twam / v4l2grab

utility for grabbing JPEGs from V4L2 devices

Home Page:http://www.twam.info/linux/v4l2grab-grabbing-jpegs-from-v4l2-devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YUVtoRGB-conversion unnecessary

mrflow opened this issue · comments

Since JPEG stores data in the YCbCr-Colorspace [http://en.wikipedia.org/wiki/JFIF#Color_space], the conversion from YUVxyz to RGB is unnecessary. libjpeg(-turbo) is capable of storing YUV444 (JCS_YCbCr). This still requires conversion from most v4l2-devices, but mostly only from YUVxyz to YUV444 which is a lot less computationally intensive than YUV to RGB.

I implemented a '--jpeg-yuv' option to use YUV conversion internally. If this work's for everybody this could be made default and the RGB conversions removed.