2 * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license and patent
5 * grant that can be found in the LICENSE file in the root of the source
6 * tree. All contributing project authors may be found in the AUTHORS
7 * file in the root of the source tree.
14 #define prototype_postproc_inplace(sym)\
15 void sym (unsigned char *dst, int pitch, int rows, int cols,int flimit)
17 #define prototype_postproc(sym)\
18 void sym (unsigned char *src, unsigned char *dst, int src_pitch,\
19 int dst_pitch, int rows, int cols, int flimit)
21 #define prototype_postproc_addnoise(sym) \
22 void sym (unsigned char *s, char *noise, char blackclamp[16],\
23 char whiteclamp[16], char bothclamp[16],\
24 unsigned int w, unsigned int h, int pitch)
26 #if ARCH_X86 || ARCH_X86_64
27 #include "x86/postproc_x86.h"
30 #ifndef vp8_postproc_down
31 #define vp8_postproc_down vp8_mbpost_proc_down_c
33 extern prototype_postproc_inplace(vp8_postproc_down
);
35 #ifndef vp8_postproc_across
36 #define vp8_postproc_across vp8_mbpost_proc_across_ip_c
38 extern prototype_postproc_inplace(vp8_postproc_across
);
40 #ifndef vp8_postproc_downacross
41 #define vp8_postproc_downacross vp8_post_proc_down_and_across_c
43 extern prototype_postproc(vp8_postproc_downacross
);
45 #ifndef vp8_postproc_addnoise
46 #define vp8_postproc_addnoise vp8_plane_add_noise_c
48 extern prototype_postproc_addnoise(vp8_postproc_addnoise
);
51 typedef prototype_postproc((*vp8_postproc_fn_t
));
52 typedef prototype_postproc_inplace((*vp8_postproc_inplace_fn_t
));
53 typedef prototype_postproc_addnoise((*vp8_postproc_addnoise_fn_t
));
56 vp8_postproc_inplace_fn_t down
;
57 vp8_postproc_inplace_fn_t across
;
58 vp8_postproc_fn_t downacross
;
59 vp8_postproc_addnoise_fn_t addnoise
;
60 } vp8_postproc_rtcd_vtable_t
;
62 #if CONFIG_RUNTIME_CPU_DETECT
63 #define POSTPROC_INVOKE(ctx,fn) (ctx)->fn
65 #define POSTPROC_INVOKE(ctx,fn) vp8_postproc_##fn
68 #include "vpx_ports/mem.h"
74 DECLARE_ALIGNED(16, char, blackclamp
[16]);
75 DECLARE_ALIGNED(16, char, whiteclamp
[16]);
76 DECLARE_ALIGNED(16, char, bothclamp
[16]);
78 #include "onyxc_int.h"
80 int vp8_post_proc_frame(struct VP8Common
*oci
, YV12_BUFFER_CONFIG
*dest
,
81 int deblock_level
, int noise_level
, int flags
);
84 void vp8_de_noise(YV12_BUFFER_CONFIG
*source
,
85 YV12_BUFFER_CONFIG
*post
,
89 vp8_postproc_rtcd_vtable_t
*rtcd
);
91 void vp8_deblock(YV12_BUFFER_CONFIG
*source
,
92 YV12_BUFFER_CONFIG
*post
,
96 vp8_postproc_rtcd_vtable_t
*rtcd
);