Commit 80b83c73 authored by James Zern's avatar James Zern

cosmetics,vp9/: normalize inv/fwd_txfm naming

+ vpx_dsp/, test/

itxfm -> inv_txfm, ftxfm -> fwd_txfm

Change-Id: I3aacdb65143576d64cfe5c9b14dd358c17c1fe7e
parent 777ca80f
......@@ -62,9 +62,9 @@ class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
virtual ~PartialIDctTest() {}
virtual void SetUp() {
rnd_.Reset(ACMRandom::DeterministicSeed());
ftxfm_ = GET_PARAM(0);
full_itxfm_ = GET_PARAM(1);
partial_itxfm_ = GET_PARAM(2);
fwd_txfm_ = GET_PARAM(0);
full_inv_txfm_ = GET_PARAM(1);
partial_inv_txfm_ = GET_PARAM(2);
tx_size_ = GET_PARAM(3);
last_nonzero_ = GET_PARAM(4);
bit_depth_ = GET_PARAM(5);
......@@ -185,9 +185,9 @@ class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
int output_block_size_;
int bit_depth_;
int mask_;
FwdTxfmFunc ftxfm_;
InvTxfmWithBdFunc full_itxfm_;
InvTxfmWithBdFunc partial_itxfm_;
FwdTxfmFunc fwd_txfm_;
InvTxfmWithBdFunc full_inv_txfm_;
InvTxfmWithBdFunc partial_inv_txfm_;
ACMRandom rnd_;
};
......@@ -221,7 +221,7 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
}
}
ftxfm_(input_extreme_block, output_ref_block, size_);
fwd_txfm_(input_extreme_block, output_ref_block, size_);
// quantization with minimum allowed step sizes
input_block_[0] = (output_ref_block[0] / 4) * 4;
......@@ -231,9 +231,9 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
}
ASM_REGISTER_STATE_CHECK(
full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
ASM_REGISTER_STATE_CHECK(
partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
pixel_size_ * output_block_size_))
<< "Error: partial inverse transform produces different results";
......@@ -246,9 +246,9 @@ TEST_P(PartialIDctTest, ResultsMatch) {
InitInput();
ASM_REGISTER_STATE_CHECK(
full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
ASM_REGISTER_STATE_CHECK(
partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
pixel_size_ * output_block_size_))
<< "Error: partial inverse transform produces different results";
......@@ -263,9 +263,9 @@ TEST_P(PartialIDctTest, AddOutputBlock) {
}
ASM_REGISTER_STATE_CHECK(
full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
ASM_REGISTER_STATE_CHECK(
partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
pixel_size_ * output_block_size_))
<< "Error: Transform results are not correctly added to output.";
......@@ -286,9 +286,9 @@ TEST_P(PartialIDctTest, SingleExtremeCoeff) {
input_block_[vp9_default_scan_orders[tx_size_].scan[i]] = coeff;
ASM_REGISTER_STATE_CHECK(
full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
ASM_REGISTER_STATE_CHECK(
partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
pixel_size_ * output_block_size_))
<< "Error: Fails with single coeff of " << coeff << " at " << i
......@@ -305,12 +305,12 @@ TEST_P(PartialIDctTest, DISABLED_Speed) {
for (int i = 0; i < kCountSpeedTestBlock; ++i) {
ASM_REGISTER_STATE_CHECK(
full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
}
vpx_usec_timer timer;
vpx_usec_timer_start(&timer);
for (int i = 0; i < kCountSpeedTestBlock; ++i) {
partial_itxfm_(input_block_, output_block_, stride_, bit_depth_);
partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_);
}
libvpx_test::ClearSystemState();
vpx_usec_timer_mark(&timer);
......
......@@ -182,11 +182,11 @@ struct macroblock {
uint8_t variance_low[25];
void (*fwd_txfm4x4)(const int16_t *input, tran_low_t *output, int stride);
void (*itxfm_add)(const tran_low_t *input, uint8_t *dest, int stride,
int eob);
void (*inv_txfm_add)(const tran_low_t *input, uint8_t *dest, int stride,
int eob);
#if CONFIG_VP9_HIGHBITDEPTH
void (*highbd_itxfm_add)(const tran_low_t *input, uint16_t *dest, int stride,
int eob, int bd);
void (*highbd_inv_txfm_add)(const tran_low_t *input, uint16_t *dest,
int stride, int eob, int bd);
#endif
};
......
......@@ -4482,12 +4482,12 @@ static void encode_frame_internal(VP9_COMP *cpi) {
x->fwd_txfm4x4 = xd->lossless ? vp9_highbd_fwht4x4 : vpx_highbd_fdct4x4;
else
x->fwd_txfm4x4 = xd->lossless ? vp9_fwht4x4 : vpx_fdct4x4;
x->highbd_itxfm_add =
x->highbd_inv_txfm_add =
xd->lossless ? vp9_highbd_iwht4x4_add : vp9_highbd_idct4x4_add;
#else
x->fwd_txfm4x4 = xd->lossless ? vp9_fwht4x4 : vpx_fdct4x4;
#endif // CONFIG_VP9_HIGHBITDEPTH
x->itxfm_add = xd->lossless ? vp9_iwht4x4_add : vp9_idct4x4_add;
x->inv_txfm_add = xd->lossless ? vp9_iwht4x4_add : vp9_idct4x4_add;
if (xd->lossless) x->optimize = 0;
......
......@@ -924,8 +924,8 @@ static void encode_block(int plane, int block, int row, int col,
// 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_itxfm_add(dqcoeff, dst16, pd->dst.stride, p->eobs[block],
xd->bd);
x->highbd_inv_txfm_add(dqcoeff, dst16, pd->dst.stride, p->eobs[block],
xd->bd);
break;
default: assert(0 && "Invalid transform size");
}
......@@ -947,7 +947,7 @@ static void encode_block(int plane, int block, int row, int col,
// 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->itxfm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
x->inv_txfm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
break;
default: assert(0 && "Invalid transform size"); break;
}
......@@ -969,12 +969,12 @@ static void encode_block_pass1(int plane, int block, int row, int col,
if (p->eobs[block] > 0) {
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->highbd_itxfm_add(dqcoeff, CONVERT_TO_SHORTPTR(dst), pd->dst.stride,
p->eobs[block], xd->bd);
x->highbd_inv_txfm_add(dqcoeff, CONVERT_TO_SHORTPTR(dst), pd->dst.stride,
p->eobs[block], xd->bd);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
x->itxfm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
x->inv_txfm_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
}
}
......@@ -1152,7 +1152,7 @@ void vp9_encode_block_intra(int plane, int block, int row, int col,
// 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_itxfm_add(dqcoeff, dst16, dst_stride, *eob, xd->bd);
x->highbd_inv_txfm_add(dqcoeff, dst16, dst_stride, *eob, xd->bd);
} else {
vp9_highbd_iht4x4_16_add(dqcoeff, dst16, dst_stride, tx_type,
xd->bd);
......@@ -1233,7 +1233,7 @@ void vp9_encode_block_intra(int plane, int block, int row, int col,
// 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->itxfm_add(dqcoeff, dst, dst_stride, *eob);
x->inv_txfm_add(dqcoeff, dst, dst_stride, *eob);
else
vp9_iht4x4_16_add(dqcoeff, dst, dst_stride, tx_type);
}
......
......@@ -5227,12 +5227,12 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
lossless ? vp9_highbd_fwht4x4 : vpx_highbd_fdct4x4;
else
cpi->td.mb.fwd_txfm4x4 = lossless ? vp9_fwht4x4 : vpx_fdct4x4;
cpi->td.mb.highbd_itxfm_add =
cpi->td.mb.highbd_inv_txfm_add =
lossless ? vp9_highbd_iwht4x4_add : vp9_highbd_idct4x4_add;
#else
cpi->td.mb.fwd_txfm4x4 = lossless ? vp9_fwht4x4 : vpx_fdct4x4;
#endif // CONFIG_VP9_HIGHBITDEPTH
cpi->td.mb.itxfm_add = lossless ? vp9_iwht4x4_add : vp9_idct4x4_add;
cpi->td.mb.inv_txfm_add = lossless ? vp9_iwht4x4_add : vp9_idct4x4_add;
vp9_first_pass(cpi, source);
} else if (oxcf->pass == 2 && (!cpi->use_svc || is_two_pass_svc(cpi))) {
Pass2Encode(cpi, size, dest, frame_flags);
......
......@@ -632,7 +632,7 @@ static void dist_block(const VP9_COMP *cpi, MACROBLOCK *x, int plane,
// 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->itxfm_add(dqcoeff, recon, 32, *eob);
x->inv_txfm_add(dqcoeff, recon, 32, *eob);
break;
default: assert(0 && "Invalid transform size"); break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment