Commit d3bbfee8 authored by David Barker's avatar David Barker Committed by Sarah Parker

Don't read global motion for intra-only frames

Save bits by not encoding global motion data when there's no
previous frame to use as a reference. Use the same logic
as for using the previous frame's motion vectors - ie, we don't
read global motion information when the current frame is
intra-only or when using error-resilient mode.

This also fixes an undefined behaviour / segfault bug - see for


Change-Id: Icca90a1bccafd06de8a4056ca5353318fce416cb
parent db61234e
......@@ -4854,6 +4854,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#endif // CONFIG_EXT_TX
if (!(frame_is_intra_only(cm) || cm->error_resilient_mode))
read_global_motion(cm, rb);
......@@ -4600,6 +4600,7 @@ static void write_uncompressed_header(AV1_COMP *cpi,
#endif // CONFIG_EXT_TX
if (!(frame_is_intra_only(cm) || cm->error_resilient_mode))
write_global_motion(cpi, wb);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment