Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
130c6d74
Commit
130c6d74
authored
Nov 10, 2014
by
Deb Mukherjee
Committed by
Gerrit Code Review
Nov 10, 2014
Browse files
Merge "Iadst transforms to use internal low precision"
parents
18366964
cc57c5e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_idct.c
View file @
130c6d74
...
...
@@ -276,10 +276,10 @@ void vp9_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
static
void
iadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
tran_
high
_t
x0
=
input
[
0
];
tran_
high
_t
x1
=
input
[
1
];
tran_
high
_t
x2
=
input
[
2
];
tran_
high
_t
x3
=
input
[
3
];
tran_
low
_t
x0
=
input
[
0
];
tran_
low
_t
x1
=
input
[
1
];
tran_
low
_t
x2
=
input
[
2
];
tran_
low
_t
x3
=
input
[
3
];
if
(
!
(
x0
|
x1
|
x2
|
x3
))
{
output
[
0
]
=
output
[
1
]
=
output
[
2
]
=
output
[
3
]
=
0
;
...
...
@@ -295,24 +295,19 @@ static void iadst4(const tran_low_t *input, tran_low_t *output) {
s6
=
sinpi_4_9
*
x3
;
s7
=
x0
-
x2
+
x3
;
x0
=
s0
+
s3
+
s5
;
x1
=
s1
-
s4
-
s6
;
x2
=
sinpi_3_9
*
s7
;
x3
=
s2
;
s0
=
x0
+
x3
;
s1
=
x1
+
x3
;
s2
=
x2
;
s3
=
x0
+
x1
-
x3
;
s0
=
s0
+
s3
+
s5
;
s1
=
s1
-
s4
-
s6
;
s3
=
s2
;
s2
=
sinpi_3_9
*
s7
;
// 1-D transform scaling factor is sqrt(2).
// The overall dynamic range is 14b (input) + 14b (multiplication scaling)
// + 1b (addition) = 29b.
// Hence the output bit depth is 15b.
output
[
0
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
),
8
);
output
[
1
]
=
WRAPLOW
(
dct_const_round_shift
(
s1
),
8
);
output
[
0
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
+
s3
),
8
);
output
[
1
]
=
WRAPLOW
(
dct_const_round_shift
(
s1
+
s3
),
8
);
output
[
2
]
=
WRAPLOW
(
dct_const_round_shift
(
s2
),
8
);
output
[
3
]
=
WRAPLOW
(
dct_const_round_shift
(
s3
),
8
);
output
[
3
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
+
s1
-
s3
),
8
);
}
void
vp9_iht4x4_16_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
...
...
@@ -1702,10 +1697,10 @@ void vp9_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest8,
static
void
highbd_iadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
,
int
bd
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
tran_
high
_t
x0
=
input
[
0
];
tran_
high
_t
x1
=
input
[
1
];
tran_
high
_t
x2
=
input
[
2
];
tran_
high
_t
x3
=
input
[
3
];
tran_
low
_t
x0
=
input
[
0
];
tran_
low
_t
x1
=
input
[
1
];
tran_
low
_t
x2
=
input
[
2
];
tran_
low
_t
x3
=
input
[
3
];
(
void
)
bd
;
if
(
!
(
x0
|
x1
|
x2
|
x3
))
{
...
...
@@ -1720,26 +1715,21 @@ static void highbd_iadst4(const tran_low_t *input, tran_low_t *output, int bd) {
s4
=
sinpi_1_9
*
x2
;
s5
=
sinpi_2_9
*
x3
;
s6
=
sinpi_4_9
*
x3
;
s7
=
x0
-
x2
+
x3
;
x0
=
s0
+
s3
+
s5
;
x1
=
s1
-
s4
-
s6
;
x2
=
sinpi_3_9
*
s7
;
x3
=
s2
;
s7
=
(
tran_high_t
)(
x0
-
x2
+
x3
);
s0
=
x
0
+
x3
;
s1
=
x
1
+
x3
;
s
2
=
x
2
;
s
3
=
x0
+
x1
-
x3
;
s0
=
s
0
+
s3
+
s5
;
s1
=
s
1
-
s4
-
s6
;
s
3
=
s
2
;
s
2
=
sinpi_3_9
*
s7
;
// 1-D transform scaling factor is sqrt(2).
// The overall dynamic range is 14b (input) + 14b (multiplication scaling)
// + 1b (addition) = 29b.
// Hence the output bit depth is 15b.
output
[
0
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
),
bd
);
output
[
1
]
=
WRAPLOW
(
dct_const_round_shift
(
s1
),
bd
);
output
[
0
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
+
s3
),
bd
);
output
[
1
]
=
WRAPLOW
(
dct_const_round_shift
(
s1
+
s3
),
bd
);
output
[
2
]
=
WRAPLOW
(
dct_const_round_shift
(
s2
),
bd
);
output
[
3
]
=
WRAPLOW
(
dct_const_round_shift
(
s3
),
bd
);
output
[
3
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
+
s1
-
s3
),
bd
);
}
void
vp9_highbd_iht4x4_16_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest8
,
...
...
@@ -1779,14 +1769,14 @@ void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
static
void
highbd_iadst8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
,
int
bd
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
tran_
high
_t
x0
=
input
[
7
];
tran_
high
_t
x1
=
input
[
0
];
tran_
high
_t
x2
=
input
[
5
];
tran_
high
_t
x3
=
input
[
2
];
tran_
high
_t
x4
=
input
[
3
];
tran_
high
_t
x5
=
input
[
4
];
tran_
high
_t
x6
=
input
[
1
];
tran_
high
_t
x7
=
input
[
6
];
tran_
low
_t
x0
=
input
[
7
];
tran_
low
_t
x1
=
input
[
0
];
tran_
low
_t
x2
=
input
[
5
];
tran_
low
_t
x3
=
input
[
2
];
tran_
low
_t
x4
=
input
[
3
];
tran_
low
_t
x5
=
input
[
4
];
tran_
low
_t
x6
=
input
[
1
];
tran_
low
_t
x7
=
input
[
6
];
(
void
)
bd
;
if
(
!
(
x0
|
x1
|
x2
|
x3
|
x4
|
x5
|
x6
|
x7
))
{
...
...
@@ -2113,22 +2103,22 @@ static void highbd_iadst16(const tran_low_t *input, tran_low_t *output,
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
,
s8
;
tran_high_t
s9
,
s10
,
s11
,
s12
,
s13
,
s14
,
s15
;
tran_
high
_t
x0
=
input
[
15
];
tran_
high
_t
x1
=
input
[
0
];
tran_
high
_t
x2
=
input
[
13
];
tran_
high
_t
x3
=
input
[
2
];
tran_
high
_t
x4
=
input
[
11
];
tran_
high
_t
x5
=
input
[
4
];
tran_
high
_t
x6
=
input
[
9
];
tran_
high
_t
x7
=
input
[
6
];
tran_
high
_t
x8
=
input
[
7
];
tran_
high
_t
x9
=
input
[
8
];
tran_
high
_t
x10
=
input
[
5
];
tran_
high
_t
x11
=
input
[
10
];
tran_
high
_t
x12
=
input
[
3
];
tran_
high
_t
x13
=
input
[
12
];
tran_
high
_t
x14
=
input
[
1
];
tran_
high
_t
x15
=
input
[
14
];
tran_
low
_t
x0
=
input
[
15
];
tran_
low
_t
x1
=
input
[
0
];
tran_
low
_t
x2
=
input
[
13
];
tran_
low
_t
x3
=
input
[
2
];
tran_
low
_t
x4
=
input
[
11
];
tran_
low
_t
x5
=
input
[
4
];
tran_
low
_t
x6
=
input
[
9
];
tran_
low
_t
x7
=
input
[
6
];
tran_
low
_t
x8
=
input
[
7
];
tran_
low
_t
x9
=
input
[
8
];
tran_
low
_t
x10
=
input
[
5
];
tran_
low
_t
x11
=
input
[
10
];
tran_
low
_t
x12
=
input
[
3
];
tran_
low
_t
x13
=
input
[
12
];
tran_
low
_t
x14
=
input
[
1
];
tran_
low
_t
x15
=
input
[
14
];
(
void
)
bd
;
if
(
!
(
x0
|
x1
|
x2
|
x3
|
x4
|
x5
|
x6
|
x7
|
x8
...
...
Write
Preview
Markdown
is supported
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