]> granicus.if.org Git - libvpx/commitdiff
Cleaned up the code a little for the CONFIG_EXT_TX experiment on the
authorZoe Liu <zoeliu@google.com>
Mon, 12 Jan 2015 20:11:37 +0000 (12:11 -0800)
committerZoe Liu <zoeliu@google.com>
Mon, 12 Jan 2015 20:11:37 +0000 (12:11 -0800)
16x16 and 8x8 transform sizes, both for the regular case and the high
bit depth (CONFIG_VP9_HIGHBITDEPTH) case.

Change-Id: I34a9d3c73c3687f967105194ce4def48c3ec435c

vp9/encoder/vp9_encodemb.c

index c5c2a785a9058fd6b42078cb4323daf619475ca4..c35c504b7dd3fc2c5f0b1685016a687d06fa21fb 100644 (file)
@@ -1255,14 +1255,8 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
         break;
       case TX_16X16:
 #if CONFIG_EXT_TX
-        tx_type = get_tx_type(plane, xd);
-        if (tx_type == DCT_DCT) {
-          vp9_highbd_idct16x16_add(dqcoeff, dst, pd->dst.stride,
-                                   p->eobs[block], xd->bd);
-        } else {
-          vp9_highbd_iht16x16_add(tx_type, dqcoeff, dst, pd->dst.stride,
-                                  p->eobs[block], xd->bd);
-        }
+        vp9_highbd_iht16x16_add(tx_type, dqcoeff, dst, pd->dst.stride,
+                                p->eobs[block], xd->bd);
 #else
         vp9_highbd_idct16x16_add(dqcoeff, dst, pd->dst.stride,
                                  p->eobs[block], xd->bd);
@@ -1270,14 +1264,8 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
         break;
       case TX_8X8:
 #if CONFIG_EXT_TX
-        tx_type = get_tx_type(plane, xd);
-        if (tx_type == DCT_DCT) {
-          vp9_highbd_idct8x8_add(dqcoeff, dst, pd->dst.stride,
-                                 p->eobs[block], xd->bd);
-        } else {
-          vp9_highbd_iht8x8_add(tx_type, dqcoeff, dst, pd->dst.stride,
-                                p->eobs[block], xd->bd);
-        }
+        vp9_highbd_iht8x8_add(tx_type, dqcoeff, dst, pd->dst.stride,
+                              p->eobs[block], xd->bd);
 #else
         vp9_highbd_idct8x8_add(dqcoeff, dst, pd->dst.stride,
                                p->eobs[block], xd->bd);
@@ -1287,7 +1275,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
 #if CONFIG_EXT_TX
         tx_type = get_tx_type_4x4(plane, xd, block);
         if (tx_type == DCT_DCT) {
-          // this is like vp9_short_idct4x4 but has a special case around eob<=1
+          // This is like vp9_short_idct4x4 but has a special case around eob<=1
           // which is significant (not just an optimization) for the lossless
           // case.
           x->highbd_itxm_add(dqcoeff, dst, pd->dst.stride,
@@ -1297,7 +1285,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
                                 p->eobs[block], xd->bd);
         }
 #else
-        // this is like vp9_short_idct4x4 but has a special case around eob<=1
+        // This is like vp9_short_idct4x4 but has a special case around eob<=1
         // which is significant (not just an optimization) for the lossless
         // case.
         x->highbd_itxm_add(dqcoeff, dst, pd->dst.stride,
@@ -1322,26 +1310,14 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
       break;
     case TX_16X16:
 #if CONFIG_EXT_TX
-      tx_type = get_tx_type(plane, xd);
-      if (tx_type == DCT_DCT) {
-        vp9_idct16x16_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
-      } else {
-        vp9_iht16x16_add(tx_type, dqcoeff, dst, pd->dst.stride,
-                         p->eobs[block]);
-      }
+      vp9_iht16x16_add(tx_type, dqcoeff, dst, pd->dst.stride, p->eobs[block]);
 #else
       vp9_idct16x16_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
 #endif
       break;
     case TX_8X8:
 #if CONFIG_EXT_TX
-      tx_type = get_tx_type(plane, xd);
-      if (tx_type == DCT_DCT) {
-        vp9_idct8x8_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
-      } else {
-        vp9_iht8x8_add(tx_type, dqcoeff, dst, pd->dst.stride,
-                       p->eobs[block]);
-      }
+      vp9_iht8x8_add(tx_type, dqcoeff, dst, pd->dst.stride, p->eobs[block]);
 #else
       vp9_idct8x8_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
 #endif
@@ -1350,18 +1326,16 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
 #if CONFIG_EXT_TX
       tx_type = get_tx_type_4x4(plane, xd, block);
       if (tx_type == DCT_DCT) {
-        // this is like vp9_short_idct4x4 but has a special case around eob<=1
+        // This is like vp9_short_idct4x4 but has a special case around eob<=1
         // which is significant (not just an optimization) for the lossless
         // case.
         x->itxm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
       } else {
-        vp9_iht4x4_add(tx_type, dqcoeff, dst, pd->dst.stride,
-                       p->eobs[block]);
+        vp9_iht4x4_add(tx_type, dqcoeff, dst, pd->dst.stride, p->eobs[block]);
       }
 #else
-      // this is like vp9_short_idct4x4 but has a special case around eob<=1
-      // which is significant (not just an optimization) for the lossless
-      // case.
+      // This is like vp9_short_idct4x4 but has a special case around eob<=1
+      // which is significant (not just an optimization) for the lossless case.
       x->itxm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
 #endif
       break;