Merge "Delay auto key frame insertion in realtime configuration"
[profile/ivi/libvpx.git] / vp8 / encoder / onyx_if.c
index d967031..df1a6f5 100644 (file)
@@ -1465,6 +1465,17 @@ void vp8_alloc_compressor_data(VP8_COMP *cpi)
         vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
                            "Failed to allocate firstpass stats");
 #endif
+
+#if CONFIG_MULTITHREAD
+    if (width < 640)
+        cpi->mt_sync_range = 1;
+    else if (width <= 1280)
+        cpi->mt_sync_range = 4;
+    else if (width <= 2560)
+        cpi->mt_sync_range = 8;
+    else
+        cpi->mt_sync_range = 16;
+#endif
 }
 
 
@@ -4433,7 +4444,7 @@ static void encode_frame_to_data_rate
     }
 
     // Update the GF useage maps.
-    // Update the GF useage maps.
+    // This is done after completing the compression of a frame when all modes etc. are finalized but before loop filter
     // This is done after completing the compression of a frame when all modes etc. are finalized but before loop filter
     vp8_update_gf_useage_maps(cpi, cm, &cpi->mb);