shithub: libvpx

Download patch

ref: 4410d729d114b37a09ef342c6de0ca97285f67f3
parent: 11b55a061476a59e0768b188a7a3053c7d8cd7aa
author: Jerome Jiang <[email protected]>
date: Fri Feb 9 09:47:00 EST 2018

VP9 ROI: Fix errors in example encoder.

Fix some errors in the vpx_temporal_svc_encoder.

Change-Id: Id93f449364dcf72c826ca931df3c8c3d3b80100f

--- a/examples/vpx_temporal_svc_encoder.c
+++ b/examples/vpx_temporal_svc_encoder.c
@@ -179,7 +179,7 @@
   }
   zero(*roi);
 
-  block_size = is_vp9 && !is_vp8 ? 16 : 8;
+  block_size = is_vp9 && !is_vp8 ? 8 : 16;
 
   // ROI is based on the segments (4 for vp8, 8 for vp9), smallest unit for
   // segment is 16x16 for vp8, 8x8 for vp9.
@@ -190,7 +190,7 @@
   // Setting to negative means lower QP (better quality).
   // Below we set delta_q to the extreme (-63) to show strong effect.
   // VP8 uses the first 4 segments. VP9 uses all 8 segments.
-  zero(roi->delta_qp);
+  zero(roi->delta_q);
   roi->delta_q[1] = -63;
 
   // Applies delta loopfilter strength on the segment blocks, varies from -63 to
@@ -792,7 +792,7 @@
     vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
     vpx_codec_control(&codec, VP8E_SET_GF_CBR_BOOST_PCT, 0);
 #if ROI_MAP
-    set_roi_map(&cfg, &roi, encoder);
+    set_roi_map(encoder->name, &cfg, &roi);
     if (vpx_codec_control(&codec, VP8E_SET_ROI_MAP, &roi))
       die_codec(&codec, "Failed to set ROI map");
 #endif
@@ -810,7 +810,7 @@
     vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
     vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
 #if ROI_MAP
-    set_roi_map(&cfg, &roi, encoder);
+    set_roi_map(encoder->name, &cfg, &roi);
     if (vpx_codec_control(&codec, VP9E_SET_ROI_MAP, &roi))
       die_codec(&codec, "Failed to set ROI map");
     vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 0);