shithub: libvpx

Download patch

ref: c2fe9acceda922ca1d9f0d6185b340560b93597a
parent: 5d881770e59498075218e81244b9a07b774bab5a
author: Marco <marpan@google.com>
date: Tue Aug 16 07:21:20 EDT 2016

vp8: Move loopfilter synchronization to end of encode_frame call.

Change-Id: I5bdfea7f51df1f1fa5d9c1597e96988acce6c2f2

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4392,13 +4392,6 @@
   /* 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;
@@ -5234,6 +5227,13 @@
 #endif
 
   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;
 }