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
46441ec5
Commit
46441ec5
authored
10 years ago
by
Yunqing Wang
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Refactor refining_search_sad code"
parents
51e9788e
30117a57
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
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
sandbox/Jingning/experimental
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
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_rtcd_defs.pl
+1
-2
vp9/common/vp9_rtcd_defs.pl
vp9/encoder/vp9_mcomp.c
+0
-45
vp9/encoder/vp9_mcomp.c
with
1 addition
and
47 deletions
vp9/common/vp9_rtcd_defs.pl
+
1
−
2
View file @
46441ec5
...
...
@@ -786,8 +786,7 @@ $vp9_full_search_sad_sse3=vp9_full_search_sadx3;
$vp9_full_search_sad_sse4_1
=
vp9_full_search_sadx8
;
add_proto
qw/int vp9_refining_search_sad/
,
"
const struct macroblock *x, struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv
";
specialize
qw/vp9_refining_search_sad sse3/
;
$vp9_refining_search_sad_sse3
=
vp9_refining_search_sadx4
;
specialize
qw/vp9_refining_search_sad/
;
add_proto
qw/int vp9_diamond_search_sad/
,
"
const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv
";
specialize
qw/vp9_diamond_search_sad sse3/
;
...
...
This diff is collapsed.
Click to expand it.
vp9/encoder/vp9_mcomp.c
+
0
−
45
View file @
46441ec5
...
...
@@ -1334,51 +1334,6 @@ int vp9_refining_search_sad_c(const MACROBLOCK *x,
int
search_range
,
const
vp9_variance_fn_ptr_t
*
fn_ptr
,
const
MV
*
center_mv
)
{
const
MV
neighbors
[
4
]
=
{{
-
1
,
0
},
{
0
,
-
1
},
{
0
,
1
},
{
1
,
0
}};
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
const
struct
buf_2d
*
const
what
=
&
x
->
plane
[
0
].
src
;
const
struct
buf_2d
*
const
in_what
=
&
xd
->
plane
[
0
].
pre
[
0
];
const
MV
fcenter_mv
=
{
center_mv
->
row
>>
3
,
center_mv
->
col
>>
3
};
unsigned
int
best_sad
=
fn_ptr
->
sdf
(
what
->
buf
,
what
->
stride
,
get_buf_from_mv
(
in_what
,
ref_mv
),
in_what
->
stride
)
+
mvsad_err_cost
(
x
,
ref_mv
,
&
fcenter_mv
,
error_per_bit
);
int
i
,
j
;
for
(
i
=
0
;
i
<
search_range
;
i
++
)
{
int
best_site
=
-
1
;
for
(
j
=
0
;
j
<
4
;
j
++
)
{
const
MV
mv
=
{
ref_mv
->
row
+
neighbors
[
j
].
row
,
ref_mv
->
col
+
neighbors
[
j
].
col
};
if
(
is_mv_in
(
x
,
&
mv
))
{
unsigned
int
sad
=
fn_ptr
->
sdf
(
what
->
buf
,
what
->
stride
,
get_buf_from_mv
(
in_what
,
&
mv
),
in_what
->
stride
);
if
(
sad
<
best_sad
)
{
sad
+=
mvsad_err_cost
(
x
,
&
mv
,
&
fcenter_mv
,
error_per_bit
);
if
(
sad
<
best_sad
)
{
best_sad
=
sad
;
best_site
=
j
;
}
}
}
}
if
(
best_site
==
-
1
)
{
break
;
}
else
{
ref_mv
->
row
+=
neighbors
[
best_site
].
row
;
ref_mv
->
col
+=
neighbors
[
best_site
].
col
;
}
}
return
best_sad
;
}
int
vp9_refining_search_sadx4
(
const
MACROBLOCK
*
x
,
MV
*
ref_mv
,
int
error_per_bit
,
int
search_range
,
const
vp9_variance_fn_ptr_t
*
fn_ptr
,
const
MV
*
center_mv
)
{
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
const
MV
neighbors
[
4
]
=
{{
-
1
,
0
},
{
0
,
-
1
},
{
0
,
1
},
{
1
,
0
}};
const
struct
buf_2d
*
const
what
=
&
x
->
plane
[
0
].
src
;
...
...
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