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,
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
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);
}
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;