summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_denoiser.h
diff options
context:
space:
mode:
authorMarco <marpan@chromium.org>2015-10-16 16:14:22 -0700
committerMarco <marpan@chromium.org>2015-10-23 11:03:30 -0700
commitd162934bdca89b156194732226746993356344ef (patch)
treeb34ac0efdf5964bf8e939778fbdcd0608bdf3825 /vp9/encoder/vp9_denoiser.h
parentf4af1a9af48c972da1d5d8f04b84fed1017a25b5 (diff)
downloadlibvpx-d162934bdca89b156194732226746993356344ef.tar
libvpx-d162934bdca89b156194732226746993356344ef.tar.gz
libvpx-d162934bdca89b156194732226746993356344ef.tar.bz2
libvpx-d162934bdca89b156194732226746993356344ef.zip
VP9: Estimate noise level for denoiser.
Periodically estiamte noise level in source, and only denoise if estimated noise level is above threshold. Change-Id: I54f967b3003b0c14d0b1d3dc83cb82ce8cc2d381
Diffstat (limited to 'vp9/encoder/vp9_denoiser.h')
-rw-r--r--vp9/encoder/vp9_denoiser.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_denoiser.h b/vp9/encoder/vp9_denoiser.h
index ec0b25e01..ad1687e7d 100644
--- a/vp9/encoder/vp9_denoiser.h
+++ b/vp9/encoder/vp9_denoiser.h
@@ -29,10 +29,17 @@ typedef enum vp9_denoiser_decision {
typedef struct vp9_denoiser {
YV12_BUFFER_CONFIG running_avg_y[MAX_REF_FRAMES];
YV12_BUFFER_CONFIG mc_running_avg_y;
+ YV12_BUFFER_CONFIG last_source;
int increase_denoising;
int frame_buffer_initialized;
+ int no_denoising;
+ int noise_estimate;
+ int thresh_noise_estimate;
+ int noise_estimate_count;
} VP9_DENOISER;
+struct VP9_COMP;
+
void vp9_denoiser_update_frame_info(VP9_DENOISER *denoiser,
YV12_BUFFER_CONFIG src,
FRAME_TYPE frame_type,
@@ -69,6 +76,12 @@ static int total_adj_strong_thresh(BLOCK_SIZE bs, int increase_denoising) {
void vp9_denoiser_free(VP9_DENOISER *denoiser);
+void vp9_denoiser_init_noise_estimate(VP9_DENOISER *denoiser,
+ int width,
+ int height);
+
+void vp9_denoiser_update_noise_estimate(struct VP9_COMP *const cpi);
+
#ifdef __cplusplus
} // extern "C"
#endif