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
46af01d7
Commit
46af01d7
authored
Feb 27, 2014
by
Dmitry Kovalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding get_tx_type() instead of get_tx_type_{8x8, 16x16}.
Change-Id: I4a54b12e5229705222c5a101258b9d1f81e2948d
parent
6440e295
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
32 deletions
+25
-32
vp9/common/vp9_blockd.h
vp9/common/vp9_blockd.h
+10
-13
vp9/common/vp9_reconintra.c
vp9/common/vp9_reconintra.c
+11
-15
vp9/decoder/vp9_decodeframe.c
vp9/decoder/vp9_decodeframe.c
+2
-2
vp9/encoder/vp9_encodemb.c
vp9/encoder/vp9_encodemb.c
+2
-2
No files found.
vp9/common/vp9_blockd.h
View file @
46af01d7
...
...
@@ -255,7 +255,16 @@ static INLINE BLOCK_SIZE get_subsize(BLOCK_SIZE bsize,
return
subsize
;
}
extern
const
TX_TYPE
mode2txfm_map
[
MB_MODE_COUNT
];
extern
const
TX_TYPE
mode2txfm_map
[
INTRA_MODES
];
static
INLINE
TX_TYPE
get_tx_type
(
PLANE_TYPE
plane_type
,
const
MACROBLOCKD
*
xd
)
{
const
MB_MODE_INFO
*
const
mbmi
=
&
xd
->
mi_8x8
[
0
]
->
mbmi
;
if
(
plane_type
!=
PLANE_TYPE_Y
||
is_inter_block
(
mbmi
))
return
DCT_DCT
;
return
mode2txfm_map
[
mbmi
->
mode
];
}
static
INLINE
TX_TYPE
get_tx_type_4x4
(
PLANE_TYPE
plane_type
,
const
MACROBLOCKD
*
xd
,
int
ib
)
{
...
...
@@ -267,18 +276,6 @@ static INLINE TX_TYPE get_tx_type_4x4(PLANE_TYPE plane_type,
return
mode2txfm_map
[
get_y_mode
(
mi
,
ib
)];
}
static
INLINE
TX_TYPE
get_tx_type_8x8
(
PLANE_TYPE
plane_type
,
const
MACROBLOCKD
*
xd
)
{
return
plane_type
==
PLANE_TYPE_Y
?
mode2txfm_map
[
xd
->
mi_8x8
[
0
]
->
mbmi
.
mode
]
:
DCT_DCT
;
}
static
INLINE
TX_TYPE
get_tx_type_16x16
(
PLANE_TYPE
plane_type
,
const
MACROBLOCKD
*
xd
)
{
return
plane_type
==
PLANE_TYPE_Y
?
mode2txfm_map
[
xd
->
mi_8x8
[
0
]
->
mbmi
.
mode
]
:
DCT_DCT
;
}
void
vp9_setup_block_planes
(
MACROBLOCKD
*
xd
,
int
ss_x
,
int
ss_y
);
static
INLINE
TX_SIZE
get_uv_tx_size_impl
(
TX_SIZE
y_tx_size
,
BLOCK_SIZE
bsize
)
{
...
...
vp9/common/vp9_reconintra.c
View file @
46af01d7
...
...
@@ -18,7 +18,7 @@
#include "vp9/common/vp9_reconintra.h"
#include "vp9/common/vp9_onyxc_int.h"
const
TX_TYPE
mode2txfm_map
[
MB_MODE_COUNT
]
=
{
const
TX_TYPE
mode2txfm_map
[
INTRA_MODES
]
=
{
DCT_DCT
,
// DC
ADST_DCT
,
// V
DCT_ADST
,
// H
...
...
@@ -29,10 +29,6 @@ const TX_TYPE mode2txfm_map[MB_MODE_COUNT] = {
DCT_ADST
,
// D207
ADST_DCT
,
// D63
ADST_ADST
,
// TM
DCT_DCT
,
// NEARESTMV
DCT_DCT
,
// NEARMV
DCT_DCT
,
// ZEROMV
DCT_DCT
// NEWMV
};
#define intra_pred_sized(type, size) \
...
...
vp9/decoder/vp9_decodeframe.c
View file @
46af01d7
...
...
@@ -245,11 +245,11 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block,
vp9_iht4x4_16_add
(
dqcoeff
,
dst
,
stride
,
tx_type
);
break
;
case
TX_8X8
:
tx_type
=
get_tx_type
_8x8
(
plane_type
,
xd
);
tx_type
=
get_tx_type
(
plane_type
,
xd
);
vp9_iht8x8_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_16X16
:
tx_type
=
get_tx_type
_16x16
(
plane_type
,
xd
);
tx_type
=
get_tx_type
(
plane_type
,
xd
);
vp9_iht16x16_add
(
tx_type
,
dqcoeff
,
dst
,
stride
,
eob
);
break
;
case
TX_32X32
:
...
...
vp9/encoder/vp9_encodemb.c
View file @
46af01d7
...
...
@@ -526,7 +526,7 @@ static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_idct32x32_add
(
dqcoeff
,
dst
,
dst_stride
,
*
eob
);
break
;
case
TX_16X16
:
tx_type
=
get_tx_type
_16x16
(
pd
->
plane_type
,
xd
);
tx_type
=
get_tx_type
(
pd
->
plane_type
,
xd
);
scan_order
=
&
vp9_scan_orders
[
TX_16X16
][
tx_type
];
mode
=
plane
==
0
?
mbmi
->
mode
:
mbmi
->
uv_mode
;
vp9_predict_intra_block
(
xd
,
block
>>
4
,
bwl
,
TX_16X16
,
mode
,
...
...
@@ -546,7 +546,7 @@ static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_iht16x16_add
(
tx_type
,
dqcoeff
,
dst
,
dst_stride
,
*
eob
);
break
;
case
TX_8X8
:
tx_type
=
get_tx_type
_8x8
(
pd
->
plane_type
,
xd
);
tx_type
=
get_tx_type
(
pd
->
plane_type
,
xd
);
scan_order
=
&
vp9_scan_orders
[
TX_8X8
][
tx_type
];
mode
=
plane
==
0
?
mbmi
->
mode
:
mbmi
->
uv_mode
;
vp9_predict_intra_block
(
xd
,
block
>>
2
,
bwl
,
TX_8X8
,
mode
,
...
...
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