Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
075b11f0
Commit
075b11f0
authored
Aug 02, 2013
by
Adrian Grange
Committed by
Gerrit Code Review
Aug 02, 2013
Browse files
Merge "Changed name of rd_pick_intra4x4mby_modes"
parents
8ff58093
5271d478
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
075b11f0
...
...
@@ -1306,9 +1306,12 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
return
best_rd
;
}
static
int64_t
rd_pick_intra4x4mby_modes
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
mb
,
int
*
Rate
,
int
*
rate_y
,
int64_t
*
Distortion
,
int64_t
best_rd
)
{
static
int64_t
rd_pick_intra_sub_8x8_y_mode
(
VP9_COMP
*
const
cpi
,
MACROBLOCK
*
const
mb
,
int
*
const
rate
,
int
*
const
rate_y
,
int64_t
*
const
distortion
,
int64_t
best_rd
)
{
int
i
,
j
;
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
BLOCK_SIZE_TYPE
bsize
=
xd
->
mode_info_context
->
mbmi
.
sb_type
;
...
...
@@ -1316,7 +1319,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
idx
,
idy
;
int
cost
=
0
;
int64_t
distortion
=
0
;
int64_t
total_
distortion
=
0
;
int
tot_rate_y
=
0
;
int64_t
total_rd
=
0
;
ENTROPY_CONTEXT
t_above
[
4
],
t_left
[
4
];
...
...
@@ -1354,7 +1357,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
total_rd
+=
this_rd
;
cost
+=
r
;
distortion
+=
d
;
total_
distortion
+=
d
;
tot_rate_y
+=
ry
;
mic
->
bmi
[
i
].
as_mode
=
best_mode
;
...
...
@@ -1368,12 +1371,12 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
}
}
*
R
ate
=
cost
;
*
r
ate
=
cost
;
*
rate_y
=
tot_rate_y
;
*
D
istortion
=
distortion
;
*
d
istortion
=
total_
distortion
;
xd
->
mode_info_context
->
mbmi
.
mode
=
mic
->
bmi
[
3
].
as_mode
;
return
RDCOST
(
mb
->
rdmult
,
mb
->
rddiv
,
cost
,
distortion
);
return
RDCOST
(
mb
->
rdmult
,
mb
->
rddiv
,
cost
,
total_
distortion
);
}
static
int64_t
rd_pick_intra_sby_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
...
...
@@ -3150,8 +3153,8 @@ void vp9_rd_pick_intra_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
&
dist_uv
,
&
uv_skip
,
bsize
);
}
else
{
y_skip
=
0
;
if
(
rd_pick_intra
4x4mb
y_mode
s
(
cpi
,
x
,
&
rate_y
,
&
rate_y_tokenonly
,
&
dist_y
,
best_rd
)
>=
best_rd
)
{
if
(
rd_pick_intra
_sub_8x8_
y_mode
(
cpi
,
x
,
&
rate_y
,
&
rate_y_tokenonly
,
&
dist_y
,
best_rd
)
>=
best_rd
)
{
*
returnrate
=
INT_MAX
;
return
;
}
...
...
@@ -3502,9 +3505,10 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
continue;
*/
// I4X4_PRED is only considered for block sizes less than 8x8.
mbmi
->
txfm_size
=
TX_4X4
;
if
(
rd_pick_intra
4x4mb
y_mode
s
(
cpi
,
x
,
&
rate
,
&
rate_y
,
&
distortion_y
,
best_rd
)
>=
best_rd
)
if
(
rd_pick_intra
_sub_8x8_
y_mode
(
cpi
,
x
,
&
rate
,
&
rate_y
,
&
distortion_y
,
best_rd
)
>=
best_rd
)
continue
;
rate2
+=
rate
;
rate2
+=
intra_cost_penalty
;
...
...
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