while (1)
{
+ int current_filter_level = 0;
+
if (pbi->b_multithreaded_rd == 0)
break;
}
}
}
+
+ // If |pbi->common.filter_level| is 0 the value can change in-between
+ // the sem_post and the check to call vp8_thread_loop_filter.
+ current_filter_level = pbi->common.filter_level;
+
// add this to each frame
if ((mbrd->mb_row == pbi->common.mb_rows-1) || ((mbrd->mb_row == pbi->common.mb_rows-2) && (pbi->common.mb_rows % (pbi->decoding_thread_count+1))==1))
{
sem_post(&pbi->h_event_end_decoding);
}
- if ((pbi->b_multithreaded_lf) &&(pbi->common.filter_level))
+ if ((pbi->b_multithreaded_lf) && (current_filter_level))
vp8_thread_loop_filter(pbi, mbrd, ithread);
}