Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
8b344375
Commit
8b344375
authored
Oct 03, 2013
by
Dmitry Kovalev
Browse files
Replacing duplicated code with get_scan_and_band call.
Change-Id: I2cc3684f416a63dc99b9303109f9850f34a470d5
parent
3b7794f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
8b344375
...
...
@@ -667,6 +667,7 @@ static void txfm_rd_in_plane(MACROBLOCK *x,
const
BLOCK_SIZE
bs
=
get_plane_block_size
(
bsize
,
pd
);
const
int
num_4x4_w
=
num_4x4_blocks_wide_lookup
[
bs
];
const
int
num_4x4_h
=
num_4x4_blocks_high_lookup
[
bs
];
const
uint8_t
*
band_translate
;
// just for the get_scan_and_band call
struct
rdcost_block_args
args
=
{
x
,
{
0
},
{
0
},
tx_size
,
num_4x4_w
,
num_4x4_h
,
...
...
@@ -678,26 +679,9 @@ static void txfm_rd_in_plane(MACROBLOCK *x,
vp9_get_entropy_contexts
(
tx_size
,
args
.
t_above
,
args
.
t_left
,
pd
->
above_context
,
pd
->
left_context
,
num_4x4_w
,
num_4x4_h
);
switch
(
tx_size
)
{
case
TX_4X4
:
get_scan_nb_4x4
(
get_tx_type_4x4
(
pd
->
plane_type
,
xd
,
0
),
&
args
.
scan
,
&
args
.
nb
);
break
;
case
TX_8X8
:
get_scan_nb_8x8
(
get_tx_type_8x8
(
pd
->
plane_type
,
xd
),
&
args
.
scan
,
&
args
.
nb
);
break
;
case
TX_16X16
:
get_scan_nb_16x16
(
get_tx_type_16x16
(
pd
->
plane_type
,
xd
),
&
args
.
scan
,
&
args
.
nb
);
break
;
case
TX_32X32
:
args
.
scan
=
vp9_default_scan_32x32
;
args
.
nb
=
vp9_default_scan_32x32_neighbors
;
break
;
default:
assert
(
0
);
}
get_scan_and_band
(
xd
,
tx_size
,
pd
->
plane_type
,
0
,
&
args
.
scan
,
&
args
.
nb
,
&
band_translate
);
foreach_transformed_block_in_plane
(
xd
,
bsize
,
plane
,
block_yrd_txfm
,
&
args
);
if
(
args
.
skip
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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