[VDPAU] [PATCH] Enable Lossless Decode Capabilities via VDPAU API
Jose Soltren
jsoltren at nvidia.com
Tue Nov 25 07:21:25 PST 2014
Thanks Karthik.
We were hoping to get community feedback on a few items here:
1. Name. Is there a preference for calling the new structure VdpPictureInfoH264Extended versus VdpPictureInfoH264Hi444PP ?
2. Versioning. Is there a preference to make this a versioned structure or not? Aaron Plattner expressed a preference for not making this versioned; I'll let him explain why here.
3. Containment. Should VdpPictureInfoH264Extended contain an entire VdpPictureInfoH264, or simply a pointer to one?
4. Flags. Are there any opinions on accepting values greater than 1 for transform_bypass for internal use, or should we write these into the specification? NVIDIA video decoding hardware contains a mode to work around the recently-fixed ipred8x8 bug in x264; the NVIDIA driver would accept a value of 2 to enable that workaround.
5. Scope. If this change really adds VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE, it will also need to add anything else related to Hi444PP, not just lossless decode. Namely it would need to introduce separate color plane coding, 4:4:4 chroma subsampling (a misnomer; not subsampling at all), and bit depths up to 14 bits per sample. If we choose to make VdpPictureInfoH264Extended versioned we can add those in a follow-on change. If not, we need to add those now.
We discussed this some internally, and the discussion was moving in this direction:
- it is fair to add a new picture info structure for a new profile;
- picture info structures should not be versioned (they're not now);
- thus we should do the additional work up front to add all API data for Hi444PP, even though NVIDIA hardware does not support many of them;
- the VdpPictureInfoH264Extended structure should contain an entire VdpPictureInfoH264 and not a pointer to one.
Again, suggestions welcome. We're hoping to have this applied by mid-December.
Thanks,
--José
-----Original Message-----
From: VDPAU [mailto:vdpau-bounces at lists.freedesktop.org] On Behalf Of Karthikeyan Sreenivasan
Sent: Monday, November 24, 2014 7:20 PM
To: vdpau at lists.freedesktop.org
Subject: [VDPAU] [PATCH] Enable Lossless Decode Capabilities via VDPAU API
The proposed patch will add a new struct VdpPictureInfoH264Extened, which enables lossless decode capabilities via VDPAU API.
The new struct VdpPictureInfoH264Extened contains the transform bypass flag which will enable lossless decode.
Note : For transform_bypass, NVIDIA driver will accept a value of 2 for the ipred8x8 workaround.
The patch also adds new profile
VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE (currently only with 8 bit depth support).
Videos of VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE profile must use VdpPictureInfoH264Extened.
--------------------------------------------------------------
diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h index 4444de3..e6dd3ae 100644
--- a/include/vdpau/vdpau.h
+++ b/include/vdpau/vdpau.h
@@ -2445,6 +2445,9 @@ typedef uint32_t VdpDecoderProfile; #define VDP_DECODER_PROFILE_H264_PROGRESSIVE_HIGH
((VdpDecoderProfile)24)
/** \hideinitializer */
#define VDP_DECODER_PROFILE_H264_CONSTRAINED_HIGH
((VdpDecoderProfile)25)
+/** \hideinitializer */
+/** \brief Support for 8 bit depth only */ #define
+VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
((VdpDecoderProfile)26)
/** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG1_NA 0
@@ -2764,6 +2767,11 @@ typedef struct {
* Note: References to "copy of bitstream field" in the field descriptions
* may refer to data literally parsed from the bitstream, or derived from
* the bitstream using a mechanism described in the specification.
+ *
+ * Note: VDPAU clients must use VdpPictureInfoH264Extended to describe
+ the
+ * attributes of a frame being decoded with
+ * VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE.
+
*/
typedef struct {
/** Number of slices in the bitstream provided. */ @@ -2831,6 +2839,35 @@ typedef struct {
VdpReferenceFrameH264 referenceFrames[16]; } VdpPictureInfoH264;
+#define VDP_H264_EXTENDED_VERSION 0
+
+/**
+ * \brief Picture parameter information for an extended H.264 picture.
+ *
+ * Note: VDPAU clients must use VdpPictureInfoH264Extended to describe
+the
+ * attributes of a frame being decoded with
+ * VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE.
+ *
+ * Note: The transform_bypass field is only valid with
+ * VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE and above.
+ *
+ * Note: software drivers may choose to honor values of
+ * transform_bypass greater than 1 for internal use.
+ */
+typedef struct {
+ /** This field must be filled with VDP_H264_EXTENDED_VERSION. */
+ uint32_t struct_version;
+ /** \ref VdpPictureInfoH264 struct. */
+ VdpPictureInfoH264 *pictureInfo;
+ /** Copy of the H.264 bitstream field.
+ *
+ * 0 - lossless disabled
+ * 1 - lossless enabled
+ */
+ uint8_t transform_bypass;
+
+} VdpPictureInfoH264Extended;
+
/**
* \brief Picture parameter information for a VC1 picture.
*
--
Karthikeyan S | nvpublic
_______________________________________________
VDPAU mailing list
VDPAU at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/vdpau
More information about the VDPAU
mailing list