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
Xiph.Org
aom-rav1e
Commits
6c998d75
Commit
6c998d75
authored
Jul 13, 2017
by
Sarah Parker
Browse files
Avoid sending gm params if source and ref are different sizes
Change-Id: I4b4272c99ba6ff4d983dcb694b3ea4d5de1b4e14
parent
1bc82866
Changes
2
Hide whitespace changes
Inline
Side-by-side
av1/decoder/decodeframe.c
View file @
6c998d75
...
...
@@ -4892,10 +4892,17 @@ static void read_global_motion_params(WarpedMotionParams *params,
static
void
read_global_motion
(
AV1_COMMON
*
cm
,
aom_reader
*
r
)
{
int
frame
;
YV12_BUFFER_CONFIG
*
ref_buf
;
for
(
frame
=
LAST_FRAME
;
frame
<=
ALTREF_FRAME
;
++
frame
)
{
read_global_motion_params
(
&
cm
->
global_motion
[
frame
],
&
cm
->
prev_frame
->
global_motion
[
frame
],
r
,
cm
->
allow_high_precision_mv
);
ref_buf
=
get_ref_frame
(
cm
,
frame
);
if
(
cm
->
width
==
ref_buf
->
y_crop_width
&&
cm
->
height
==
ref_buf
->
y_crop_height
)
{
read_global_motion_params
(
&
cm
->
global_motion
[
frame
],
&
cm
->
prev_frame
->
global_motion
[
frame
],
r
,
cm
->
allow_high_precision_mv
);
}
else
{
set_default_warp_params
(
&
cm
->
global_motion
[
frame
]);
}
/*
printf("Dec Ref %d [%d/%d]: %d %d %d %d\n",
frame, cm->current_video_frame, cm->show_frame,
...
...
av1/encoder/bitstream.c
View file @
6c998d75
...
...
@@ -4494,10 +4494,18 @@ static void write_global_motion_params(WarpedMotionParams *params,
static
void
write_global_motion
(
AV1_COMP
*
cpi
,
aom_writer
*
w
)
{
AV1_COMMON
*
const
cm
=
&
cpi
->
common
;
int
frame
;
YV12_BUFFER_CONFIG
*
ref_buf
;
for
(
frame
=
LAST_FRAME
;
frame
<=
ALTREF_FRAME
;
++
frame
)
{
write_global_motion_params
(
&
cm
->
global_motion
[
frame
],
&
cm
->
prev_frame
->
global_motion
[
frame
],
w
,
cm
->
allow_high_precision_mv
);
ref_buf
=
get_ref_frame_buffer
(
cpi
,
frame
);
if
(
cpi
->
source
->
y_crop_width
==
ref_buf
->
y_crop_width
&&
cpi
->
source
->
y_crop_height
==
ref_buf
->
y_crop_height
)
{
write_global_motion_params
(
&
cm
->
global_motion
[
frame
],
&
cm
->
prev_frame
->
global_motion
[
frame
],
w
,
cm
->
allow_high_precision_mv
);
}
else
{
assert
(
cm
->
global_motion
[
frame
].
wmtype
==
IDENTITY
&&
"Invalid warp type for frames of different resolutions"
);
}
/*
printf("Frame %d/%d: Enc Ref %d (used %d): %d %d %d %d\n",
cm->current_video_frame, cm->show_frame, frame,
...
...
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