ref: 80b83c73ba6f43373df452aea433ae39b0386b13
parent: 777ca80f0aeffc1cc9f613cc46f0d28212c633d0
author: James Zern <jzern@google.com>
date: Fri Jun 30 11:29:46 EDT 2017
cosmetics,vp9/: normalize inv/fwd_txfm naming + vpx_dsp/, test/ itxfm -> inv_txfm, ftxfm -> fwd_txfm Change-Id: I3aacdb65143576d64cfe5c9b14dd358c17c1fe7e
--- a/test/partial_idct_test.cc
+++ b/test/partial_idct_test.cc
@@ -62,9 +62,9 @@
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 @@
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 @@
}
}
- 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 @@
}
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 @@
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 @@
}
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 @@
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 @@
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);
--- a/vp9/encoder/vp9_block.h
+++ b/vp9/encoder/vp9_block.h
@@ -182,11 +182,11 @@
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
};
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -4482,12 +4482,12 @@
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;
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -924,8 +924,8 @@
// 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 @@
// 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 @@
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 @@
// 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 @@
// 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);
}
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5227,12 +5227,12 @@
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);
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -632,7 +632,7 @@
// 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;
}