descampsa / yuv2rgb

C99 library for fast image conversion between yuv420p and rgb24
BSD 3-Clause "New" or "Revised" License
170 stars 62 forks source link

Clamping does not work correctly in SSE code if wrong color space is used #12

Closed mika-fischer closed 2 years ago

mika-fischer commented 5 years ago

If I have data with format YCBCR_JPEG, but call the yuv -> rgb functions with YCBCR_601 instead, I would expect some values to get clipped.

That also happens correctly for the _std functions, but not for the _sse and _sseu functions. There, the pixel values that get > 255 somehow overflow and turn out black...

descampsa commented 2 years ago

You are right, but I am not sure how I can fix this without losing too much speed. Added to the todo list ;-)

descampsa commented 2 years ago

Should be fixed in e805bf2ef80d3cc4c5bc84270fd77cbaba3173ef Sorry for the slight delay ;-)