shithub: libvpx

Download patch

ref: 1ae97b4a4db010ee87bedca5943c64f55d43f6f7
parent: 4a20caef7851a07f2a3864faaaa522c1a9282e9e
author: Jerome Jiang <jianj@google.com>
date: Tue Mar 20 11:39:02 EDT 2018

vp9 svc frame drop: enable adaptive rd for row mt.

adaptive_rd_threshold_mt is set to 1 when speed >= 7 for SVC.
QVGA in SVC uses speed 5 which set adaptive_rd_threshold_mt to 0.
If VGA or HD is dropped for the last super frame, the flag is still 0
when the encoder is destroyed. Thus memory won't be released.

Change the bitrate threshold in datarate test.

Change-Id: I55352cc0b030568d38eb735d99c2fa29058d3690

--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -2230,7 +2230,7 @@
                           layer_target_avg_bandwidth_, bits_in_buffer_model_);
     ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
     CheckLayerRateTargeting(&cfg_, number_spatial_layers_,
-                            number_temporal_layers_, file_datarate_, 0.75, 1.2);
+                            number_temporal_layers_, file_datarate_, 0.73, 1.2);
 #if CONFIG_VP9_DECODER
     // The non-reference frames are expected to be mismatched frames as the
     // encoder will avoid loopfilter on these frames.
--- a/vp9/encoder/vp9_multi_thread.c
+++ b/vp9/encoder/vp9_multi_thread.c
@@ -146,11 +146,9 @@
       TileDataEnc *this_tile =
           &cpi->tile_data[tile_row * multi_thread_ctxt->allocated_tile_cols +
                           tile_col];
-      if (cpi->sf.adaptive_rd_thresh_row_mt) {
-        if (this_tile->row_base_thresh_freq_fact != NULL) {
-          vpx_free(this_tile->row_base_thresh_freq_fact);
-          this_tile->row_base_thresh_freq_fact = NULL;
-        }
+      if (this_tile->row_base_thresh_freq_fact != NULL) {
+        vpx_free(this_tile->row_base_thresh_freq_fact);
+        this_tile->row_base_thresh_freq_fact = NULL;
       }
     }
   }
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -667,11 +667,6 @@
           (uint8_t *)vpx_calloc((cm->mi_stride >> 3) * ((cm->mi_rows >> 3) + 1),
                                 sizeof(*cpi->count_lastgolden_frame_usage));
   }
-  // Disable adaptive_rd_thresh for row_mt for SVC with frame dropping.
-  // This is causing some tests to fail.
-  // TODO(marpan/jianj): Look into this failure and re-enable later.
-  if (cpi->use_svc && cpi->oxcf.drop_frames_water_mark)
-    sf->adaptive_rd_thresh_row_mt = 0;
 }
 
 void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) {