]> granicus.if.org Git - libvpx/blobdiff - vp10/encoder/ethread.c
vp10 cleanup: remove svc code
[libvpx] / vp10 / encoder / ethread.c
index ba56d18e5dc036d87f853fac8e26bd688cad0cba..671020a7f398df55da156d9a883fc662608f6e63 100644 (file)
@@ -32,7 +32,7 @@ static void accumulate_rd_opt(ThreadData *td, ThreadData *td_t) {
 }
 
 static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) {
-  VP9_COMP *const cpi = thread_data->cpi;
+  VP10_COMP *const cpi = thread_data->cpi;
   const VP10_COMMON *const cm = &cpi->common;
   const int tile_cols = 1 << cm->log2_tile_cols;
   const int tile_rows = 1 << cm->log2_tile_rows;
@@ -51,7 +51,7 @@ static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) {
   return 0;
 }
 
-static int get_max_tile_cols(VP9_COMP *cpi) {
+static int get_max_tile_cols(VP10_COMP *cpi) {
   const int aligned_width = ALIGN_POWER_OF_TWO(cpi->oxcf.width, MI_SIZE_LOG2);
   int mi_cols = aligned_width >> MI_SIZE_LOG2;
   int min_log2_tile_cols, max_log2_tile_cols;
@@ -63,11 +63,11 @@ static int get_max_tile_cols(VP9_COMP *cpi) {
   return (1 << log2_tile_cols);
 }
 
-void vp10_encode_tiles_mt(VP9_COMP *cpi) {
+void vp10_encode_tiles_mt(VP10_COMP *cpi) {
   VP10_COMMON *const cm = &cpi->common;
   const int tile_cols = 1 << cm->log2_tile_cols;
   const VPxWorkerInterface *const winterface = vpx_get_worker_interface();
-  const int num_workers = MIN(cpi->oxcf.max_threads, tile_cols);
+  const int num_workers = VPXMIN(cpi->oxcf.max_threads, tile_cols);
   int i;
 
   vp10_init_tile_data(cpi);
@@ -76,13 +76,6 @@ void vp10_encode_tiles_mt(VP9_COMP *cpi) {
   if (cpi->num_workers == 0) {
     int allocated_workers = num_workers;
 
-    // While using SVC, we need to allocate threads according to the highest
-    // resolution.
-    if (cpi->use_svc) {
-      int max_tile_cols = get_max_tile_cols(cpi);
-      allocated_workers = MIN(cpi->oxcf.max_threads, max_tile_cols);
-    }
-
     CHECK_MEM_ERROR(cm, cpi->workers,
                     vpx_malloc(allocated_workers * sizeof(*cpi->workers)));
 
@@ -146,23 +139,6 @@ void vp10_encode_tiles_mt(VP9_COMP *cpi) {
       memcpy(thread_data->td->counts, &cpi->common.counts,
              sizeof(cpi->common.counts));
     }
-
-    // Handle use_nonrd_pick_mode case.
-    if (cpi->sf.use_nonrd_pick_mode) {
-      MACROBLOCK *const x = &thread_data->td->mb;
-      MACROBLOCKD *const xd = &x->e_mbd;
-      struct macroblock_plane *const p = x->plane;
-      struct macroblockd_plane *const pd = xd->plane;
-      PICK_MODE_CONTEXT *ctx = &thread_data->td->pc_root->none;
-      int j;
-
-      for (j = 0; j < MAX_MB_PLANE; ++j) {
-        p[j].coeff = ctx->coeff_pbuf[j][0];
-        p[j].qcoeff = ctx->qcoeff_pbuf[j][0];
-        pd[j].dqcoeff = ctx->dqcoeff_pbuf[j][0];
-        p[j].eobs = ctx->eobs_pbuf[j][0];
-      }
-    }
   }
 
   // Encode a frame