]> granicus.if.org Git - libvpx/commitdiff
Merge "Add early termination in transform size search"
authorYunqing Wang <yunqingwang@google.com>
Tue, 19 Aug 2014 02:00:24 +0000 (19:00 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Tue, 19 Aug 2014 02:00:24 +0000 (19:00 -0700)
1  2 
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h

Simple merge
index a2f4583a50340bd2e201858d5689ae9f9883c30e,35365079ffe27bac6686c16502b0dffd6cd69ff1..d04f5876d5164fbeb4a5fc53dff5ccf7223fca4c
@@@ -391,23 -390,26 +394,24 @@@ void vp9_set_speed_features(VP9_COMP *c
    // Recode loop tolerence %.
    sf->recode_tolerance = 25;
    sf->default_interp_filter = SWITCHABLE;
+   sf->tx_size_search_breakout = 0;
  
 -  switch (oxcf->mode) {
 -    case ONE_PASS_BEST:
 -    case TWO_PASS_SECOND_BEST:  // This is the best quality mode.
 -      cpi->diamond_search_sad = vp9_full_range_search;
 -      break;
 -    case TWO_PASS_FIRST:
 -    case ONE_PASS_GOOD:
 -    case TWO_PASS_SECOND_GOOD:
 +  if (oxcf->mode == REALTIME) {
 +    set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content);
 +  } else {
 +    if (!is_best_mode(oxcf->mode))
        set_good_speed_feature(cpi, cm, sf, oxcf->speed);
 -      break;
 -    case REALTIME:
 -      set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content);
 -      break;
    }
  
 +  cpi->full_search_sad = vp9_full_search_sad;
 +  cpi->diamond_search_sad = is_best_mode(oxcf->mode) ? vp9_full_range_search
 +                                                     : vp9_diamond_search_sad;
 +  cpi->refining_search_sad = vp9_refining_search_sad;
 +
 +
    // Slow quant, dct and trellis not worthwhile for first pass
    // so make sure they are always turned off.
 -  if (cpi->pass == 1)
 +  if (oxcf->pass == 1)
      sf->optimize_coefficients = 0;
  
    // No recode for 1 pass.
Simple merge