mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 10:25:46 +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:
		| @@ -873,10 +873,14 @@ static WebPEncodingError GenerateCandidates( | |||||||
|   WebPPicture* const curr_canvas = &enc->curr_canvas_copy_; |   WebPPicture* const curr_canvas = &enc->curr_canvas_copy_; | ||||||
|   const WebPPicture* const prev_canvas = |   const WebPPicture* const prev_canvas = | ||||||
|       is_dispose_none ? &enc->prev_canvas_ : &enc->prev_canvas_disposed_; |       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 && |       !is_key_frame && | ||||||
|       IsLosslessBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_ll_); |       IsLosslessBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_ll_); | ||||||
|   const int use_blending_lossy = |   use_blending_lossy = | ||||||
|       !is_key_frame && |       !is_key_frame && | ||||||
|       IsLossyBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_lossy_, |       IsLossyBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_lossy_, | ||||||
|                               config_lossy->quality); |                               config_lossy->quality); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user