Commit 01483677 authored by James Zern's avatar James Zern
Browse files

add vp9_loop_filter_data_reset

Change-Id: I8a9c9019242ec10fa499a78db322221bf96a0275
parent e9b8810b
......@@ -1625,6 +1625,17 @@ void vp9_loop_filter_frame(YV12_BUFFER_CONFIG *frame,
y_only);
}
void vp9_loop_filter_data_reset(
LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer,
struct VP9Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]) {
lf_data->frame_buffer = frame_buffer;
lf_data->cm = cm;
lf_data->start = 0;
lf_data->stop = 0;
lf_data->y_only = 0;
vpx_memcpy(lf_data->planes, planes, sizeof(lf_data->planes));
}
int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused) {
(void)unused;
vp9_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes,
......
......@@ -126,6 +126,10 @@ typedef struct LoopFilterWorkerData {
int y_only;
} LFWorkerData;
void vp9_loop_filter_data_reset(
LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer,
struct VP9Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]);
// Operates on the rows described by 'lf_data'.
int vp9_loop_filter_worker(LFWorkerData *const lf_data, void *unused);
#ifdef __cplusplus
......
......@@ -902,11 +902,8 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1;
// Be sure to sync as we might be resuming after a failed frame decode.
winterface->sync(&pbi->lf_worker);
lf_data->frame_buffer = get_frame_new_buffer(cm);
lf_data->cm = cm;
vp9_copy(lf_data->planes, pbi->mb.plane);
lf_data->stop = 0;
lf_data->y_only = 0;
vp9_loop_filter_data_reset(lf_data, get_frame_new_buffer(cm), cm,
pbi->mb.plane);
vp9_loop_filter_frame_init(cm, cm->lf.filter_level);
}
......
......@@ -174,9 +174,7 @@ void vp9_loop_filter_frame_mt(VP9LfSync *lf_sync,
worker->data2 = lf_data;
// Loopfilter data
lf_data->frame_buffer = frame;
lf_data->cm = cm;
vpx_memcpy(lf_data->planes, planes, sizeof(lf_data->planes));
vp9_loop_filter_data_reset(lf_data, frame, cm, planes);
lf_data->start = i;
lf_data->stop = sb_rows;
lf_data->y_only = y_only;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment