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
75112626
Commit
75112626
authored
Sep 22, 2016
by
Jingning Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 2x2 adst and dct units
Change-Id: I6d3e97385a9d1c82fd3b7cbc8fcc02b3f682e955
parent
beacb3ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletion
+56
-1
aom_dsp/txfm_common.h
aom_dsp/txfm_common.h
+6
-1
av1/common/av1_inv_txfm.c
av1/common/av1_inv_txfm.c
+14
-0
av1/encoder/dct.c
av1/encoder/dct.c
+36
-0
No files found.
aom_dsp/txfm_common.h
View file @
75112626
...
...
@@ -58,11 +58,16 @@ static const tran_high_t cospi_29_64 = 2404;
static
const
tran_high_t
cospi_30_64
=
1606
;
static
const
tran_high_t
cospi_31_64
=
804
;
// 16384 * sqrt(2) * sin(k
Pi/
9) * 2 / 3
// 16384 * sqrt(2) * sin(k
* Pi /
9) * 2 / 3
static
const
tran_high_t
sinpi_1_9
=
5283
;
static
const
tran_high_t
sinpi_2_9
=
9929
;
static
const
tran_high_t
sinpi_3_9
=
13377
;
static
const
tran_high_t
sinpi_4_9
=
15212
;
#if CONFIG_CB4X4
// 16384 * sqrt(2/5) * 2 * sin(k * Pi / 5)
static
const
tran_high_t
sinpi_1_5
=
12181
;
static
const
tran_high_t
sinpi_2_5
=
19710
;
#endif
// 16384 * sqrt(2)
static
const
tran_high_t
Sqrt2
=
23170
;
...
...
av1/common/av1_inv_txfm.c
View file @
75112626
...
...
@@ -242,6 +242,20 @@ void av1_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
}
}
#if CONFIG_CB4X4
void
av1_iadst2_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
;
const
tran_low_t
x0
=
input
[
0
];
const
tran_low_t
x1
=
input
[
1
];
s0
=
sinpi_1_5
*
x0
+
sinpi_2_5
*
x1
;
s1
=
sinpi_2_5
*
x0
-
sinpi_1_5
*
x1
;
output
[
0
]
=
WRAPLOW
(
dct_const_round_shift
(
s0
),
8
);
output
[
1
]
=
WRAPLOW
(
dct_const_round_shift
(
s1
),
8
);
}
#endif
void
av1_iadst4_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
...
...
av1/encoder/dct.c
View file @
75112626
...
...
@@ -38,6 +38,20 @@ static INLINE void range_check(const tran_low_t *input, const int size,
#endif
}
#if CONFIG_CB4X4
static
void
fdct2
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
;
const
tran_low_t
x0
=
input
[
0
];
const
tran_low_t
x1
=
input
[
1
];
s0
=
(
tran_high_t
)
x0
+
x1
;
s1
=
(
tran_high_t
)
x0
-
x1
;
output
[
0
]
=
(
tran_low_t
)
s0
;
output
[
1
]
=
(
tran_low_t
)
s1
;
}
#endif
static
void
fdct4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
temp
;
tran_low_t
step
[
4
];
...
...
@@ -694,6 +708,22 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
}
#endif // CONFIG_EXT_TX
#if CONFIG_CB4X4
static
void
fadst2
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
;
tran_low_t
x0
,
x1
;
x0
=
input
[
0
];
x1
=
input
[
1
];
s0
=
sinpi_1_5
*
x0
+
sinpi_2_5
*
x1
;
s1
=
sinpi_2_5
*
x0
-
sinpi_1_5
*
x1
;
output
[
0
]
=
(
tran_low_t
)
fdct_round_shift
(
s0
);
output
[
1
]
=
(
tran_low_t
)
fdct_round_shift
(
s1
);
}
#endif
static
void
fadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
x0
,
x1
,
x2
,
x3
;
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
...
...
@@ -1101,6 +1131,12 @@ static void maybe_flip_input(const int16_t **src, int *src_stride, int l,
}
#endif // CONFIG_EXT_TX
#if CONFIG_CB4X4
static
const
transform_2d
FHT_2
[]
=
{
{
fdct2
,
fdct2
},
{
fadst2
,
fdct2
},
{
fdct2
,
fadst2
},
{
fadst2
,
fadst2
},
};
#endif
static
const
transform_2d
FHT_4
[]
=
{
{
fdct4
,
fdct4
},
// DCT_DCT = 0
{
fadst4
,
fdct4
},
// ADST_DCT = 1
...
...
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