static int vdpau_h264_init(AVCodecContext *avctx) { VdpDecoderProfile profile; uint32_t level = avctx->level; switch (avctx->profile & ~FF_PROFILE_H264_INTRA) { case FF_PROFILE_H264_BASELINE: profile = VDP_DECODER_PROFILE_H264_BASELINE; break; case FF_PROFILE_H264_CONSTRAINED_BASELINE: #ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE profile = VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE; break; #endif case FF_PROFILE_H264_MAIN: profile = VDP_DECODER_PROFILE_H264_MAIN; break; case FF_PROFILE_H264_HIGH: profile = VDP_DECODER_PROFILE_H264_HIGH; break; #ifdef VDP_DECODER_PROFILE_H264_EXTENDED case FF_PROFILE_H264_EXTENDED: profile = VDP_DECODER_PROFILE_H264_EXTENDED; break; #endif default: return AVERROR(ENOTSUP); } if ((avctx->profile & FF_PROFILE_H264_INTRA) && avctx->level == 11) level = VDP_DECODER_LEVEL_H264_1b; return ff_vdpau_common_init(avctx, profile, level); }
static int vdpau_mpeg4_init(AVCodecContext *avctx) { VdpDecoderProfile profile; switch (avctx->profile) { case FF_PROFILE_MPEG4_SIMPLE: profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP; break; case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP; break; default: return AVERROR(ENOTSUP); } return ff_vdpau_common_init(avctx, profile, avctx->level); }
static int vdpau_h264_init(AVCodecContext *avctx) { VdpDecoderProfile profile; uint32_t level = avctx->level; switch (avctx->profile & ~FF_PROFILE_H264_INTRA) { case FF_PROFILE_H264_BASELINE: profile = VDP_DECODER_PROFILE_H264_BASELINE; break; case FF_PROFILE_H264_CONSTRAINED_BASELINE: #ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE profile = VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE; break; #endif case FF_PROFILE_H264_MAIN: profile = VDP_DECODER_PROFILE_H264_MAIN; break; case FF_PROFILE_H264_HIGH: profile = VDP_DECODER_PROFILE_H264_HIGH; break; #ifdef VDP_DECODER_PROFILE_H264_EXTENDED case FF_PROFILE_H264_EXTENDED: profile = VDP_DECODER_PROFILE_H264_EXTENDED; break; #endif case FF_PROFILE_H264_HIGH_10: /* XXX: High 10 can be treated as High so long as only 8-bits per * formats are supported. */ profile = VDP_DECODER_PROFILE_H264_HIGH; break; #ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE case FF_PROFILE_H264_HIGH_422: case FF_PROFILE_H264_HIGH_444_PREDICTIVE: case FF_PROFILE_H264_CAVLC_444: profile = VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE; break; #endif default: return AVERROR(ENOTSUP); } if ((avctx->profile & FF_PROFILE_H264_INTRA) && avctx->level == 11) level = VDP_DECODER_LEVEL_H264_1b; return ff_vdpau_common_init(avctx, profile, level); }
static int vdpau_vc1_init(AVCodecContext *avctx) { VdpDecoderProfile profile; switch (avctx->profile) { case FF_PROFILE_VC1_SIMPLE: profile = VDP_DECODER_PROFILE_VC1_SIMPLE; break; case FF_PROFILE_VC1_MAIN: profile = VDP_DECODER_PROFILE_VC1_MAIN; break; case FF_PROFILE_VC1_ADVANCED: profile = VDP_DECODER_PROFILE_VC1_ADVANCED; break; default: return AVERROR(ENOTSUP); } return ff_vdpau_common_init(avctx, profile, avctx->level); }
static int vdpau_hevc_init(AVCodecContext *avctx) { VdpDecoderProfile profile; uint32_t level = avctx->level; switch (avctx->profile) { case FF_PROFILE_HEVC_MAIN: profile = VDP_DECODER_PROFILE_HEVC_MAIN; break; case FF_PROFILE_HEVC_MAIN_10: profile = VDP_DECODER_PROFILE_HEVC_MAIN_10; break; case FF_PROFILE_HEVC_MAIN_STILL_PICTURE: profile = VDP_DECODER_PROFILE_HEVC_MAIN_STILL; break; default: return AVERROR(ENOTSUP); } return ff_vdpau_common_init(avctx, profile, level); }
static int vdpau_h263_init(AVCodecContext *avctx) { return ff_vdpau_common_init(avctx, VDP_DECODER_PROFILE_MPEG4_PART2_ASP, VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5); }