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
61dca1fd
Commit
61dca1fd
authored
Jan 04, 2017
by
Angie Chiang
Browse files
Use 16-bit internal precision in fdct32
Change-Id: I487995f51737be882d4f2a4c7bbd6b87297b4f55
parent
8e1d0f70
Changes
1
Hide whitespace changes
Inline
Side-by-side
av1/encoder/dct.c
View file @
61dca1fd
...
...
@@ -22,23 +22,6 @@
#include
"av1/common/av1_fwd_txfm2d_cfg.h"
#include
"av1/common/idct.h"
static
INLINE
void
range_check_high
(
const
tran_high_t
*
input
,
const
int
size
,
const
int
bit
)
{
#if 0 // CONFIG_COEFFICIENT_RANGE_CHECKING
// TODO(angiebird): the range_check is not used because the bit range
// in fdct# is not correct. Since we are going to merge in a new version
// of fdct# from nextgenv2, we won't fix the incorrect bit range now.
int i;
for (i = 0; i < size; ++i) {
assert(abs(input[i]) < (1 << bit));
}
#else
(
void
)
input
;
(
void
)
size
;
(
void
)
bit
;
#endif
}
static
INLINE
void
range_check
(
const
tran_low_t
*
input
,
const
int
size
,
const
int
bit
)
{
#if 0 // CONFIG_COEFFICIENT_RANGE_CHECKING
...
...
@@ -346,7 +329,7 @@ static void fdct16(const tran_low_t *input, tran_low_t *output) {
static
void
fdct32
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
temp
;
tran_
high
_t
step
[
32
];
tran_
low
_t
step
[
32
];
// stage 0
range_check
(
input
,
32
,
14
);
...
...
@@ -429,7 +412,7 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
step
[
30
]
=
output
[
30
];
step
[
31
]
=
output
[
31
];
range_check
_high
(
step
,
32
,
16
);
range_check
(
step
,
32
,
16
);
// stage 3
output
[
0
]
=
step
[
0
]
+
step
[
7
];
...
...
@@ -515,7 +498,7 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
step
[
30
]
=
output
[
30
];
step
[
31
]
=
output
[
31
];
range_check
_high
(
step
,
32
,
18
);
range_check
(
step
,
32
,
18
);
// stage 5
temp
=
step
[
0
]
*
cospi_16_64
+
step
[
1
]
*
cospi_16_64
;
...
...
@@ -607,7 +590,7 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
step
[
30
]
=
(
tran_low_t
)
fdct_round_shift
(
temp
);
step
[
31
]
=
output
[
31
];
range_check
_high
(
step
,
32
,
18
);
range_check
(
step
,
32
,
18
);
// stage 7
output
[
0
]
=
step
[
0
];
...
...
@@ -703,7 +686,7 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
temp
=
output
[
31
]
*
cospi_31_64
+
output
[
16
]
*
-
cospi_1_64
;
step
[
31
]
=
(
tran_low_t
)
fdct_round_shift
(
temp
);
range_check
_high
(
step
,
32
,
18
);
range_check
(
step
,
32
,
18
);
// stage 9
output
[
0
]
=
step
[
0
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment