Re: [PATCH v4] media: coda: Add driver for Coda video codec.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 18 July 2012 15:10:41 Hans Verkuil wrote:
> On Wed 18 July 2012 14:42:00 javier Martin wrote:
> > Hi Hans,
> > thank you for your review.
> > 
> > On 18 July 2012 13:00, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> 
> <snip>
> 
> > >
> > > Colorspace.
> > 
> > But I don't know how to handle colorspace in this driver. Video
> > encoder from samsung
> > (http://lxr.linux.no/#linux+v3.4.5/drivers/media/video/s5p-mfc/s5p_mfc_enc.c#L844
> > ) does not handle it either.
> 
> That's wrong too :-)
> 
> > This is a video encoder which gets an input video streaming (with its
> > specific colorspace) and encodes it. I understand the sense of this
> > field for a video source but for an encoder?
> 
> An encoder should copy the colorspace of the video it receives to the output
> video format and default to V4L2_COLORSPACE_SMPTE170M (SDTV) or
> V4L2_COLORSPACE_REC709 (HDTV).
> 
> So as long as userspace hasn't told the driver what the colorspace is of the
> video it will encode you can return a default colorspace. Once you know the
> actual colorspace, then that's what should be returned.
> 
> This assumes that the encoder doesn't do any colorspace changes and just encodes
> as is.

Look at my patches for mem2mem_testdev that are here:

http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/m2m

I think that the way I handle colorspace there is quite reasonable. Note that I
just used V4L2_COLORSPACE_REC709 as the default. I think it is unnecessary to
make a distinction between SDTV and HDTV colorspace.

Note that I need to do a bit more work on v4l2-compliance so that it recognizes
and correctly handles mem2mem devices. Some of the tests do not work correctly
at the moment for such devices.

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux