From ff8c490b9abd292bf8ed4ade066dc3a9df13e890 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Mon, 4 Apr 2016 12:40:10 -0700 Subject: [PATCH] Branch dct to new implementation for bd12 Change-Id: I9281935653aacce22ac3100f79fb956c249e2bf3 --- vp10/common/idct.c | 31 ++++++++++----------------- vp10/encoder/hybrid_fwd_txfm.c | 38 +++++++++++----------------------- 2 files changed, 23 insertions(+), 46 deletions(-) diff --git a/vp10/common/idct.c b/vp10/common/idct.c index 0eec3b436..da50c033b 100644 --- a/vp10/common/idct.c +++ b/vp10/common/idct.c @@ -1302,11 +1302,8 @@ void vp10_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) - vp10_inv_txfm2d_add_4x4(input, CONVERT_TO_SHORTPTR(dest), stride, - &inv_txfm_2d_cfg_dct_dct_4, bd); - else - vp10_highbd_idct4x4_add(input, dest, stride, eob, bd); + vp10_inv_txfm2d_add_4x4(input, CONVERT_TO_SHORTPTR(dest), stride, + &inv_txfm_2d_cfg_dct_dct_4, bd); break; case ADST_DCT: case DCT_ADST: @@ -1343,13 +1340,11 @@ void vp10_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, void vp10_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd, TX_TYPE tx_type) { + (void)eob; switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) - vp10_inv_txfm2d_add_8x8(input, CONVERT_TO_SHORTPTR(dest), stride, - &inv_txfm_2d_cfg_dct_dct_8, bd); - else - vp10_highbd_idct8x8_add(input, dest, stride, eob, bd); + vp10_inv_txfm2d_add_8x8(input, CONVERT_TO_SHORTPTR(dest), stride, + &inv_txfm_2d_cfg_dct_dct_8, bd); break; case ADST_DCT: case DCT_ADST: @@ -1386,13 +1381,11 @@ void vp10_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, void vp10_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd, TX_TYPE tx_type) { + (void)eob; switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) - vp10_inv_txfm2d_add_16x16(input, CONVERT_TO_SHORTPTR(dest), stride, - &inv_txfm_2d_cfg_dct_dct_16, bd); - else - vp10_highbd_idct16x16_add(input, dest, stride, eob, bd); + vp10_inv_txfm2d_add_16x16(input, CONVERT_TO_SHORTPTR(dest), stride, + &inv_txfm_2d_cfg_dct_dct_16, bd); break; case ADST_DCT: case DCT_ADST: @@ -1429,13 +1422,11 @@ void vp10_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, void vp10_highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd, TX_TYPE tx_type) { + (void)eob; switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) - vp10_inv_txfm2d_add_32x32(input, CONVERT_TO_SHORTPTR(dest), stride, - &inv_txfm_2d_cfg_dct_dct_32, bd); - else - vp10_highbd_idct32x32_add(input, dest, stride, eob, bd); + vp10_inv_txfm2d_add_32x32(input, CONVERT_TO_SHORTPTR(dest), stride, + &inv_txfm_2d_cfg_dct_dct_32, bd); break; #if CONFIG_EXT_TX case ADST_DCT: diff --git a/vp10/encoder/hybrid_fwd_txfm.c b/vp10/encoder/hybrid_fwd_txfm.c index 3ccaf39d9..07c6ba0ac 100644 --- a/vp10/encoder/hybrid_fwd_txfm.c +++ b/vp10/encoder/hybrid_fwd_txfm.c @@ -195,12 +195,8 @@ void vp10_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff, switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) { - vp10_fwd_txfm2d_4x4(src_diff, coeff, diff_stride, - &fwd_txfm_2d_cfg_dct_dct_4, bd); - } else { - vp10_highbd_fht4x4(src_diff, coeff, diff_stride, tx_type); - } + vp10_fwd_txfm2d_4x4(src_diff, coeff, diff_stride, + &fwd_txfm_2d_cfg_dct_dct_4, bd); break; case ADST_DCT: case DCT_ADST: @@ -239,11 +235,9 @@ static void highbd_fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff, (void)fwd_txfm_opt; switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) { - vp10_fwd_txfm2d_8x8(src_diff, coeff, diff_stride, - &fwd_txfm_2d_cfg_dct_dct_8, bd); - break; - } + vp10_fwd_txfm2d_8x8(src_diff, coeff, diff_stride, + &fwd_txfm_2d_cfg_dct_dct_8, bd); + break; case ADST_DCT: case DCT_ADST: case ADST_ADST: @@ -285,11 +279,9 @@ static void highbd_fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff, (void)fwd_txfm_opt; switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) { - vp10_fwd_txfm2d_16x16(src_diff, coeff, diff_stride, - &fwd_txfm_2d_cfg_dct_dct_16, bd); - break; - } + vp10_fwd_txfm2d_16x16(src_diff, coeff, diff_stride, + &fwd_txfm_2d_cfg_dct_dct_16, bd); + break; case ADST_DCT: case DCT_ADST: case ADST_ADST: @@ -329,18 +321,12 @@ static void highbd_fwd_txfm_32x32(int rd_transform, const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type, FWD_TXFM_OPT fwd_txfm_opt, const int bd) { - (void)bd; + (void)rd_transform; + (void)fwd_txfm_opt; switch (tx_type) { case DCT_DCT: - if (bd == BITDEPTH_10) { - vp10_fwd_txfm2d_32x32(src_diff, coeff, diff_stride, - &fwd_txfm_2d_cfg_dct_dct_32, bd); - } else { - if (fwd_txfm_opt == FWD_TXFM_OPT_NORMAL) - highbd_fdct32x32(rd_transform, src_diff, coeff, diff_stride); - else // FWD_TXFM_OPT_DC - vpx_highbd_fdct32x32_1(src_diff, coeff, diff_stride); - } + vp10_fwd_txfm2d_32x32(src_diff, coeff, diff_stride, + &fwd_txfm_2d_cfg_dct_dct_32, bd); break; #if CONFIG_EXT_TX case ADST_DCT: -- 2.49.0