2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
15 #define prototype_postproc_inplace(sym)\
16 void sym (unsigned char *dst, int pitch, int rows, int cols,int flimit)
18 #define prototype_postproc(sym)\
19 void sym (unsigned char *src, unsigned char *dst, int src_pitch,\
20 int dst_pitch, int rows, int cols, int flimit)
22 #define prototype_postproc_addnoise(sym) \
23 void sym (unsigned char *s, char *noise, char blackclamp[16],\
24 char whiteclamp[16], char bothclamp[16],\
25 unsigned int w, unsigned int h, int pitch)
27 #define prototype_postproc_blend_mb(sym)\
28 void sym (unsigned char *y, unsigned char *u, unsigned char *v,\
29 int y1, int u1, int v1, int alpha, int stride)
31 #if ARCH_X86 || ARCH_X86_64
32 #include "x86/postproc_x86.h"
35 #ifndef vp8_postproc_down
36 #define vp8_postproc_down vp8_mbpost_proc_down_c
38 extern prototype_postproc_inplace(vp8_postproc_down
);
40 #ifndef vp8_postproc_across
41 #define vp8_postproc_across vp8_mbpost_proc_across_ip_c
43 extern prototype_postproc_inplace(vp8_postproc_across
);
45 #ifndef vp8_postproc_downacross
46 #define vp8_postproc_downacross vp8_post_proc_down_and_across_c
48 extern prototype_postproc(vp8_postproc_downacross
);
50 #ifndef vp8_postproc_addnoise
51 #define vp8_postproc_addnoise vp8_plane_add_noise_c
53 extern prototype_postproc_addnoise(vp8_postproc_addnoise
);
55 #ifndef vp8_postproc_blend_mb
56 #define vp8_postproc_blend_mb vp8_blend_mb_c
58 extern prototype_postproc_blend_mb(vp8_postproc_blend_mb
);
60 typedef prototype_postproc((*vp8_postproc_fn_t
));
61 typedef prototype_postproc_inplace((*vp8_postproc_inplace_fn_t
));
62 typedef prototype_postproc_addnoise((*vp8_postproc_addnoise_fn_t
));
63 typedef prototype_postproc_blend_mb((*vp8_postproc_blend_mb_fn_t
));
66 vp8_postproc_inplace_fn_t down
;
67 vp8_postproc_inplace_fn_t across
;
68 vp8_postproc_fn_t downacross
;
69 vp8_postproc_addnoise_fn_t addnoise
;
70 vp8_postproc_blend_mb_fn_t blend_mb
;
71 } vp8_postproc_rtcd_vtable_t
;
73 #if CONFIG_RUNTIME_CPU_DETECT
74 #define POSTPROC_INVOKE(ctx,fn) (ctx)->fn
76 #define POSTPROC_INVOKE(ctx,fn) vp8_postproc_##fn
79 #include "vpx_ports/mem.h"
85 DECLARE_ALIGNED(16, char, blackclamp
[16]);
86 DECLARE_ALIGNED(16, char, whiteclamp
[16]);
87 DECLARE_ALIGNED(16, char, bothclamp
[16]);
89 #include "onyxc_int.h"
91 int vp8_post_proc_frame(struct VP8Common
*oci
, YV12_BUFFER_CONFIG
*dest
,
92 int deblock_level
, int noise_level
, int flags
);
95 void vp8_de_noise(YV12_BUFFER_CONFIG
*source
,
96 YV12_BUFFER_CONFIG
*post
,
100 vp8_postproc_rtcd_vtable_t
*rtcd
);
102 void vp8_deblock(YV12_BUFFER_CONFIG
*source
,
103 YV12_BUFFER_CONFIG
*post
,
107 vp8_postproc_rtcd_vtable_t
*rtcd
);