Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
e554f36c
Commit
e554f36c
authored
Oct 04, 2017
by
Nathan E. Egge
Committed by
Nathan Egge
Oct 19, 2017
Browse files
Rename DAALA_DCTx experiments to DAALA_TXx.
Change-Id: I8fa0a67d7a198b8b24837ffc352acf77f390cffe
parent
cce013cd
Changes
18
Hide whitespace changes
Inline
Side-by-side
aom_dsp/inv_txfm.c
View file @
e554f36c
...
...
@@ -14,8 +14,8 @@
#include "./aom_dsp_rtcd.h"
#include "aom_dsp/inv_txfm.h"
#if CONFIG_DAALA_
DC
T4 || CONFIG_DAALA_
DC
T8 || CONFIG_DAALA_
DC
T16 || \
CONFIG_DAALA_
DC
T32 || CONFIG_DAALA_
DC
T64
#if CONFIG_DAALA_T
X
4 || CONFIG_DAALA_T
X
8 || CONFIG_DAALA_T
X
16 || \
CONFIG_DAALA_T
X
32 || CONFIG_DAALA_T
X
64
#include "av1/common/daala_tx.h"
#endif
...
...
aom_dsp/inv_txfm.h
View file @
e554f36c
...
...
@@ -58,7 +58,7 @@ void aom_idct4_c(const tran_low_t *input, tran_low_t *output);
void
aom_idct8_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
aom_idct16_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
aom_idct32_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
#if CONFIG_TX64X64 && CONFIG_DAALA_
DC
T64
#if CONFIG_TX64X64 && CONFIG_DAALA_T
X
64
void
aom_idct64_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
#endif
void
aom_iadst4_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
...
...
av1/common/av1_rtcd_defs.pl
View file @
e554f36c
...
...
@@ -101,7 +101,7 @@ if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto
qw/void av1_iht32x32_1024_add/
,
"
const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param
";
}
else
{
add_proto
qw/void av1_iht4x4_16_add/
,
"
const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T4
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
4
")
ne
"
yes
")
{
specialize
qw/av1_iht4x4_16_add sse2 neon/
;
}
...
...
@@ -132,25 +132,25 @@ if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto
qw/void av1_iht32x8_256_add/
,
"
const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param
";
add_proto
qw/void av1_iht8x8_64_add/
,
"
const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T8
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
8
")
ne
"
yes
")
{
specialize
qw/av1_iht8x8_64_add sse2 neon/
;
}
add_proto
qw/void av1_iht16x16_256_add/
,
"
const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T16
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
16
")
ne
"
yes
")
{
specialize
qw/av1_iht16x16_256_add sse2 avx2/
;
}
add_proto
qw/void av1_iht32x32_1024_add/
,
"
const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param
";
if
(
aom_config
("
CONFIG_EXT_TX
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_
DC
T4
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
4
")
ne
"
yes
")
{
specialize
qw/av1_iht4x4_16_add msa/
;
}
if
(
aom_config
("
CONFIG_DAALA_
DC
T8
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
8
")
ne
"
yes
")
{
specialize
qw/av1_iht8x8_64_add msa/
;
}
if
(
aom_config
("
CONFIG_DAALA_
DC
T16
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
16
")
ne
"
yes
")
{
specialize
qw/av1_iht16x16_256_add msa/
;
}
}
...
...
@@ -272,19 +272,19 @@ add_proto qw/void av1_inv_txfm2d_add_16x8/, "const int32_t *input, uint16_t *out
add_proto
qw/void av1_inv_txfm2d_add_16x32/
,
"
const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd
";
add_proto
qw/void av1_inv_txfm2d_add_32x16/
,
"
const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd
";
add_proto
qw/void av1_inv_txfm2d_add_4x4/
,
"
const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T4
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
4
")
ne
"
yes
")
{
specialize
qw/av1_inv_txfm2d_add_4x4 sse4_1/
;
}
add_proto
qw/void av1_inv_txfm2d_add_8x8/
,
"
const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T8
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
8
")
ne
"
yes
")
{
specialize
qw/av1_inv_txfm2d_add_8x8 sse4_1/
;
}
add_proto
qw/void av1_inv_txfm2d_add_16x16/
,
"
const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T16
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
16
")
ne
"
yes
")
{
specialize
qw/av1_inv_txfm2d_add_16x16 sse4_1/
;
}
add_proto
qw/void av1_inv_txfm2d_add_32x32/
,
"
const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T32
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
32
")
ne
"
yes
")
{
specialize
qw/av1_inv_txfm2d_add_32x32 avx2/
;
}
if
(
aom_config
("
CONFIG_TX64X64
")
eq
"
yes
")
{
...
...
@@ -337,24 +337,24 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
# fdct functions
add_proto
qw/void av1_fht4x4/
,
"
const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T4
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
4
")
ne
"
yes
")
{
specialize
qw/av1_fht4x4 sse2/
;
}
add_proto
qw/void av1_fwht4x4/
,
"
const int16_t *input, tran_low_t *output, int stride
";
add_proto
qw/void av1_fht8x8/
,
"
const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T8
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
8
")
ne
"
yes
")
{
specialize
qw/av1_fht8x8 sse2/
;
}
add_proto
qw/void av1_fht16x16/
,
"
const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T16
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
16
")
ne
"
yes
")
{
specialize
qw/av1_fht16x16 sse2 avx2/
;
}
add_proto
qw/void av1_fht32x32/
,
"
const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T32
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
32
")
ne
"
yes
")
{
specialize
qw/av1_fht32x32 sse2 avx2/
;
}
...
...
@@ -392,13 +392,13 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
if
(
aom_config
("
CONFIG_HIGHBITDEPTH
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_EXT_TX
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_
DC
T4
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
4
")
ne
"
yes
")
{
specialize
qw/av1_fht4x4 msa/
;
}
if
(
aom_config
("
CONFIG_DAALA_
DC
T8
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
8
")
ne
"
yes
")
{
specialize
qw/av1_fht8x8 msa/
;
}
if
(
aom_config
("
CONFIG_DAALA_
DC
T16
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
16
")
ne
"
yes
")
{
specialize
qw/av1_fht16x16 msa/
;
}
}
...
...
@@ -414,19 +414,19 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
add_proto
qw/void av1_fwd_txfm2d_16x32/
,
"
const int16_t *input, int32_t *output, int stride, TX_TYPE tx_type, int bd
";
add_proto
qw/void av1_fwd_txfm2d_32x16/
,
"
const int16_t *input, int32_t *output, int stride, TX_TYPE tx_type, int bd
";
add_proto
qw/void av1_fwd_txfm2d_4x4/
,
"
const int16_t *input, int32_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T4
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
4
")
ne
"
yes
")
{
specialize
qw/av1_fwd_txfm2d_4x4 sse4_1/
;
}
add_proto
qw/void av1_fwd_txfm2d_8x8/
,
"
const int16_t *input, int32_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T8
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
8
")
ne
"
yes
")
{
specialize
qw/av1_fwd_txfm2d_8x8 sse4_1/
;
}
add_proto
qw/void av1_fwd_txfm2d_16x16/
,
"
const int16_t *input, int32_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T16
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
16
")
ne
"
yes
")
{
specialize
qw/av1_fwd_txfm2d_16x16 sse4_1/
;
}
add_proto
qw/void av1_fwd_txfm2d_32x32/
,
"
const int16_t *input, int32_t *output, int stride, TX_TYPE tx_type, int bd
";
if
(
aom_config
("
CONFIG_DAALA_
DC
T32
")
ne
"
yes
")
{
if
(
aom_config
("
CONFIG_DAALA_T
X
32
")
ne
"
yes
")
{
specialize
qw/av1_fwd_txfm2d_32x32 sse4_1/
;
}
...
...
av1/common/idct.c
View file @
e554f36c
...
...
@@ -19,8 +19,8 @@
#include "av1/common/blockd.h"
#include "av1/common/enums.h"
#include "av1/common/idct.h"
#if CONFIG_DAALA_
DC
T4 || CONFIG_DAALA_
DC
T8 || CONFIG_DAALA_
DC
T16 || \
CONFIG_DAALA_
DC
T32 || CONFIG_DAALA_
DC
T64
#if CONFIG_DAALA_T
X
4 || CONFIG_DAALA_T
X
8 || CONFIG_DAALA_T
X
16 || \
CONFIG_DAALA_T
X
32 || CONFIG_DAALA_T
X
64
#include "av1/common/daala_tx.h"
#endif
...
...
@@ -61,7 +61,7 @@ static void iidtx32_c(const tran_low_t *input, tran_low_t *output) {
}
}
#if CONFIG_TX64X64 && !CONFIG_DAALA_
DC
T64
#if CONFIG_TX64X64 && !CONFIG_DAALA_T
X
64
static
void
iidtx64_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
int
i
;
for
(
i
=
0
;
i
<
64
;
++
i
)
{
...
...
@@ -86,7 +86,7 @@ static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) {
// Note overall scaling factor is 4 times orthogonal
}
#if CONFIG_TX64X64 && !CONFIG_DAALA_
DC
T64
#if CONFIG_TX64X64 && !CONFIG_DAALA_T
X
64
static
void
idct64_col_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
int32_t
in
[
64
],
out
[
64
];
int
i
;
...
...
@@ -712,14 +712,14 @@ void av1_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
#if CONFIG_MRC_TX
assert
(
tx_type
!=
MRC_DCT
&&
"Invalid tx type for tx size"
);
#endif // CONFIG_MRC_TX
#if !CONFIG_DAALA_
DC
T4
#if !CONFIG_DAALA_T
X
4
if
(
tx_type
==
DCT_DCT
)
{
aom_idct4x4_16_add
(
input
,
dest
,
stride
);
return
;
}
#endif
static
const
transform_2d
IHT_4
[]
=
{
#if CONFIG_DAALA_
DC
T4
#if CONFIG_DAALA_T
X
4
{
daala_idct4
,
daala_idct4
},
// DCT_DCT = 0
{
daala_idst4
,
daala_idct4
},
// ADST_DCT = 1
{
daala_idct4
,
daala_idst4
},
// DCT_ADST = 2
...
...
@@ -779,7 +779,7 @@ void av1_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// inverse transform row vectors
for
(
i
=
0
;
i
<
4
;
++
i
)
{
#if CONFIG_DAALA_
DC
T4
#if CONFIG_DAALA_T
X
4
tran_low_t
temp_in
[
4
];
for
(
j
=
0
;
j
<
4
;
j
++
)
temp_in
[
j
]
=
input
[
j
]
*
2
;
IHT_4
[
tx_type
].
rows
(
temp_in
,
out
[
i
]);
...
...
@@ -820,7 +820,7 @@ void av1_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
for
(
j
=
0
;
j
<
4
;
++
j
)
{
int
d
=
i
*
stride
+
j
;
int
s
=
j
*
outstride
+
i
;
#if CONFIG_DAALA_
DC
T4
#if CONFIG_DAALA_T
X
4
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
4
));
#else
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
4
));
...
...
@@ -1569,7 +1569,7 @@ void av1_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert
(
tx_type
==
DCT_DCT
);
#endif
static
const
transform_2d
IHT_8
[]
=
{
#if CONFIG_DAALA_
DC
T8
#if CONFIG_DAALA_T
X
8
{
daala_idct8
,
daala_idct8
},
// DCT_DCT = 0
{
daala_idst8
,
daala_idct8
},
// ADST_DCT = 1
{
daala_idct8
,
daala_idst8
},
// DCT_ADST = 2
...
...
@@ -1625,7 +1625,7 @@ void av1_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// inverse transform row vectors
for
(
i
=
0
;
i
<
8
;
++
i
)
{
#if CONFIG_DAALA_
DC
T8
#if CONFIG_DAALA_T
X
8
tran_low_t
temp_in
[
8
];
for
(
j
=
0
;
j
<
8
;
j
++
)
temp_in
[
j
]
=
input
[
j
]
*
2
;
IHT_8
[
tx_type
].
rows
(
temp_in
,
out
[
i
]);
...
...
@@ -1666,7 +1666,7 @@ void av1_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride,
for
(
j
=
0
;
j
<
8
;
++
j
)
{
int
d
=
i
*
stride
+
j
;
int
s
=
j
*
outstride
+
i
;
#if CONFIG_DAALA_
DC
T8
#if CONFIG_DAALA_T
X
8
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
4
));
#else
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
5
));
...
...
@@ -1685,7 +1685,7 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert
(
tx_type
==
DCT_DCT
);
#endif
static
const
transform_2d
IHT_16
[]
=
{
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
{
daala_idct16
,
daala_idct16
},
// DCT_DCT = 0
{
daala_idst16
,
daala_idct16
},
// ADST_DCT = 1
{
daala_idct16
,
daala_idst16
},
// DCT_ADST = 2
...
...
@@ -1734,7 +1734,7 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// inverse transform row vectors
for
(
i
=
0
;
i
<
16
;
++
i
)
{
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
tran_low_t
temp_in
[
16
];
for
(
j
=
0
;
j
<
16
;
j
++
)
temp_in
[
j
]
=
input
[
j
]
*
2
;
IHT_16
[
tx_type
].
rows
(
temp_in
,
out
[
i
]);
...
...
@@ -1763,7 +1763,7 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride,
for
(
j
=
0
;
j
<
16
;
++
j
)
{
int
d
=
i
*
stride
+
j
;
int
s
=
j
*
outstride
+
i
;
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
4
));
#else
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
6
));
...
...
@@ -1772,7 +1772,7 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride,
}
}
#if CONFIG_EXT_TX || CONFIG_DAALA_
DC
T32
#if CONFIG_EXT_TX || CONFIG_DAALA_T
X
32
void
av1_iht32x32_1024_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
const
TX_TYPE
tx_type
=
txfm_param
->
tx_type
;
...
...
@@ -1780,7 +1780,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert
(
tx_type
==
DCT_DCT
);
#endif
static
const
transform_2d
IHT_32
[]
=
{
#if CONFIG_DAALA_
DC
T32
#if CONFIG_DAALA_T
X
32
{
daala_idct32
,
daala_idct32
},
// DCT_DCT
#if CONFIG_EXT_TX
{
daala_idst32
,
daala_idct32
},
// ADST_DCT
...
...
@@ -1829,7 +1829,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// inverse transform row vectors
for
(
i
=
0
;
i
<
32
;
++
i
)
{
#if CONFIG_DAALA_
DC
T32
#if CONFIG_DAALA_T
X
32
tran_low_t
temp_in
[
32
];
for
(
j
=
0
;
j
<
32
;
j
++
)
temp_in
[
j
]
=
input
[
j
]
*
2
;
IHT_32
[
tx_type
].
rows
(
temp_in
,
out
[
i
]);
...
...
@@ -1842,7 +1842,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// transpose
for
(
i
=
0
;
i
<
32
;
i
++
)
{
for
(
j
=
0
;
j
<
32
;
j
++
)
{
#if CONFIG_DAALA_
DC
T32
#if CONFIG_DAALA_T
X
32
tmp
[
j
][
i
]
=
out
[
i
][
j
]
*
4
;
#else
tmp
[
j
][
i
]
=
out
[
i
][
j
];
...
...
@@ -1860,7 +1860,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
for
(
j
=
0
;
j
<
32
;
++
j
)
{
int
d
=
i
*
stride
+
j
;
int
s
=
j
*
outstride
+
i
;
#if CONFIG_DAALA_
DC
T32
#if CONFIG_DAALA_T
X
32
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
5
));
#else
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
6
));
...
...
@@ -1868,7 +1868,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
}
}
}
#endif // CONFIG_EXT_TX || CONFIG_DAALA_
DC
T32
#endif // CONFIG_EXT_TX || CONFIG_DAALA_T
X
32
#if CONFIG_TX64X64
void
av1_iht64x64_4096_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
...
...
@@ -1881,7 +1881,7 @@ void av1_iht64x64_4096_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert
(
tx_type
==
DCT_DCT
);
#endif
static
const
transform_2d
IHT_64
[]
=
{
#if CONFIG_DAALA_
DC
T64
#if CONFIG_DAALA_T
X
64
{
daala_idct64
,
daala_idct64
},
// DCT_DCT
{
daala_idst64
,
daala_idct64
},
// ADST_DCT
{
daala_idct64
,
daala_idst64
},
// DCT_ADST
...
...
@@ -1930,7 +1930,7 @@ void av1_iht64x64_4096_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// inverse transform row vectors
for
(
i
=
0
;
i
<
64
;
++
i
)
{
#if CONFIG_DAALA_
DC
T64
#if CONFIG_DAALA_T
X
64
tran_low_t
temp_in
[
64
];
for
(
j
=
0
;
j
<
64
;
j
++
)
temp_in
[
j
]
=
input
[
j
]
*
2
;
IHT_64
[
tx_type
].
rows
(
temp_in
,
out
[
i
]);
...
...
@@ -1961,7 +1961,7 @@ void av1_iht64x64_4096_add_c(const tran_low_t *input, uint8_t *dest, int stride,
for
(
j
=
0
;
j
<
64
;
++
j
)
{
int
d
=
i
*
stride
+
j
;
int
s
=
j
*
outstride
+
i
;
#if CONFIG_DAALA_
DC
T64
#if CONFIG_DAALA_T
X
64
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
2
));
#else
dest
[
d
]
=
clip_pixel_add
(
dest
[
d
],
ROUND_POWER_OF_TWO
(
outp
[
s
],
5
));
...
...
@@ -2115,7 +2115,7 @@ void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
aom_iwht4x4_1_add
(
input
,
dest
,
stride
);
}
#if !CONFIG_DAALA_
DC
T8
#if !CONFIG_DAALA_T
X
8
static
void
idct8x8_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
// If dc is 1, then input[0] is the reconstructed value, do not need
...
...
@@ -2142,7 +2142,7 @@ static void idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride,
}
#endif
#if !CONFIG_DAALA_
DC
T16
#if !CONFIG_DAALA_T
X
16
static
void
idct16x16_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
// The calculation can be simplified if there are not many non-zero dct
...
...
@@ -2208,7 +2208,7 @@ static void imrc32x32_add_c(const tran_low_t *input, uint8_t *dest, int stride,
}
#endif // CONFIG_MRC_TX
#if !CONFIG_DAALA_
DC
T32
#if !CONFIG_DAALA_T
X
32
static
void
idct32x32_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
#if CONFIG_ADAPT_SCAN
...
...
@@ -2233,13 +2233,13 @@ static void idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride,
}
#endif
#if CONFIG_TX64X64 && !CONFIG_DAALA_
DC
T64
#if CONFIG_TX64X64 && !CONFIG_DAALA_T
X
64
static
void
idct64x64_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
(
void
)
txfm_param
;
av1_iht64x64_4096_add
(
input
,
dest
,
stride
,
txfm_param
);
}
#endif // CONFIG_TX64X64 && !CONFIG_DAALA_
DC
T64
#endif // CONFIG_TX64X64 && !CONFIG_DAALA_T
X
64
static
void
inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
...
...
@@ -2251,7 +2251,7 @@ static void inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride,
}
switch
(
tx_type
)
{
#if !CONFIG_DAALA_
DC
T4
#if !CONFIG_DAALA_T
X
4
case
DCT_DCT
:
av1_idct4x4_add
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
case
DCT_DCT
:
...
...
@@ -2259,7 +2259,7 @@ static void inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride,
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
#if CONFIG_LGT || CONFIG_DAALA_
DC
T4
#if CONFIG_LGT || CONFIG_DAALA_T
X
4
// LGT only exists in C verson
av1_iht4x4_16_add_c
(
input
,
dest
,
stride
,
txfm_param
);
break
;
...
...
@@ -2273,7 +2273,7 @@ static void inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride,
case
FLIPADST_FLIPADST
:
case
ADST_FLIPADST
:
case
FLIPADST_ADST
:
#if CONFIG_LGT || CONFIG_DAALA_
DC
T4
#if CONFIG_LGT || CONFIG_DAALA_T
X
4
av1_iht4x4_16_add_c
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
...
...
@@ -2396,7 +2396,7 @@ static void inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride,
const
TxfmParam
*
txfm_param
)
{
const
TX_TYPE
tx_type
=
txfm_param
->
tx_type
;
switch
(
tx_type
)
{
#if !CONFIG_DAALA_
DC
T8
#if !CONFIG_DAALA_T
X
8
case
DCT_DCT
:
idct8x8_add
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
case
DCT_DCT
:
...
...
@@ -2404,7 +2404,7 @@ static void inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride,
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
#if CONFIG_LGT || CONFIG_DAALA_
DC
T8
#if CONFIG_LGT || CONFIG_DAALA_T
X
8
av1_iht8x8_64_add_c
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
...
...
@@ -2417,7 +2417,7 @@ static void inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride,
case
FLIPADST_FLIPADST
:
case
ADST_FLIPADST
:
case
FLIPADST_ADST
:
#if CONFIG_LGT || CONFIG_DAALA_
DC
T8
#if CONFIG_LGT || CONFIG_DAALA_T
X
8
av1_iht8x8_64_add_c
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
...
...
@@ -2443,7 +2443,7 @@ static void inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
const
TX_TYPE
tx_type
=
txfm_param
->
tx_type
;
switch
(
tx_type
)
{
#if !CONFIG_DAALA_
DC
T16
#if !CONFIG_DAALA_T
X
16
case
DCT_DCT
:
idct16x16_add
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
case
DCT_DCT
:
...
...
@@ -2451,11 +2451,11 @@ static void inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
av1_iht16x16_256_add_c
(
input
,
dest
,
stride
,
txfm_param
);
#else
av1_iht16x16_256_add
(
input
,
dest
,
stride
,
txfm_param
);
#endif // CONFIG_DAALA_
DC
T16
#endif // CONFIG_DAALA_T
X
16
break
;
#if CONFIG_EXT_TX
case
FLIPADST_DCT
:
...
...
@@ -2469,11 +2469,11 @@ static void inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
case
H_ADST
:
case
V_FLIPADST
:
case
H_FLIPADST
:
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
av1_iht16x16_256_add_c
(
input
,
dest
,
stride
,
txfm_param
);
#else
av1_iht16x16_256_add
(
input
,
dest
,
stride
,
txfm_param
);
#endif // CONFIG_DAALA_
DC
T16
#endif // CONFIG_DAALA_T
X
16
break
;
case
IDTX
:
inv_idtx_add_c
(
input
,
dest
,
stride
,
16
,
16
,
tx_type
);
break
;
#endif // CONFIG_EXT_TX
...
...
@@ -2488,7 +2488,7 @@ static void inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
int
stride
,
const
TxfmParam
*
txfm_param
)
{
const
TX_TYPE
tx_type
=
txfm_param
->
tx_type
;
switch
(
tx_type
)
{
#if !CONFIG_DAALA_
DC
T32
#if !CONFIG_DAALA_T
X
32
case
DCT_DCT
:
idct32x32_add
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
case
DCT_DCT
:
...
...
@@ -2527,7 +2527,7 @@ static void inv_txfm_add_64x64(const tran_low_t *input, uint8_t *dest,
const
TX_TYPE
tx_type
=
txfm_param
->
tx_type
;
assert
(
tx_type
==
DCT_DCT
);
switch
(
tx_type
)
{
#if !CONFIG_DAALA_
DC
T64
#if !CONFIG_DAALA_T
X
64
case
DCT_DCT
:
idct64x64_add
(
input
,
dest
,
stride
,
txfm_param
);
break
;
#else
case
DCT_DCT
:
...
...
av1/encoder/dct.c
View file @
e554f36c
...
...
@@ -21,8 +21,8 @@
#include "av1/common/av1_fwd_txfm1d.h"
#include "av1/common/av1_fwd_txfm1d_cfg.h"
#include "av1/common/idct.h"
#if CONFIG_DAALA_
DC
T4 || CONFIG_DAALA_
DC
T8 || CONFIG_DAALA_
DC
T16 || \
CONFIG_DAALA_
DC
T32 || CONFIG_DAALA_
DC
T64
#if CONFIG_DAALA_T
X
4 || CONFIG_DAALA_T
X
8 || CONFIG_DAALA_T
X
16 || \
CONFIG_DAALA_T
X
32 || CONFIG_DAALA_T
X
64
#include "av1/common/daala_tx.h"
#endif
...
...
@@ -1389,7 +1389,7 @@ void av1_fht4x4_c(const int16_t *input, tran_low_t *output, int stride,
#if CONFIG_DCT_ONLY
assert
(
tx_type
==
DCT_DCT
);
#endif
#if !CONFIG_DAALA_
DC
T4
#if !CONFIG_DAALA_T
X
4
if
(
tx_type
==
DCT_DCT
)
{
aom_fdct4x4_c
(
input
,
output
,
stride
);
return
;
...
...
@@ -1397,7 +1397,7 @@ void av1_fht4x4_c(const int16_t *input, tran_low_t *output, int stride,
#endif
{
static
const
transform_2d
FHT
[]
=
{
#if CONFIG_DAALA_
DC
T4
#if CONFIG_DAALA_T
X
4
{
daala_fdct4
,
daala_fdct4
},
// DCT_DCT
{
daala_fdst4
,
daala_fdct4
},
// ADST_DCT
{
daala_fdct4
,
daala_fdst4
},
// DCT_ADST
...
...
@@ -1460,7 +1460,7 @@ void av1_fht4x4_c(const int16_t *input, tran_low_t *output, int stride,
for
(
i
=
0
;
i
<
4
;
++
i
)
{
/* A C99-safe upshift by 4 for both Daala and VPx TX. */
for
(
j
=
0
;
j
<
4
;
++
j
)
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
16
;
#if !CONFIG_DAALA_
DC
T4
#if !CONFIG_DAALA_T
X
4
if
(
i
==
0
&&
temp_in
[
0
])
temp_in
[
0
]
+=
1
;
#endif
#if CONFIG_LGT
...
...
@@ -1481,7 +1481,7 @@ void av1_fht4x4_c(const int16_t *input, tran_low_t *output, int stride,
else
#endif
ht
.
rows
(
temp_in
,
temp_out
);
#if CONFIG_DAALA_
DC
T4
#if CONFIG_DAALA_T
X
4
/* Daala TX has orthonormal scaling; shift down by only 1 to achieve
the usual VPx coefficient left-shift of 3. */
for
(
j
=
0
;
j
<
4
;
++
j
)
output
[
j
+
i
*
4
]
=
temp_out
[
j
]
>>
1
;
...
...
@@ -2177,7 +2177,7 @@ void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride,
#if CONFIG_DCT_ONLY
assert
(
tx_type
==
DCT_DCT
);
#endif
#if !CONFIG_DAALA_
DC
T8
#if !CONFIG_DAALA_T
X
8
if
(
tx_type
==
DCT_DCT
)
{
aom_fdct8x8_c
(
input
,
output
,
stride
);
return
;
...
...
@@ -2185,7 +2185,7 @@ void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride,
#endif
{
static
const
transform_2d
FHT
[]
=
{
#if CONFIG_DAALA_
DC
T8
#if CONFIG_DAALA_T
X
8
{
daala_fdct8
,
daala_fdct8
},
// DCT_DCT
{
daala_fdst8
,
daala_fdct8
},
// ADST_DCT
{
daala_fdct8
,
daala_fdst8
},
// DCT_ADST
...
...
@@ -2244,7 +2244,7 @@ void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride,
// Columns
for
(
i
=
0
;
i
<
8
;
++
i
)
{
#if CONFIG_DAALA_
DC
T8
#if CONFIG_DAALA_T
X
8
for
(
j
=
0
;
j
<
8
;
++
j
)
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
16
;
#else
for
(
j
=
0
;
j
<
8
;
++
j
)
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
4
;
...
...
@@ -2267,7 +2267,7 @@ void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride,
else
#endif
ht
.
rows
(
temp_in
,
temp_out
);
#if CONFIG_DAALA_
DC
T8
#if CONFIG_DAALA_T
X
8
for
(
j
=
0
;
j
<
8
;
++
j
)
output
[
j
+
i
*
8
]
=
(
temp_out
[
j
]
+
(
temp_out
[
j
]
<
0
))
>>
1
;
#else
...
...
@@ -2344,7 +2344,7 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
assert
(
tx_type
==
DCT_DCT
);
#endif
static
const
transform_2d
FHT
[]
=
{
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
{
daala_fdct16
,
daala_fdct16
},
// DCT_DCT
{
daala_fdst16
,
daala_fdct16
},
// ADST_DCT
{
daala_fdct16
,
daala_fdst16
},
// DCT_ADST
...
...
@@ -2397,7 +2397,7 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
// Columns
for
(
i
=
0
;
i
<
16
;
++
i
)
{
for
(
j
=
0
;
j
<
16
;
++
j
)
{
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
16
;
#else
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
4
;
...
...
@@ -2405,7 +2405,7 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
}
ht
.
cols
(
temp_in
,
temp_out
);
for
(
j
=
0
;
j
<
16
;
++
j
)
{
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
out
[
j
*
16
+
i
]
=
temp_out
[
j
];
#else
out
[
j
*
16
+
i
]
=
(
temp_out
[
j
]
+
1
+
(
temp_out
[
j
]
<
0
))
>>
2
;
...
...
@@ -2418,7 +2418,7 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
for
(
j
=
0
;
j
<
16
;
++
j
)
temp_in
[
j
]
=
out
[
j
+
i
*
16
];
ht
.
rows
(
temp_in
,
temp_out
);
for
(
j
=
0
;
j
<
16
;
++
j
)
{
#if CONFIG_DAALA_
DC
T16
#if CONFIG_DAALA_T
X
16
output
[
j
+
i
*
16
]
=
(
temp_out
[
j
]
+
(
temp_out
[
j
]
<
0
))
>>
1
;
#else
output
[
j
+
i
*
16
]
=
temp_out
[
j
];
...
...
@@ -2439,7 +2439,7 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
assert
(
tx_type
==
DCT_DCT
);
#endif
static
const
transform_2d
FHT
[]
=
{
#if CONFIG_DAALA_
DC
T32
#if CONFIG_DAALA_T
X
32
{
daala_fdct32
,
daala_fdct32
},
// DCT_DCT
#if CONFIG_EXT_TX
{
daala_fdst32
,
daala_fdct32
},
// ADST_DCT
...
...
@@ -2503,7 +2503,7 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
// Columns
for
(
i
=
0
;
i
<
32
;
++
i
)
{
for
(
j
=
0
;
j
<
32
;
++
j
)
{
#if CONFIG_DAALA_
DC
T32
#if CONFIG_DAALA_T
X
32
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
16
;
#else
temp_in
[
j
]
=
input
[
j
*
stride
+
i
]
*
4
;
...
...
@@ -2511,7 +2511,7 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,