shithub: libvpx

Download patch

ref: a767d10fa51e80a9b05ab7e7fae6bab706d3eb35
parent: 0c10a94581caf10f47524bdecc21f9ad6f8e95b2
parent: e5fa44c869f03925d2f5f97f89effcc20982d826
author: Dmitry Kovalev <[email protected]>
date: Tue Oct 22 07:34:17 EDT 2013

Merge "Using stride (# of elements) instead of pitch (bytes) in fdct8x8."

--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -223,7 +223,7 @@
     fwd_txfm_ = GET_PARAM(0);
     inv_txfm_ = GET_PARAM(1);
     tx_type_  = GET_PARAM(2);
-    pitch_    = 16;
+    pitch_    = 8;
     fwd_txfm_ref = fdct8x8_ref;
   }
 
@@ -234,7 +234,7 @@
     fwd_txfm_(in, out, stride);
   }
   void RunInvTxfm(int16_t *out, uint8_t *dst, int stride) {
-    inv_txfm_(out, dst, stride >> 1);
+    inv_txfm_(out, dst, stride);
   }
 
   fdct_t fwd_txfm_;
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -695,7 +695,7 @@
 prototype void vp9_short_fht16x16 "int16_t *InputData, int16_t *OutputData, int pitch, int tx_type"
 specialize vp9_short_fht16x16 sse2
 
-prototype void vp9_short_fdct8x8 "int16_t *InputData, int16_t *OutputData, int pitch"
+prototype void vp9_short_fdct8x8 "int16_t *InputData, int16_t *OutputData, int stride"
 specialize vp9_short_fdct8x8 sse2
 
 prototype void vp9_short_fdct4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -230,8 +230,7 @@
   output[7] = dct_const_round_shift(t3);
 }
 
-void vp9_short_fdct8x8_c(int16_t *input, int16_t *final_output, int pitch) {
-  const int stride = pitch >> 1;
+void vp9_short_fdct8x8_c(int16_t *input, int16_t *final_output, int stride) {
   int i, j;
   int16_t intermediate[64];
 
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -391,7 +391,7 @@
       xoff = 8 * (block & twmask);
       yoff = 8 * (block >> twl);
       src_diff = p->src_diff + 4 * bw * yoff + xoff;
-      vp9_short_fdct8x8(src_diff, coeff, bw * 8);
+      vp9_short_fdct8x8(src_diff, coeff, bw * 4);
       vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round,
                      p->quant, p->quant_shift, qcoeff, dqcoeff,
                      pd->dequant, p->zbin_extra, eob, scan, iscan);
@@ -584,7 +584,7 @@
       if (tx_type != DCT_DCT)
         vp9_short_fht8x8(src_diff, coeff, bw * 4, tx_type);
       else
-        vp9_short_fdct8x8(src_diff, coeff, bw * 8);
+        vp9_short_fdct8x8(src_diff, coeff, bw * 4);
       vp9_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant,
                      p->quant_shift, qcoeff, dqcoeff,
                      pd->dequant, p->zbin_extra, eob, scan, iscan);
--- a/vp9/encoder/x86/vp9_dct_sse2.c
+++ b/vp9/encoder/x86/vp9_dct_sse2.c
@@ -271,8 +271,7 @@
   write_buffer_4x4(output, in);
 }
 
-void vp9_short_fdct8x8_sse2(int16_t *input, int16_t *output, int pitch) {
-  const int stride = pitch >> 1;
+void vp9_short_fdct8x8_sse2(int16_t *input, int16_t *output, int stride) {
   int pass;
   // Constants
   //    When we use them, in one case, they are all the same. In all others