]> granicus.if.org Git - libvpx/commitdiff
Add no_skip_block4x4_search flag in SPLITMV mode
authorYunqing Wang <yunqingwang@google.com>
Mon, 10 Jan 2011 22:21:55 +0000 (17:21 -0500)
committerYunqing Wang <yunqingwang@google.com>
Tue, 11 Jan 2011 14:50:13 +0000 (09:50 -0500)
Add a flag to always enable block4x4 search for speed=0 (good
quality) to guarantee no quality loss for speed0.

Change-Id: Ie04bbc25f7e6a33a7bfa30e05775d33148731c81

vp8/encoder/onyx_if.c
vp8/encoder/onyx_int.h
vp8/encoder/rdopt.c

index 2d9e8011b0c0657d84d3ca38ed2479a8914918e0..9fdf618640bcd2ba7996917536ecb42d7e6ea99f 100644 (file)
@@ -592,6 +592,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
     sf->iterative_sub_pixel = 1;
     sf->optimize_coefficients = 1;
     sf->use_fastquant_for_pick = 0;
+    sf->no_skip_block4x4_search = 1;
 
     sf->first_step = 0;
     sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
@@ -794,6 +795,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
 
             sf->first_step = 1;
             sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
+            sf->no_skip_block4x4_search = 0;
         }
 
         if (Speed > 1)
index 05e8c4e6aa0c2a5766d9923bfbd5f10e7ce02945..6bffd982f04643cf8452d62565dfddebcdc76f81 100644 (file)
@@ -183,6 +183,7 @@ typedef struct
     int optimize_coefficients;
 
     int use_fastquant_for_pick;
+    int no_skip_block4x4_search;
 
 } SPEED_FEATURES;
 
index 366b8759a5ab16691dcf7b4f0981c6fd614a0411..e751b096149f9737db304c727ab6cbc5ea9cbe3b 100644 (file)
@@ -1375,7 +1375,8 @@ static int vp8_rd_pick_best_mbsegmentation(VP8_COMP *cpi, MACROBLOCK *x,
             }
 
             /* If 8x8 is better than 16x8/8x16, then do 4x4 search */
-            if (bsi.segment_num == BLOCK_8X8)  /* || (sv_segment_rd8x8-bsi.segment_rd) < sv_segment_rd8x8>>5) */
+            /* Not skip 4x4 if speed=0 (good quality) */
+            if (cpi->sf.no_skip_block4x4_search || bsi.segment_num == BLOCK_8X8)  /* || (sv_segment_rd8x8-bsi.segment_rd) < sv_segment_rd8x8>>5) */
             {
                 bsi.mvp = &bsi.sv_mvp[0];
                 vp8_rd_check_segment(cpi, x, &bsi, BLOCK_4X4);