[VDPAU] [PATCH] Extend the public VDPAU API to support HEVC Decoding

Rémi Denis-Courmont remi at remlab.net
Sat Jul 26 00:59:47 PDT 2014


	Hello,

Le vendredi 25 juillet 2014, 15:21:55 José Hiram Soltren a écrit :
> +/** \hideinitializer */
> +#define VDP_DECODER_PROFILE_HEVC_MAIN_10               
> (VdpDecoderProfile)23
> +/** \hideinitializer */
> +#define VDP_DECODER_PROFILE_HEVC_MAIN_12               
> (VdpDecoderProfile)24

I think we need new VdpChromaType values for high depth video surfaces, since 
they will likely require more memory and/different alignment in some VDPAU 
back-ends.

In particular, VdpVideoSurfaceCreate() does not "know" what decoding profile 
the created surface will be used with: it does not have any reference to the 
VdpDecoder, and it is perfectly legal to create a surface without or before 
the decoder.

So far, it was always assumed that video surfaces would be for 8-bits with 
components. For backward compatibility, I would make explicit that existing 
chroma types are 8-bits per component, and create new ones for higher depth, 
e.g.:

#define VDP_CHROMA_TYPE_420_8 ((VdpChromaType)0)
#define VDP_CHROMA_TYPE_422_8 ((VdpChromaType)1)
#define VDP_CHROMA_TYPE_444_8 ((VdpChromaType)2)

#define VDP_CHROMA_TYPE_420_10 ((VdpChromaType)8)
#define VDP_CHROMA_TYPE_422_10 ((VdpChromaType)9)
#define VDP_CHROMA_TYPE_444_10 ((VdpChromaType)10)

#define VDP_CHROMA_TYPE_420_12 ((VdpChromaType)16)
#define VDP_CHROMA_TYPE_422_12 ((VdpChromaType)17)
#define VDP_CHROMA_TYPE_444_12 ((VdpChromaType)18)

/* Backward source compatibility aliases */
#define VDP_CHROMA_TYPE_420 VDP_CHROMA_TYPE_420_8
#define VDP_CHROMA_TYPE_422 VDP_CHROMA_TYPE_422_8
#define VDP_CHROMA_TYPE_444 VDP_CHROMA_TYPE_444_8


Also, while this is not strictly required for H.265 decoding, if VDPAU gains 
support for higher depth, it would be kinda nice to define usable 
VdpYCbCrFormat formats to upload/download raw surfaces.


Regards,

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the VDPAU mailing list