Re: [RFC] Need comments for supplementing a new pixelformat in videodev2.h

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

 



On Friday 31 July 2009 09:22:03 Dongsoo, Nathaniel Kim wrote:
> Hello,
> 
> As the codec device of my new H/W I'm is giving output with Y and CbCr
> as separated components which means it's just like other NV
> pixelformats described in videodev2.h. However, there is a significant
> difference in aligning each Y and CbCr components in memory.
> 
> Picking up the description from the user manual, it says
> 
> "Reference picture is always made in the tile mode memory structure.
> Decoding reconstruction image is made in 64
> pixels x 32 lines tiled mode. Encoding reconstruction image is made in
> 16 pixels x 16 lines tiled mode."
> 
> Besides that, it totally looks like NV12 pixelformat.
> S/W engineer from the vendor wants to call this as "NV12 tiled" which
> can be considered as a tiled alignment of 64pixel X 32 lines of macro
> blocks of each components.
> 
> So, is that just a NV12 or should be called as a new pixelformat?

No, that's a new pixelformat. It sounds very similar to the HM12 format
which is also a tiled format. That format is described here:

Documentation/video4linux/cx2341x/README.hm12

If I understand correctly then you actually have two different formats:
one for encoding, one for decoding. In that case you also need to make
two different pixelformats. Each pixelformat must map unambiguously to
a specific format.

> If that should be considered as a new pixelformat, how about the way like this:
> 
> #define V4L2_PIX_FMT_NV12T    v4l2_fourcc('T', 'V', '1', '2') /* 12
> Y/CbCr 4:2:0 */

Note that for each pixelformat you add you also need to add an entry to
the v4l2 spec. Either make a new pixfmt-tv12.sgml file to document the format
precisely (recommended if customers will need to know this information)
or add a short entry to pixfmt.sgml that just refers to your driver.

This is needed to make sure that the spec still can be build, otherwise
you get an unresolved reference to the new pixelformat define.

You can also consider adding support for converting this format to something
more common to libv4lconvert. The tiled hm12 format is already handled there,
so that code can be used as reference code (or even reused).

Finally note that we do not add new pixel formats unless we also merge the
driver that uses it at the same time or very soon afterwards.

> 
> Any comment will be appreciated.

No problem!

Regards,

        Hans

> Cheers,
> 
> Nate
> 



-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
--
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