Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
35bd8868
Commit
35bd8868
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Cleaning up pack_inter_mode_mvs() function."
parents
4e06ee39
19a8eee1
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp9/common/vp9_pred_common.h
+1
-1
vp9/common/vp9_pred_common.h
vp9/encoder/vp9_bitstream.c
+17
-19
vp9/encoder/vp9_bitstream.c
with
18 additions
and
20 deletions
vp9/common/vp9_pred_common.h
+
1
−
1
View file @
35bd8868
...
@@ -39,7 +39,7 @@ static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
...
@@ -39,7 +39,7 @@ static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
return
above_sip
+
left_sip
;
return
above_sip
+
left_sip
;
}
}
static
INLINE
vp9_prob
vp9_get_pred_prob_seg_id
(
struct
segmentation
*
seg
,
static
INLINE
vp9_prob
vp9_get_pred_prob_seg_id
(
const
struct
segmentation
*
seg
,
const
MACROBLOCKD
*
xd
)
{
const
MACROBLOCKD
*
xd
)
{
return
seg
->
pred_probs
[
vp9_get_pred_context_seg_id
(
xd
)];
return
seg
->
pred_probs
[
vp9_get_pred_context_seg_id
(
xd
)];
}
}
...
...
This diff is collapsed.
Click to expand it.
vp9/encoder/vp9_bitstream.c
+
17
−
19
View file @
35bd8868
...
@@ -246,15 +246,15 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
...
@@ -246,15 +246,15 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
const
nmv_context
*
nmvc
=
&
cm
->
fc
.
nmvc
;
const
nmv_context
*
nmvc
=
&
cm
->
fc
.
nmvc
;
MACROBLOCK
*
const
x
=
&
cpi
->
mb
;
MACROBLOCK
*
const
x
=
&
cpi
->
mb
;
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
struct
segmentation
*
seg
=
&
cm
->
seg
;
const
struct
segmentation
*
const
seg
=
&
cm
->
seg
;
MB_MODE_INFO
*
const
mi
=
&
m
->
mbmi
;
MB_MODE_INFO
*
const
mi
=
&
m
->
mbmi
;
const
MV_REFERENCE_FRAME
r
f
=
mi
->
ref_frame
[
0
];
const
MV_REFERENCE_FRAME
r
ef0
=
mi
->
ref_frame
[
0
];
const
MV_REFERENCE_FRAME
sec_rf
=
mi
->
ref_frame
[
1
];
const
MV_REFERENCE_FRAME
ref1
=
mi
->
ref_frame
[
1
];
const
MB_PREDICTION_MODE
mode
=
mi
->
mode
;
const
MB_PREDICTION_MODE
mode
=
mi
->
mode
;
const
int
segment_id
=
mi
->
segment_id
;
const
int
segment_id
=
mi
->
segment_id
;
int
skip
;
const
BLOCK_SIZE
bsize
=
mi
->
sb_type
;
const
BLOCK_SIZE
bsize
=
mi
->
sb_type
;
const
int
allow_hp
=
cm
->
allow_high_precision_mv
;
const
int
allow_hp
=
cm
->
allow_high_precision_mv
;
int
skip
;
#ifdef ENTROPY_STATS
#ifdef ENTROPY_STATS
active_section
=
9
;
active_section
=
9
;
...
@@ -275,15 +275,15 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
...
@@ -275,15 +275,15 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
skip
=
write_skip
(
cpi
,
segment_id
,
m
,
bc
);
skip
=
write_skip
(
cpi
,
segment_id
,
m
,
bc
);
if
(
!
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_REF_FRAME
))
if
(
!
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_REF_FRAME
))
vp9_write
(
bc
,
r
f
!=
INTRA_FRAME
,
vp9_get_intra_inter_prob
(
cm
,
xd
));
vp9_write
(
bc
,
r
ef0
!=
INTRA_FRAME
,
vp9_get_intra_inter_prob
(
cm
,
xd
));
if
(
bsize
>=
BLOCK_8X8
&&
cm
->
tx_mode
==
TX_MODE_SELECT
&&
if
(
bsize
>=
BLOCK_8X8
&&
cm
->
tx_mode
==
TX_MODE_SELECT
&&
!
(
r
f
!=
INTRA_FRAME
&&
!
(
r
ef0
!=
INTRA_FRAME
&&
(
skip
||
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))))
{
(
skip
||
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))))
{
write_selected_tx_size
(
cpi
,
m
,
mi
->
tx_size
,
bsize
,
bc
);
write_selected_tx_size
(
cpi
,
m
,
mi
->
tx_size
,
bsize
,
bc
);
}
}
if
(
r
f
==
INTRA_FRAME
)
{
if
(
r
ef0
==
INTRA_FRAME
)
{
#ifdef ENTROPY_STATS
#ifdef ENTROPY_STATS
active_section
=
6
;
active_section
=
6
;
#endif
#endif
...
@@ -305,7 +305,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
...
@@ -305,7 +305,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
}
else
{
}
else
{
vp9_prob
*
mv_ref_p
;
vp9_prob
*
mv_ref_p
;
encode_ref_frame
(
cpi
,
bc
);
encode_ref_frame
(
cpi
,
bc
);
mv_ref_p
=
c
pi
->
common
.
fc
.
inter_mode_probs
[
mi
->
mode_context
[
r
f
]];
mv_ref_p
=
c
m
->
fc
.
inter_mode_probs
[
mi
->
mode_context
[
r
ef0
]];
#ifdef ENTROPY_STATS
#ifdef ENTROPY_STATS
active_section
=
3
;
active_section
=
3
;
...
@@ -315,7 +315,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
...
@@ -315,7 +315,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
if
(
!
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))
{
if
(
!
vp9_segfeature_active
(
seg
,
segment_id
,
SEG_LVL_SKIP
))
{
if
(
bsize
>=
BLOCK_8X8
)
{
if
(
bsize
>=
BLOCK_8X8
)
{
write_inter_mode
(
bc
,
mode
,
mv_ref_p
);
write_inter_mode
(
bc
,
mode
,
mv_ref_p
);
++
cm
->
counts
.
inter_mode
[
mi
->
mode_context
[
r
f
]][
INTER_OFFSET
(
mode
)];
++
cm
->
counts
.
inter_mode
[
mi
->
mode_context
[
r
ef0
]][
INTER_OFFSET
(
mode
)];
}
}
}
}
...
@@ -335,21 +335,19 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
...
@@ -335,21 +335,19 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
{
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
const
int
j
=
idy
*
2
+
idx
;
const
int
j
=
idy
*
2
+
idx
;
const
MB_PREDICTION_MODE
blockmode
=
m
->
bmi
[
j
].
as_mode
;
const
MB_PREDICTION_MODE
b_mode
=
m
->
bmi
[
j
].
as_mode
;
write_inter_mode
(
bc
,
blockmode
,
mv_ref_p
);
write_inter_mode
(
bc
,
b_mode
,
mv_ref_p
);
++
cm
->
counts
.
inter_mode
[
mi
->
mode_context
[
rf
]]
++
cm
->
counts
.
inter_mode
[
mi
->
mode_context
[
ref0
]][
INTER_OFFSET
(
b_mode
)];
[
INTER_OFFSET
(
blockmode
)];
if
(
b_mode
==
NEWMV
)
{
if
(
blockmode
==
NEWMV
)
{
#ifdef ENTROPY_STATS
#ifdef ENTROPY_STATS
active_section
=
11
;
active_section
=
11
;
#endif
#endif
vp9_encode_mv
(
cpi
,
bc
,
&
m
->
bmi
[
j
].
as_mv
[
0
].
as_mv
,
vp9_encode_mv
(
cpi
,
bc
,
&
m
->
bmi
[
j
].
as_mv
[
0
].
as_mv
,
&
mi
->
ref_mvs
[
r
f
][
0
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
r
ef0
][
0
].
as_mv
,
nmvc
,
allow_hp
);
if
(
has_second_ref
(
mi
))
if
(
has_second_ref
(
mi
))
vp9_encode_mv
(
cpi
,
bc
,
&
m
->
bmi
[
j
].
as_mv
[
1
].
as_mv
,
vp9_encode_mv
(
cpi
,
bc
,
&
m
->
bmi
[
j
].
as_mv
[
1
].
as_mv
,
&
mi
->
ref_mvs
[
sec_rf
][
0
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
ref1
][
0
].
as_mv
,
nmvc
,
allow_hp
);
}
}
}
}
}
}
...
@@ -358,11 +356,11 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
...
@@ -358,11 +356,11 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
active_section
=
5
;
active_section
=
5
;
#endif
#endif
vp9_encode_mv
(
cpi
,
bc
,
&
mi
->
mv
[
0
].
as_mv
,
vp9_encode_mv
(
cpi
,
bc
,
&
mi
->
mv
[
0
].
as_mv
,
&
mi
->
ref_mvs
[
r
f
][
0
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
r
ef0
][
0
].
as_mv
,
nmvc
,
allow_hp
);
if
(
has_second_ref
(
mi
))
if
(
has_second_ref
(
mi
))
vp9_encode_mv
(
cpi
,
bc
,
&
mi
->
mv
[
1
].
as_mv
,
vp9_encode_mv
(
cpi
,
bc
,
&
mi
->
mv
[
1
].
as_mv
,
&
mi
->
ref_mvs
[
sec_rf
][
0
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
ref1
][
0
].
as_mv
,
nmvc
,
allow_hp
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets