v4l2grab Version 0.2

A few weeks ago, I published my v4l2grab program to grab JPEGs from V4l2 devices.

Today I got an request by email to include support for integer conversion from YUV422 to RGB as descriped by Wikipedia. So I included it and did some style adjustments, too.

You can download it here: v4l2grab Version 0.2

To use integer conversion you have to compile with an additional

-DNTSC

for NTSC like conversion or

-DITU_R_INT

for ITU-R integer conversion. Both standars are explained in the referenced wikipedia article. The use of

-DITU_R_FLOAT

uses the previous floating point version of ITU-R which is default if no compiling options are specified. More information about compilation can be found on the original post.

The current version of V4L2grab can be found on github.

2 thoughts on “v4l2grab Version 0.2

  1. Hello,
    This code is very usefull, thanks.
    Just a remark, i think there is a memory leak if function "imageProcess".
    In effect, we must free dst, i.e. add at the end :
    [...]
    jpegWrite(dst);
    free(dst) ; // This
    }
    [...]

    In one frame this is not a problem, but in many applications we must have to treat a lot of frames, so...

    Thanks a lot.

    --
    JM

Leave a Reply

Your email address will not be published. Required fields are marked *