vdpau.h   vdpau.h 
/* /*
* This source file is documented using Doxygen markup. * This source file is documented using Doxygen markup.
* See http://www.stack.nl/~dimitri/doxygen/ * See http://www.stack.nl/~dimitri/doxygen/
*/ */
/* /*
* This copyright notice applies to this header file: * This copyright notice applies to this header file:
* *
* Copyright (c) 2008-2010 NVIDIA Corporation * Copyright (c) 2008-2015 NVIDIA Corporation
* *
* Permission is hereby granted, free of charge, to any person * Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation * obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without * files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, * restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell * copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the * copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following * Software is furnished to do so, subject to the following
* conditions: * conditions:
* *
skipping to change at line 435 skipping to change at line 435
* *
* The bitstream passed to VDPAU should contain all original emulation * The bitstream passed to VDPAU should contain all original emulation
* prevention bytes present in the original bitstream; do not remove these * prevention bytes present in the original bitstream; do not remove these
* from the bitstream. * from the bitstream.
* *
* \subsection bitstream_mpeg4part2 MPEG-4 Part 2 and DivX * \subsection bitstream_mpeg4part2 MPEG-4 Part 2 and DivX
* *
* Include all slices beginning with start codes 0x000001B6. The slice star t * Include all slices beginning with start codes 0x000001B6. The slice star t
* code must be included for all slices. * code must be included for all slices.
* *
* \subsection bitstream_hevc H.265/HEVC - High Efficiency Video Codec
*
* Include all video coding layer (VCL) NAL units, with nal_unit_type value
s
* of 0 (TRAIL_N) through 31 (RSV_VCL31) inclusive. In addition to parsing
* and providing NAL units, an H.265/HEVC decoder application using VDPAU
* for decoding must parse certain values of the first slice segment header
* in a VCL NAL unit and provide it through VdpPictureInfoHEVC. Please see
* the documentation for VdpPictureInfoHEVC below for further details.
*
* The complete slice start code (including the 0x000001 prefix) must be
* included for all slices, even when the prefix is not included in the
* bitstream.
*
* Note that if desired:
*
* - The slice start code prefix may be included in a separate bitstream
* buffer array entry to the actual slice data extracted from the bitstre
am.
* - Multiple bitstream buffer array entries (e.g. one per slice) may point
at
* the same physical data storage for the slice start code prefix.
*
* \section video_mixer_usage Video Mixer Usage * \section video_mixer_usage Video Mixer Usage
* *
* \subsection video_surface_content VdpVideoSurface Content * \subsection video_surface_content VdpVideoSurface Content
* *
* Each \ref VdpVideoSurface "VdpVideoSurface" is expected to contain an * Each \ref VdpVideoSurface "VdpVideoSurface" is expected to contain an
* entire frame's-worth of data, irrespective of whether an interlaced of * entire frame's-worth of data, irrespective of whether an interlaced of
* progressive sequence is being decoded. * progressive sequence is being decoded.
* *
* Depending on the exact encoding structure of the compressed video stream , * Depending on the exact encoding structure of the compressed video stream ,
* the application may need to call \ref VdpDecoderRender twice to fill a * the application may need to call \ref VdpDecoderRender twice to fill a
skipping to change at line 2466 skipping to change at line 2486
#define VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ((VdpDecoderProfile )22) #define VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ((VdpDecoderProfile )22)
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_PROFILE_H264_EXTENDED ((VdpDecoderProfile )23) #define VDP_DECODER_PROFILE_H264_EXTENDED ((VdpDecoderProfile )23)
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_PROFILE_H264_PROGRESSIVE_HIGH ((VdpDecoderProfile )24) #define VDP_DECODER_PROFILE_H264_PROGRESSIVE_HIGH ((VdpDecoderProfile )24)
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_PROFILE_H264_CONSTRAINED_HIGH ((VdpDecoderProfile )25) #define VDP_DECODER_PROFILE_H264_CONSTRAINED_HIGH ((VdpDecoderProfile )25)
/** \hideinitializer */ /** \hideinitializer */
/** \brief Support for 8 bit depth only */ /** \brief Support for 8 bit depth only */
#define VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE ((VdpDecoderProfile )26) #define VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE ((VdpDecoderProfile )26)
/** \hideinitializer */
/** \brief MPEG-H Part 2 == H.265 == HEVC */
#define VDP_DECODER_PROFILE_HEVC_MAIN ((VdpDecoderProfile
)50)
/** \hideinitializer */
#define VDP_DECODER_PROFILE_HEVC_MAIN_10 ((VdpDecoderProfile
)51)
/** \hideinitializer */
#define VDP_DECODER_PROFILE_HEVC_MAIN_STILL ((VdpDecoderProfile
)52)
/** \hideinitializer */
#define VDP_DECODER_PROFILE_HEVC_MAIN_12 ((VdpDecoderProfile
)53)
/** \hideinitializer */
#define VDP_DECODER_PROFILE_HEVC_MAIN_444 ((VdpDecoderProfile
)54)
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG1_NA 0 #define VDP_DECODER_LEVEL_MPEG1_NA 0
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG2_LL 0 #define VDP_DECODER_LEVEL_MPEG2_LL 0
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG2_ML 1 #define VDP_DECODER_LEVEL_MPEG2_ML 1
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG2_HL14 2 #define VDP_DECODER_LEVEL_MPEG2_HL14 2
skipping to change at line 2561 skipping to change at line 2592
#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L3 3 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L3 3
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L4 4 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L4 4
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5 5 #define VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5 5
/** \hideinitializer */ /** \hideinitializer */
#define VDP_DECODER_LEVEL_DIVX_NA 0 #define VDP_DECODER_LEVEL_DIVX_NA 0
/** /**
* The VDPAU H.265/HEVC decoder levels correspond to the values of
* general_level_idc as described in the H.265 Specification, Annex A,
* Table A.1. The enumeration values are equal to thirty times the level
* number.
*/
#define VDP_DECODER_LEVEL_HEVC_1 30
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_2 60
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_2_1 63
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_3 90
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_3_1 93
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_4 120
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_4_1 123
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_5 150
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_5_1 153
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_5_2 156
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_6 180
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_6_1 183
/** \hideinitializer */
#define VDP_DECODER_LEVEL_HEVC_6_2 186
/**
* \brief Query the implementation's VdpDecoder capabilities. * \brief Query the implementation's VdpDecoder capabilities.
* \param[in] device The device to query. * \param[in] device The device to query.
* \param[in] profile The decoder profile for which information is requeste d. * \param[in] profile The decoder profile for which information is requeste d.
* \param[out] is_supported Is this profile supported? * \param[out] is_supported Is this profile supported?
* \param[out] max_level The maximum specification level supported for this * \param[out] max_level The maximum specification level supported for this
* profile. * profile.
* \param[out] max_macroblocks The maximum supported surface size in * \param[out] max_macroblocks The maximum supported surface size in
* macroblocks. Note that this could be greater than that dictated by * macroblocks. Note that this could be greater than that dictated by
* the maximum level. * the maximum level.
* \param[out] max_width The maximum supported surface width for this profi le. * \param[out] max_width The maximum supported surface width for this profi le.
skipping to change at line 2682 skipping to change at line 2745
* instance of one of the "real" VdpPictureInfo* structures, * instance of one of the "real" VdpPictureInfo* structures,
* picking the type appropriate for the decoder object in * picking the type appropriate for the decoder object in
* question. * question.
*/ */
typedef void VdpPictureInfo; typedef void VdpPictureInfo;
/** /**
* \brief Picture parameter information for an MPEG 1 or MPEG 2 * \brief Picture parameter information for an MPEG 1 or MPEG 2
* picture. * picture.
* *
* Note: References to "copy of bitstream field" in the field descriptions * Note: References to bitstream fields below may refer to data literally p
* may refer to data literally parsed from the bitstream, or derived from arsed
* the bitstream using a mechanism described in the specification. * from the bitstream, or derived from the bitstream using a mechanism desc
ribed
* in the specification.
*/ */
typedef struct { typedef struct {
/** /**
* Reference used by B and P frames. * Reference used by B and P frames.
* Set to VDP_INVALID_HANDLE when not used. * Set to VDP_INVALID_HANDLE when not used.
*/ */
VdpVideoSurface forward_reference; VdpVideoSurface forward_reference;
/** /**
* Reference used by B frames. * Reference used by B frames.
* Set to VDP_INVALID_HANDLE when not used. * Set to VDP_INVALID_HANDLE when not used.
*/ */
VdpVideoSurface backward_reference; VdpVideoSurface backward_reference;
/** Number of slices in the bitstream provided. */ /** Number of slices in the bitstream provided. */
uint32_t slice_count; uint32_t slice_count;
/** Copy of the MPEG bitstream field. */ /** \name MPEG bitstream
*
* Copies of the MPEG bitstream fields.
* @{ */
uint8_t picture_structure; uint8_t picture_structure;
/** Copy of the MPEG bitstream field. */
uint8_t picture_coding_type; uint8_t picture_coding_type;
/** Copy of the MPEG bitstream field. */
uint8_t intra_dc_precision; uint8_t intra_dc_precision;
/** Copy of the MPEG bitstream field. */
uint8_t frame_pred_frame_dct; uint8_t frame_pred_frame_dct;
/** Copy of the MPEG bitstream field. */
uint8_t concealment_motion_vectors; uint8_t concealment_motion_vectors;
/** Copy of the MPEG bitstream field. */
uint8_t intra_vlc_format; uint8_t intra_vlc_format;
/** Copy of the MPEG bitstream field. */
uint8_t alternate_scan; uint8_t alternate_scan;
/** Copy of the MPEG bitstream field. */
uint8_t q_scale_type; uint8_t q_scale_type;
/** Copy of the MPEG bitstream field. */
uint8_t top_field_first; uint8_t top_field_first;
/** Copy of the MPEG-1 bitstream field. For MPEG-2, set to 0. */ /** MPEG-1 only. For MPEG-2, set to 0. */
uint8_t full_pel_forward_vector; uint8_t full_pel_forward_vector;
/** Copy of the MPEG-1 bitstream field. For MPEG-2, set to 0. */ /** MPEG-1 only. For MPEG-2, set to 0. */
uint8_t full_pel_backward_vector; uint8_t full_pel_backward_vector;
/** /** For MPEG-1, fill both horizontal and vertical entries. */
* Copy of the MPEG bitstream field.
* For MPEG-1, fill both horizontal and vertical entries.
*/
uint8_t f_code[2][2]; uint8_t f_code[2][2];
/** Copy of the MPEG bitstream field, converted to raster order. */ /** Convert to raster order. */
uint8_t intra_quantizer_matrix[64]; uint8_t intra_quantizer_matrix[64];
/** Copy of the MPEG bitstream field, converted to raster order. */ /** Convert to raster order. */
uint8_t non_intra_quantizer_matrix[64]; uint8_t non_intra_quantizer_matrix[64];
/** @} */
} VdpPictureInfoMPEG1Or2; } VdpPictureInfoMPEG1Or2;
/** /**
* \brief Information about an H.264 reference frame * \brief Information about an H.264 reference frame
* *
* Note: References to "copy of bitstream field" in the field descriptions * Note: References to bitstream fields below may refer to data literally p
* may refer to data literally parsed from the bitstream, or derived from arsed
* the bitstream using a mechanism described in the specification. * from the bitstream, or derived from the bitstream using a mechanism desc
ribed
* in the specification.
*/ */
typedef struct { typedef struct {
/** /**
* The surface that contains the reference image. * The surface that contains the reference image.
* Set to VDP_INVALID_HANDLE for unused entries. * Set to VDP_INVALID_HANDLE for unused entries.
*/ */
VdpVideoSurface surface; VdpVideoSurface surface;
/** Is this a long term reference (else short term). */ /** Is this a long term reference (else short term). */
VdpBool is_long_term; VdpBool is_long_term;
/** /**
skipping to change at line 2782 skipping to change at line 2838
* defined by the H.264 specification. In particular, once a * defined by the H.264 specification. In particular, once a
* reference frame has been decoded to a surface, that surface must * reference frame has been decoded to a surface, that surface must
* continue to appear in the DPB until no longer required to predict * continue to appear in the DPB until no longer required to predict
* any future frame. Once a surface is removed from the DPB, it can * any future frame. Once a surface is removed from the DPB, it can
* no longer be used as a reference, unless decoded again. * no longer be used as a reference, unless decoded again.
* *
* Also note that only surfaces previously generated using \ref * Also note that only surfaces previously generated using \ref
* VdpDecoderRender may be used as reference frames. In particular, * VdpDecoderRender may be used as reference frames. In particular,
* surfaces filled using any "put bits" API will not work. * surfaces filled using any "put bits" API will not work.
* *
* Note: References to "copy of bitstream field" in the field descriptions * Note: References to bitstream fields below may refer to data literally p
* may refer to data literally parsed from the bitstream, or derived from arsed
* the bitstream using a mechanism described in the specification. * from the bitstream, or derived from the bitstream using a mechanism desc
ribed
* in the specification.
* *
* Note: VDPAU clients must use VdpPictureInfoH264Predictive to describe th e * Note: VDPAU clients must use VdpPictureInfoH264Predictive to describe th e
* attributes of a frame being decoded with * attributes of a frame being decoded with
* VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE. * VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE.
*/ */
typedef struct { typedef struct {
/** Number of slices in the bitstream provided. */ /** Number of slices in the bitstream provided. */
uint32_t slice_count; uint32_t slice_count;
/** [0]: top, [1]: bottom */ /** [0]: top, [1]: bottom */
int32_t field_order_cnt[2]; int32_t field_order_cnt[2];
/** Will the decoded frame be used as a reference later. */ /** Will the decoded frame be used as a reference later. */
VdpBool is_reference; VdpBool is_reference;
/** Copy of the H.264 bitstream field. */ /** \name H.264 bitstream
*
* Copies of the H.264 bitstream fields.
* @{ */
uint16_t frame_num; uint16_t frame_num;
/** Copy of the H.264 bitstream field. */
uint8_t field_pic_flag; uint8_t field_pic_flag;
/** Copy of the H.264 bitstream field. */
uint8_t bottom_field_flag; uint8_t bottom_field_flag;
/** Copy of the H.264 bitstream field. */
uint8_t num_ref_frames; uint8_t num_ref_frames;
/** Copy of the H.264 bitstream field. */
uint8_t mb_adaptive_frame_field_flag; uint8_t mb_adaptive_frame_field_flag;
/** Copy of the H.264 bitstream field. */
uint8_t constrained_intra_pred_flag; uint8_t constrained_intra_pred_flag;
/** Copy of the H.264 bitstream field. */
uint8_t weighted_pred_flag; uint8_t weighted_pred_flag;
/** Copy of the H.264 bitstream field. */
uint8_t weighted_bipred_idc; uint8_t weighted_bipred_idc;
/** Copy of the H.264 bitstream field. */
uint8_t frame_mbs_only_flag; uint8_t frame_mbs_only_flag;
/** Copy of the H.264 bitstream field. */
uint8_t transform_8x8_mode_flag; uint8_t transform_8x8_mode_flag;
/** Copy of the H.264 bitstream field. */
int8_t chroma_qp_index_offset; int8_t chroma_qp_index_offset;
/** Copy of the H.264 bitstream field. */
int8_t second_chroma_qp_index_offset; int8_t second_chroma_qp_index_offset;
/** Copy of the H.264 bitstream field. */
int8_t pic_init_qp_minus26; int8_t pic_init_qp_minus26;
/** Copy of the H.264 bitstream field. */
uint8_t num_ref_idx_l0_active_minus1; uint8_t num_ref_idx_l0_active_minus1;
/** Copy of the H.264 bitstream field. */
uint8_t num_ref_idx_l1_active_minus1; uint8_t num_ref_idx_l1_active_minus1;
/** Copy of the H.264 bitstream field. */
uint8_t log2_max_frame_num_minus4; uint8_t log2_max_frame_num_minus4;
/** Copy of the H.264 bitstream field. */
uint8_t pic_order_cnt_type; uint8_t pic_order_cnt_type;
/** Copy of the H.264 bitstream field. */
uint8_t log2_max_pic_order_cnt_lsb_minus4; uint8_t log2_max_pic_order_cnt_lsb_minus4;
/** Copy of the H.264 bitstream field. */
uint8_t delta_pic_order_always_zero_flag; uint8_t delta_pic_order_always_zero_flag;
/** Copy of the H.264 bitstream field. */
uint8_t direct_8x8_inference_flag; uint8_t direct_8x8_inference_flag;
/** Copy of the H.264 bitstream field. */
uint8_t entropy_coding_mode_flag; uint8_t entropy_coding_mode_flag;
/** Copy of the H.264 bitstream field. */
uint8_t pic_order_present_flag; uint8_t pic_order_present_flag;
/** Copy of the H.264 bitstream field. */
uint8_t deblocking_filter_control_present_flag; uint8_t deblocking_filter_control_present_flag;
/** Copy of the H.264 bitstream field. */
uint8_t redundant_pic_cnt_present_flag; uint8_t redundant_pic_cnt_present_flag;
/** Convert to raster order. */
/** Copy of the H.264 bitstream field, converted to raster order. */
uint8_t scaling_lists_4x4[6][16]; uint8_t scaling_lists_4x4[6][16];
/** Copy of the H.264 bitstream field, converted to raster order. */ /** Convert to raster order. */
uint8_t scaling_lists_8x8[2][64]; uint8_t scaling_lists_8x8[2][64];
/** @} */
/** See \ref VdpPictureInfoH264 for instructions regarding this field. */ /** See \ref VdpPictureInfoH264 for instructions regarding this field. */
VdpReferenceFrameH264 referenceFrames[16]; VdpReferenceFrameH264 referenceFrames[16];
} VdpPictureInfoH264; } VdpPictureInfoH264;
/** /**
* \brief Picture parameter information for an H.264 Hi444PP picture. * \brief Picture parameter information for an H.264 Hi444PP picture.
* *
* Note: VDPAU clients must use VdpPictureInfoH264Predictive to describe th e * Note: VDPAU clients must use VdpPictureInfoH264Predictive to describe th e
* attributes of a frame being decoded with * attributes of a frame being decoded with
* VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE. * VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE.
* *
* Note: software drivers may choose to honor values of * Note: software drivers may choose to honor values of
* qpprime_y_zero_transform_bypass_flag greater than 1 for internal use. * qpprime_y_zero_transform_bypass_flag greater than 1 for internal use.
*/ */
typedef struct { typedef struct {
/** \ref VdpPictureInfoH264 struct. */ /** \ref VdpPictureInfoH264 struct. */
VdpPictureInfoH264 pictureInfo; VdpPictureInfoH264 pictureInfo;
/** Copy of the H.264 bitstream field.
/** \name H.264 bitstream
* *
* Copies of the H.264 bitstream fields.
* @{ */
/**
* 0 - lossless disabled * 0 - lossless disabled
* 1 - lossless enabled * 1 - lossless enabled
*/ */
uint8_t qpprime_y_zero_transform_bypass_flag; uint8_t qpprime_y_zero_transform_bypass_flag;
/** Copy of the H.264 bitstream field. /**
* 0 - disabled * 0 - disabled
* 1 - enabled * 1 - enabled
*/ */
uint8_t separate_colour_plane_flag; uint8_t separate_colour_plane_flag;
/** @} */
} VdpPictureInfoH264Predictive; } VdpPictureInfoH264Predictive;
/** /**
* \brief Picture parameter information for a VC1 picture. * \brief Picture parameter information for a VC1 picture.
* *
* Note: References to "copy of bitstream field" in the field descriptions * Note: References to bitstream fields below may refer to data literally p
* may refer to data literally parsed from the bitstream, or derived from arsed
* the bitstream using a mechanism described in the specification. * from the bitstream, or derived from the bitstream using a mechanism desc
ribed
* in the specification.
*/ */
typedef struct { typedef struct {
/** /**
* Reference used by B and P frames. * Reference used by B and P frames.
* Set to VDP_INVALID_HANDLE when not used. * Set to VDP_INVALID_HANDLE when not used.
*/ */
VdpVideoSurface forward_reference; VdpVideoSurface forward_reference;
/** /**
* Reference used by B frames. * Reference used by B frames.
* Set to VDP_INVALID_HANDLE when not used. * Set to VDP_INVALID_HANDLE when not used.
*/ */
VdpVideoSurface backward_reference; VdpVideoSurface backward_reference;
/** Number of slices in the bitstream provided. */ /** Number of slices in the bitstream provided. */
uint32_t slice_count; uint32_t slice_count;
/** I=0, P=1, B=3, BI=4 from 7.1.1.4. */ /** I=0, P=1, B=3, BI=4 from 7.1.1.4. */
uint8_t picture_type; uint8_t picture_type;
/** Progressive=0, Frame-interlace=2, Field-interlace=3; see VC-1 7.1.1 .15. */ /** Progressive=0, Frame-interlace=2, Field-interlace=3; see VC-1 7.1.1 .15. */
uint8_t frame_coding_mode; uint8_t frame_coding_mode;
/** Copy of the VC-1 bitstream field. See VC-1 6.1.5. */ /** \name VC-1 bitstream
*
* Copies of the VC-1 bitstream fields.
* @{ */
/** See VC-1 6.1.5. */
uint8_t postprocflag; uint8_t postprocflag;
/** Copy of the VC-1 bitstream field. See VC-1 6.1.8. */ /** See VC-1 6.1.8. */
uint8_t pulldown; uint8_t pulldown;
/** Copy of the VC-1 bitstream field. See VC-1 6.1.9. */ /** See VC-1 6.1.9. */
uint8_t interlace; uint8_t interlace;
/** Copy of the VC-1 bitstream field. See VC-1 6.1.10. */ /** See VC-1 6.1.10. */
uint8_t tfcntrflag; uint8_t tfcntrflag;
/** Copy of the VC-1 bitstream field. See VC-1 6.1.11. */ /** See VC-1 6.1.11. */
uint8_t finterpflag; uint8_t finterpflag;
/** Copy of the VC-1 bitstream field. See VC-1 6.1.3. */ /** See VC-1 6.1.3. */
uint8_t psf; uint8_t psf;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.8. */ /** See VC-1 6.2.8. */
uint8_t dquant; uint8_t dquant;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.3. */ /** See VC-1 6.2.3. */
uint8_t panscan_flag; uint8_t panscan_flag;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.4. */ /** See VC-1 6.2.4. */
uint8_t refdist_flag; uint8_t refdist_flag;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.11. */ /** See VC-1 6.2.11. */
uint8_t quantizer; uint8_t quantizer;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.7. */ /** See VC-1 6.2.7. */
uint8_t extended_mv; uint8_t extended_mv;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.14. */ /** See VC-1 6.2.14. */
uint8_t extended_dmv; uint8_t extended_dmv;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.10. */ /** See VC-1 6.2.10. */
uint8_t overlap; uint8_t overlap;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.9. */ /** See VC-1 6.2.9. */
uint8_t vstransform; uint8_t vstransform;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.5. */ /** See VC-1 6.2.5. */
uint8_t loopfilter; uint8_t loopfilter;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.6. */ /** See VC-1 6.2.6. */
uint8_t fastuvmc; uint8_t fastuvmc;
/** Copy of the VC-1 bitstream field. See VC-1 6.12.15. */ /** See VC-1 6.12.15. */
uint8_t range_mapy_flag; uint8_t range_mapy_flag;
/** Copy of the VC-1 bitstream field. */
uint8_t range_mapy; uint8_t range_mapy;
/** Copy of the VC-1 bitstream field. See VC-1 6.2.16. */ /** See VC-1 6.2.16. */
uint8_t range_mapuv_flag; uint8_t range_mapuv_flag;
/** Copy of the VC-1 bitstream field. */
uint8_t range_mapuv; uint8_t range_mapuv;
/** /**
* Copy of the VC-1 bitstream field. See VC-1 J.1.10. * See VC-1 J.1.10.
* Only used by simple and main profiles. * Only used by simple and main profiles.
*/ */
uint8_t multires; uint8_t multires;
/** /**
* Copy of the VC-1 bitstream field. See VC-1 J.1.16. * See VC-1 J.1.16.
* Only used by simple and main profiles. * Only used by simple and main profiles.
*/ */
uint8_t syncmarker; uint8_t syncmarker;
/** /**
* VC-1 SP/MP range reduction control. * VC-1 SP/MP range reduction control.
* Only used by simple and main profiles. * Only used by simple and main profiles.
* Bit 0: Copy of rangered VC-1 bitstream field; See VC-1 J.1.17. * Bit 0: Copy of rangered VC-1 bitstream field; See VC-1 J.1.17.
* Bit 1: Copy of rangeredfrm VC-1 bitstream fiels; See VC-1 7.1.13. * Bit 1: Copy of rangeredfrm VC-1 bitstream fiels; See VC-1 7.1.13.
*/ */
uint8_t rangered; uint8_t rangered;
/** /**
* Copy of the VC-1 bitstream field. See VC-1 J.1.17. * See VC-1 J.1.17.
* Only used by simple and main profiles. * Only used by simple and main profiles.
*/ */
uint8_t maxbframes; uint8_t maxbframes;
/** @} */
/** /**
* Out-of-loop deblocking enable. * Out-of-loop deblocking enable.
* Bit 0 of POSTPROC from VC-1 7.1.1.27 * Bit 0 of POSTPROC from VC-1 7.1.1.27
* Note that bit 1 of POSTPROC (dering enable) should not be included. * Note that bit 1 of POSTPROC (dering enable) should not be included.
*/ */
uint8_t deblockEnable; uint8_t deblockEnable;
/** /**
* Parameter used by VC-1 Annex H deblocking algorithm. Note that VDPAU * Parameter used by VC-1 Annex H deblocking algorithm. Note that VDPAU
* implementations may choose which deblocking algorithm to use. * implementations may choose which deblocking algorithm to use.
* See VC-1 7.1.1.6 * See VC-1 7.1.1.6
*/ */
uint8_t pquant; uint8_t pquant;
} VdpPictureInfoVC1; } VdpPictureInfoVC1;
/** /**
* \brief Picture parameter information for an MPEG-4 Part 2 picture. * \brief Picture parameter information for an MPEG-4 Part 2 picture.
* *
* Note: References to "copy of bitstream field" in the field descriptions * Note: References to bitstream fields below may refer to data literally p
* may refer to data literally parsed from the bitstream, or derived from arsed
* the bitstream using a mechanism described in the specification. * from the bitstream, or derived from the bitstream using a mechanism desc
ribed
* in the specification.
*/ */
typedef struct { typedef struct {
/** /**
* Reference used by B and P frames. * Reference used by B and P frames.
* Set to VDP_INVALID_HANDLE when not used. * Set to VDP_INVALID_HANDLE when not used.
*/ */
VdpVideoSurface forward_reference; VdpVideoSurface forward_reference;
/** /**
* Reference used by B frames. * Reference used by B frames.
* Set to VDP_INVALID_HANDLE when not used. * Set to VDP_INVALID_HANDLE when not used.
*/ */
VdpVideoSurface backward_reference; VdpVideoSurface backward_reference;
/** Copy of the bitstream field. */ /** \name MPEG 4 part 2 bitstream
*
* Copies of the MPEG 4 part 2 bitstream fields.
* @{ */
int32_t trd[2]; int32_t trd[2];
/** Copy of the bitstream field. */
int32_t trb[2]; int32_t trb[2];
/** Copy of the bitstream field. */
uint16_t vop_time_increment_resolution; uint16_t vop_time_increment_resolution;
/** Copy of the bitstream field. */
uint8_t vop_coding_type; uint8_t vop_coding_type;
/** Copy of the bitstream field. */
uint8_t vop_fcode_forward; uint8_t vop_fcode_forward;
/** Copy of the bitstream field. */
uint8_t vop_fcode_backward; uint8_t vop_fcode_backward;
/** Copy of the bitstream field. */
uint8_t resync_marker_disable; uint8_t resync_marker_disable;
/** Copy of the bitstream field. */
uint8_t interlaced; uint8_t interlaced;
/** Copy of the bitstream field. */
uint8_t quant_type; uint8_t quant_type;
/** Copy of the bitstream field. */
uint8_t quarter_sample; uint8_t quarter_sample;
/** Copy of the bitstream field. */
uint8_t short_video_header; uint8_t short_video_header;
/** Derived from vop_rounding_type bitstream field. */ /** Derived from vop_rounding_type bitstream field. */
uint8_t rounding_control; uint8_t rounding_control;
/** Copy of the bitstream field. */
uint8_t alternate_vertical_scan_flag; uint8_t alternate_vertical_scan_flag;
/** Copy of the bitstream field. */
uint8_t top_field_first; uint8_t top_field_first;
/** Copy of the bitstream field. */
uint8_t intra_quantizer_matrix[64]; uint8_t intra_quantizer_matrix[64];
/** Copy of the bitstream field. */
uint8_t non_intra_quantizer_matrix[64]; uint8_t non_intra_quantizer_matrix[64];
/** @} */
} VdpPictureInfoMPEG4Part2; } VdpPictureInfoMPEG4Part2;
/** /**
* \brief Picture parameter information for a DivX 4 picture. * \brief Picture parameter information for a DivX 4 picture.
* *
* Due to similarites between MPEG-4 Part 2 and DivX 4, the picture * Due to similarites between MPEG-4 Part 2 and DivX 4, the picture
* parameter structure is re-used. * parameter structure is re-used.
*/ */
typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX4; typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX4;
/** /**
* \brief Picture parameter information for a DivX 5 picture. * \brief Picture parameter information for a DivX 5 picture.
* *
* Due to similarites between MPEG-4 Part 2 and DivX 5, the picture * Due to similarites between MPEG-4 Part 2 and DivX 5, the picture
* parameter structure is re-used. * parameter structure is re-used.
*/ */
typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX5; typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX5;
/** /**
* \brief Picture parameter information for an H.265/HEVC picture.
*
* References to bitsream fields below may refer to data literally parsed f
rom
* the bitstream, or derived from the bitstream using a mechanism described
in
* Rec. ITU-T H.265 (04/2013), hereafter referred to as "the H.265/HEVC
* Specification".
*
* VDPAU H.265/HEVC implementations implement the portion of the decoding
* process described by clauses 8.4, 8.5, 8.6 and 8.7 of the the
* H.265/HEVC Specification. VdpPictureInfoHEVC provides enough data
* to complete this portion of the decoding process, plus additional
* information not defined in the H.265/HEVC Specification that may be
* useful to particular implementations.
*
* Client applications must supply every field in this struct.
*/
typedef struct {
/** \name HEVC Sequence Parameter Set
*
* Copies of the HEVC Sequence Parameter Set bitstream fields.
* @{ */
uint8_t chroma_format_idc;
/** Only valid if chroma_format_idc == 3. Ignored otherwise.*/
uint8_t separate_colour_plane_flag;
uint32_t pic_width_in_luma_samples;
uint32_t pic_height_in_luma_samples;
uint8_t bit_depth_luma_minus8;
uint8_t bit_depth_chroma_minus8;
uint8_t log2_max_pic_order_cnt_lsb_minus4;
/** Provides the value corresponding to the nuh_temporal_id of the fram
e
to be decoded. */
uint8_t sps_max_dec_pic_buffering_minus1;
uint8_t log2_min_luma_coding_block_size_minus3;
uint8_t log2_diff_max_min_luma_coding_block_size;
uint8_t log2_min_transform_block_size_minus2;
uint8_t log2_diff_max_min_transform_block_size;
uint8_t max_transform_hierarchy_depth_inter;
uint8_t max_transform_hierarchy_depth_intra;
uint8_t scaling_list_enabled_flag;
/** Scaling lists, in diagonal order, to be used for this frame. */
/** Scaling List for 4x4 quantization matrix,
indexed as ScalingList4x4[matrixId][i]. */
uint8_t ScalingList4x4[6][16];
/** Scaling List for 8x8 quantization matrix,
indexed as ScalingList8x8[matrixId][i]. */
uint8_t ScalingList8x8[6][64];
/** Scaling List for 16x16 quantization matrix,
indexed as ScalingList16x16[matrixId][i]. */
uint8_t ScalingList16x16[6][64];
/** Scaling List for 32x32 quantization matrix,
indexed as ScalingList32x32[matrixId][i]. */
uint8_t ScalingList32x32[2][64];
/** Scaling List DC Coefficients for 16x16,
indexed as ScalingListDCCoeff16x16[matrixId]. */
uint8_t ScalingListDCCoeff16x16[6];
/** Scaling List DC Coefficients for 32x32,
indexed as ScalingListDCCoeff32x32[matrixId]. */
uint8_t ScalingListDCCoeff32x32[2];
uint8_t amp_enabled_flag;
uint8_t sample_adaptive_offset_enabled_flag;
uint8_t pcm_enabled_flag;
/** Only needs to be set if pcm_enabled_flag is set. Ignored otherwise.
*/
uint8_t pcm_sample_bit_depth_luma_minus1;
/** Only needs to be set if pcm_enabled_flag is set. Ignored otherwise.
*/
uint8_t pcm_sample_bit_depth_chroma_minus1;
/** Only needs to be set if pcm_enabled_flag is set. Ignored otherwise.
*/
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
/** Only needs to be set if pcm_enabled_flag is set. Ignored otherwise.
*/
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
/** Only needs to be set if pcm_enabled_flag is set. Ignored otherwise.
*/
uint8_t pcm_loop_filter_disabled_flag;
/** Per spec, when zero, assume short_term_ref_pic_set_sps_flag
is also zero. */
uint8_t num_short_term_ref_pic_sets;
uint8_t long_term_ref_pics_present_flag;
/** Only needed if long_term_ref_pics_present_flag is set. Ignored
otherwise. */
uint8_t num_long_term_ref_pics_sps;
uint8_t sps_temporal_mvp_enabled_flag;
uint8_t strong_intra_smoothing_enabled_flag;
/** @} */
/** \name HEVC Picture Parameter Set
*
* Copies of the HEVC Picture Parameter Set bitstream fields.
* @{ */
uint8_t dependent_slice_segments_enabled_flag;
uint8_t output_flag_present_flag;
uint8_t num_extra_slice_header_bits;
uint8_t sign_data_hiding_enabled_flag;
uint8_t cabac_init_present_flag;
uint8_t num_ref_idx_l0_default_active_minus1;
uint8_t num_ref_idx_l1_default_active_minus1;
int8_t init_qp_minus26;
uint8_t constrained_intra_pred_flag;
uint8_t transform_skip_enabled_flag;
uint8_t cu_qp_delta_enabled_flag;
/** Only needed if cu_qp_delta_enabled_flag is set. Ignored otherwise.
*/
uint8_t diff_cu_qp_delta_depth;
int8_t pps_cb_qp_offset;
int8_t pps_cr_qp_offset;
uint8_t pps_slice_chroma_qp_offsets_present_flag;
uint8_t weighted_pred_flag;
uint8_t weighted_bipred_flag;
uint8_t transquant_bypass_enabled_flag;
uint8_t tiles_enabled_flag;
uint8_t entropy_coding_sync_enabled_flag;
/** Only valid if tiles_enabled_flag is set. Ignored otherwise. */
uint8_t num_tile_columns_minus1;
/** Only valid if tiles_enabled_flag is set. Ignored otherwise. */
uint8_t num_tile_rows_minus1;
/** Only valid if tiles_enabled_flag is set. Ignored otherwise. */
uint8_t uniform_spacing_flag;
/** Only need to set 0..num_tile_columns_minus1. The struct
definition reserves up to the maximum of 22. Invalid values are
ignored. */
uint16_t column_width_minus1[22];
/** Only need to set 0..num_tile_rows_minus1. The struct
definition reserves up to the maximum of 20. Invalid values are
ignored.*/
uint16_t row_height_minus1[20];
/** Only needed if tiles_enabled_flag is set. Invalid values are
ignored. */
uint8_t loop_filter_across_tiles_enabled_flag;
uint8_t pps_loop_filter_across_slices_enabled_flag;
uint8_t deblocking_filter_control_present_flag;
/** Only valid if deblocking_filter_control_present_flag is set. Ignore
d
otherwise. */
uint8_t deblocking_filter_override_enabled_flag;
/** Only valid if deblocking_filter_control_present_flag is set. Ignore
d
otherwise. */
uint8_t pps_deblocking_filter_disabled_flag;
/** Only valid if deblocking_filter_control_present_flag is set and
pps_deblocking_filter_disabled_flag is not set. Ignored otherwise.*
/
int8_t pps_beta_offset_div2;
/** Only valid if deblocking_filter_control_present_flag is set and
pps_deblocking_filter_disabled_flag is not set. Ignored otherwise.
*/
int8_t pps_tc_offset_div2;
uint8_t lists_modification_present_flag;
uint8_t log2_parallel_merge_level_minus2;
uint8_t slice_segment_header_extension_present_flag;
/** \name HEVC Slice Segment Header
*
* Copies of the HEVC Slice Segment Header bitstream fields and calcula
ted
* values detailed in the specification.
* @{ */
/** Set to 1 if nal_unit_type is equal to IDR_W_RADL or IDR_N_LP.
Set to zero otherwise. */
uint8_t IDRPicFlag;
/** Set to 1 if nal_unit_type in the range of BLA_W_LP to
RSV_IRAP_VCL23, inclusive. Set to zero otherwise.*/
uint8_t RAPPicFlag;
/** See section 7.4.7.1 of the specification. */
uint8_t CurrRpsIdx;
/** See section 7.4.7.2 of the specification. */
uint32_t NumPocTotalCurr;
/** Corresponds to specification field, NumDeltaPocs[RefRpsIdx].
Only applicable when short_term_ref_pic_set_sps_flag == 0.
Implementations will ignore this value in other cases. See 7.4.8. *
/
uint32_t NumDeltaPocsOfRefRpsIdx;
/** Section 7.6.3.1 of the H.265/HEVC Specification defines the syntax
of
the slice_segment_header. This header contains information that
some VDPAU implementations may choose to skip. The VDPAU API
requires client applications to track the number of bits used in th
e
slice header for structures associated with short term and long ter
m
reference pictures. First, VDPAU requires the number of bits used b
y
the short_term_ref_pic_set array in the slice_segment_header. */
uint32_t NumShortTermPictureSliceHeaderBits;
/** Second, VDPAU requires the number of bits used for long term refere
nce
pictures in the slice_segment_header. This is equal to the number
of bits used for the contents of the block beginning with
"if(long_term_ref_pics_present_flag)". */
uint32_t NumLongTermPictureSliceHeaderBits;
/** @} */
/** Slice Decoding Process - Picture Order Count */
/** The value of PicOrderCntVal of the picture in the access unit
containing the SEI message. The picture being decoded. */
int32_t CurrPicOrderCntVal;
/** Slice Decoding Process - Reference Picture Sets */
/** Array of video reference surfaces.
Set any unused positions to VDP_INVALID_HANDLE. */
VdpVideoSurface RefPics[16];
/** Array of picture order counts. These correspond to positions
in the RefPics array. */
int32_t PicOrderCntVal[16];
/** Array used to specify whether a particular RefPic is
a long term reference. A value of "1" indicates a long-term
reference. */
uint8_t IsLongTerm[16];
/** Copy of specification field, see Section 8.3.2 of the
H.265/HEVC Specification. */
uint8_t NumPocStCurrBefore;
/** Copy of specification field, see Section 8.3.2 of the
H.265/HEVC Specification. */
uint8_t NumPocStCurrAfter;
/** Copy of specification field, see Section 8.3.2 of the
H.265/HEVC Specification. */
uint8_t NumPocLtCurr;
/** Reference Picture Set list, one of the short-term RPS. These
correspond to positions in the RefPics array. */
uint8_t RefPicSetStCurrBefore[8];
/** Reference Picture Set list, one of the short-term RPS. These
correspond to positions in the RefPics array. */
uint8_t RefPicSetStCurrAfter[8];
/** Reference Picture Set list, one of the long-term RPS. These
correspond to positions in the RefPics array. */
uint8_t RefPicSetLtCurr[8];
} VdpPictureInfoHEVC;
/**
* \brief Decode a compressed field/frame and render the result * \brief Decode a compressed field/frame and render the result
* into a \ref VdpVideoSurface "VdpVideoSurface". * into a \ref VdpVideoSurface "VdpVideoSurface".
* \param[in] decoder The decoder object that will perform the * \param[in] decoder The decoder object that will perform the
* decode operation. * decode operation.
* \param[in] target The video surface to render to. * \param[in] target The video surface to render to.
* \param[in] picture_info A (pointer to a) structure containing * \param[in] picture_info A (pointer to a) structure containing
* information about the picture to be decoded. Note that * information about the picture to be decoded. Note that
* the appropriate type of VdpPictureInfo* structure must * the appropriate type of VdpPictureInfo* structure must
* be provided to match to profile that the decoder was * be provided to match to profile that the decoder was
* created for. * created for.
 End of changes. 96 change blocks. 
101 lines changed or deleted 385 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/