shithub: libvpx

Download patch

ref: f5bd76f5c1b56bcb0e38063daff0c3a604ac420a
parent: 37169c0bd41ff110d004a0bf27cb218cc68a6ea8
parent: de075a95e015686c03dea3f40884a018dc6ab1c5
author: Marco Paniconi <marpan@google.com>
date: Mon Aug 22 11:46:57 EDT 2016

Merge "Revert "vp8: Move loopfilter synchronization to end of encode_frame call.""

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