Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
d0e23b40
Commit
d0e23b40
authored
Dec 23, 2016
by
Sebastien Alaiwan
Committed by
Yaowu Xu
Feb 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge dct_const_round_shift functions.
Change-Id: I73e3eec0b8fd17c3f9b9f52afc9fac43f3043028
parent
3aec8d6c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
198 deletions
+183
-198
aom_dsp/inv_txfm.c
aom_dsp/inv_txfm.c
+170
-170
aom_dsp/inv_txfm.h
aom_dsp/inv_txfm.h
+0
-4
av1/common/idct.c
av1/common/idct.c
+13
-24
No files found.
aom_dsp/inv_txfm.c
View file @
d0e23b40
This diff is collapsed.
Click to expand it.
aom_dsp/inv_txfm.h
View file @
d0e23b40
...
...
@@ -59,10 +59,6 @@ static INLINE tran_high_t highbd_check_range(tran_high_t input, int bd) {
return
input
;
}
static
INLINE
tran_high_t
highbd_dct_const_round_shift
(
tran_high_t
input
)
{
tran_high_t
rv
=
ROUND_POWER_OF_TWO
(
input
,
DCT_CONST_BITS
);
return
rv
;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_EMULATE_HARDWARE
...
...
av1/common/idct.c
View file @
d0e23b40
...
...
@@ -121,8 +121,7 @@ static void highbd_iidtx4_c(const tran_low_t *input, tran_low_t *output,
int
bd
)
{
int
i
;
for
(
i
=
0
;
i
<
4
;
++
i
)
output
[
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
input
[
i
]
*
Sqrt2
),
bd
);
output
[
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
input
[
i
]
*
Sqrt2
),
bd
);
}
static
void
highbd_iidtx8_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
,
...
...
@@ -136,8 +135,7 @@ static void highbd_iidtx16_c(const tran_low_t *input, tran_low_t *output,
int
bd
)
{
int
i
;
for
(
i
=
0
;
i
<
16
;
++
i
)
output
[
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
input
[
i
]
*
2
*
Sqrt2
),
bd
);
output
[
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
input
[
i
]
*
2
*
Sqrt2
),
bd
);
}
static
void
highbd_iidtx32_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
,
...
...
@@ -154,8 +152,7 @@ static void highbd_ihalfright32_c(const tran_low_t *input, tran_low_t *output,
tran_low_t
inputhalf
[
16
];
// Multiply input by sqrt(2)
for
(
i
=
0
;
i
<
16
;
++
i
)
{
inputhalf
[
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
input
[
i
]
*
Sqrt2
),
bd
);
inputhalf
[
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
input
[
i
]
*
Sqrt2
),
bd
);
}
for
(
i
=
0
;
i
<
16
;
++
i
)
{
output
[
i
]
=
input
[
16
+
i
]
*
4
;
...
...
@@ -170,8 +167,7 @@ static void highbd_iidtx64_c(const tran_low_t *input, tran_low_t *output,
int
bd
)
{
int
i
;
for
(
i
=
0
;
i
<
64
;
++
i
)
output
[
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
input
[
i
]
*
4
*
Sqrt2
),
bd
);
output
[
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
input
[
i
]
*
4
*
Sqrt2
),
bd
);
}
#endif // CONFIG_TX64X64
#endif // CONFIG_EXT_TX
...
...
@@ -184,12 +180,11 @@ static void highbd_ihalfright64_c(const tran_low_t *input, tran_low_t *output,
tran_low_t
inputhalf
[
32
];
// Multiply input by sqrt(2)
for
(
i
=
0
;
i
<
32
;
++
i
)
{
inputhalf
[
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
input
[
i
]
*
Sqrt2
),
bd
);
inputhalf
[
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
input
[
i
]
*
Sqrt2
),
bd
);
}
for
(
i
=
0
;
i
<
32
;
++
i
)
{
output
[
i
]
=
HIGHBD_WRAPLOW
(
highbd_
dct_const_round_shift
(
input
[
32
+
i
]
*
4
*
Sqrt2
),
bd
);
output
[
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
input
[
32
+
i
]
*
4
*
Sqrt2
),
bd
);
}
aom_highbd_idct32_c
(
inputhalf
,
output
+
32
,
bd
);
// Note overall scaling factor is 4 * sqrt(2) times orthogonal
...
...
@@ -1620,8 +1615,7 @@ void av1_highbd_iht4x8_32_add_c(const tran_low_t *input, uint8_t *dest8,
for
(
i
=
0
;
i
<
n2
;
++
i
)
{
HIGH_IHT_4x8
[
tx_type
].
rows
(
input
,
outtmp
,
bd
);
for
(
j
=
0
;
j
<
n
;
++
j
)
{
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
}
input
+=
n
;
}
...
...
@@ -1682,8 +1676,7 @@ void av1_highbd_iht8x4_32_add_c(const tran_low_t *input, uint8_t *dest8,
for
(
i
=
0
;
i
<
n
;
++
i
)
{
HIGH_IHT_8x4
[
tx_type
].
rows
(
input
,
outtmp
,
bd
);
for
(
j
=
0
;
j
<
n2
;
++
j
)
{
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
}
input
+=
n2
;
}
...
...
@@ -1860,8 +1853,7 @@ void av1_highbd_iht8x16_128_add_c(const tran_low_t *input, uint8_t *dest8,
for
(
i
=
0
;
i
<
n2
;
++
i
)
{
HIGH_IHT_8x16
[
tx_type
].
rows
(
input
,
outtmp
,
bd
);
for
(
j
=
0
;
j
<
n
;
++
j
)
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
input
+=
n
;
}
...
...
@@ -1921,8 +1913,7 @@ void av1_highbd_iht16x8_128_add_c(const tran_low_t *input, uint8_t *dest8,
for
(
i
=
0
;
i
<
n
;
++
i
)
{
HIGH_IHT_16x8
[
tx_type
].
rows
(
input
,
outtmp
,
bd
);
for
(
j
=
0
;
j
<
n2
;
++
j
)
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
input
+=
n2
;
}
...
...
@@ -2096,8 +2087,7 @@ void av1_highbd_iht16x32_512_add_c(const tran_low_t *input, uint8_t *dest8,
for
(
i
=
0
;
i
<
n2
;
++
i
)
{
HIGH_IHT_16x32
[
tx_type
].
rows
(
input
,
outtmp
,
bd
);
for
(
j
=
0
;
j
<
n
;
++
j
)
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
input
+=
n
;
}
...
...
@@ -2157,8 +2147,7 @@ void av1_highbd_iht32x16_512_add_c(const tran_low_t *input, uint8_t *dest8,
for
(
i
=
0
;
i
<
n
;
++
i
)
{
HIGH_IHT_32x16
[
tx_type
].
rows
(
input
,
outtmp
,
bd
);
for
(
j
=
0
;
j
<
n2
;
++
j
)
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
highbd_dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
out
[
j
][
i
]
=
HIGHBD_WRAPLOW
(
dct_const_round_shift
(
outtmp
[
j
]
*
Sqrt2
),
bd
);
input
+=
n2
;
}
...
...
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