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
f1d090e2
Commit
f1d090e2
authored
Aug 24, 2015
by
Hui Su
Committed by
Gerrit Code Review
Aug 24, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Refactoring on transform types"
parents
697a8e6f
d76e5b36
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
452 additions
and
243 deletions
+452
-243
vp10/common/idct.c
vp10/common/idct.c
+128
-38
vp10/common/idct.h
vp10/common/idct.h
+23
-18
vp10/decoder/decodeframe.c
vp10/decoder/decodeframe.c
+65
-100
vp10/encoder/encodemb.c
vp10/encoder/encodemb.c
+204
-71
vp10/encoder/encodemb.h
vp10/encoder/encodemb.h
+12
-0
vp10/encoder/rdopt.c
vp10/encoder/rdopt.c
+20
-16
No files found.
vp10/common/idct.c
View file @
f1d090e2
...
...
@@ -178,30 +178,73 @@ void vp10_idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride,
vpx_idct32x32_1024_add
(
input
,
dest
,
stride
);
}
// iht
void
vp10_iht4x4_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
)
{
if
(
tx_type
==
DCT_DCT
)
vp10_idct4x4_add
(
input
,
dest
,
stride
,
eob
);
else
vp10_iht4x4_16_add
(
input
,
dest
,
stride
,
tx_type
);
void
vp10_inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
,
void
(
*
itxm_add_4x4
)(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
))
{
switch
(
tx_type
)
{
case
DCT_DCT
:
itxm_add_4x4
(
input
,
dest
,
stride
,
eob
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_iht4x4_16_add
(
input
,
dest
,
stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
void
vp10_iht8x8_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
)
{
if
(
tx_type
==
DCT_DCT
)
{
vp10_idct8x8_add
(
input
,
dest
,
stride
,
eob
);
}
else
{
vp10_iht8x8_64_add
(
input
,
dest
,
stride
,
tx_type
);
void
vp10_inv_txfm_add_8x8
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_idct8x8_add
(
input
,
dest
,
stride
,
eob
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_iht8x8_64_add
(
input
,
dest
,
stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
void
vp10_iht16x16_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
)
{
if
(
tx_type
==
DCT_DCT
)
{
vp10_idct16x16_add
(
input
,
dest
,
stride
,
eob
);
}
else
{
vp10_iht16x16_256_add
(
input
,
dest
,
stride
,
tx_type
);
void
vp10_inv_txfm_add_16x16
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_idct16x16_add
(
input
,
dest
,
stride
,
eob
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_iht16x16_256_add
(
input
,
dest
,
stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
void
vp10_inv_txfm_add_32x32
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_idct32x32_add
(
input
,
dest
,
stride
,
eob
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
assert
(
0
);
break
;
default:
assert
(
0
);
break
;
}
}
...
...
@@ -373,30 +416,77 @@ void vp10_highbd_idct32x32_add(const tran_low_t *input, uint8_t *dest,
}
}
// iht
void
vp10_highbd_iht4x4_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
)
{
if
(
tx_type
==
DCT_DCT
)
vp10_highbd_idct4x4_add
(
input
,
dest
,
stride
,
eob
,
bd
);
else
vp10_highbd_iht4x4_16_add
(
input
,
dest
,
stride
,
tx_type
,
bd
);
void
vp10_highbd_inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
,
void
(
*
highbd_itxm_add_4x4
)
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
))
{
switch
(
tx_type
)
{
case
DCT_DCT
:
highbd_itxm_add_4x4
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_highbd_iht4x4_16_add
(
input
,
dest
,
stride
,
tx_type
,
bd
);
break
;
default:
assert
(
0
);
break
;
}
}
void
vp10_highbd_iht8x8_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
)
{
if
(
tx_type
==
DCT_DCT
)
{
vp10_highbd_idct8x8_add
(
input
,
dest
,
stride
,
eob
,
bd
);
}
else
{
vp10_highbd_iht8x8_64_add
(
input
,
dest
,
stride
,
tx_type
,
bd
);
void
vp10_highbd_inv_txfm_add_8x8
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_idct8x8_add
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_highbd_iht8x8_64_add
(
input
,
dest
,
stride
,
tx_type
,
bd
);
break
;
default:
assert
(
0
);
break
;
}
}
void
vp10_highbd_iht16x16_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
)
{
if
(
tx_type
==
DCT_DCT
)
{
vp10_highbd_idct16x16_add
(
input
,
dest
,
stride
,
eob
,
bd
);
}
else
{
vp10_highbd_iht16x16_256_add
(
input
,
dest
,
stride
,
tx_type
,
bd
);
void
vp10_highbd_inv_txfm_add_16x16
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_idct16x16_add
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_highbd_iht16x16_256_add
(
input
,
dest
,
stride
,
tx_type
,
bd
);
break
;
default:
assert
(
0
);
break
;
}
}
void
vp10_highbd_inv_txfm_add_32x32
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_idct32x32_add
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
assert
(
0
);
break
;
default:
assert
(
0
);
break
;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
vp10/common/idct.h
View file @
f1d090e2
...
...
@@ -42,19 +42,17 @@ void vp10_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
int
eob
);
void
vp10_idct4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_idct8x8_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_idct16x16_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_idct32x32_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_iht4x4_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_iht8x8_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_iht16x16_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
void
vp10_inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
,
void
(
*
itxm_add_4x4
)(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
));
void
vp10_inv_txfm_add_8x8
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
);
void
vp10_inv_txfm_add_16x16
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
);
void
vp10_inv_txfm_add_32x32
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
);
#if CONFIG_VP9_HIGHBITDEPTH
void
vp10_highbd_iwht4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
...
...
@@ -67,12 +65,19 @@ void vp10_highbd_idct16x16_add(const tran_low_t *input, uint8_t *dest,
int
stride
,
int
eob
,
int
bd
);
void
vp10_highbd_idct32x32_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
void
vp10_highbd_iht4x4_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
void
vp10_highbd_iht8x8_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
void
vp10_highbd_iht16x16_add
(
TX_TYPE
tx_type
,
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
void
vp10_highbd_inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
,
void
(
*
highbd_itxm_add_4x4
)
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
));
void
vp10_highbd_inv_txfm_add_8x8
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
void
vp10_highbd_inv_txfm_add_16x16
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
void
vp10_highbd_inv_txfm_add_32x32
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
#endif // CONFIG_VP9_HIGHBITDEPTH
#ifdef __cplusplus
}
// extern "C"
...
...
vp10/decoder/decodeframe.c
View file @
f1d090e2
...
...
@@ -186,76 +186,59 @@ static void read_mv_probs(nmv_context *ctx, int allow_hp, vpx_reader *r) {
static
void
inverse_transform_block_inter
(
MACROBLOCKD
*
xd
,
int
plane
,
const
TX_SIZE
tx_size
,
uint8_t
*
dst
,
int
stride
,
int
eob
)
{
int
eob
,
int
block
)
{
struct
macroblockd_plane
*
const
pd
=
&
xd
->
plane
[
plane
];
TX_TYPE
tx_type
=
get_tx_type
(
pd
->
plane_type
,
xd
,
block
);
if
(
eob
>
0
)
{
tran_low_t
*
const
dqcoeff
=
pd
->
dqcoeff
;
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
if
(
xd
->
lossless
)
{
vp10_highbd_iwht4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
}
else
{
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_highbd_idct4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
case
TX_8X8
:
vp10_highbd_idct8x8_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
case
TX_16X16
:
vp10_highbd_idct16x16_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
case
TX_32X32
:
vp10_highbd_idct32x32_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
}
}
}
else
{
if
(
xd
->
lossless
)
{
vp10_iwht4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
);
}
else
{
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_idct4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_8X8
:
vp10_idct8x8_add
(
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_16X16
:
vp10_idct16x16_add
(
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_32X32
:
vp10_idct32x32_add
(
dqcoeff
,
dst
,
stride
,
eob
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
return
;
}
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_highbd_inv_txfm_add_4x4
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
,
xd
->
lossless
?
vp10_highbd_iwht4x4_add
:
vp10_highbd_idct4x4_add
);
break
;
case
TX_8X8
:
vp10_highbd_inv_txfm_add_8x8
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
);
break
;
case
TX_16X16
:
vp10_highbd_inv_txfm_add_16x16
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
);
break
;
case
TX_32X32
:
vp10_highbd_inv_txfm_add_32x32
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
return
;
}
}
#else
if
(
xd
->
lossless
)
{
vp10_iwht4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
);
}
else
{
#else // CONFIG_VP9_HIGHBITDEPTH
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_idct4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
);
vp10_inv_txfm_add_4x4
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
,
xd
->
lossless
?
vp10_iwht4x4_add
:
vp10_idct4x4_add
);
break
;
case
TX_8X8
:
vp10_i
dct8x8_add
(
dqcoeff
,
dst
,
stride
,
eob
);
vp10_i
nv_txfm_add_8x8
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
);
break
;
case
TX_16X16
:
vp10_i
dct
16x16
_add
(
dqcoeff
,
dst
,
stride
,
eob
);
vp10_i
nv_txfm_add_
16x16
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
);
break
;
case
TX_32X32
:
vp10_i
dct
32x32
_add
(
dqcoeff
,
dst
,
stride
,
eob
);
vp10_i
nv_txfm_add_
32x32
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
return
;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
...
...
@@ -282,70 +265,52 @@ static void inverse_transform_block_intra(MACROBLOCKD* xd, int plane,
tran_low_t
*
const
dqcoeff
=
pd
->
dqcoeff
;
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
if
(
xd
->
lossless
)
{
vp10_highbd_iwht4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
}
else
{
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_highbd_iht4x4_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
case
TX_8X8
:
vp10_highbd_iht8x8_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
case
TX_16X16
:
vp10_highbd_iht16x16_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
case
TX_32X32
:
vp10_highbd_idct32x32_add
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
}
}
}
else
{
if
(
xd
->
lossless
)
{
vp10_iwht4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
);
}
else
{
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_iht4x4_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_8X8
:
vp10_iht8x8_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_16X16
:
vp10_iht16x16_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_32X32
:
vp10_idct32x32_add
(
dqcoeff
,
dst
,
stride
,
eob
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
return
;
}
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_highbd_inv_txfm_add_4x4
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
,
xd
->
lossless
?
vp10_highbd_iwht4x4_add
:
vp10_highbd_idct4x4_add
);
break
;
case
TX_8X8
:
vp10_highbd_inv_txfm_add_8x8
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
);
break
;
case
TX_16X16
:
vp10_highbd_inv_txfm_add_16x16
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
);
break
;
case
TX_32X32
:
vp10_highbd_inv_txfm_add_32x32
(
dqcoeff
,
dst
,
stride
,
eob
,
xd
->
bd
,
tx_type
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
return
;
}
}
#else
if
(
xd
->
lossless
)
{
vp10_iwht4x4_add
(
dqcoeff
,
dst
,
stride
,
eob
);
}
else
{
#else // CONFIG_VP9_HIGHBITDEPTH
switch
(
tx_size
)
{
case
TX_4X4
:
vp10_iht4x4_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
vp10_inv_txfm_add_4x4
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
,
xd
->
lossless
?
vp10_iwht4x4_add
:
vp10_idct4x4_add
);
break
;
case
TX_8X8
:
vp10_i
ht8x8_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
vp10_i
nv_txfm_add_8x8
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
);
break
;
case
TX_16X16
:
vp10_i
ht16x16_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
vp10_i
nv_txfm_add_16x16
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
);
break
;
case
TX_32X32
:
vp10_i
dct
32x32
_add
(
dqcoeff
,
dst
,
stride
,
eob
);
vp10_i
nv_txfm_add_
32x32
(
dqcoeff
,
dst
,
stride
,
eob
,
tx_type
);
break
;
default:
assert
(
0
&&
"Invalid transform size"
);
return
;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
...
...
@@ -406,7 +371,7 @@ static int reconstruct_inter_block(MACROBLOCKD *const xd, vpx_reader *r,
inverse_transform_block_inter
(
xd
,
plane
,
tx_size
,
&
pd
->
dst
.
buf
[
4
*
row
*
pd
->
dst
.
stride
+
4
*
col
],
pd
->
dst
.
stride
,
eob
);
pd
->
dst
.
stride
,
eob
,
block_idx
);
return
eob
;
}
...
...
vp10/encoder/encodemb.c
View file @
f1d090e2
...
...
@@ -496,6 +496,146 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block,
}
}
void
vp10_fwd_txfm_4x4
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
void
(
*
fwd_txm4x4
)(
const
int16_t
*
input
,
tran_low_t
*
output
,
int
stride
))
{
switch
(
tx_type
)
{
case
DCT_DCT
:
fwd_txm4x4
(
src_diff
,
coeff
,
diff_stride
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_fht4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
static
void
fwd_txfm_8x8
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_fht8x8
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
static
void
fwd_txfm_16x16
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_fht16x16
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
static
void
fwd_txfm_32x32
(
int
rd_transform
,
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
fdct32x32
(
rd_transform
,
src_diff
,
coeff
,
diff_stride
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
assert
(
0
);
break
;
default:
assert
(
0
);
break
;
}
}
#if CONFIG_VP9_HIGHBITDEPTH
void
vp10_highbd_fwd_txfm_4x4
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
void
(
*
highbd_fwd_txm4x4
)(
const
int16_t
*
input
,
tran_low_t
*
output
,
int
stride
))
{
switch
(
tx_type
)
{
case
DCT_DCT
:
highbd_fwd_txm4x4
(
src_diff
,
coeff
,
diff_stride
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_highbd_fht4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
static
void
highbd_fwd_txfm_8x8
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vpx_highbd_fdct8x8
(
src_diff
,
coeff
,
diff_stride
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_highbd_fht8x8
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
static
void
highbd_fwd_txfm_16x16
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vpx_highbd_fdct16x16
(
src_diff
,
coeff
,
diff_stride
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
vp10_highbd_fht16x16
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
break
;
default:
assert
(
0
);
break
;
}
}
static
void
highbd_fwd_txfm_32x32
(
int
rd_transform
,
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
highbd_fdct32x32
(
rd_transform
,
src_diff
,
coeff
,
diff_stride
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
assert
(
0
);
break
;
default:
assert
(
0
);
break
;
}