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
Xiph.Org
aom-rav1e
Commits
052bc8ea
Commit
052bc8ea
authored
Sep 22, 2014
by
Yaowu Xu
Committed by
Gerrit Code Review
Sep 22, 2014
Browse files
Merge "Simplify rd_pick_intra_sby_mode()"
parents
b51f0ea2
f46326c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
052bc8ea
...
...
@@ -827,6 +827,7 @@ static int64_t rd_pick_intra_sub_8x8_y_mode(VP9_COMP *cpi, MACROBLOCK *mb,
return
RDCOST
(
mb
->
rdmult
,
mb
->
rddiv
,
cost
,
total_distortion
);
}
// This function is used only for intra_only frames
static
int64_t
rd_pick_intra_sby_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
int
*
rate
,
int
*
rate_tokenonly
,
int64_t
*
distortion
,
int
*
skippable
,
...
...
@@ -841,7 +842,12 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
int64_t
this_distortion
,
this_rd
;
TX_SIZE
best_tx
=
TX_4X4
;
int
i
;
int
*
bmode_costs
=
cpi
->
mbmode_cost
;
int
*
bmode_costs
;
const
MODE_INFO
*
above_mi
=
xd
->
mi
[
-
xd
->
mi_stride
].
src_mi
;
const
MODE_INFO
*
left_mi
=
xd
->
left_available
?
xd
->
mi
[
-
1
].
src_mi
:
NULL
;
const
PREDICTION_MODE
A
=
vp9_above_block_mode
(
mic
,
above_mi
,
0
);
const
PREDICTION_MODE
L
=
vp9_left_block_mode
(
mic
,
left_mi
,
0
);
bmode_costs
=
cpi
->
y_mode_costs
[
A
][
L
];
if
(
cpi
->
sf
.
tx_size_search_method
==
USE_FULL_RD
)
for
(
i
=
0
;
i
<
TX_MODES
;
i
++
)
...
...
@@ -850,15 +856,6 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
/* Y Search for intra prediction mode */
for
(
mode
=
DC_PRED
;
mode
<=
TM_PRED
;
mode
++
)
{
int64_t
local_tx_cache
[
TX_MODES
];
MODE_INFO
*
above_mi
=
xd
->
mi
[
-
xd
->
mi_stride
].
src_mi
;
MODE_INFO
*
left_mi
=
xd
->
left_available
?
xd
->
mi
[
-
1
].
src_mi
:
NULL
;
if
(
cpi
->
common
.
frame_type
==
KEY_FRAME
)
{
const
PREDICTION_MODE
A
=
vp9_above_block_mode
(
mic
,
above_mi
,
0
);
const
PREDICTION_MODE
L
=
vp9_left_block_mode
(
mic
,
left_mi
,
0
);
bmode_costs
=
cpi
->
y_mode_costs
[
A
][
L
];
}
mic
->
mbmi
.
mode
=
mode
;
super_block_yrd
(
cpi
,
x
,
&
this_rate_tokenonly
,
&
this_distortion
,
...
...
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