ref: 6d65cb1552193b02a216136cb73d6a8b98e459ae
parent: 89ffda0ddf6c8abc044b308cf36dcec883b36977
parent: a46ca6ec00aa0a8bdb0e0fff4ddd2db4257b3cbf
author: James Zern <[email protected]>
date: Tue Sep 9 12:48:43 EDT 2014
Merge changes I660c1b7f,Id3cdf6b6 * changes: vp9_loop_filter_frame_mt: defer allocations vp9_loop_filter_alloc: reorder parameters
--- a/vp9/decoder/vp9_dthread.c
+++ b/vp9/decoder/vp9_dthread.c
@@ -145,15 +145,13 @@
const int num_workers = MIN(pbi->max_threads & ~1, tile_cols);
int i;
- // Allocate memory used in thread synchronization.
- // This always needs to be done even if frame_filter_level is 0.
+ if (!frame_filter_level) return;
+
if (!lf_sync->sync_range || cm->last_height != cm->height) {
vp9_loop_filter_dealloc(lf_sync);
- vp9_loop_filter_alloc(cm, lf_sync, sb_rows, cm->width);
+ vp9_loop_filter_alloc(lf_sync, cm, sb_rows, cm->width);
}
- if (!frame_filter_level) return;
-
vp9_loop_filter_frame_init(cm, frame_filter_level);
// Initialize cur_sb_col to -1 for all SB rows.
@@ -216,7 +214,7 @@
}
// Allocate memory for lf row synchronization
-void vp9_loop_filter_alloc(VP9_COMMON *cm, VP9LfSync *lf_sync, int rows,
+void vp9_loop_filter_alloc(VP9LfSync *lf_sync, VP9_COMMON *cm, int rows,
int width) {
lf_sync->rows = rows;
#if CONFIG_MULTITHREAD
--- a/vp9/decoder/vp9_dthread.h
+++ b/vp9/decoder/vp9_dthread.h
@@ -42,8 +42,8 @@
} VP9LfSync;
// Allocate memory for loopfilter row synchronization.
-void vp9_loop_filter_alloc(struct VP9Common *cm, VP9LfSync *lf_sync,
- int rows, int width);
+void vp9_loop_filter_alloc(VP9LfSync *lf_sync, VP9_COMMON *cm, int rows,
+ int width);
// Deallocate loopfilter synchronization related mutex and data.
void vp9_loop_filter_dealloc(VP9LfSync *lf_sync);