Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
aa2effa9
Commit
aa2effa9
authored
Jan 10, 2013
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge tx32x32 experiment.
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833
parent
460501fe
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
24 additions
and
335 deletions
+24
-335
configure
configure
+0
-1
test/dct32x32_test.cc
test/dct32x32_test.cc
+3
-3
test/test.mk
test/test.mk
+1
-3
vp9/common/vp9_blockd.c
vp9/common/vp9_blockd.c
+0
-4
vp9/common/vp9_blockd.h
vp9/common/vp9_blockd.h
+0
-8
vp9/common/vp9_default_coef_probs.h
vp9/common/vp9_default_coef_probs.h
+0
-2
vp9/common/vp9_entropy.c
vp9/common/vp9_entropy.c
+1
-13
vp9/common/vp9_entropy.h
vp9/common/vp9_entropy.h
+0
-8
vp9/common/vp9_idctllm.c
vp9/common/vp9_idctllm.c
+0
-2
vp9/common/vp9_invtrans.c
vp9/common/vp9_invtrans.c
+0
-2
vp9/common/vp9_invtrans.h
vp9/common/vp9_invtrans.h
+0
-2
vp9/common/vp9_loopfilter.c
vp9/common/vp9_loopfilter.c
+0
-2
vp9/common/vp9_onyxc_int.h
vp9/common/vp9_onyxc_int.h
+2
-10
vp9/common/vp9_recon.c
vp9/common/vp9_recon.c
+0
-2
vp9/common/vp9_rtcd_defs.sh
vp9/common/vp9_rtcd_defs.sh
+0
-8
vp9/decoder/vp9_decodemv.c
vp9/decoder/vp9_decodemv.c
+0
-8
vp9/decoder/vp9_decodframe.c
vp9/decoder/vp9_decodframe.c
+1
-18
vp9/decoder/vp9_dequantize.c
vp9/decoder/vp9_dequantize.c
+0
-2
vp9/decoder/vp9_detokenize.c
vp9/decoder/vp9_detokenize.c
+0
-4
vp9/decoder/vp9_detokenize.h
vp9/decoder/vp9_detokenize.h
+0
-2
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_bitstream.c
+0
-24
vp9/encoder/vp9_block.h
vp9/encoder/vp9_block.h
+0
-10
vp9/encoder/vp9_dct.c
vp9/encoder/vp9_dct.c
+0
-6
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_encodeframe.c
+7
-52
vp9/encoder/vp9_encodemb.c
vp9/encoder/vp9_encodemb.c
+0
-4
vp9/encoder/vp9_encodemb.h
vp9/encoder/vp9_encodemb.h
+0
-4
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_if.c
+0
-2
vp9/encoder/vp9_onyx_int.h
vp9/encoder/vp9_onyx_int.h
+0
-6
vp9/encoder/vp9_quantize.c
vp9/encoder/vp9_quantize.c
+0
-16
vp9/encoder/vp9_quantize.h
vp9/encoder/vp9_quantize.h
+0
-2
vp9/encoder/vp9_ratectrl.c
vp9/encoder/vp9_ratectrl.c
+0
-4
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+9
-49
vp9/encoder/vp9_tokenize.c
vp9/encoder/vp9_tokenize.c
+0
-46
vp9/encoder/vp9_tokenize.h
vp9/encoder/vp9_tokenize.h
+0
-6
No files found.
configure
View file @
aa2effa9
...
...
@@ -246,7 +246,6 @@ EXPERIMENT_LIST="
implicit_segmentation
newbintramodes
comp_interintra_pred
tx32x32
tx64x64
dwtdcthybrid
cnvcontext
...
...
test/dct32x32_test.cc
View file @
aa2effa9
...
...
@@ -36,7 +36,7 @@ static int round(double x) {
}
#endif
#if !CONFIG_DWT
32X32
HYBRID
#if !CONFIG_DWT
DCT
HYBRID
static
const
double
kPi
=
3.141592653589793238462643383279502884
;
static
void
reference2_32x32_idct_2d
(
double
*
input
,
double
*
output
)
{
double
x
;
...
...
@@ -127,9 +127,9 @@ TEST(VP9Idct32x32Test, AccuracyCheck) {
}
}
}
#else // CONFIG_DWT
32X32
HYBRID
#else // CONFIG_DWT
DCT
HYBRID
// TODO(rbultje/debargha): add DWT-specific tests
#endif // CONFIG_DWT
32X32
HYBRID
#endif // CONFIG_DWT
DCT
HYBRID
TEST
(
VP9Fdct32x32Test
,
AccuracyCheck
)
{
ACMRandom
rnd
(
ACMRandom
::
DeterministicSeed
());
unsigned
int
max_error
=
0
;
...
...
test/test.mk
View file @
aa2effa9
...
...
@@ -69,9 +69,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER)
+=
fdct8x8_test.cc
#LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER)
+=
variance_test.cc
ifeq
($(CONFIG_VP9_ENCODER)$(CONFIG_TX32X32),yesyes)
LIBVPX_TEST_SRCS-yes
+=
dct32x32_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER)
+=
dct32x32_test.cc
endif
# VP9
...
...
vp9/common/vp9_blockd.c
View file @
aa2effa9
...
...
@@ -16,15 +16,11 @@ const uint8_t vp9_block2left[TX_SIZE_MAX_SB][25] = {
{
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
7
,
7
,
8
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
},
#if CONFIG_TX32X32
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
}
#endif
};
const
uint8_t
vp9_block2above
[
TX_SIZE_MAX_SB
][
25
]
=
{
{
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
4
,
5
,
4
,
5
,
6
,
7
,
6
,
7
,
8
},
{
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
},
#if CONFIG_TX32X32
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
}
#endif
};
vp9/common/vp9_blockd.h
View file @
aa2effa9
...
...
@@ -125,12 +125,8 @@ typedef enum {
TX_8X8
=
1
,
// 8x8 dct transform
TX_16X16
=
2
,
// 16x16 dct transform
TX_SIZE_MAX_MB
=
3
,
// Number of different transforms available
#if CONFIG_TX32X32
TX_32X32
=
TX_SIZE_MAX_MB
,
// 32x32 dct transform
TX_SIZE_MAX_SB
,
// Number of transforms available to SBs
#else
TX_SIZE_MAX_SB
=
TX_SIZE_MAX_MB
,
#endif
}
TX_SIZE
;
typedef
enum
{
...
...
@@ -301,14 +297,12 @@ typedef struct blockd {
union
b_mode_info
bmi
;
}
BLOCKD
;
#if CONFIG_TX32X32
typedef
struct
superblockd
{
/* 32x32 Y and 16x16 U/V. No 2nd order transform yet. */
DECLARE_ALIGNED
(
16
,
int16_t
,
diff
[
32
*
32
+
16
*
16
*
2
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
qcoeff
[
32
*
32
+
16
*
16
*
2
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
dqcoeff
[
32
*
32
+
16
*
16
*
2
]);
}
SUPERBLOCKD
;
#endif
typedef
struct
macroblockd
{
DECLARE_ALIGNED
(
16
,
int16_t
,
diff
[
400
]);
/* from idct diff */
...
...
@@ -317,9 +311,7 @@ typedef struct macroblockd {
DECLARE_ALIGNED
(
16
,
int16_t
,
dqcoeff
[
400
]);
DECLARE_ALIGNED
(
16
,
uint16_t
,
eobs
[
25
]);
#if CONFIG_TX32X32
SUPERBLOCKD
sb_coeff_data
;
#endif
/* 16 Y blocks, 4 U, 4 V, 1 DC 2nd order block, each with 16 entries. */
BLOCKD
block
[
25
];
...
...
vp9/common/vp9_default_coef_probs.h
View file @
aa2effa9
...
...
@@ -1038,7 +1038,6 @@ static const vp9_coeff_probs default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]
}
}
};
#if CONFIG_TX32X32
static
const
vp9_coeff_probs
default_coef_probs_32x32
[
BLOCK_TYPES_32X32
]
=
{
{
/* block Type 0 */
{
/* Coeff Band 0 */
...
...
@@ -1210,4 +1209,3 @@ static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = {
}
}
};
#endif // CONFIG_TX32X32
vp9/common/vp9_entropy.c
View file @
aa2effa9
...
...
@@ -142,7 +142,6 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]) = {
237
,
252
,
253
,
238
,
223
,
239
,
254
,
255
,
};
#if CONFIG_TX32X32
#if CONFIG_DWTDCTHYBRID
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_coef_bands_32x32
[
1024
])
=
{
0
,
1
,
2
,
3
,
5
,
4
,
4
,
5
,
5
,
3
,
6
,
3
,
5
,
4
,
6
,
...
...
@@ -352,7 +351,7 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]) = {
975
,
991
,
510
,
1006
,
1022
,
511
,
1007
,
1023
,
};
#else
#else
// CONFIG_DWTDCTHYBRID
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_coef_bands_32x32
[
1024
])
=
{
0
,
1
,
2
,
3
,
5
,
4
,
4
,
5
,
5
,
3
,
6
,
3
,
5
,
4
,
6
,
6
,
...
...
@@ -459,7 +458,6 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]) = {
923
,
954
,
985
,
1016
,
1017
,
986
,
955
,
924
,
893
,
862
,
831
,
863
,
894
,
925
,
956
,
987
,
1018
,
1019
,
988
,
957
,
926
,
895
,
927
,
958
,
989
,
1020
,
1021
,
990
,
959
,
991
,
1022
,
1023
,
};
#endif // CONFIG_DWTDCTHYBRID
#endif
/* Array indices are identical to previously-existing CONTEXT_NODE indices */
...
...
@@ -547,10 +545,8 @@ DECLARE_ALIGNED(16, int,
vp9_default_zig_zag1d_8x8_neighbors
[
64
*
MAX_NEIGHBORS
]);
DECLARE_ALIGNED
(
16
,
int
,
vp9_default_zig_zag1d_16x16_neighbors
[
256
*
MAX_NEIGHBORS
]);
#if CONFIG_TX32X32
DECLARE_ALIGNED
(
16
,
int
,
vp9_default_zig_zag1d_32x32_neighbors
[
1024
*
MAX_NEIGHBORS
]);
#endif
static
int
find_in_scan
(
const
int
*
scan
,
int
l
,
int
m
)
{
int
i
,
l2
=
l
*
l
;
...
...
@@ -628,10 +624,8 @@ void vp9_init_neighbors() {
vp9_default_zig_zag1d_8x8_neighbors
);
init_scan_neighbors
(
vp9_default_zig_zag1d_16x16
,
16
,
vp9_default_zig_zag1d_16x16_neighbors
);
#if CONFIG_TX32X32
init_scan_neighbors
(
vp9_default_zig_zag1d_32x32
,
32
,
vp9_default_zig_zag1d_32x32_neighbors
);
#endif
}
const
int
*
vp9_get_coef_neighbors_handle
(
const
int
*
scan
)
{
...
...
@@ -645,10 +639,8 @@ const int *vp9_get_coef_neighbors_handle(const int *scan) {
return
vp9_default_zig_zag1d_8x8_neighbors
;
}
else
if
(
scan
==
vp9_default_zig_zag1d_16x16
)
{
return
vp9_default_zig_zag1d_16x16_neighbors
;
#if CONFIG_TX32X32
}
else
if
(
scan
==
vp9_default_zig_zag1d_32x32
)
{
return
vp9_default_zig_zag1d_32x32_neighbors
;
#endif
}
return
vp9_default_zig_zag1d_4x4_neighbors
;
}
...
...
@@ -693,10 +685,8 @@ void vp9_default_coef_probs(VP9_COMMON *pc) {
vpx_memcpy
(
pc
->
fc
.
hybrid_coef_probs_16x16
,
default_hybrid_coef_probs_16x16
,
sizeof
(
pc
->
fc
.
hybrid_coef_probs_16x16
));
#if CONFIG_TX32X32
vpx_memcpy
(
pc
->
fc
.
coef_probs_32x32
,
default_coef_probs_32x32
,
sizeof
(
pc
->
fc
.
coef_probs_32x32
));
#endif
}
void
vp9_coef_tree_initialize
()
{
...
...
@@ -840,9 +830,7 @@ void vp9_adapt_coef_probs(VP9_COMMON *cm) {
cm
->
fc
.
pre_hybrid_coef_probs_16x16
,
BLOCK_TYPES_16X16
,
cm
->
fc
.
hybrid_coef_counts_16x16
,
count_sat
,
update_factor
);
#if CONFIG_TX32X32
update_coef_probs
(
cm
->
fc
.
coef_probs_32x32
,
cm
->
fc
.
pre_coef_probs_32x32
,
BLOCK_TYPES_32X32
,
cm
->
fc
.
coef_counts_32x32
,
count_sat
,
update_factor
);
#endif
}
vp9/common/vp9_entropy.h
View file @
aa2effa9
...
...
@@ -66,9 +66,7 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
#define BLOCK_TYPES_16X16 4
#if CONFIG_TX32X32
#define BLOCK_TYPES_32X32 4
#endif
/* Middle dimension is a coarsening of the coefficient's
position within the 4x4 DCT. */
...
...
@@ -77,9 +75,7 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
extern
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_coef_bands_4x4
[
16
]);
extern
DECLARE_ALIGNED
(
64
,
const
int
,
vp9_coef_bands_8x8
[
64
]);
extern
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_coef_bands_16x16
[
256
]);
#if CONFIG_TX32X32
extern
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_coef_bands_32x32
[
1024
]);
#endif
/* Inside dimension is 3-valued measure of nearby complexity, that is,
the extent to which nearby coefficients are nonzero. For the first
...
...
@@ -122,9 +118,7 @@ extern DECLARE_ALIGNED(16, const int, vp9_row_scan_4x4[16]);
extern
DECLARE_ALIGNED
(
64
,
const
int
,
vp9_default_zig_zag1d_8x8
[
64
]);
extern
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_default_zig_zag1d_16x16
[
256
]);
#if CONFIG_TX32X32
extern
DECLARE_ALIGNED
(
16
,
const
int
,
vp9_default_zig_zag1d_32x32
[
1024
]);
#endif
void
vp9_coef_tree_initialize
(
void
);
void
vp9_adapt_coef_probs
(
struct
VP9Common
*
);
...
...
@@ -154,9 +148,7 @@ extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_8x8_neighbors[
64
*
MAX_NEIGHBORS
]);
extern
DECLARE_ALIGNED
(
16
,
int
,
vp9_default_zig_zag1d_16x16_neighbors
[
256
*
MAX_NEIGHBORS
]);
#if CONFIG_TX32X32
extern
DECLARE_ALIGNED
(
16
,
int
,
vp9_default_zig_zag1d_32x32_neighbors
[
1024
*
MAX_NEIGHBORS
]);
#endif
#endif // CONFIG_NEWCOEFCONTEXT
#endif // VP9_COMMON_VP9_ENTROPY_H_
vp9/common/vp9_idctllm.c
View file @
aa2effa9
...
...
@@ -1533,7 +1533,6 @@ void vp9_short_idct10_16x16_c(int16_t *input, int16_t *output, int pitch) {
#undef RIGHT_ROUNDING
#endif
#if CONFIG_TX32X32
#if !CONFIG_DWTDCTHYBRID
#define DownshiftMultiplyBy2(x) x * 2
#define DownshiftMultiply(x) x
...
...
@@ -2505,4 +2504,3 @@ void vp9_short_idct64x64_c(int16_t *input, int16_t *output, int pitch) {
#endif
}
#endif // CONFIG_DWTDCTHYBRID
#endif // CONFIG_TX32X32
vp9/common/vp9_invtrans.c
View file @
aa2effa9
...
...
@@ -146,7 +146,6 @@ void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd) {
vp9_inverse_transform_mbuv_8x8
(
xd
);
}
#if CONFIG_TX32X32
void
vp9_inverse_transform_sby_32x32
(
SUPERBLOCKD
*
xd_sb
)
{
vp9_short_idct32x32
(
xd_sb
->
dqcoeff
,
xd_sb
->
diff
,
64
);
}
...
...
@@ -157,4 +156,3 @@ void vp9_inverse_transform_sbuv_16x16(SUPERBLOCKD *xd_sb) {
vp9_inverse_transform_b_16x16
(
xd_sb
->
dqcoeff
+
1280
,
xd_sb
->
diff
+
1280
,
32
);
}
#endif
vp9/common/vp9_invtrans.h
View file @
aa2effa9
...
...
@@ -39,9 +39,7 @@ extern void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd);
extern
void
vp9_inverse_transform_mby_16x16
(
MACROBLOCKD
*
xd
);
#if CONFIG_TX32X32
extern
void
vp9_inverse_transform_sby_32x32
(
SUPERBLOCKD
*
xd_sb
);
extern
void
vp9_inverse_transform_sbuv_16x16
(
SUPERBLOCKD
*
xd_sb
);
#endif
#endif // VP9_COMMON_VP9_INVTRANS_H_
vp9/common/vp9_loopfilter.c
View file @
aa2effa9
...
...
@@ -187,9 +187,7 @@ static int sb_mb_lf_skip(const MODE_INFO *const mip0,
const
MODE_INFO
*
const
mip1
)
{
return
mb_lf_skip
(
&
mip0
->
mbmi
)
&&
mb_lf_skip
(
&
mip1
->
mbmi
)
&&
#if CONFIG_TX32X32
mip0
->
mbmi
.
txfm_size
>=
TX_32X32
&&
#endif
mip0
->
mbmi
.
ref_frame
;
}
void
vp9_loop_filter_frame
(
VP9_COMMON
*
cm
,
...
...
vp9/common/vp9_onyxc_int.h
View file @
aa2effa9
...
...
@@ -55,9 +55,7 @@ typedef struct frame_contexts {
vp9_coeff_probs
hybrid_coef_probs_8x8
[
BLOCK_TYPES_8X8
];
vp9_coeff_probs
coef_probs_16x16
[
BLOCK_TYPES_16X16
];
vp9_coeff_probs
hybrid_coef_probs_16x16
[
BLOCK_TYPES_16X16
];
#if CONFIG_TX32X32
vp9_coeff_probs
coef_probs_32x32
[
BLOCK_TYPES_32X32
];
#endif
nmv_context
nmvc
;
nmv_context
pre_nmvc
;
...
...
@@ -82,9 +80,7 @@ typedef struct frame_contexts {
vp9_coeff_probs
pre_hybrid_coef_probs_8x8
[
BLOCK_TYPES_8X8
];
vp9_coeff_probs
pre_coef_probs_16x16
[
BLOCK_TYPES_16X16
];
vp9_coeff_probs
pre_hybrid_coef_probs_16x16
[
BLOCK_TYPES_16X16
];
#if CONFIG_TX32X32
vp9_coeff_probs
pre_coef_probs_32x32
[
BLOCK_TYPES_32X32
];
#endif
vp9_coeff_count
coef_counts_4x4
[
BLOCK_TYPES_4X4
];
vp9_coeff_count
hybrid_coef_counts_4x4
[
BLOCK_TYPES_4X4
];
...
...
@@ -92,9 +88,7 @@ typedef struct frame_contexts {
vp9_coeff_count
hybrid_coef_counts_8x8
[
BLOCK_TYPES_8X8
];
vp9_coeff_count
coef_counts_16x16
[
BLOCK_TYPES_16X16
];
vp9_coeff_count
hybrid_coef_counts_16x16
[
BLOCK_TYPES_16X16
];
#if CONFIG_TX32X32
vp9_coeff_count
coef_counts_32x32
[
BLOCK_TYPES_32X32
];
#endif
nmv_context_counts
NMVcount
;
vp9_prob
switchable_interp_prob
[
VP9_SWITCHABLE_FILTERS
+
1
]
...
...
@@ -125,11 +119,9 @@ typedef enum {
ONLY_4X4
=
0
,
ALLOW_8X8
=
1
,
ALLOW_16X16
=
2
,
#if CONFIG_TX32X32
ALLOW_32X32
=
3
,
#endif
TX_MODE_SELECT
=
3
+
CONFIG_TX32X32
,
NB_TXFM_MODES
=
4
+
CONFIG_TX32X32
,
TX_MODE_SELECT
=
4
,
NB_TXFM_MODES
=
5
,
}
TXFM_MODE
;
typedef
struct
VP9Common
{
...
...
vp9/common/vp9_recon.c
View file @
aa2effa9
...
...
@@ -115,7 +115,6 @@ void vp9_recon_mbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) {
}
}
#if CONFIG_TX32X32
void
vp9_recon_sby_s_c
(
MACROBLOCKD
*
xd
,
uint8_t
*
dst
)
{
int
x
,
y
,
stride
=
xd
->
block
[
0
].
dst_stride
;
int16_t
*
diff
=
xd
->
sb_coeff_data
.
diff
;
...
...
@@ -145,7 +144,6 @@ void vp9_recon_sbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) {
vdiff
+=
16
;
}
}
#endif // CONFIG_TX32X32
void
vp9_recon_mby_c
(
MACROBLOCKD
*
xd
)
{
int
i
;
...
...
vp9/common/vp9_rtcd_defs.sh
View file @
aa2effa9
...
...
@@ -77,16 +77,12 @@ specialize vp9_dequant_idct_add_y_block
prototype void vp9_dequant_idct_add_uv_block
"int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dstu, uint8_t *dstv, int stride, uint16_t *eobs"
specialize vp9_dequant_idct_add_uv_block
if
[
"
$CONFIG_TX32X32
"
=
"yes"
]
;
then
prototype void vp9_dequant_idct_add_32x32
"int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int pitch, int stride, int eob"
specialize vp9_dequant_idct_add_32x32
prototype void vp9_dequant_idct_add_uv_block_16x16
"int16_t *q, const int16_t *dq, uint8_t *dstu, uint8_t *dstv, int stride, uint16_t *eobs"
specialize vp9_dequant_idct_add_uv_block_16x16
fi
#
# RECON
#
...
...
@@ -135,16 +131,12 @@ specialize vp9_recon_mby_s
prototype void vp9_recon_mbuv_s
"struct macroblockd *x, uint8_t *udst, uint8_t *vdst"
specialize void vp9_recon_mbuv_s
if
[
"
$CONFIG_TX32X32
"
=
"yes"
]
;
then
prototype void vp9_recon_sby_s
"struct macroblockd *x, uint8_t *dst"
specialize vp9_recon_sby_s
prototype void vp9_recon_sbuv_s
"struct macroblockd *x, uint8_t *udst, uint8_t *vdst"
specialize void vp9_recon_sbuv_s
fi
prototype void vp9_build_intra_predictors_mby_s
"struct macroblockd *x"
specialize vp9_build_intra_predictors_mby_s
...
...
vp9/decoder/vp9_decodemv.c
View file @
aa2effa9
...
...
@@ -222,15 +222,11 @@ static void kfread_modes(VP9D_COMP *pbi,
m
->
mbmi
.
txfm_size
=
vp9_read
(
bc
,
cm
->
prob_tx
[
0
]);
if
(
m
->
mbmi
.
txfm_size
!=
TX_4X4
&&
m
->
mbmi
.
mode
!=
I8X8_PRED
)
{
m
->
mbmi
.
txfm_size
+=
vp9_read
(
bc
,
cm
->
prob_tx
[
1
]);
#if CONFIG_TX32X32
if
(
m
->
mbmi
.
txfm_size
!=
TX_8X8
&&
m
->
mbmi
.
sb_type
)
m
->
mbmi
.
txfm_size
+=
vp9_read
(
bc
,
cm
->
prob_tx
[
2
]);
#endif
}
#if CONFIG_TX32X32
}
else
if
(
cm
->
txfm_mode
>=
ALLOW_32X32
&&
m
->
mbmi
.
sb_type
)
{
m
->
mbmi
.
txfm_size
=
TX_32X32
;
#endif
}
else
if
(
cm
->
txfm_mode
>=
ALLOW_16X16
&&
m
->
mbmi
.
mode
<=
TM_PRED
)
{
m
->
mbmi
.
txfm_size
=
TX_16X16
;
}
else
if
(
cm
->
txfm_mode
>=
ALLOW_8X8
&&
m
->
mbmi
.
mode
!=
B_PRED
)
{
...
...
@@ -1208,15 +1204,11 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
if
(
mbmi
->
txfm_size
!=
TX_4X4
&&
mbmi
->
mode
!=
I8X8_PRED
&&
mbmi
->
mode
!=
SPLITMV
)
{
mbmi
->
txfm_size
+=
vp9_read
(
bc
,
cm
->
prob_tx
[
1
]);
#if CONFIG_TX32X32
if
(
mbmi
->
sb_type
&&
mbmi
->
txfm_size
!=
TX_8X8
)
mbmi
->
txfm_size
+=
vp9_read
(
bc
,
cm
->
prob_tx
[
2
]);
#endif
}
#if CONFIG_TX32X32
}
else
if
(
mbmi
->
sb_type
&&
cm
->
txfm_mode
>=
ALLOW_32X32
)
{
mbmi
->
txfm_size
=
TX_32X32
;
#endif
}
else
if
(
cm
->
txfm_mode
>=
ALLOW_16X16
&&
((
mbmi
->
ref_frame
==
INTRA_FRAME
&&
mbmi
->
mode
<=
TM_PRED
)
||
(
mbmi
->
ref_frame
!=
INTRA_FRAME
&&
mbmi
->
mode
!=
SPLITMV
)))
{
...
...
vp9/decoder/vp9_decodframe.c
View file @
aa2effa9
...
...
@@ -747,7 +747,6 @@ static void decode_superblock64(VP9D_COMP *pbi, MACROBLOCKD *xd,
}
/* dequantization and idct */
#if CONFIG_TX32X32
if
(
xd
->
mode_info_context
->
mbmi
.
txfm_size
==
TX_32X32
)
{
for
(
n
=
0
;
n
<
4
;
n
++
)
{
const
int
x_idx
=
n
&
1
,
y_idx
=
n
>>
1
;
...
...
@@ -787,7 +786,6 @@ static void decode_superblock64(VP9D_COMP *pbi, MACROBLOCKD *xd,
}
}
}
else
{
#endif
for
(
n
=
0
;
n
<
16
;
n
++
)
{
int
x_idx
=
n
&
3
,
y_idx
=
n
>>
2
;
...
...
@@ -816,9 +814,7 @@ static void decode_superblock64(VP9D_COMP *pbi, MACROBLOCKD *xd,
decode_4x4_sb
(
pbi
,
xd
,
bc
,
n
,
3
,
2
);
}
}
#if CONFIG_TX32X32
}
#endif
xd
->
above_context
=
pc
->
above_context
+
mb_col
;
xd
->
left_context
=
pc
->
left_context
;
...
...
@@ -873,7 +869,6 @@ static void decode_superblock32(VP9D_COMP *pbi, MACROBLOCKD *xd,
}
/* dequantization and idct */
#if CONFIG_TX32X32
if
(
xd
->
mode_info_context
->
mbmi
.
txfm_size
==
TX_32X32
)
{
eobtotal
=
vp9_decode_sb_tokens
(
pbi
,
xd
,
bc
);
if
(
eobtotal
==
0
)
{
// skip loopfilter
...
...
@@ -895,9 +890,7 @@ static void decode_superblock32(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd
->
dst
.
u_buffer
,
xd
->
dst
.
v_buffer
,
xd
->
dst
.
uv_stride
,
xd
->
eobs
+
16
);
}
}
else
#endif
{
}
else
{
for
(
n
=
0
;
n
<
4
;
n
++
)
{
int
x_idx
=
n
&
1
,
y_idx
=
n
>>
1
;
...
...
@@ -1396,11 +1389,9 @@ static void read_coef_probs(VP9D_COMP *pbi, BOOL_DECODER* const bc) {
read_coef_probs_common
(
bc
,
pc
->
fc
.
hybrid_coef_probs_16x16
,
BLOCK_TYPES_16X16
);
}
#if CONFIG_TX32X32
if
(
pbi
->
common
.
txfm_mode
>
ALLOW_16X16
)
{
read_coef_probs_common
(
bc
,
pc
->
fc
.
coef_probs_32x32
,
BLOCK_TYPES_32X32
);
}
#endif
}
int
vp9_decode_frame
(
VP9D_COMP
*
pbi
,
const
unsigned
char
**
p_data_end
)
{
...
...
@@ -1590,16 +1581,12 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) {
/* Read the loop filter level and type */
pc
->
txfm_mode
=
vp9_read_literal
(
&
header_bc
,
2
);
#if CONFIG_TX32X32
if
(
pc
->
txfm_mode
==
3
)
pc
->
txfm_mode
+=
vp9_read_bit
(
&
header_bc
);
#endif
if
(
pc
->
txfm_mode
==
TX_MODE_SELECT
)
{
pc
->
prob_tx
[
0
]
=
vp9_read_literal
(
&
header_bc
,
8
);
pc
->
prob_tx
[
1
]
=
vp9_read_literal
(
&
header_bc
,
8
);
#if CONFIG_TX32X32
pc
->
prob_tx
[
2
]
=
vp9_read_literal
(
&
header_bc
,
8
);
#endif
}
pc
->
filter_type
=
(
LOOPFILTERTYPE
)
vp9_read_bit
(
&
header_bc
);
...
...
@@ -1782,10 +1769,8 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) {
pbi
->
common
.
fc
.
coef_probs_16x16
);
vp9_copy
(
pbi
->
common
.
fc
.
pre_hybrid_coef_probs_16x16
,
pbi
->
common
.
fc
.
hybrid_coef_probs_16x16
);
#if CONFIG_TX32X32
vp9_copy
(
pbi
->
common
.
fc
.
pre_coef_probs_32x32
,
pbi
->
common
.
fc
.
coef_probs_32x32
);
#endif
vp9_copy
(
pbi
->
common
.
fc
.
pre_ymode_prob
,
pbi
->
common
.
fc
.
ymode_prob
);
vp9_copy
(
pbi
->
common
.
fc
.
pre_sb_ymode_prob
,
pbi
->
common
.
fc
.
sb_ymode_prob
);
vp9_copy
(
pbi
->
common
.
fc
.
pre_uv_mode_prob
,
pbi
->
common
.
fc
.
uv_mode_prob
);
...
...
@@ -1803,9 +1788,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) {
vp9_zero
(
pbi
->
common
.
fc
.
hybrid_coef_counts_8x8
);
vp9_zero
(
pbi
->
common
.
fc
.
coef_counts_16x16
);
vp9_zero
(
pbi
->
common
.
fc
.
hybrid_coef_counts_16x16
);
#if CONFIG_TX32X32
vp9_zero
(
pbi
->
common
.
fc
.
coef_counts_32x32
);
#endif
vp9_zero
(
pbi
->
common
.
fc
.
ymode_counts
);
vp9_zero
(
pbi
->
common
.
fc
.
sb_ymode_counts
);
vp9_zero
(
pbi
->
common
.
fc
.
uv_mode_counts
);
...
...
vp9/decoder/vp9_dequantize.c
View file @
aa2effa9
...
...
@@ -348,7 +348,6 @@ void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
}
}
#if CONFIG_TX32X32
void
vp9_dequant_idct_add_32x32_c
(
int16_t
*
input
,
const
int16_t
*
dq
,
uint8_t
*
pred
,
uint8_t
*
dest
,
int
pitch
,
int
stride
,
int
eob
)
{
...
...
@@ -373,4 +372,3 @@ void vp9_dequant_idct_add_uv_block_16x16_c(int16_t *q, const int16_t *dq,
vp9_dequant_idct_add_16x16_c
(
q
+
256
,
dq
,
dstv
,
dstv
,
stride
,
stride
,
eobs
[
4
]);
}
#endif
vp9/decoder/vp9_detokenize.c
View file @
aa2effa9
...
...
@@ -144,12 +144,10 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
coef_counts
=
fc
->
hybrid_coef_counts_16x16
;
}
break
;
#if CONFIG_TX32X32
case
TX_32X32
:
coef_probs
=
fc
->
coef_probs_32x32
;
coef_counts
=
fc
->
coef_counts_32x32
;
break
;
#endif
}
VP9_COMBINEENTROPYCONTEXTS
(
pt
,
*
a
,
*
l
);
...
...
@@ -249,7 +247,6 @@ static int get_eob(MACROBLOCKD* const xd, int segment_id, int eob_max) {
return
eob
;
}
#if CONFIG_TX32X32
int
vp9_decode_sb_tokens
(
VP9D_COMP
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
BOOL_DECODER
*
const
bc
)
{
...
...
@@ -316,7 +313,6 @@ int vp9_decode_sb_tokens(VP9D_COMP* const pbi,
A
[
8
]
=
L
[
8
]
=
A1
[
8
]
=
L1
[
8
]
=
0
;
return
eobtotal
;
}
#endif
static
int
vp9_decode_mb_tokens_16x16
(
VP9D_COMP
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
...
...
vp9/decoder/vp9_detokenize.h
View file @
aa2effa9
...
...
@@ -23,11 +23,9 @@ int vp9_decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
int
vp9_decode_mb_tokens
(
VP9D_COMP
*
const
,
MACROBLOCKD
*
const
,
BOOL_DECODER
*
const
);
#if CONFIG_TX32X32
int
vp9_decode_sb_tokens
(
VP9D_COMP
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
BOOL_DECODER
*
const
bc
);
#endif
int
vp9_decode_mb_tokens_4x4_uv
(
VP9D_COMP
*
const
dx
,
MACROBLOCKD
*
const
xd
,
BOOL_DECODER
*
const
bc
);
...
...
vp9/encoder/vp9_bitstream.c
View file @
aa2effa9
...
...
@@ -972,10 +972,8 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
vp9_write
(
bc
,
sz
!=
TX_4X4
,
pc
->
prob_tx
[
0
]);
if
(
sz
!=
TX_4X4
&&
mode
!=
I8X8_PRED
&&
mode
!=
SPLITMV
)
{
vp9_write
(
bc
,
sz
!=
TX_8X8
,
pc
->
prob_tx
[
1
]);
#if CONFIG_TX32X32
if
(
mi
->
sb_type
&&
sz
!=
TX_8X8
)
vp9_write
(
bc
,
sz
!=
TX_16X16
,
pc
->
prob_tx
[
2
]);
#endif
}
}
}
...
...
@@ -1078,10 +1076,8 @@ static void write_mb_modes_kf(const VP9_COMP *cpi,
vp9_write
(
bc
,
sz
!=
TX_4X4
,
c
->
prob_tx
[
0
]);
if
(
sz
!=
TX_4X4
&&
ym
<=
TM_PRED
)
{
vp9_write
(
bc
,
sz
!=
TX_8X8
,
c
->
prob_tx
[
1
]);
#if CONFIG_TX32X32
if
(
m
->
mbmi
.
sb_type
&&
sz
!=
TX_8X8
)
vp9_write
(
bc
,
sz
!=
TX_16X16
,
c
->
prob_tx
[
2
]);
#endif
}
}
}
...
...
@@ -1262,14 +1258,12 @@ static void build_coeff_contexts(VP9_COMP *cpi) {
cpi
,
hybrid_context_counters_16x16
,
#endif
cpi
->
frame_hybrid_branch_ct_16x16
,
BLOCK_TYPES_16X16
);
#if CONFIG_TX32X32
build_tree_distribution
(
cpi
->
frame_coef_probs_32x32
,
cpi
->
coef_counts_32x32
,
#ifdef ENTROPY_STATS
cpi
,
context_counters_32x32
,
#endif
cpi
->
frame_branch_ct_32x32
,
BLOCK_TYPES_32X32
);
#endif
}
static
void
update_coef_probs_common
(
vp9_writer
*
const
bc
,
...
...
@@ -1446,7 +1440,6 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
BLOCK_TYPES_16X16
);
}
#if CONFIG_TX32X32
if
(
cpi
->
common
.
txfm_mode
>
ALLOW_16X16
)
{
update_coef_probs_common
(
bc
,
#ifdef ENTROPY_STATS
...
...
@@ -1458,7 +1451,6 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
cpi
->
frame_branch_ct_32x32
,
BLOCK_TYPES_32X32
);
}
#endif
}
#ifdef PACKET_TESTING
...
...
@@ -1699,9 +1691,7 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
cpi
->
txfm_count_32x32p
[
TX_4X4
]
+
cpi
->
txfm_count_32x32p
[
TX_8X8
]
+
cpi
->
txfm_count_32x32p
[
TX_16X16
]
+
#if CONFIG_TX32X32
cpi
->
txfm_count_32x32p
[
TX_32X32
]
+
#endif
cpi
->
txfm_count_16x16p
[
TX_4X4
]
+
cpi
->
txfm_count_16x16p
[
TX_8X8
]
+
cpi
->
txfm_count_16x16p
[
TX_16X16
]
+
...
...
@@ -1711,35 +1701,25 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
cpi
->
txfm_count_16x16p
[
TX_8X8
],
cpi
->
txfm_count_32x32p
[
TX_8X8
]
+
cpi
->
txfm_count_32x32p
[
TX_16X16
]
+