1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
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.
9  */
10 
11 
12 #ifndef VP9_COMMON_VP9_POSTPROC_H_
13 #define VP9_COMMON_VP9_POSTPROC_H_
14 
15 #include "vpx_ports/mem.h"
16 #include "vpx_scale/yv12config.h"
17 #include "vp9/common/vp9_blockd.h"
18 #include "vp9/common/vp9_mfqe.h"
19 #include "vp9/common/vp9_ppflags.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 struct postproc_state {
26   int last_q;
27   int last_noise;
28   char noise[3072];
29   int last_base_qindex;
30   int last_frame_valid;
31   MODE_INFO *prev_mip;
32   MODE_INFO *prev_mi;
33   DECLARE_ALIGNED(16, char, blackclamp[16]);
34   DECLARE_ALIGNED(16, char, whiteclamp[16]);
35   DECLARE_ALIGNED(16, char, bothclamp[16]);
36 };
37 
38 struct VP9Common;
39 
40 #define MFQE_PRECISION 4
41 
42 int vp9_post_proc_frame(struct VP9Common *cm,
43                         YV12_BUFFER_CONFIG *dest, vp9_ppflags_t *flags);
44 
45 void vp9_denoise(const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, int q);
46 
47 void vp9_deblock(const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, int q);
48 
49 #ifdef __cplusplus
50 }  // extern "C"
51 #endif
52 
53 #endif  // VP9_COMMON_VP9_POSTPROC_H_
54