]> granicus.if.org Git - libvpx/commitdiff
Using stride (# of elements) instead of pitch (bytes) in fdct8x8.
authorDmitry Kovalev <dkovalev@google.com>
Fri, 18 Oct 2013 19:20:26 +0000 (12:20 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Fri, 18 Oct 2013 19:20:26 +0000 (12:20 -0700)
Just making fdct consistent with iht/idct/fht functions which all use
stride (# of elements) as input argument.

Change-Id: Ibc944952a192e6c7b2b6a869ec2894c01da82ed1

test/fdct8x8_test.cc
vp9/common/vp9_rtcd_defs.sh
vp9/encoder/vp9_dct.c
vp9/encoder/vp9_encodemb.c
vp9/encoder/x86/vp9_dct_sse2.c

index 728db6dc782f76262e8c1bc1be2745bb47a51924..ffd7d235a0f9c8d20ba69f5223c20b04b3bb0085 100644 (file)
@@ -223,7 +223,7 @@ class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
     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 @@ class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
     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_;
index af96bb314b2ba913f0f1861be261470af3e9f122..cc88c771e47d0c5cdff30828324f0f1a4abd187a 100644 (file)
@@ -695,7 +695,7 @@ specialize vp9_short_fht8x8 sse2
 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"
index 00a29037e92ab818d8506879ff518021f4758e9b..6dc966c0183cbc95781cc1d7e63f5518d4450be5 100644 (file)
@@ -230,8 +230,7 @@ static void fdct8(const int16_t *input, int16_t *output) {
   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];
 
index 2b5451bb898ad12189c623ef85208aa336f50873..5fe44c9e65223f711fdbd9525a1848933b1ed9ef 100644 (file)
@@ -391,7 +391,7 @@ void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
       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 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
       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);
index 5e1e5ed4a7bcddc0a47929af8b5382d1cf302786..52a0528cca75755e422cc8c8718665e76b378499 100644 (file)
@@ -271,8 +271,7 @@ void vp9_short_fht4x4_sse2(int16_t *input, int16_t *output,
   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