shithub: libvpx

Download patch

ref: a272530bf0962d4cbf54fdb8abd1051f8fbb5917
parent: f0446164fbabe0f21ecbb4d29ec75b3cb130dfc8
author: Yaowu Xu <yaowu@google.com>
date: Fri Nov 1 03:24:07 EDT 2013

Two optimizations:

1. Reduced the size memset based on eob for 32x32 transform. The reset
of non-zero coefficient should probably go into where they are read in
inverse transform functions. (TODO)
2. Removed a redundant level of indirection.
vp9_iht4x4_add() checks transform type and call vp9_iht4x4_16_add()
for tranforms other than DCT_DCT. In this case, the DCT_DCT case
has been already handled here.

Change-Id: Iacbc77da761f0b308df5acea0f20c9add9f33d20

--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -262,7 +262,7 @@
         if (tx_type == DCT_DCT)
           xd->itxm_add(qcoeff, dst, stride, eob);
         else
-          vp9_iht4x4_add(tx_type, qcoeff, dst, stride, eob);
+          vp9_iht4x4_16_add(qcoeff, dst, stride, tx_type);
         break;
       case TX_8X8:
         tx_type = get_tx_type_8x8(pd->plane_type, xd);
@@ -285,6 +285,8 @@
     } else {
       if (tx_type == DCT_DCT && tx_size <= TX_16X16 && eob <= 10)
         vpx_memset(qcoeff, 0, 4 * (4 << tx_size) * sizeof(qcoeff[0]));
+      else if (tx_size == TX_32X32 && eob <= 34)
+        vpx_memset(qcoeff, 0, 256 * sizeof(qcoeff[0]));
       else
         vpx_memset(qcoeff, 0, (16 << (tx_size << 1)) * sizeof(qcoeff[0]));
     }