Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Raphael Zumer
aom-rav1e
Commits
13177d7e
Commit
13177d7e
authored
Jan 14, 2016
by
Scott LaVarnway
Committed by
Gerrit Code Review
Jan 14, 2016
Browse files
Merge "VP9: Remove decoder args from find_mv_refs_idx()"
parents
8d92858a
a85e552d
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_mvref_common.c
View file @
13177d7e
...
...
@@ -17,7 +17,6 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
MODE_INFO
*
mi
,
MV_REFERENCE_FRAME
ref_frame
,
int_mv
*
mv_ref_list
,
int
block
,
int
mi_row
,
int
mi_col
,
find_mv_refs_sync
sync
,
void
*
const
data
,
uint8_t
*
mode_context
)
{
const
int
*
ref_sign_bias
=
cm
->
ref_frame_sign_bias
;
int
i
,
refmv_count
=
0
;
...
...
@@ -70,23 +69,8 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
}
}
// TODO(hkuang): Remove this sync after fixing pthread_cond_broadcast
// on windows platform. The sync here is unnecessary if use_prev_frame_mvs
// is 0. But after removing it, there will be hang in the unit test on windows
// due to several threads waiting for a thread's signal.
#if defined(_WIN32) && !HAVE_PTHREAD_H
if
(
cm
->
frame_parallel_decode
&&
sync
!=
NULL
)
{
sync
(
data
,
mi_row
);
}
#endif
// Check the last frame's mode and mv info.
if
(
cm
->
use_prev_frame_mvs
)
{
// Synchronize here for frame parallel decode if sync function is provided.
if
(
cm
->
frame_parallel_decode
&&
sync
!=
NULL
)
{
sync
(
data
,
mi_row
);
}
if
(
prev_frame_mvs
->
ref_frame
[
0
]
==
ref_frame
)
{
ADD_MV_REF_LIST
(
prev_frame_mvs
->
mv
[
0
],
refmv_count
,
mv_ref_list
,
Done
);
}
else
if
(
prev_frame_mvs
->
ref_frame
[
1
]
==
ref_frame
)
{
...
...
@@ -150,10 +134,9 @@ void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
MODE_INFO
*
mi
,
MV_REFERENCE_FRAME
ref_frame
,
int_mv
*
mv_ref_list
,
int
mi_row
,
int
mi_col
,
find_mv_refs_sync
sync
,
void
*
const
data
,
uint8_t
*
mode_context
)
{
find_mv_refs_idx
(
cm
,
xd
,
mi
,
ref_frame
,
mv_ref_list
,
-
1
,
mi_row
,
mi_col
,
sync
,
data
,
mode_context
);
mi_row
,
mi_col
,
mode_context
);
}
void
vp9_find_best_ref_mvs
(
MACROBLOCKD
*
xd
,
int
allow_hp
,
...
...
@@ -181,7 +164,7 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
assert
(
MAX_MV_REF_CANDIDATES
==
2
);
find_mv_refs_idx
(
cm
,
xd
,
mi
,
mi
->
mbmi
.
ref_frame
[
ref
],
mv_list
,
block
,
mi_row
,
mi_col
,
NULL
,
NULL
,
mode_context
);
mi_row
,
mi_col
,
mode_context
);
near_mv
->
as_int
=
0
;
switch
(
block
)
{
...
...
vp9/common/vp9_mvref_common.h
View file @
13177d7e
...
...
@@ -221,7 +221,6 @@ typedef void (*find_mv_refs_sync)(void *const data, int mi_row);
void
vp9_find_mv_refs
(
const
VP9_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
,
MODE_INFO
*
mi
,
MV_REFERENCE_FRAME
ref_frame
,
int_mv
*
mv_ref_list
,
int
mi_row
,
int
mi_col
,
find_mv_refs_sync
sync
,
void
*
const
data
,
uint8_t
*
mode_context
);
// check a list of motion vectors by sad score using a number rows of pixels
...
...
vp9/encoder/vp9_pickmode.c
View file @
13177d7e
...
...
@@ -1225,8 +1225,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if
(
cm
->
use_prev_frame_mvs
)
vp9_find_mv_refs
(
cm
,
xd
,
xd
->
mi
[
0
],
ref_frame
,
candidates
,
mi_row
,
mi_col
,
NULL
,
NULL
,
x
->
mbmi_ext
->
mode_context
);
candidates
,
mi_row
,
mi_col
,
x
->
mbmi_ext
->
mode_context
);
else
const_motion
[
ref_frame
]
=
mv_refs_rt
(
cm
,
x
,
xd
,
tile_info
,
xd
->
mi
[
0
],
...
...
@@ -1833,8 +1832,7 @@ void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
vp9_setup_pred_block
(
xd
,
yv12_mb
[
ref_frame
],
yv12
,
mi_row
,
mi_col
,
sf
,
sf
);
vp9_find_mv_refs
(
cm
,
xd
,
xd
->
mi
[
0
],
ref_frame
,
candidates
,
mi_row
,
mi_col
,
NULL
,
NULL
,
mbmi_ext
->
mode_context
);
candidates
,
mi_row
,
mi_col
,
mbmi_ext
->
mode_context
);
vp9_find_best_ref_mvs
(
xd
,
cm
->
allow_high_precision_mv
,
candidates
,
&
dummy_mv
[
0
],
&
dummy_mv
[
1
]);
...
...
vp9/encoder/vp9_rdopt.c
View file @
13177d7e
...
...
@@ -2202,7 +2202,7 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
// Gets an initial list of candidate vectors from neighbours and orders them
vp9_find_mv_refs
(
cm
,
xd
,
mi
,
ref_frame
,
candidates
,
mi_row
,
mi_col
,
NULL
,
NULL
,
mbmi_ext
->
mode_context
);
mbmi_ext
->
mode_context
);
// Candidate refinement carried out at encoder and decoder
vp9_find_best_ref_mvs
(
xd
,
cm
->
allow_high_precision_mv
,
candidates
,
...
...
Write
Preview
Supports
Markdown
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