Commit d708e7fb authored by John Koleszar's avatar John Koleszar Committed by Gerrit Code Review
Browse files

Merge "Fix another multithreaded encoder loopfilter race condition"

parents d790bc17 ea392d47
...@@ -196,18 +196,14 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm, ...@@ -196,18 +196,14 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
} }
} }
void vp8_loop_filter_frame void vp8_loop_filter_frame(VP8_COMMON *cm,
( MACROBLOCKD *mbd,
VP8_COMMON *cm, int frame_type)
MACROBLOCKD *mbd
)
{ {
YV12_BUFFER_CONFIG *post = cm->frame_to_show; YV12_BUFFER_CONFIG *post = cm->frame_to_show;
loop_filter_info_n *lfi_n = &cm->lf_info; loop_filter_info_n *lfi_n = &cm->lf_info;
loop_filter_info lfi; loop_filter_info lfi;
FRAME_TYPE frame_type = cm->frame_type;
int mb_row; int mb_row;
int mb_col; int mb_col;
int mb_rows = cm->mb_rows; int mb_rows = cm->mb_rows;
......
...@@ -76,7 +76,8 @@ void vp8_loop_filter_frame_init(struct VP8Common *cm, ...@@ -76,7 +76,8 @@ void vp8_loop_filter_frame_init(struct VP8Common *cm,
struct macroblockd *mbd, struct macroblockd *mbd,
int default_filt_lvl); int default_filt_lvl);
void vp8_loop_filter_frame(struct VP8Common *cm, struct macroblockd *mbd); void vp8_loop_filter_frame(struct VP8Common *cm, struct macroblockd *mbd,
int frame_type);
void vp8_loop_filter_partial_frame(struct VP8Common *cm, void vp8_loop_filter_partial_frame(struct VP8Common *cm,
struct macroblockd *mbd, struct macroblockd *mbd,
......
...@@ -471,7 +471,7 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, unsigned long size, const unsi ...@@ -471,7 +471,7 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, unsigned long size, const unsi
if(cm->filter_level) if(cm->filter_level)
{ {
/* Apply the loop filter if appropriate. */ /* Apply the loop filter if appropriate. */
vp8_loop_filter_frame(cm, &pbi->mb); vp8_loop_filter_frame(cm, &pbi->mb, cm->frame_type);
} }
vp8_yv12_extend_frame_borders(cm->frame_to_show); vp8_yv12_extend_frame_borders(cm->frame_to_show);
} }
......
...@@ -3117,6 +3117,8 @@ static void update_reference_frames(VP8_COMMON *cm) ...@@ -3117,6 +3117,8 @@ static void update_reference_frames(VP8_COMMON *cm)
void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm) void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm)
{ {
const FRAME_TYPE frame_type = cm->frame_type;
if (cm->no_lpf) if (cm->no_lpf)
{ {
cm->filter_level = 0; cm->filter_level = 0;
...@@ -3134,6 +3136,11 @@ void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm) ...@@ -3134,6 +3136,11 @@ void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm)
else else
vp8cx_pick_filter_level(cpi->Source, cpi); vp8cx_pick_filter_level(cpi->Source, cpi);
if (cm->filter_level > 0)
{
vp8cx_set_alt_lf_level(cpi, cm->filter_level);
}
vpx_usec_timer_mark(&timer); vpx_usec_timer_mark(&timer);
cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer); cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer);
} }
...@@ -3145,8 +3152,7 @@ void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm) ...@@ -3145,8 +3152,7 @@ void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm)
if (cm->filter_level > 0) if (cm->filter_level > 0)
{ {
vp8cx_set_alt_lf_level(cpi, cm->filter_level); vp8_loop_filter_frame(cm, &cpi->mb.e_mbd, frame_type);
vp8_loop_filter_frame(cm, &cpi->mb.e_mbd);
} }
vp8_yv12_extend_frame_borders(cm->frame_to_show); vp8_yv12_extend_frame_borders(cm->frame_to_show);
......
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