vp9_loop_filter_frame_mt: pass planes directly
authorJames Zern <jzern@google.com>
Sun, 31 Aug 2014 19:36:34 +0000 (12:36 -0700)
committerJames Zern <jzern@google.com>
Thu, 16 Oct 2014 16:54:10 +0000 (18:54 +0200)
one less dependency on pbi

Change-Id: I3f3a392416d3523f4aea6682c3965885baf85197

vp9/decoder/vp9_decodeframe.c
vp9/decoder/vp9_dthread.c
vp9/decoder/vp9_dthread.h

index 1b22572..b1ae58f 100644 (file)
@@ -1563,8 +1563,8 @@ void vp9_decode_frame(VP9Decoder *pbi,
     if (!xd->corrupted) {
       // If multiple threads are used to decode tiles, then we use those threads
       // to do parallel loopfiltering.
-      vp9_loop_filter_frame_mt(&pbi->lf_row_sync, new_fb, pbi, cm,
-                               cm->lf.filter_level, 0);
+      vp9_loop_filter_frame_mt(&pbi->lf_row_sync, new_fb, pbi->mb.plane, pbi,
+                               cm, cm->lf.filter_level, 0);
     }
   } else {
     *p_data_end = decode_tiles(pbi, data + first_partition_size, data_end);
index 982d58a..82be1f6 100644 (file)
@@ -135,6 +135,7 @@ static int loop_filter_row_worker(TileWorkerData *const tile_data,
 // threads.
 void vp9_loop_filter_frame_mt(VP9LfSync *lf_sync,
                               YV12_BUFFER_CONFIG *frame,
+                              struct macroblockd_plane planes[MAX_MB_PLANE],
                               VP9Decoder *pbi, VP9_COMMON *cm,
                               int frame_filter_level,
                               int y_only) {
@@ -177,7 +178,7 @@ void vp9_loop_filter_frame_mt(VP9LfSync *lf_sync,
     // Loopfilter data
     lf_data->frame_buffer = frame;
     lf_data->cm = cm;
-    vp9_copy(lf_data->planes, pbi->mb.plane);
+    vpx_memcpy(lf_data->planes, planes, sizeof(lf_data->planes));
     lf_data->start = i;
     lf_data->stop = sb_rows;
     lf_data->y_only = y_only;   // always do all planes in decoder
index bd72234..0bfee15 100644 (file)
@@ -51,6 +51,7 @@ void vp9_loop_filter_dealloc(VP9LfSync *lf_sync);
 // Multi-threaded loopfilter that uses the tile threads.
 void vp9_loop_filter_frame_mt(VP9LfSync *lf_sync,
                               YV12_BUFFER_CONFIG *frame,
+                              struct macroblockd_plane planes[MAX_MB_PLANE],
                               struct VP9Decoder *pbi,
                               struct VP9Common *cm,
                               int frame_filter_level,