Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

green color blocks #1379

Closed
styst opened this issue Nov 11, 2024 · 11 comments
Closed

green color blocks #1379

styst opened this issue Nov 11, 2024 · 11 comments

Comments

@styst
Copy link

styst commented Nov 11, 2024

Hello, when using heif-convert for image conversion, I have noticed occasional occurrences of green color blocks appearing in the image after multiple conversions of the same picture.
aa7
aa5

@bradh
Copy link
Contributor

bradh commented Nov 11, 2024

Can you confirm this is with x265 and de265?

Can you share the exact commands, along with source data to reproduce this?

It is likely in the de265 layer, but would be good to check first.

@styst
Copy link
Author

styst commented Nov 11, 2024

command:heif-convert a.heic a.jpg
This issue occurs on any .heic image as long as the conversion command is executed consecutively, and it will occasionally result in an image with a green color block.

@farindk
Copy link
Contributor

farindk commented Nov 11, 2024

This looks very much like a race-condition when multiple tiles are decoded in parallel.
I could not reproduce this yet.

Can you tell me exactly which version (or commit hash) you are using and which cmake settings? Especially ENABLE_MULTITHREADING_SUPPORT and ENABLE_PARALLEL_TILE_DECODING.

@farindk
Copy link
Contributor

farindk commented Nov 11, 2024

Also let me know the system (Linux, Windows, macOS).

@styst
Copy link
Author

styst commented Nov 11, 2024

commit:08aba4a02ab491667b0fd71ccba109b26908b6f4

image

system:Debian GNU/Linux

image

I used this to install it:
https://github.com/MaestroError/heif-converter-image/blob/maestro/install-libheif.sh

repetition step:

image

@farindk
Copy link
Contributor

farindk commented Nov 11, 2024

Ok, I managed to reproduce this. Does not happen very often with my 4 core CPU. Might be that it happens more often with more cores.

@styst
Copy link
Author

styst commented Nov 11, 2024

Our server has 2 core CPU. Is there any way to avoid this kind of problem

@styst
Copy link
Author

styst commented Nov 11, 2024

Setting the container to a single core resolved this issue for me. Thank you.

@farindk
Copy link
Contributor

farindk commented Nov 11, 2024

Can you please confirm that the above commit fixes the race condition when running on multiple cores?

@styst
Copy link
Author

styst commented Nov 12, 2024

After verification, it has been confirmed that the above commit no longer encounters race condition issues when running on multiple cores

@farindk
Copy link
Contributor

farindk commented Nov 12, 2024

Thank you for the report and the confirmation that it is fixed now.

@farindk farindk closed this as completed Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants