Merge "vp8: Suppress denoising with respect to old reference frames."

This commit is contained in:
Marco 2014-10-09 08:41:49 -07:00 коммит произвёл Gerrit Code Review
Родитель 3af39b9997 3b789d3693
Коммит a007ec0f7f
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -27,6 +27,8 @@ extern "C" {
#define SUM_DIFF_FROM_AVG_THRESH_UV (8 * 8 * 8)
#define MOTION_MAGNITUDE_THRESHOLD_UV (8*3)
#define MAX_GF_ARF_DENOISE_RANGE (16)
enum vp8_denoiser_decision
{
COPY_BLOCK,

Просмотреть файл

@ -1083,7 +1083,14 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
{
/* Store for later use by denoiser. */
if (this_mode == ZEROMV && sse < zero_mv_sse )
// Dont' denoise with GOLDEN OR ALTREF is they are old reference
// frames (greater than MAX_GF_ARF_DENOISE_RANGE frames in past).
int skip_old_reference = ((this_ref_frame != LAST_FRAME) &&
(cpi->common.current_video_frame -
cpi->current_ref_frames[this_ref_frame] >
MAX_GF_ARF_DENOISE_RANGE)) ? 1 : 0;
if (this_mode == ZEROMV && sse < zero_mv_sse &&
!skip_old_reference)
{
zero_mv_sse = sse;
x->best_zeromv_reference_frame =
@ -1092,7 +1099,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
/* Store the best NEWMV in x for later use in the denoiser. */
if (x->e_mbd.mode_info_context->mbmi.mode == NEWMV &&
sse < best_sse)
sse < best_sse && !skip_old_reference)
{
best_sse = sse;
x->best_sse_inter_mode = NEWMV;