mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
WebPAnimEncoder: Restore canvas before evaluating blending possibility.
Without this, the canvas may have been modified in-between two GenerateCandidate() calls. Change-Id: I0364a269caabdf282c30a8fa3c61896f0247342e
This commit is contained in:
parent
6e12e1e3d2
commit
e3912d560b
@ -873,10 +873,14 @@ static WebPEncodingError GenerateCandidates(
|
||||
WebPPicture* const curr_canvas = &enc->curr_canvas_copy_;
|
||||
const WebPPicture* const prev_canvas =
|
||||
is_dispose_none ? &enc->prev_canvas_ : &enc->prev_canvas_disposed_;
|
||||
const int use_blending_ll =
|
||||
int use_blending_ll;
|
||||
int use_blending_lossy;
|
||||
|
||||
CopyCurrentCanvas(enc);
|
||||
use_blending_ll =
|
||||
!is_key_frame &&
|
||||
IsLosslessBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_ll_);
|
||||
const int use_blending_lossy =
|
||||
use_blending_lossy =
|
||||
!is_key_frame &&
|
||||
IsLossyBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_lossy_,
|
||||
config_lossy->quality);
|
||||
|
Loading…
Reference in New Issue
Block a user