]> granicus.if.org Git - libvpx/commitdiff
VPX: refactor vpx_idct32x32_1_add_sse2()
authorScott LaVarnway <slavarnway@google.com>
Mon, 5 Oct 2015 13:33:42 +0000 (06:33 -0700)
committerScott LaVarnway <slavarnway@google.com>
Mon, 5 Oct 2015 13:33:42 +0000 (06:33 -0700)
Change-Id: Ia1a2cac0e9dc05f3207b3433a6c1589fa7f2aee3

vpx_dsp/x86/inv_txfm_sse2.c

index 49f30224b0f049bba5ad06c923b18f9d68c271d0..ae907fd0bd2e9ddc81eb91422ca962bf5d1e3ff4 100644 (file)
@@ -3474,7 +3474,7 @@ void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest,
                               int stride) {
   __m128i dc_value;
   const __m128i zero = _mm_setzero_si128();
-  int a, i;
+  int a, j;
 
   a = dct_const_round_shift(input[0] * cospi_16_64);
   a = dct_const_round_shift(a * cospi_16_64);
@@ -3482,12 +3482,11 @@ void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest,
 
   dc_value = _mm_set1_epi16(a);
 
-  for (i = 0; i < 4; ++i) {
-    int j;
-    for (j = 0; j < 32; ++j) {
-      RECON_AND_STORE(dest + j * stride, dc_value);
-    }
-    dest += 8;
+  for (j = 0; j < 32; ++j) {
+    RECON_AND_STORE(dest +  0 + j * stride, dc_value);
+    RECON_AND_STORE(dest +  8 + j * stride, dc_value);
+    RECON_AND_STORE(dest + 16 + j * stride, dc_value);
+    RECON_AND_STORE(dest + 24 + j * stride, dc_value);
   }
 }