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
Yushin Cho
aom-rav1e
Commits
170305dc
Commit
170305dc
authored
Nov 16, 2012
by
Yaowu Xu
Committed by
Gerrit Code Review
Nov 16, 2012
Browse files
Merge "changed mv candidate search for superblocks" into experimental
parents
1c56946e
415e6bff
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/common/mvref_common.c
View file @
170305dc
...
...
@@ -11,11 +11,20 @@
#include "mvref_common.h"
#define MVREF_NEIGHBOURS 8
static
int
mv_ref_search
[
MVREF_NEIGHBOURS
][
2
]
=
{
{
0
,
-
1
},{
-
1
,
0
},{
-
1
,
-
1
},{
0
,
-
2
},{
-
2
,
0
},{
-
1
,
-
2
},{
-
2
,
-
1
},{
-
2
,
-
2
}
};
static
int
ref_distance_weight
[
MVREF_NEIGHBOURS
]
=
{
3
,
3
,
2
,
1
,
1
,
1
,
1
,
1
};
static
int
mb_mv_ref_search
[
MVREF_NEIGHBOURS
][
2
]
=
{
{
0
,
-
1
},
{
-
1
,
0
},
{
-
1
,
-
1
},
{
0
,
-
2
},
{
-
2
,
0
},
{
-
1
,
-
2
},
{
-
2
,
-
1
},
{
-
2
,
-
2
}
};
static
int
mb_ref_distance_weight
[
MVREF_NEIGHBOURS
]
=
{
3
,
3
,
2
,
1
,
1
,
1
,
1
,
1
};
#if CONFIG_SUPERBLOCKS
static
int
sb_mv_ref_search
[
MVREF_NEIGHBOURS
][
2
]
=
{
{
0
,
-
1
},
{
-
1
,
0
},
{
1
,
-
1
},
{
-
1
,
1
},
{
-
1
,
-
1
},
{
0
,
-
2
},
{
-
2
,
0
},
{
-
1
,
-
2
}
};
static
int
sb_ref_distance_weight
[
MVREF_NEIGHBOURS
]
=
{
3
,
3
,
2
,
2
,
2
,
1
,
1
,
1
};
#endif
// clamp_mv
#define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units
static
void
clamp_mv
(
const
MACROBLOCKD
*
xd
,
int_mv
*
mv
)
{
...
...
@@ -224,12 +233,26 @@ void vp9_find_mv_refs(
int
index
=
0
;
int
ref_weight
=
0
;
int
valid_mv_ref
;
int
(
*
mv_ref_search
)[
2
];
int
*
ref_distance_weight
;
// Blank the reference vector lists and other local structures.
vpx_memset
(
mv_ref_list
,
0
,
sizeof
(
int_mv
)
*
MAX_MV_REFS
);
vpx_memset
(
candidate_mvs
,
0
,
sizeof
(
int_mv
)
*
MAX_MV_REFS
);
vpx_memset
(
candidate_scores
,
0
,
sizeof
(
candidate_scores
));
#if CONFIG_SUPERBLOCKS
if
(
mbmi
->
encoded_as_sb
)
{
mv_ref_search
=
sb_mv_ref_search
;
ref_distance_weight
=
sb_ref_distance_weight
;
}
else
{
mv_ref_search
=
mb_mv_ref_search
;
ref_distance_weight
=
mb_ref_distance_weight
;
}
#else
mv_ref_search
=
mb_mv_ref_search
;
ref_distance_weight
=
mb_ref_distance_weight
;
#endif
// Populate a list with candidate reference vectors from the
// spatial neighbours.
for
(
i
=
0
;
i
<
2
;
++
i
)
{
...
...
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