[VDPAU] [PATCH 1/1] Add VP9 decode support in VDPAU API
Manoj Bonda
mbonda at nvidia.com
Thu Jul 18 11:59:39 UTC 2019
> -----Original Message-----
> From: Philip Langdale <philipl at overt.org>
> Sent: Thursday, July 18, 2019 3:49 PM
> To: Manoj Bonda <mbonda at nvidia.com>
> Cc: vdpau at lists.freedesktop.org; Aaron Plattner <aplattner at nvidia.com>;
> Stephen Warren <swarren at nvidia.com>; Andy Ritger <ARitger at nvidia.com>
> Subject: Re: [PATCH 1/1] Add VP9 decode support in VDPAU API
>
> On 2019-07-18 00:13, ManojGuptaBonda wrote:
> > Added VP9 decoder profiles and level to VDPAU header file.
> > VP9 specification has 4 profiles and 1 level defined.
> > A new VdpPictureInfoVP9 structure is defined to pass VP9 specific
> > params to the driver.
> > ---
> > include/vdpau/vdpau.h | 72
> > +++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 72 insertions(+)
> >
> > diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h index
> > 67aeacf..402d119 100644
> > --- a/include/vdpau/vdpau.h
> > +++ b/include/vdpau/vdpau.h
> > @@ -2560,6 +2560,14 @@ typedef uint32_t VdpDecoderProfile;
> > /** \brief Support for 8 bit depth only */
> > #define VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
> > ((VdpDecoderProfile)26)
> > /** \hideinitializer */
> > +#define VDP_DECODER_PROFILE_VP9_PROFILE_0
> > ((VdpDecoderProfile)27)
> > +/** \hideinitializer */
> > +#define VDP_DECODER_PROFILE_VP9_PROFILE_1
> > ((VdpDecoderProfile)28)
> > +/** \hideinitializer */
> > +#define VDP_DECODER_PROFILE_VP9_PROFILE_2
> > ((VdpDecoderProfile)29)
> > +/** \hideinitializer */
> > +#define VDP_DECODER_PROFILE_VP9_PROFILE_3
> > ((VdpDecoderProfile)30)
> > +/** \hideinitializer */
> > /** \brief MPEG-H Part 2 == H.265 == HEVC */ #define
> > VDP_DECODER_PROFILE_HEVC_MAIN
> > ((VdpDecoderProfile)100)
> > /** \hideinitializer */
> > @@ -2664,6 +2672,9 @@ typedef uint32_t VdpDecoderProfile;
> > /** \hideinitializer */
> > #define VDP_DECODER_LEVEL_DIVX_NA 0
> >
> > +/** \hideinitializer */
> > +#define VDP_DECODER_LEVEL_VP9_L1 1
> > +
> > /**
> > * The VDPAU H.265/HEVC decoder levels correspond to the values of
> > * general_level_idc as described in the H.265 Specification, Annex
> > A, @@ -3202,6 +3213,67 @@ typedef VdpPictureInfoMPEG4Part2
> > VdpPictureInfoDivX4;
> > */
> > typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX5;
> >
> > +typedef struct
> > +{
> > + unsigned int width;
> > + unsigned int height;
> > +
> > + //Frame Indices
> > + VdpVideoSurface lastReference;
> > + VdpVideoSurface goldenReference;
> > + VdpVideoSurface altReference;
> > +
> > + unsigned char colorSpace;
> > +
> > + unsigned short profile;
> > + unsigned short frameContextIdx;
> > + unsigned short keyFrame;
> > + unsigned short showFrame;
> > + unsigned short errorResilient;
> > + unsigned short frameParallelDecoding;
> > + unsigned short subSamplingX;
> > + unsigned short subSamplingY;
> > + unsigned short intraOnly;
> > + unsigned short allowHighPrecisionMv;
> > + unsigned short refreshEntropyProbs;
> > + unsigned short prevIsKeyFrame;
>
> This field is missing in the nvdec struct. What does it mean?
[Manoj] This is analogous to last_keyframe in VP9Context in ffmpeg code.
A field telling whether the previous frame is keyframe or not.
This can be handled in the driver internally also, but since its already available in
FFmpeg code I used it.
>
> > +
> > + unsigned char refFrameSignBias[4];
> > +
> > + unsigned char bitDepthMinus8Luma;
> > + unsigned char bitDepthMinus8Chroma;
> > + unsigned char loopFilterLevel;
> > + unsigned char loopFilterSharpness;
> > +
> > + unsigned char modeRefLfEnabled;
> > + unsigned char log2TileColumns;
> > + unsigned char log2TileRows;
> > +
> > + unsigned char segmentEnabled;
> > + unsigned char segmentMapUpdate;
> > + unsigned char segmentMapTemporalUpdate;
> > + unsigned char segmentFeatureMode;
> > +
> > + unsigned char segmentFeatureEnable[8][4];
> > + short segmentFeatureData[8][4];
> > + unsigned char mbSegmentTreeProbs[7];
> > + unsigned char segmentPredProbs[3];
> > + unsigned char reservedSegment16Bits[2];
> > +
> > + int qpYAc;
> > + int qpYDc;
> > + int qpChDc;
> > + int qpChAc;
> > +
> > + unsigned int activeRefIdx[3];
> > + unsigned int resetFrameContext;
> > + unsigned int mcompFilterType;
> > + unsigned int mbRefLfDelta[4];
> > + unsigned int mbModeLfDelta[2];
>
> > + unsigned int uncompressedHeaderSize;
> > + unsigned int compressedHeaderSize;
>
> I notice you've used the ffmpeg names for these rather than the nvdec ones.
> To the extent that these have names in the spec, I'd use those, but I don't
> know what they are. I don't mind either way; just making an observation.
>
> > +} VdpPictureInfoVP9;
> > +
> > /**
> > * \brief Picture parameter information for an H.265/HEVC picture.
> > *
>
> Rest looks fine.
>
> Thanks,
>
> --phil
More information about the VDPAU
mailing list