Skip to content
GitLab
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
79dd5e7a
Commit
79dd5e7a
authored
Apr 11, 2014
by
Dmitry Kovalev
Browse files
Renaming zz_motion_search() to get_block_variance().
Change-Id: Ibec06411c8cd843c2ca33b528a511a656e551983
parent
dc89e9b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_firstpass.c
View file @
79dd5e7a
...
...
@@ -376,15 +376,12 @@ static vp9_variance_fn_t get_block_variance_fn(BLOCK_SIZE bsize) {
}
}
static
unsigned
int
zz_motion_search
(
const
MACROBLOCK
*
x
)
{
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
const
uint8_t
*
const
src
=
x
->
plane
[
0
].
src
.
buf
;
const
int
src_stride
=
x
->
plane
[
0
].
src
.
stride
;
const
uint8_t
*
const
ref
=
xd
->
plane
[
0
].
pre
[
0
].
buf
;
const
int
ref_stride
=
xd
->
plane
[
0
].
pre
[
0
].
stride
;
static
unsigned
int
get_prediction_error
(
BLOCK_SIZE
bsize
,
const
struct
buf_2d
*
src
,
const
struct
buf_2d
*
ref
)
{
unsigned
int
sse
;
vp9_variance_fn_t
fn
=
get_block_variance_fn
(
xd
->
mi
[
0
]
->
mbmi
.
sb_typ
e
);
fn
(
src
,
src
_
stride
,
ref
,
ref
_
stride
,
&
sse
);
const
vp9_variance_fn_t
fn
=
get_block_variance_fn
(
bsiz
e
);
fn
(
src
->
buf
,
src
->
stride
,
ref
->
buf
,
ref
->
stride
,
&
sse
);
return
sse
;
}
...
...
@@ -632,7 +629,8 @@ void vp9_first_pass(VP9_COMP *cpi) {
int_mv
mv
,
tmp_mv
;
xd
->
plane
[
0
].
pre
[
0
].
buf
=
first_ref_buf
->
y_buffer
+
recon_yoffset
;
motion_error
=
zz_motion_search
(
x
);
motion_error
=
get_prediction_error
(
bsize
,
&
x
->
plane
[
0
].
src
,
&
xd
->
plane
[
0
].
pre
[
0
]);
// Assume 0,0 motion with no mv overhead.
mv
.
as_int
=
tmp_mv
.
as_int
=
0
;
...
...
@@ -668,7 +666,8 @@ void vp9_first_pass(VP9_COMP *cpi) {
int
gf_motion_error
;
xd
->
plane
[
0
].
pre
[
0
].
buf
=
gld_yv12
->
y_buffer
+
recon_yoffset
;
gf_motion_error
=
zz_motion_search
(
x
);
gf_motion_error
=
get_prediction_error
(
bsize
,
&
x
->
plane
[
0
].
src
,
&
xd
->
plane
[
0
].
pre
[
0
]);
first_pass_motion_search
(
cpi
,
x
,
&
zero_mv
,
&
tmp_mv
.
as_mv
,
&
gf_motion_error
);
...
...
Write
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!
Cancel
Please
register
or
sign in
to comment