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
Xiph.Org
aom-rav1e
Commits
eece45fe
Commit
eece45fe
authored
Mar 09, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Mar 09, 2014
Browse files
Merge "Cleaning up vp9_get_mvpred_var()."
parents
62e1d37e
ee7d26d5
Changes
2
Show whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_mcomp.c
View file @
eece45fe
...
@@ -711,23 +711,21 @@ static int vp9_pattern_search(const MACROBLOCK *x,
...
@@ -711,23 +711,21 @@ static int vp9_pattern_search(const MACROBLOCK *x,
}
}
int
vp9_get_mvpred_var
(
const
MACROBLOCK
*
x
,
int
vp9_get_mvpred_var
(
const
MACROBLOCK
*
x
,
MV
*
best_mv
,
const
MV
*
best_mv
,
const
MV
*
center_mv
,
const
MV
*
center_mv
,
const
vp9_variance_fn_ptr_t
*
vfp
,
const
vp9_variance_fn_ptr_t
*
vfp
,
int
use_mvcost
)
{
int
use_mvcost
)
{
unsigned
int
bestsa
d
;
unsigned
int
unuse
d
;
MV
this_mv
;
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
const
uint8_t
*
what
=
x
->
plane
[
0
].
src
.
buf
;
const
uint8_t
*
what
=
x
->
plane
[
0
].
src
.
buf
;
const
int
what_stride
=
x
->
plane
[
0
].
src
.
stride
;
const
int
what_stride
=
x
->
plane
[
0
].
src
.
stride
;
const
int
in_what_stride
=
xd
->
plane
[
0
].
pre
[
0
].
stride
;
const
int
in_what_stride
=
xd
->
plane
[
0
].
pre
[
0
].
stride
;
const
uint8_t
*
base_offset
=
xd
->
plane
[
0
].
pre
[
0
].
buf
;
const
uint8_t
*
base_offset
=
xd
->
plane
[
0
].
pre
[
0
].
buf
;
const
uint8_t
*
this_offset
=
base_offset
+
(
best_mv
->
row
*
in_what_stride
)
+
const
uint8_t
*
this_offset
=
&
base_offset
[
best_mv
->
row
*
in_what_stride
+
best_mv
->
col
;
best_mv
->
col
];
this_mv
.
row
=
best_mv
->
row
*
8
;
const
MV
mv
=
{
best_mv
->
row
*
8
,
best_mv
->
col
*
8
};
this_mv
.
col
=
best_mv
->
col
*
8
;
return
vfp
->
vf
(
what
,
what_stride
,
this_offset
,
in_what_stride
,
&
unused
)
+
return
vfp
->
vf
(
what
,
what_stride
,
this_offset
,
in_what_stride
,
&
bestsad
)
+
(
use_mvcost
?
mv_err_cost
(
&
mv
,
center_mv
,
x
->
nmvjointcost
,
(
use_mvcost
?
mv_err_cost
(
&
this_mv
,
center_mv
,
x
->
nmvjointcost
,
x
->
mvcost
,
x
->
errorperbit
)
:
0
);
x
->
mvcost
,
x
->
errorperbit
)
:
0
);
}
}
...
...
vp9/encoder/vp9_mcomp.h
View file @
eece45fe
...
@@ -38,8 +38,7 @@ int vp9_mv_bit_cost(const MV *mv, const MV *ref,
...
@@ -38,8 +38,7 @@ int vp9_mv_bit_cost(const MV *mv, const MV *ref,
// Utility to compute variance + MV rate cost for a given MV
// Utility to compute variance + MV rate cost for a given MV
int
vp9_get_mvpred_var
(
const
MACROBLOCK
*
x
,
int
vp9_get_mvpred_var
(
const
MACROBLOCK
*
x
,
MV
*
best_mv
,
const
MV
*
best_mv
,
const
MV
*
center_mv
,
const
MV
*
center_mv
,
const
vp9_variance_fn_ptr_t
*
vfp
,
const
vp9_variance_fn_ptr_t
*
vfp
,
int
use_mvcost
);
int
use_mvcost
);
int
vp9_get_mvpred_av_var
(
const
MACROBLOCK
*
x
,
int
vp9_get_mvpred_av_var
(
const
MACROBLOCK
*
x
,
...
...
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