vp8: Move loopfilter synchronization to end of encode_frame call.

Change-Id: I5bdfea7f51df1f1fa5d9c1597e96988acce6c2f2
This commit is contained in:
Marco 2016-08-16 11:21:20 -07:00
parent 5d881770e5
commit c2fe9acced

View File

@ -4392,13 +4392,6 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, unsigned long *size,
/* build the bitstream */
vp8_pack_bitstream(cpi, dest, dest_end, size);
#if CONFIG_MULTITHREAD
/* wait for the lpf thread done */
if (cpi->b_multi_threaded) {
sem_wait(&cpi->h_event_end_lpf);
}
#endif
/* Move storing frame_type out of the above loop since it is also
* needed in motion search besides loopfilter */
cm->last_frame_type = cm->frame_type;
@ -5235,6 +5228,13 @@ int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags,
cpi->common.error.setjmp = 0;
#if CONFIG_MULTITHREAD
/* wait for the lpf thread done */
if (cpi->b_multi_threaded) {
sem_wait(&cpi->h_event_end_lpf);
}
#endif
return 0;
}