> I much rather do this as part of a longer series that actually adds 10 bit 
> support.

> The problem is that adding support for 10 bit doesn't mean you can just use 
> all the time since you still need support for 8 bit as well.

Heh. I was afraid to hear that. I can probably support 10-bits for
white balance somehow.

How would complete support for 10-bits work? Introduce RGB48 and
modify processing to work in 16-bits?

And the big question: is it possible to do processing with
libv4lconvert, without actually have v4l device available?

For example... I do have a simple camera application. In a viewfinder
mode, it has to work at GRBG10 format, because any conversion is just
too slow. We'd also want to save raw GRBG10 image to disk for raw
processing. So far so good. But we'd also want to save jpeg, which
means converting existing buffer to RGB24, applying white balance (and
maybe bad-pixel, lens shading, vignetting compensation) and saving

I'm trying to use this for conversion:

static void convert_rgb(struct dev_info *dev, struct v4l2_format sfmt, void 
*buf, struct v4l2_f\
ormat dfmt, void *buf2, int wb)
        struct v4lconvert_data *data = v4lconvert_create(dev->fd);
        int res;

        printf("Converting first.");
        if (wb) {
                struct v4l2_control ctrl;
                ctrl.id = V4L2_CID_AUTO_WHITE_BALANCE;
                ctrl.value = 1;
                v4lconvert_vidioc_s_ctrl(data, &ctrl);
        res = v4lconvert_convert(data, &sfmt, &dfmt, buf, SIZE, buf2, SIZE);
        printf("Converting: %d\n", res);


1) it feels like improper use of internal functions.

2) it crashes when I attempt to do white balance processing.

Is there an interface I could use? Should I create interface for
v4lconvert_ for this kind of processing? Any preferences how it should
look like?

Best regards,
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 

Attachment: signature.asc
Description: Digital signature

Reply via email to