diff options
Diffstat (limited to 'vp8/encoder')
-rw-r--r-- | vp8/encoder/onyx_if.c | 2 | ||||
-rw-r--r-- | vp8/encoder/temporal_filter.c | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 2ec087ee6..7b1bd32de 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -2170,7 +2170,7 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf) //when needed. This will avoid unnecessary calls of vp8cx_init_quantizer() for every frame. vp8cx_init_quantizer(cpi); { - vp8_init_loop_filter(cm); + vp8_loop_filter_init(cm); cm->last_frame_type = KEY_FRAME; cm->last_filter_type = cm->filter_type; cm->last_sharpness_level = cm->sharpness_level; diff --git a/vp8/encoder/temporal_filter.c b/vp8/encoder/temporal_filter.c index 1c2656e0a..19913a9b1 100644 --- a/vp8/encoder/temporal_filter.c +++ b/vp8/encoder/temporal_filter.c @@ -262,10 +262,19 @@ static void vp8_temporal_filter_iterate_c for (mb_row = 0; mb_row < mb_rows; mb_row++) { #if ALT_REF_MC_ENABLED - // Reduced search extent by 3 for 6-tap filter & smaller UMV border - cpi->mb.mv_row_min = -((mb_row * 16) + (VP8BORDERINPIXELS - 19)); + // Source frames are extended to 16 pixels. This is different than + // L/A/G reference frames that have a border of 32 (VP8BORDERINPIXELS) + // A 6 tap filter is used for motion search. This requires 2 pixels + // before and 3 pixels after. So the largest Y mv on a border would + // then be 16 - 3. The UV blocks are half the size of the Y and + // therefore only extended by 8. The largest mv that a UV block + // can support is 8 - 3. A UV mv is half of a Y mv. + // (16 - 3) >> 1 == 6 which is greater than 8 - 3. + // To keep the mv in play for both Y and UV planes the max that it + // can be on a border is therefore 16 - 5. + cpi->mb.mv_row_min = -((mb_row * 16) + (16 - 5)); cpi->mb.mv_row_max = ((cpi->common.mb_rows - 1 - mb_row) * 16) - + (VP8BORDERINPIXELS - 19); + + (16 - 5); #endif for (mb_col = 0; mb_col < mb_cols; mb_col++) @@ -277,10 +286,9 @@ static void vp8_temporal_filter_iterate_c vpx_memset(count, 0, 384*sizeof(unsigned short)); #if ALT_REF_MC_ENABLED - // Reduced search extent by 3 for 6-tap filter & smaller UMV border - cpi->mb.mv_col_min = -((mb_col * 16) + (VP8BORDERINPIXELS - 19)); + cpi->mb.mv_col_min = -((mb_col * 16) + (16 - 5)); cpi->mb.mv_col_max = ((cpi->common.mb_cols - 1 - mb_col) * 16) - + (VP8BORDERINPIXELS - 19); + + (16 - 5); #endif for (frame = 0; frame < frame_count; frame++) |