Another 10-bit packed YUV format

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Another 10-bit packed YUV format

Josh Doe
I'm writing a source for Imperx SDI grabbers, and they seem to use a
format I've not seen before.

It's packed 4:2:2 YUV 10 bits per channel, YVYU order, big endian, and
with no padding bits, so they pack 4 components in 5 bytes, and each
row is aligned to 4 bytes. Unless others use this format, it's not
worth adding a new pixel format.

From grepping plugins for similar formats, it seems v210 is the most
commonly supported format, so adding conversions internal to the
source to v210 and AYUV64 might make the most sense. Input welcome, I
don't often encounter new formats.

-Josh
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Another 10-bit packed YUV format

Nicolas Dufresne-5
Le mercredi 31 juillet 2019 à 06:45 -0400, Josh Doe a écrit :
> I'm writing a source for Imperx SDI grabbers, and they seem to use a
> format I've not seen before.
>
> It's packed 4:2:2 YUV 10 bits per channel, YVYU order, big endian, and
> with no padding bits, so they pack 4 components in 5 bytes, and each
> row is aligned to 4 bytes. Unless others use this format, it's not
> worth adding a new pixel format.

I've seen similar format, I think Rockchip uses similar packing as it's
optimal for serial links and memory bandwidth. Feel free to propose a
patch to libgstvideo (gst-plugins-base), it seems like a valid format
that we'll see again in the future.

>
> From grepping plugins for similar formats, it seems v210 is the most
> commonly supported format, so adding conversions internal to the
> source to v210 and AYUV64 might make the most sense. Input welcome, I
> don't often encounter new formats.

The side effect is that you don't get HW acceleration, while exposing
the real format let you later implement some GL/Vulkan/D3D shader to
handle it faster.

>
> -Josh
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Another 10-bit packed YUV format

Josh Doe
On Wed, Jul 31, 2019 at 8:16 AM Nicolas Dufresne <[hidden email]> wrote:

>
> Le mercredi 31 juillet 2019 à 06:45 -0400, Josh Doe a écrit :
> > I'm writing a source for Imperx SDI grabbers, and they seem to use a
> > format I've not seen before.
> >
> > It's packed 4:2:2 YUV 10 bits per channel, YVYU order, big endian, and
> > with no padding bits, so they pack 4 components in 5 bytes, and each
> > row is aligned to 4 bytes. Unless others use this format, it's not
> > worth adding a new pixel format.
>
> I've seen similar format, I think Rockchip uses similar packing as it's
> optimal for serial links and memory bandwidth. Feel free to propose a
> patch to libgstvideo (gst-plugins-base), it seems like a valid format
> that we'll see again in the future.

I was misled on the format, and have finally gotten to test the device
with a working unpack function. Turns out it's 4:2:2 YUV 10 bits per
channel, YUYV order, little endian, 6 components packed into 64-bits
with the 4 MSBs unused. So it's very much like v210, just different
order and padding after six components instead of after three. Not
sure if anyone else uses this variant.

I'd be happy to propose a patch, hardest thing would be coming up with
a name, maybe YUY2_10LE64?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Another 10-bit packed YUV format

Nicolas Dufresne-5
Le jeudi 01 août 2019 à 12:51 -0400, Josh Doe a écrit :

> On Wed, Jul 31, 2019 at 8:16 AM Nicolas Dufresne <[hidden email]> wrote:
> > Le mercredi 31 juillet 2019 à 06:45 -0400, Josh Doe a écrit :
> > > I'm writing a source for Imperx SDI grabbers, and they seem to use a
> > > format I've not seen before.
> > >
> > > It's packed 4:2:2 YUV 10 bits per channel, YVYU order, big endian, and
> > > with no padding bits, so they pack 4 components in 5 bytes, and each
> > > row is aligned to 4 bytes. Unless others use this format, it's not
> > > worth adding a new pixel format.
> >
> > I've seen similar format, I think Rockchip uses similar packing as it's
> > optimal for serial links and memory bandwidth. Feel free to propose a
> > patch to libgstvideo (gst-plugins-base), it seems like a valid format
> > that we'll see again in the future.
>
> I was misled on the format, and have finally gotten to test the device
> with a working unpack function. Turns out it's 4:2:2 YUV 10 bits per
> channel, YUYV order, little endian, 6 components packed into 64-bits
> with the 4 MSBs unused. So it's very much like v210, just different
> order and padding after six components instead of after three. Not
> sure if anyone else uses this variant.
>
> I'd be happy to propose a patch, hardest thing would be coming up with
> a name, maybe YUY2_10LE64?
Sounds about the right name, or at least follow my tentative to make a
meaningful naming scheme.

> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment