Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 362 by
lizhuoli...@gmail.com: WebPIDecoder does not get correct rgba bitmap on multi-threads env on x86 architecture(but works great on ARM)
https://bugs.chromium.org/p/webp/issues/detail?id=362What steps will reproduce the problem?
1. Use x86 Architecture device (I test on iPhone simulator and macOS)
2. Use multiple WebPIDecoder to do incrementally decoding for WebP images in different threads
3. Use WebPIDecGetRGB to grab decoded rgba bitmap and draw CGImage
What is the expected output? What do you see instead?
Excepted: Each WebPIDecoder in different thread can get the valid rgba and draw correct CGImage without affecting each other.
What I See: Suppose two WebPIDecoders A and B. A finish incrementally decoding and then B start incrementally decoding. A's rgba is correct and draw imageA. But B's rgba is not correct and contains A's part. The imageB will looks like two image bitmap merged. The top part of imageB is current decoded partial imageB but the bottom part is the partial imageA.
Please see the attach image file for this strange image bitmap. :)
What version of the product are you using? On what operating system?
Version: libwebp: 0.6.0
System: I test macOS(x86), iPhone simulator(x86) and it contains this bug. But for iPhone device(ARM & ARM64) this bug can not be reproduced.
Please provide any additional information below.
The decoding code is from open-source iOS/macOS project SDWebImage:
https://github.com/rs/SDWebImage/blob/a0879fc049453c9028e2e1a9755cd9028aecf5f5/SDWebImage/SDWebImageWebPCoder.m#L195We use that `last_y` to create partial height CGImage to avoid this bug. But I think this should be fixed in other better way since this works great on ARM architecture.
Attachments:
2017-10-18-15-56-37.png 1014 KB
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings