From d162934bdca89b156194732226746993356344ef Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 16 Oct 2015 16:14:22 -0700 Subject: 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 --- vp9/encoder/vp9_denoiser.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'vp9/encoder/vp9_denoiser.h') 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 -- cgit v1.2.3