1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/encoder/denoising.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +/* 1.5 + * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 +#ifndef VP8_ENCODER_DENOISING_H_ 1.15 +#define VP8_ENCODER_DENOISING_H_ 1.16 + 1.17 +#include "block.h" 1.18 + 1.19 +#define SUM_DIFF_THRESHOLD (16 * 16 * 2) 1.20 +#define MOTION_MAGNITUDE_THRESHOLD (8*3) 1.21 + 1.22 +enum vp8_denoiser_decision 1.23 +{ 1.24 + COPY_BLOCK, 1.25 + FILTER_BLOCK 1.26 +}; 1.27 + 1.28 +typedef struct vp8_denoiser 1.29 +{ 1.30 + YV12_BUFFER_CONFIG yv12_running_avg[MAX_REF_FRAMES]; 1.31 + YV12_BUFFER_CONFIG yv12_mc_running_avg; 1.32 +} VP8_DENOISER; 1.33 + 1.34 +int vp8_denoiser_allocate(VP8_DENOISER *denoiser, int width, int height); 1.35 + 1.36 +void vp8_denoiser_free(VP8_DENOISER *denoiser); 1.37 + 1.38 +void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser, 1.39 + MACROBLOCK *x, 1.40 + unsigned int best_sse, 1.41 + unsigned int zero_mv_sse, 1.42 + int recon_yoffset, 1.43 + int recon_uvoffset); 1.44 + 1.45 +#endif /* VP8_ENCODER_DENOISING_H_ */