shithub: libvpx

Download patch

ref: 5bfa29b6c54e31578cc377d49add31bddedc83a4
parent: 9f1083e9a00d7032227d58cbaf8ecd76335261d6
parent: db389cb804a6e7ba5bd4ed3765d1cb543619ef26
author: Scott LaVarnway <slavarnway@google.com>
date: Wed Jan 4 02:50:13 EST 2012

Merge "Make a local copy of the dequantized data"

--- a/vp8/common/invtrans.h
+++ b/vp8/common/invtrans.h
@@ -17,6 +17,10 @@
 #include "blockd.h"
 #include "onyxc_int.h"
 
+#if CONFIG_MULTITHREAD
+#include "vpx_mem/vpx_mem.h"
+#endif
+
 static void eob_adjust(char *eobs, short *diff)
 {
     /* eob adjust.... the idct can only skip if both the dc and eob are zero */
@@ -36,6 +40,10 @@
     /* save the dc dequant constant in case it is overridden */
     short dc_dequant_temp = DQC[0];
 
+#if CONFIG_MULTITHREAD
+    DECLARE_ALIGNED(16, short, local_dequant[16]);
+#endif
+
     if (xd->mode_info_context->mbmi.mode != SPLITMV)
     {
         /* do 2nd order transform on the dc block */
@@ -51,11 +59,18 @@
         }
         eob_adjust(xd->eobs, xd->qcoeff);
 
+#if CONFIG_MULTITHREAD
+        DQC = local_dequant;
+
+        vpx_memcpy(DQC, xd->block[0].dequant,
+                   sizeof(local_dequant));
+#endif
+
         /* override the dc dequant constant */
         DQC[0] = 1;
     }
     DEQUANT_INVOKE (&rtcd->dequant, idct_add_y_block)
-                    (xd->qcoeff, xd->block[0].dequant,
+                    (xd->qcoeff, DQC,
                      xd->dst.y_buffer,
                      xd->dst.y_stride, xd->eobs);