descampsa / yuv2rgb

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

rgb32 to YUV420 #10

Open ktb92677 opened 5 years ago

ktb92677 commented 5 years ago

any plans for 32bpp to yuv420? My screen buffers are in 32bpp. I could convert to 24bpp, but the time it would take to convert every cycle would defeat the purpose of increasing the speed of the conversion itself.

descampsa commented 5 years ago

That should not be too difficult to do, just a macro similar to the UNPACK_RGB24_32 macro to unpack rgba instead of rgb24. I will try to have a look at it this week

ktb92677 commented 5 years ago

Thanks a ton!!!

descampsa commented 5 years ago

Il have added the function in the last commit.

Note to self : too much copy pasted code here, needs a clean up

ktb92677 commented 5 years ago

Thank you so much! I will test this out in a bit. On a side note... any plans for a YUV420 to RGB32?

aramg commented 3 years ago

YUV to RGBX/BGRX would be top, I'd be willing to buy @descampsa a beer (or many beers) if you by chance decide to implement it 🙂