[VDPAU] [PATCH] Change HEVC profile numbers to 100 through 104

José Hiram Soltren jsoltren at nvidia.com
Mon Mar 16 12:41:52 PDT 2015


This change itself looks fine to me. This must only change once before the next
VDPAU release.

This also brings up two more points which will set precedents

1. Instead of bumping the API major version number for a VdpPictureInfo change,
we are instead changing the VdpDecoderProfile version to cause a decoder
initialization failure. I think this is a clever and appropriate idea, are
there any other opinions?

2. VdpDecoderProfile is a uint32_t. I propose that we carve out ranges of 100
for individual codecs in the future. As a concrete example, all HEVC
VdpDecoderProfile values must fit in the range of 100-199, and 200-299 is
reserved for a future codec.

I prefer to reserve integer ranges as 100 seems like plenty of profiles for a
particular codec and that gives floor((2^32-1)/100) possible codecs.

Reviewed-by: José Hiram Soltren <jsoltren at nvidia.com>

On 03/16/2015 02:19 PM, Aaron Plattner wrote:
> libvdpau 1.0 contained an error in its HEVC picture info structures.  Rather
> than try to maintain backward compatibility with the incorrect definition, the
> existing VdpPictureInfoHEVC was updated to contain the fixed definition.  Since
> the new structure is no longer compatible with the ABI defined by libvdpau 1.0,
> change the profile numbers for HEVC so that software built against the incorrect
> definition will not recognize the new profiles.
> 
> Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
> ---
>  include/vdpau/vdpau.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h
> index a0c4dafb15ec..e6803f729080 100644
> --- a/include/vdpau/vdpau.h
> +++ b/include/vdpau/vdpau.h
> @@ -2485,15 +2485,15 @@ typedef uint32_t VdpDecoderProfile;
>  #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)
> +#define VDP_DECODER_PROFILE_HEVC_MAIN                   ((VdpDecoderProfile)100)
>  /** \hideinitializer */
> -#define VDP_DECODER_PROFILE_HEVC_MAIN_10                ((VdpDecoderProfile)51)
> +#define VDP_DECODER_PROFILE_HEVC_MAIN_10                ((VdpDecoderProfile)101)
>  /** \hideinitializer */
> -#define VDP_DECODER_PROFILE_HEVC_MAIN_STILL             ((VdpDecoderProfile)52)
> +#define VDP_DECODER_PROFILE_HEVC_MAIN_STILL             ((VdpDecoderProfile)102)
>  /** \hideinitializer */
> -#define VDP_DECODER_PROFILE_HEVC_MAIN_12                ((VdpDecoderProfile)53)
> +#define VDP_DECODER_PROFILE_HEVC_MAIN_12                ((VdpDecoderProfile)103)
>  /** \hideinitializer */
> -#define VDP_DECODER_PROFILE_HEVC_MAIN_444               ((VdpDecoderProfile)54)
> +#define VDP_DECODER_PROFILE_HEVC_MAIN_444               ((VdpDecoderProfile)104)
>  
>  /** \hideinitializer */
>  #define VDP_DECODER_LEVEL_MPEG1_NA 0
> 


More information about the VDPAU mailing list