Merged vp9_high and high_transforms options
Using --enable-vp9-high now automatically uses the high precision transform code. (Before you needed to specify both --enable-vp9-high and --enable-high-transforms) Change-Id: I742d5b82601bc38eb81c95d7ecd3f78b9ff0df57
This commit is contained in:
1
configure
vendored
1
configure
vendored
@@ -275,7 +275,6 @@ EXPERIMENT_LIST="
|
||||
vp9_high
|
||||
multiple_arf
|
||||
spatial_svc
|
||||
high_transforms
|
||||
high_quant
|
||||
denoising
|
||||
emulate_hw_high
|
||||
|
@@ -686,7 +686,7 @@ TEST_P(Trans16x16HT, QuantCheck) {
|
||||
|
||||
using std::tr1::make_tuple;
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
@@ -700,7 +700,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_c, 0, 8)));
|
||||
#endif
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans16x16HT,
|
||||
::testing::Values(
|
||||
@@ -726,7 +726,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_NEON_ASM && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
@@ -734,7 +734,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
&vp9_idct16x16_256_add_neon, 0, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
@@ -749,14 +749,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSSE3, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_ssse3, 0, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_AVX2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGH
|
||||
// TODO(jzern): these prototypes can be removed after the avx2 versions are
|
||||
// reenabled in vp9_rtcd_defs.pl.
|
||||
extern "C" {
|
||||
|
@@ -292,7 +292,7 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans32x32Test,
|
||||
::testing::Values(
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
make_tuple(&vp9_fdct32x32_c, &vp9_idct32x32_1024_add_c, 0, 8),
|
||||
make_tuple(&vp9_fdct32x32_rd_c, &vp9_idct32x32_1024_add_c, 1, 8),
|
||||
make_tuple(&vp9_high_fdct32x32_c, &idct32x32_10, 0, 10),
|
||||
@@ -304,7 +304,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fdct32x32_rd_c, &vp9_idct32x32_1024_add_c, 1, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_NEON_ASM && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, Trans32x32Test,
|
||||
::testing::Values(
|
||||
@@ -314,7 +314,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
&vp9_idct32x32_1024_add_neon, 1, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
@@ -324,7 +324,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
&vp9_idct32x32_1024_add_sse2, 1, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_AVX2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
AVX2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
|
@@ -391,7 +391,7 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, 8),
|
||||
make_tuple(&vp9_high_fdct4x4_c, &idct4x4_10, 0, 10),
|
||||
make_tuple(&vp9_high_fdct4x4_c, &idct4x4_12, 0, 12)));
|
||||
@@ -401,7 +401,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans4x4HT,
|
||||
::testing::Values(
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, 8),
|
||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, 8),
|
||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, 8),
|
||||
@@ -423,7 +423,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans4x4WHT,
|
||||
::testing::Values(
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, 8),
|
||||
make_tuple(&vp9_high_fwht4x4_c, &iwht4x4_10, 0, 10),
|
||||
make_tuple(&vp9_high_fwht4x4_c, &iwht4x4_12, 0, 12)));
|
||||
@@ -431,7 +431,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_NEON_ASM && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
@@ -446,14 +446,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MMX, Trans4x4WHT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fwht4x4_mmx, &vp9_iwht4x4_16_add_c, 0, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
@@ -468,7 +468,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_AVX2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
AVX2, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
|
@@ -514,7 +514,7 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
#if CONFIG_HIGH_TRANSFORMS && CONFIG_VP9_HIGH
|
||||
#if CONFIG_VP9_HIGH
|
||||
make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, 8),
|
||||
make_tuple(&vp9_high_fdct8x8_c, &idct8x8_10, 0, 10),
|
||||
make_tuple(&vp9_high_fdct8x8_c, &idct8x8_12, 0, 12)));
|
||||
@@ -524,7 +524,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, FwdTrans8x8HT,
|
||||
::testing::Values(
|
||||
#if CONFIG_HIGH_TRANSFORMS && CONFIG_VP9_HIGH
|
||||
#if CONFIG_VP9_HIGH
|
||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, 8),
|
||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, 8),
|
||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, 8),
|
||||
@@ -544,7 +544,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_NEON_ASM && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
@@ -558,7 +558,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
@@ -572,14 +572,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSSE3, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0, 8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_AVX2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
AVX2, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
|
@@ -259,7 +259,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
TX_4X4, 1)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, PartialIDctTest,
|
||||
::testing::Values(
|
||||
@@ -293,7 +293,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
TX_4X4, 1)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSSE3_64, PartialIDctTest,
|
||||
::testing::Values(
|
||||
@@ -303,7 +303,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
TX_8X8, 12)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3 && !CONFIG_HIGH_TRANSFORMS
|
||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSSE3, PartialIDctTest,
|
||||
::testing::Values(
|
||||
|
@@ -23,7 +23,7 @@ const vp9_prob vp9_cat5_prob[] = { 180, 157, 141, 134, 130 };
|
||||
const vp9_prob vp9_cat6_prob[] = {
|
||||
254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129
|
||||
};
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
const vp9_prob vp9_cat1_prob_high10[] = { 159 };
|
||||
const vp9_prob vp9_cat2_prob_high10[] = { 165, 145 };
|
||||
const vp9_prob vp9_cat3_prob_high10[] = { 173, 148, 140 };
|
||||
|
@@ -59,7 +59,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat3_prob[3]);
|
||||
DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat4_prob[4]);
|
||||
DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat5_prob[5]);
|
||||
DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob[14]);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat1_prob_high10[1]);
|
||||
DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat2_prob_high10[2]);
|
||||
DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat3_prob_high10[3]);
|
||||
@@ -86,7 +86,7 @@ typedef struct {
|
||||
|
||||
// indexed by token value
|
||||
extern const vp9_extra_bit vp9_extra_bits[ENTROPY_TOKENS];
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
extern const vp9_extra_bit vp9_extra_bits_high10[ENTROPY_TOKENS];
|
||||
extern const vp9_extra_bit vp9_extra_bits_high12[ENTROPY_TOKENS];
|
||||
#endif
|
||||
|
@@ -39,7 +39,7 @@ static INLINE tran_low_t clamp_high(tran_high_t value, tran_low_t low,
|
||||
static INLINE tran_low_t clip_pixel_bps_high(tran_high_t dest,
|
||||
tran_high_t trans, int bps) {
|
||||
trans = WRAPLOW(trans);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (bps) {
|
||||
default:
|
||||
return clamp_high(WRAPLOW(dest + trans), 0, 255);
|
||||
|
@@ -36,7 +36,7 @@ extern "C" {
|
||||
#define dual_set_epi16(a, b) \
|
||||
_mm_set_epi16(b, b, b, b, a, a, a, a)
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
typedef int64_t tran_high_t;
|
||||
typedef int32_t tran_low_t;
|
||||
#else
|
||||
|
@@ -47,7 +47,7 @@ static const int16_t dc_qlookup[QINDEX_RANGE] = {
|
||||
1022, 1058, 1098, 1139, 1184, 1232, 1282, 1336,
|
||||
};
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
static const int16_t dc_qlookup_10[QINDEX_RANGE] = {
|
||||
4, 9, 10, 13, 15, 17, 20, 22,
|
||||
25, 28, 31, 34, 37, 40, 43, 47,
|
||||
@@ -154,7 +154,7 @@ static const int16_t ac_qlookup[QINDEX_RANGE] = {
|
||||
1597, 1628, 1660, 1692, 1725, 1759, 1793, 1828,
|
||||
};
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
static const int16_t ac_qlookup_10[QINDEX_RANGE] = {
|
||||
4, 9, 11, 13, 16, 18, 21, 24,
|
||||
27, 30, 33, 37, 40, 44, 48, 51,
|
||||
@@ -227,7 +227,7 @@ static const int16_t ac_qlookup_12[QINDEX_RANGE] = {
|
||||
#endif
|
||||
|
||||
int16_t vp9_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
|
||||
@@ -238,7 +238,7 @@ int16_t vp9_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
|
||||
default:
|
||||
assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
|
||||
}
|
||||
#elif CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#elif CONFIG_VP9_HIGH
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
|
||||
@@ -256,7 +256,7 @@ int16_t vp9_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
|
||||
}
|
||||
|
||||
int16_t vp9_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
|
||||
@@ -267,7 +267,7 @@ int16_t vp9_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
|
||||
default:
|
||||
assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
|
||||
}
|
||||
#elif CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#elif CONFIG_VP9_HIGH
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
|
||||
|
@@ -332,7 +332,7 @@ $vp9_convolve8_avg_vert_neon_asm=vp9_convolve8_avg_vert_neon;
|
||||
#
|
||||
# dct
|
||||
#
|
||||
if (vpx_config("CONFIG_VP9_HIGH") eq "yes" && vpx_config("CONFIG_HIGH_TRANSFORMS") eq "yes") {
|
||||
if (vpx_config("CONFIG_VP9_HIGH") eq "yes") {
|
||||
add_proto qw/void vp9_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
|
||||
specialize qw/vp9_idct4x4_1_add/;
|
||||
|
||||
@@ -1066,8 +1066,8 @@ specialize qw/vp9_get_mb_ss mmx sse2/;
|
||||
add_proto qw/void vp9_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride";
|
||||
specialize qw/vp9_subtract_block/, "$sse2_x86inc";
|
||||
|
||||
if (vpx_config("CONFIG_VP9_HIGH") eq "yes" && vpx_config("CONFIG_HIGH_TRANSFORMS") eq "yes") {
|
||||
# With CONFIG_HIGH_TRANSFORMS, the transform coefficients are held in 32-bit
|
||||
if (vpx_config("CONFIG_VP9_HIGH") eq "yes") {
|
||||
# the transform coefficients are held in 32-bit
|
||||
# values, so the assembler code for vp9_block_error can no longer be used.
|
||||
add_proto qw/int64_t vp9_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
|
||||
specialize qw/vp9_block_error/;
|
||||
@@ -1112,7 +1112,7 @@ if (vpx_config("CONFIG_INTERNAL_STATS") eq "yes") {
|
||||
}
|
||||
|
||||
# fdct functions
|
||||
if (vpx_config("CONFIG_VP9_HIGH") eq "yes" && vpx_config("CONFIG_HIGH_TRANSFORMS") eq "yes") {
|
||||
if (vpx_config("CONFIG_VP9_HIGH") eq "yes") {
|
||||
add_proto qw/void vp9_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
|
||||
specialize qw/vp9_fht4x4/;
|
||||
|
||||
|
@@ -77,7 +77,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type,
|
||||
int v;
|
||||
int16_t dqv = dq[0];
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
if (cm->use_high) {
|
||||
if (cm->bit_depth == VPX_BITS_10) {
|
||||
cat1_ptr = vp9_cat1_prob_high10;
|
||||
@@ -206,7 +206,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type,
|
||||
val = (val << 1) | vp9_read(r, cat6_ptr[11]);
|
||||
val = (val << 1) | vp9_read(r, cat6_ptr[12]);
|
||||
val = (val << 1) | vp9_read(r, cat6_ptr[13]);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
if (cm->use_high) {
|
||||
// 10 bit
|
||||
val = (val << 1) | vp9_read(r, cat6_ptr[14]);
|
||||
|
@@ -133,7 +133,7 @@ static void pack_mb_tokens(vp9_writer *w,
|
||||
int i = 0;
|
||||
int v = a->value;
|
||||
int n = a->len;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
const vp9_extra_bit *const b =
|
||||
bit_depth == VPX_BITS_12 ? &vp9_extra_bits_high12[t] :
|
||||
bit_depth == VPX_BITS_10 ? &vp9_extra_bits_high10[t] :
|
||||
|
@@ -60,7 +60,7 @@ void vp9_high_subtract_block_c(int rows, int cols,
|
||||
int r, c;
|
||||
uint16_t *src = CONVERT_TO_SHORTPTR(src8);
|
||||
uint16_t *pred = CONVERT_TO_SHORTPTR(pred8);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
(void) bps;
|
||||
#else
|
||||
int shift = bps - 8;
|
||||
@@ -69,7 +69,7 @@ void vp9_high_subtract_block_c(int rows, int cols,
|
||||
|
||||
for (r = 0; r < rows; r++) {
|
||||
for (c = 0; c < cols; c++) {
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
diff[c] = src[c] - pred[c];
|
||||
#else
|
||||
diff[c] = (src[c] - pred[c] + rnd) >> shift;
|
||||
@@ -181,7 +181,7 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block,
|
||||
tokens[eob][0].qc = 0;
|
||||
tokens[eob][1] = tokens[eob][0];
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
if (xd->bps == 12) {
|
||||
dct_value_tokens = vp9_dct_value_tokens_high12_ptr;
|
||||
dct_value_cost = vp9_dct_value_cost_high12_ptr;
|
||||
@@ -228,7 +228,7 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block,
|
||||
best = rd_cost1 < rd_cost0;
|
||||
base_bits = dct_value_cost[x];
|
||||
dx = mul * (dqcoeff[rc] - coeff[rc]);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
dx >>= xd->bps - 8;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block,
|
||||
base_bits = dct_value_cost[x];
|
||||
|
||||
if (shortcut) {
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
dx -= ((dequant_ptr[rc != 0] >> (xd->bps - 8)) + sz) ^ sz;
|
||||
} else {
|
||||
|
@@ -639,7 +639,7 @@ void vp9_first_pass(VP9_COMP *cpi) {
|
||||
(bsize >= BLOCK_16X16 ? TX_16X16 : TX_8X8) : TX_4X4;
|
||||
vp9_encode_intra_block_plane(x, bsize, 0);
|
||||
this_error = vp9_get_mb_ss(x->plane[0].src_diff);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (cm->use_high) {
|
||||
switch (cm->bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
|
@@ -160,7 +160,7 @@ void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
|
||||
int filt_guess;
|
||||
// These values were determined by linear fitting the result of the
|
||||
// searched level, filt_guess = q * 0.316206 + 3.87252
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (cm->bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18);
|
||||
|
@@ -229,7 +229,7 @@ static void model_rd_for_sb_y(VP9_COMP *cpi, BLOCK_SIZE bsize,
|
||||
tx_mode_to_biggest_tx_size[cpi->common.tx_mode]);
|
||||
}
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
vp9_model_rd_from_var_lapndz(sse - var, 1 << num_pels_log2_lookup[bsize],
|
||||
dc_quant >> (xd->bps - 5), &rate, &dist);
|
||||
@@ -244,7 +244,7 @@ static void model_rd_for_sb_y(VP9_COMP *cpi, BLOCK_SIZE bsize,
|
||||
*out_rate_sum = rate >> 1;
|
||||
*out_dist_sum = dist << 3;
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
vp9_model_rd_from_var_lapndz(var, 1 << num_pels_log2_lookup[bsize],
|
||||
ac_quant >> (xd->bps - 5), &rate, &dist);
|
||||
@@ -300,13 +300,13 @@ static void encode_breakout_test(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
// The encode_breakout input
|
||||
const unsigned int min_thresh =
|
||||
MIN(((unsigned int)x->encode_breakout << 4), max_thresh);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
const int shift = 2 * xd->bps - 16;
|
||||
#endif
|
||||
|
||||
// Calculate threshold according to dequant value.
|
||||
thresh_ac = (xd->plane[0].dequant[1] * xd->plane[0].dequant[1]) / 9;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
if (shift > 0)
|
||||
thresh_ac = ROUND_POWER_OF_TWO(thresh_ac, shift);
|
||||
@@ -319,7 +319,7 @@ static void encode_breakout_test(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
8 - (b_width_log2(bsize) + b_height_log2(bsize));
|
||||
|
||||
thresh_dc = (xd->plane[0].dequant[0] * xd->plane[0].dequant[0] >> 6);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
if (shift > 0)
|
||||
thresh_dc = ROUND_POWER_OF_TWO(thresh_dc, shift);
|
||||
@@ -788,7 +788,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
int vp9_get_intra_cost_penalty(int qindex, int qdelta,
|
||||
vpx_bit_depth_t bit_depth) {
|
||||
const int q = vp9_dc_quant(qindex, qdelta, bit_depth);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return 20 * q;
|
||||
|
@@ -548,7 +548,7 @@ static void invert_quant(int16_t *quant, int16_t *shift, int d) {
|
||||
|
||||
static int get_qzbin_factor(int q, vpx_bit_depth_t bit_depth) {
|
||||
int quant = vp9_dc_quant(q, 0, bit_depth);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return q == 0 ? 64 : (quant < 148 ? 84 : 80);
|
||||
|
@@ -44,7 +44,7 @@
|
||||
|
||||
#define FRAME_OVERHEAD_BITS 200
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
#define ASSIGN_MINQ_TABLE(bit_depth, name) \
|
||||
do { \
|
||||
switch (bit_depth) { \
|
||||
@@ -76,7 +76,7 @@ static int arfgf_low_motion_minq_8[QINDEX_RANGE];
|
||||
static int arfgf_high_motion_minq_8[QINDEX_RANGE];
|
||||
static int inter_minq_8[QINDEX_RANGE];
|
||||
static int rtc_minq_8[QINDEX_RANGE];
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
static int kf_low_motion_minq_10[QINDEX_RANGE];
|
||||
static int kf_high_motion_minq_10[QINDEX_RANGE];
|
||||
static int arfgf_low_motion_minq_10[QINDEX_RANGE];
|
||||
@@ -137,7 +137,7 @@ void vp9_rc_init_minq_luts() {
|
||||
init_minq_luts(kf_low_motion_minq_8, kf_high_motion_minq_8,
|
||||
arfgf_low_motion_minq_8, arfgf_high_motion_minq_8,
|
||||
inter_minq_8, rtc_minq_8, VPX_BITS_8);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
init_minq_luts(kf_low_motion_minq_10, kf_high_motion_minq_10,
|
||||
arfgf_low_motion_minq_10, arfgf_high_motion_minq_10,
|
||||
inter_minq_10, rtc_minq_10, VPX_BITS_10);
|
||||
@@ -152,7 +152,7 @@ void vp9_rc_init_minq_luts() {
|
||||
// tables if and when things settle down in the experimental bitstream
|
||||
double vp9_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth) {
|
||||
// Convert the index to a real Q value (scaled down to match old Q values)
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
return vp9_ac_quant(qindex, 0, bit_depth) / 4.0;
|
||||
|
@@ -96,7 +96,7 @@ static void fill_token_costs(vp9_coeff_cost *c,
|
||||
static int sad_per_bit16lut_8[QINDEX_RANGE];
|
||||
static int sad_per_bit4lut_8[QINDEX_RANGE];
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
static int sad_per_bit16lut_10[QINDEX_RANGE];
|
||||
static int sad_per_bit4lut_10[QINDEX_RANGE];
|
||||
|
||||
@@ -120,7 +120,7 @@ static void init_me_luts_bd(int *bit16lut, int *bit4lut, int range,
|
||||
void vp9_init_me_luts() {
|
||||
init_me_luts_bd(sad_per_bit16lut_8, sad_per_bit4lut_8, QINDEX_RANGE,
|
||||
VPX_BITS_8);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
init_me_luts_bd(sad_per_bit16lut_10, sad_per_bit4lut_10, QINDEX_RANGE,
|
||||
VPX_BITS_10);
|
||||
init_me_luts_bd(sad_per_bit16lut_12, sad_per_bit4lut_12, QINDEX_RANGE,
|
||||
@@ -139,7 +139,7 @@ static const int rd_frame_type_factor[FRAME_UPDATE_TYPES] = {
|
||||
int vp9_compute_rd_mult(const VP9_COMP *cpi, int qindex) {
|
||||
const int64_t q = vp9_dc_quant(qindex, 0, cpi->common.bit_depth);
|
||||
int rdmult = 88 * q * q / 24;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (cpi->common.bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
rdmult = 88 * q * q / 24;
|
||||
@@ -167,7 +167,7 @@ int vp9_compute_rd_mult(const VP9_COMP *cpi, int qindex) {
|
||||
|
||||
static int compute_rd_thresh_factor(int qindex, vpx_bit_depth_t bit_depth) {
|
||||
double q;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
q = vp9_dc_quant(qindex, 0, VPX_BITS_8) / 4.0;
|
||||
@@ -190,7 +190,7 @@ static int compute_rd_thresh_factor(int qindex, vpx_bit_depth_t bit_depth) {
|
||||
}
|
||||
|
||||
void vp9_initialize_me_consts(VP9_COMP *cpi, int qindex) {
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
switch (cpi->common.bit_depth) {
|
||||
case VPX_BITS_8:
|
||||
cpi->mb.sadperbit16 = sad_per_bit16lut_8[qindex];
|
||||
|
@@ -191,7 +191,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
|
||||
int64_t dist;
|
||||
int64_t square_error = sse;
|
||||
int quantizer = (pd->dequant[1] >> 3);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
quantizer >>= (xd->bps - 8);
|
||||
}
|
||||
@@ -207,7 +207,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
|
||||
} else {
|
||||
int rate;
|
||||
int64_t dist;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
vp9_model_rd_from_var_lapndz(sse, 1 << num_pels_log2_lookup[bs],
|
||||
pd->dequant[1] >> (xd->bps - 5),
|
||||
@@ -244,7 +244,7 @@ int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff,
|
||||
return error;
|
||||
}
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
int64_t vp9_high_block_error_c(const tran_low_t *coeff,
|
||||
const tran_low_t *dqcoeff, intptr_t block_size,
|
||||
int64_t *ssz, int bps) {
|
||||
@@ -304,7 +304,7 @@ static INLINE int cost_coeffs(MACROBLOCK *x,
|
||||
assert(type == PLANE_TYPE_Y ? mbmi->tx_size == tx_size
|
||||
: get_uv_tx_size(mbmi, pd) == tx_size);
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
if (xd->bps == 12) {
|
||||
dct_value_tokens = vp9_dct_value_tokens_high12_ptr;
|
||||
dct_value_cost = vp9_dct_value_cost_high12_ptr;
|
||||
@@ -371,7 +371,7 @@ static INLINE int cost_coeffs(MACROBLOCK *x,
|
||||
|
||||
return cost;
|
||||
}
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
static void dist_block(int plane, int block, TX_SIZE tx_size,
|
||||
struct rdcost_block_args* args, int bps) {
|
||||
#else
|
||||
@@ -387,7 +387,7 @@ static void dist_block(int plane, int block, TX_SIZE tx_size,
|
||||
int shift = tx_size == TX_32X32 ? 0 : 2;
|
||||
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
|
||||
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
args->dist = vp9_high_block_error(coeff, dqcoeff, 16 << ss_txfrm_size,
|
||||
&this_sse, bps) >> shift;
|
||||
#else
|
||||
@@ -400,7 +400,7 @@ static void dist_block(int plane, int block, TX_SIZE tx_size,
|
||||
// TODO(jingning): tune the model to better capture the distortion.
|
||||
int64_t p = (pd->dequant[1] * pd->dequant[1] *
|
||||
(1 << ss_txfrm_size)) >> (shift + 2);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
p >>= ((xd->bps - 8) * 2);
|
||||
}
|
||||
@@ -437,7 +437,7 @@ static void block_rd_txfm(int plane, int block, BLOCK_SIZE plane_bsize,
|
||||
vp9_encode_block_intra(x, plane, block, plane_bsize, tx_size, &mbmi->skip);
|
||||
else
|
||||
vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
dist_block(plane, block, tx_size, args, xd->bps);
|
||||
} else {
|
||||
@@ -782,7 +782,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
|
||||
ratey += cost_coeffs(x, 0, block, tempa + idx, templ + idy, TX_4X4,
|
||||
so->scan, so->neighbors,
|
||||
cpi->sf.use_fast_coef_costing);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
distortion += vp9_high_block_error(coeff,
|
||||
BLOCK_OFFSET(pd->dqcoeff, block), 16, &unused,
|
||||
xd->bps) >> 2;
|
||||
@@ -1339,7 +1339,7 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi,
|
||||
x->fwd_txm4x4(raster_block_offset_int16(BLOCK_8X8, k, p->src_diff),
|
||||
coeff, 8);
|
||||
vp9_regular_quantize_b_4x4(x, 0, k, so->scan, so->iscan);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
thisdistortion += vp9_high_block_error(coeff,
|
||||
BLOCK_OFFSET(pd->dqcoeff, k),
|
||||
@@ -2545,7 +2545,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
|
||||
// Calculate threshold according to dequant value.
|
||||
thresh_ac = (xd->plane[0].dequant[1] * xd->plane[0].dequant[1]) / 9;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
const int shift = 2 * xd->bps - 16;
|
||||
if (shift > 0)
|
||||
@@ -2558,7 +2558,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
thresh_ac >>= 8 - (b_width_log2(bsize) +
|
||||
b_height_log2(bsize));
|
||||
thresh_dc = (xd->plane[0].dequant[0] * xd->plane[0].dequant[0] >> 6);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
const int shift = 2 * xd->bps - 16;
|
||||
if (shift > 0)
|
||||
@@ -3157,7 +3157,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
int qstep = xd->plane[0].dequant[1];
|
||||
// TODO(debargha): Enhance this by specializing for each mode_index
|
||||
int scale = 4;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
qstep >>= (xd->bps - 8);
|
||||
}
|
||||
@@ -3892,7 +3892,7 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
int qstep = xd->plane[0].dequant[1];
|
||||
// TODO(debargha): Enhance this by specializing for each mode_index
|
||||
int scale = 4;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS
|
||||
#if CONFIG_VP9_HIGH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGH) {
|
||||
qstep >>= (xd->bps - 8);
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ static int16_t dct_value_cost[DCT_MAX_VALUE * 2];
|
||||
const int16_t *vp9_dct_value_cost_ptr;
|
||||
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
static TOKENVALUE dct_value_tokens_high10[DCT_MAX_VALUE_HIGH10 * 2];
|
||||
const TOKENVALUE *vp9_dct_value_tokens_high10_ptr;
|
||||
static int16_t dct_value_cost_high10[DCT_MAX_VALUE_HIGH10 * 2];
|
||||
@@ -72,7 +72,7 @@ const vp9_tree_index vp9_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
|
||||
|
||||
static vp9_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[28];
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
static vp9_tree_index cat1_high10[2], cat2_high10[4], cat3_high10[6],
|
||||
cat4_high10[8], cat5_high10[10], cat6_high10[32];
|
||||
|
||||
@@ -98,7 +98,7 @@ static void init_bit_trees() {
|
||||
init_bit_tree(cat4, 4);
|
||||
init_bit_tree(cat5, 5);
|
||||
init_bit_tree(cat6, 14);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
init_bit_tree(cat1_high10, 1);
|
||||
init_bit_tree(cat2_high10, 2);
|
||||
init_bit_tree(cat3_high10, 3);
|
||||
@@ -130,7 +130,7 @@ const vp9_extra_bit vp9_extra_bits[ENTROPY_TOKENS] = {
|
||||
{0, 0, 0, 0} // EOB_TOKEN
|
||||
};
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
const vp9_extra_bit vp9_extra_bits_high10[ENTROPY_TOKENS] = {
|
||||
{0, 0, 0, 0}, // ZERO_TOKEN
|
||||
{0, 0, 0, 1}, // ONE_TOKEN
|
||||
@@ -219,7 +219,7 @@ void vp9_tokenize_initialize() {
|
||||
|
||||
tokenize_init_one(dct_value_tokens + DCT_MAX_VALUE, vp9_extra_bits,
|
||||
dct_value_cost + DCT_MAX_VALUE, DCT_MAX_VALUE);
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
vp9_dct_value_tokens_high10_ptr = dct_value_tokens_high10 +
|
||||
DCT_MAX_VALUE_HIGH10;
|
||||
vp9_dct_value_cost_high10_ptr = dct_value_cost_high10 + DCT_MAX_VALUE_HIGH10;
|
||||
@@ -326,7 +326,7 @@ static void tokenize_b(int plane, int block, BLOCK_SIZE plane_bsize,
|
||||
scan = so->scan;
|
||||
nb = so->neighbors;
|
||||
c = 0;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
if (cpi->common.profile > PROFILE_1) {
|
||||
dct_value_tokens = (cpi->common.bit_depth == VPX_BITS_10 ?
|
||||
vp9_dct_value_tokens_high10_ptr :
|
||||
|
@@ -26,7 +26,7 @@ void vp9_tokenize_initialize();
|
||||
|
||||
typedef struct {
|
||||
int16_t token;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
int32_t extra;
|
||||
#else
|
||||
int16_t extra;
|
||||
@@ -35,7 +35,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
const vp9_prob *context_tree;
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
int32_t extra;
|
||||
#else
|
||||
int16_t extra;
|
||||
@@ -62,7 +62,7 @@ extern const int16_t *vp9_dct_value_cost_ptr;
|
||||
*/
|
||||
extern const TOKENVALUE *vp9_dct_value_tokens_ptr;
|
||||
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_TRANSFORMS && CONFIG_HIGH_QUANT
|
||||
#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT
|
||||
extern const int16_t *vp9_dct_value_cost_high10_ptr;
|
||||
extern const TOKENVALUE *vp9_dct_value_tokens_high10_ptr;
|
||||
extern const int16_t *vp9_dct_value_cost_high12_ptr;
|
||||
|
Reference in New Issue
Block a user