michael@0: /* michael@0: * Copyright (c) 2012 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: #ifndef VP8_ENCODER_DENOISING_H_ michael@0: #define VP8_ENCODER_DENOISING_H_ michael@0: michael@0: #include "block.h" michael@0: michael@0: #define SUM_DIFF_THRESHOLD (16 * 16 * 2) michael@0: #define MOTION_MAGNITUDE_THRESHOLD (8*3) michael@0: michael@0: enum vp8_denoiser_decision michael@0: { michael@0: COPY_BLOCK, michael@0: FILTER_BLOCK michael@0: }; michael@0: michael@0: typedef struct vp8_denoiser michael@0: { michael@0: YV12_BUFFER_CONFIG yv12_running_avg[MAX_REF_FRAMES]; michael@0: YV12_BUFFER_CONFIG yv12_mc_running_avg; michael@0: } VP8_DENOISER; michael@0: michael@0: int vp8_denoiser_allocate(VP8_DENOISER *denoiser, int width, int height); michael@0: michael@0: void vp8_denoiser_free(VP8_DENOISER *denoiser); michael@0: michael@0: void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser, michael@0: MACROBLOCK *x, michael@0: unsigned int best_sse, michael@0: unsigned int zero_mv_sse, michael@0: int recon_yoffset, michael@0: int recon_uvoffset); michael@0: michael@0: #endif /* VP8_ENCODER_DENOISING_H_ */