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
466f42aa
Commit
466f42aa
authored
Jan 21, 2014
by
Yaowu Xu
Committed by
Gerrit Code Review
Jan 21, 2014
Browse files
Merge "Deprecate best_mv from encoder"
parents
9c8b74f1
b461c088
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.h
View file @
466f42aa
...
...
@@ -122,7 +122,6 @@ typedef struct {
TX_SIZE
tx_size
;
int_mv
mv
[
2
];
// for each reference frame used
int_mv
ref_mvs
[
MAX_REF_FRAMES
][
MAX_MV_REF_CANDIDATES
];
int_mv
best_mv
[
2
];
uint8_t
mode_context
[
MAX_REF_FRAMES
];
...
...
vp9/encoder/vp9_bitstream.c
View file @
466f42aa
...
...
@@ -260,6 +260,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
struct
segmentation
*
seg
=
&
cm
->
seg
;
MB_MODE_INFO
*
const
mi
=
&
m
->
mbmi
;
const
MV_REFERENCE_FRAME
rf
=
mi
->
ref_frame
[
0
];
const
MV_REFERENCE_FRAME
sec_rf
=
mi
->
ref_frame
[
1
];
const
MB_PREDICTION_MODE
mode
=
mi
->
mode
;
const
int
segment_id
=
mi
->
segment_id
;
int
skip_coeff
;
...
...
@@ -355,11 +356,11 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
active_section
=
11
;
#endif
vp9_encode_mv
(
cpi
,
bc
,
&
m
->
bmi
[
j
].
as_mv
[
0
].
as_mv
,
&
mi
->
best_mv
[
0
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
rf
]
[
0
].
as_mv
,
nmvc
,
allow_hp
);
if
(
has_second_ref
(
mi
))
vp9_encode_mv
(
cpi
,
bc
,
&
m
->
bmi
[
j
].
as_mv
[
1
].
as_mv
,
&
mi
->
best_mv
[
1
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
sec_rf
][
0
].
as_mv
,
nmvc
,
allow_hp
);
}
}
}
...
...
@@ -368,11 +369,11 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
active_section
=
5
;
#endif
vp9_encode_mv
(
cpi
,
bc
,
&
mi
->
mv
[
0
].
as_mv
,
&
mi
->
best_mv
[
0
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
rf
]
[
0
].
as_mv
,
nmvc
,
allow_hp
);
if
(
has_second_ref
(
mi
))
vp9_encode_mv
(
cpi
,
bc
,
&
mi
->
mv
[
1
].
as_mv
,
&
mi
->
best_mv
[
1
].
as_mv
,
nmvc
,
allow_hp
);
&
mi
->
ref_mvs
[
sec_rf
][
0
].
as_mv
,
nmvc
,
allow_hp
);
}
}
}
...
...
vp9/encoder/vp9_encodeframe.c
View file @
466f42aa
...
...
@@ -500,17 +500,8 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
if
(
is_inter_block
(
mbmi
)
&&
(
mbmi
->
sb_type
<
BLOCK_8X8
||
mbmi
->
mode
==
NEWMV
))
{
int_mv
best_mv
[
2
];
const
MV_REFERENCE_FRAME
rf1
=
mbmi
->
ref_frame
[
0
];
const
MV_REFERENCE_FRAME
rf2
=
mbmi
->
ref_frame
[
1
];
best_mv
[
0
].
as_int
=
ctx
->
best_ref_mv
[
0
].
as_int
;
best_mv
[
1
].
as_int
=
ctx
->
best_ref_mv
[
1
].
as_int
;
if
(
mbmi
->
mode
==
NEWMV
)
{
best_mv
[
0
].
as_int
=
mbmi
->
ref_mvs
[
rf1
][
0
].
as_int
;
if
(
rf2
>
0
)
best_mv
[
1
].
as_int
=
mbmi
->
ref_mvs
[
rf2
][
0
].
as_int
;
}
mbmi
->
best_mv
[
0
].
as_int
=
best_mv
[
0
].
as_int
;
mbmi
->
best_mv
[
1
].
as_int
=
best_mv
[
1
].
as_int
;
for
(
i
=
0
;
i
<
2
;
++
i
)
best_mv
[
i
].
as_int
=
mbmi
->
ref_mvs
[
mbmi
->
ref_frame
[
i
]][
0
].
as_int
;
vp9_update_mv_count
(
cpi
,
x
,
best_mv
);
}
...
...
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