Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_denoiser.h

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_block.h ('k') | source/libvpx/vp9/encoder/vp9_denoiser.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef VP9_ENCODER_DENOISER_H_ 11 #ifndef VP9_ENCODER_DENOISER_H_
12 #define VP9_ENCODER_DENOISER_H_ 12 #define VP9_ENCODER_DENOISER_H_
13 13
14 #include "vp9/encoder/vp9_block.h" 14 #include "vp9/encoder/vp9_block.h"
15 #include "vpx_scale/yv12config.h" 15 #include "vpx_scale/yv12config.h"
16 16
17 #ifdef __cplusplus 17 #ifdef __cplusplus
18 extern "C" { 18 extern "C" {
19 #endif 19 #endif
20 20
21 enum vp9_denoiser_decision { 21 typedef enum vp9_denoiser_decision {
22 COPY_BLOCK, 22 COPY_BLOCK,
23 FILTER_BLOCK 23 FILTER_BLOCK
24 }; 24 } VP9_DENOISER_DECISION;
25 25
26 typedef struct vp9_denoiser { 26 typedef struct vp9_denoiser {
27 YV12_BUFFER_CONFIG running_avg_y[MAX_REF_FRAMES]; 27 YV12_BUFFER_CONFIG running_avg_y[MAX_REF_FRAMES];
28 YV12_BUFFER_CONFIG mc_running_avg_y; 28 YV12_BUFFER_CONFIG mc_running_avg_y;
29
30 unsigned int zero_mv_sse;
31 unsigned int best_sse;
32 int increase_denoising;
33 PREDICTION_MODE best_sse_inter_mode;
34 int_mv best_sse_mv;
35 MV_REFERENCE_FRAME best_reference_frame;
36 MV_REFERENCE_FRAME best_zeromv_reference_frame;
29 } VP9_DENOISER; 37 } VP9_DENOISER;
30 38
31 void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser, 39 void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
32 YV12_BUFFER_CONFIG src, 40 YV12_BUFFER_CONFIG src,
33 FRAME_TYPE frame_type, 41 FRAME_TYPE frame_type,
34 int refresh_alt_ref_frame, 42 int refresh_alt_ref_frame,
35 int refresh_golden_frame, 43 int refresh_golden_frame,
36 int refresh_last_frame); 44 int refresh_last_frame);
37 45
38 void vp9_denoiser_denoise(VP9_DENOISER *denoiser, MACROBLOCK *mb, 46 void vp9_denoiser_denoise(VP9_DENOISER *denoiser, MACROBLOCK *mb,
39 int mi_row, int mi_col, BLOCK_SIZE bs); 47 int mi_row, int mi_col, BLOCK_SIZE bs);
40 48
41 void vp9_denoiser_update_frame_stats(); 49 void vp9_denoiser_reset_frame_stats(VP9_DENOISER *denoiser);
50
51 void vp9_denoiser_update_frame_stats(VP9_DENOISER *denoiser, MB_MODE_INFO *mbmi,
52 unsigned int sse, PREDICTION_MODE mode);
42 53
43 int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height, 54 int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height,
44 int ssx, int ssy, int border); 55 int ssx, int ssy, int border);
45 56
46 void vp9_denoiser_free(VP9_DENOISER *denoiser); 57 void vp9_denoiser_free(VP9_DENOISER *denoiser);
47 58
48 #ifdef __cplusplus 59 #ifdef __cplusplus
49 } // extern "C" 60 } // extern "C"
50 #endif 61 #endif
51 62
52 #endif // VP9_ENCODER_DENOISER_H_ 63 #endif // VP9_ENCODER_DENOISER_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_block.h ('k') | source/libvpx/vp9/encoder/vp9_denoiser.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698