Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
libvpx
Commits
a0e8b45f
Commit
a0e8b45f
authored
Jul 25, 2013
by
Scott LaVarnway
Committed by
Gerrit Code Review
Jul 25, 2013
Browse files
Merge "pack_inter_mode_mvs cleanup"
parents
91fa1242
7bc294a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_bitstream.c
+12
-13
No files found.
vp9/encoder/vp9_bitstream.c
View file @
a0e8b45f
...
...
@@ -405,8 +405,8 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
const
MB_PREDICTION_MODE
mode
=
mi
->
mode
;
const
int
segment_id
=
mi
->
segment_id
;
int
skip_coeff
;
const
BLOCK_SIZE_TYPE
bsize
=
mi
->
sb_type
;
xd
->
prev_mode_info_context
=
pc
->
prev_mi
+
(
m
-
pc
->
mi
);
x
->
partition_info
=
x
->
pi
+
(
m
-
pc
->
mi
);
#ifdef ENTROPY_STATS
...
...
@@ -415,7 +415,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
if
(
seg
->
update_map
)
{
if
(
seg
->
temporal_update
)
{
const
int
pred_flag
=
xd
->
mode_info_context
->
mbmi
.
seg_id_predicted
;
const
int
pred_flag
=
mi
->
seg_id_predicted
;
vp9_prob
pred_prob
=
vp9_get_pred_prob_seg_id
(
xd
);
vp9_write
(
bc
,
pred_flag
,
pred_prob
);
if
(
!
pred_flag
)
...
...
@@ -431,10 +431,10 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
vp9_write
(
bc
,
rf
!=
INTRA_FRAME
,
vp9_get_pred_prob_intra_inter
(
pc
,
xd
));
if
(
mi
->
sb_typ
e
>=
BLOCK_SIZE_SB8X8
&&
pc
->
tx_mode
==
TX_MODE_SELECT
&&
if
(
bsiz
e
>=
BLOCK_SIZE_SB8X8
&&
pc
->
tx_mode
==
TX_MODE_SELECT
&&
!
(
rf
!=
INTRA_FRAME
&&
(
skip_coeff
||
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))))
{
write_selected_txfm_size
(
cpi
,
mi
->
txfm_size
,
mi
->
sb_typ
e
,
bc
);
write_selected_txfm_size
(
cpi
,
mi
->
txfm_size
,
bsiz
e
,
bc
);
}
if
(
rf
==
INTRA_FRAME
)
{
...
...
@@ -442,15 +442,14 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
active_section
=
6
;
#endif
if
(
m
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB8X8
)
{
const
BLOCK_SIZE_TYPE
bsize
=
xd
->
mode_info_context
->
mbmi
.
sb_type
;
if
(
bsize
>=
BLOCK_SIZE_SB8X8
)
{
const
int
bwl
=
b_width_log2
(
bsize
),
bhl
=
b_height_log2
(
bsize
);
const
int
bsl
=
MIN
(
bwl
,
bhl
);
write_intra_mode
(
bc
,
mode
,
pc
->
fc
.
y_mode_prob
[
MIN
(
3
,
bsl
)]);
}
else
{
int
idx
,
idy
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
mi
->
sb_typ
e
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
mi
->
sb_typ
e
];
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsiz
e
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsiz
e
];
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
const
MB_PREDICTION_MODE
bm
=
m
->
bmi
[
idy
*
2
+
idx
].
as_mode
;
...
...
@@ -469,7 +468,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
// If segment skip is not enabled code the mode.
if
(
!
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))
{
if
(
mi
->
sb_typ
e
>=
BLOCK_SIZE_SB8X8
)
{
if
(
bsiz
e
>=
BLOCK_SIZE_SB8X8
)
{
write_sb_mv_ref
(
bc
,
mode
,
mv_ref_p
);
vp9_accum_mv_refs
(
&
cpi
->
common
,
mode
,
mi
->
mb_mode_context
[
rf
]);
}
...
...
@@ -484,17 +483,17 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
assert
(
mi
->
interp_filter
==
cpi
->
common
.
mcomp_filter_type
);
}
if
(
xd
->
mode_info_context
->
mbmi
.
sb_typ
e
<
BLOCK_SIZE_SB8X8
)
{
if
(
bsiz
e
<
BLOCK_SIZE_SB8X8
)
{
int
j
;
MB_PREDICTION_MODE
blockmode
;
int_mv
blockmv
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
mi
->
sb_typ
e
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
mi
->
sb_typ
e
];
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsiz
e
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsiz
e
];
int
idx
,
idy
;
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
j
=
idy
*
2
+
idx
;
blockmode
=
cpi
->
mb
.
partition_info
->
bmi
[
j
].
mode
;
blockmode
=
x
->
partition_info
->
bmi
[
j
].
mode
;
blockmv
=
m
->
bmi
[
j
].
as_mv
[
0
];
write_sb_mv_ref
(
bc
,
blockmode
,
mv_ref_p
);
vp9_accum_mv_refs
(
&
cpi
->
common
,
blockmode
,
mi
->
mb_mode_context
[
rf
]);
...
...
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