Commit 538865df authored by Yunqing Wang's avatar Yunqing Wang Committed by Gerrit Code Review
Browse files

Merge "Multithreaded encoder, late sync loopfilter"

parents 016a38be 380d64ec
......@@ -3781,6 +3781,17 @@ static void encode_frame_to_data_rate
vp8_setup_key_frame(cpi);
}
#if CONFIG_MULTITHREAD
/* wait for loopfilter thread done (for last picture)
* don't do it for first frame, re-code and when PSNR is calculated
*/
if (cpi->b_multi_threaded && cm->current_video_frame && (!Loop) &&
(!cpi->b_calculate_psnr))
{
sem_wait(&cpi->h_event_end_lpf);
}
#endif
// transform / motion compensation build reconstruction frame
vp8_encode_frame(cpi);
......@@ -4153,8 +4164,8 @@ static void encode_frame_to_data_rate
vp8_pack_bitstream(cpi, dest, size);
#if CONFIG_MULTITHREAD
/* wait for loopfilter thread done */
if (cpi->b_multi_threaded)
/* if PSNR packets are generated we have to wait for the lpf */
if (cpi->b_multi_threaded && cpi->b_calculate_psnr)
{
sem_wait(&cpi->h_event_end_lpf);
}
......
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