vtdec: support P010_10LE output
I'm trying to add 10-bit output in the applemedia/vtdec element for H265 decoding. I identified that pixel format kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
corresponds to GST_VIDEO_FORMAT_P010_10LE
so I added necessary conversions and everything works fine as long as I don't use GLMemory
.
However, when I use GLMemory and pass decoded pictures to glimagesink
the video gets corrupted on the conversion to RGBA
in glcolorconvert
element and all I can see is green rectangle that fills entire display window. Here is the pipeline that I use:
gst-launch-1.0 filesrc location=file.h265 ! h265parse ! vtdec ! "video/x-raw(memory:GLMemory),format=(string)P010_10LE" ! glimagesink
Interestingly, if I dump vtdec output to file (see pipeline below) and open it with a raw YUV video player the video looks ok.
gst-launch-1.0 filesrc location=file.h265 ! h265parse ! vtdec ! "video/x-raw(memory:GLMemory),format=(string)P010_10LE" ! filesink location=file.raw
I'd appreciate any suggestions what I might be missing.