expose vp8_deblock
[libvpx.git] / vp8 / common / postproc.h
blobcd99056b0b7f1ffab10f96cbe93517fcc882270e
1 /*
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.
8 */
11 #ifndef POSTPROC_H
12 #define POSTPROC_H
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"
28 #endif
30 #ifndef vp8_postproc_down
31 #define vp8_postproc_down vp8_mbpost_proc_down_c
32 #endif
33 extern prototype_postproc_inplace(vp8_postproc_down);
35 #ifndef vp8_postproc_across
36 #define vp8_postproc_across vp8_mbpost_proc_across_ip_c
37 #endif
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
42 #endif
43 extern prototype_postproc(vp8_postproc_downacross);
45 #ifndef vp8_postproc_addnoise
46 #define vp8_postproc_addnoise vp8_plane_add_noise_c
47 #endif
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));
54 typedef struct
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
64 #else
65 #define POSTPROC_INVOKE(ctx,fn) vp8_postproc_##fn
66 #endif
68 #include "vpx_ports/mem.h"
69 struct postproc_state
71 int last_q;
72 int last_noise;
73 char noise[3072];
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"
79 #include "ppflags.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,
86 int q,
87 int low_var_thresh,
88 int flag,
89 vp8_postproc_rtcd_vtable_t *rtcd);
91 void vp8_deblock(YV12_BUFFER_CONFIG *source,
92 YV12_BUFFER_CONFIG *post,
93 int q,
94 int low_var_thresh,
95 int flag,
96 vp8_postproc_rtcd_vtable_t *rtcd);
97 #endif