Skip to content

Commit

Permalink
avcodec/d3d12va_(av1|hevc|vp9): Don't use deprecated FF_PROFILE_*
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Rheinhardt <[email protected]>
  • Loading branch information
mkver committed Jan 24, 2024
1 parent 280df9d commit 3435565
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libavcodec/d3d12va_av1.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int d3d12va_av1_decode_init(AVCodecContext *avctx)

int ret;

if (avctx->profile != FF_PROFILE_AV1_MAIN)
if (avctx->profile != AV_PROFILE_AV1_MAIN)
return AVERROR(EINVAL);

ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_AV1_PROFILE0;
Expand Down
6 changes: 3 additions & 3 deletions libavcodec/d3d12va_hevc.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ static int d3d12va_hevc_decode_init(AVCodecContext *avctx)
DXVA_PicParams_HEVC pp;

switch (avctx->profile) {
case FF_PROFILE_HEVC_MAIN_10:
case AV_PROFILE_HEVC_MAIN_10:
ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10;
break;

case FF_PROFILE_HEVC_MAIN_STILL_PICTURE:
case AV_PROFILE_HEVC_MAIN_STILL_PICTURE:
if (avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH) {
ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN;
break;
Expand All @@ -184,7 +184,7 @@ static int d3d12va_hevc_decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}

case FF_PROFILE_HEVC_MAIN:
case AV_PROFILE_HEVC_MAIN:
default:
ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN;
break;
Expand Down
8 changes: 4 additions & 4 deletions libavcodec/d3d12va_vp9.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ static int d3d12va_vp9_decode_init(AVCodecContext *avctx)
DXVA_PicParams_VP9 pp;

switch (avctx->profile) {
case FF_PROFILE_VP9_2:
case FF_PROFILE_VP9_3:
case AV_PROFILE_VP9_2:
case AV_PROFILE_VP9_3:
ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VP9_10BIT_PROFILE2;
break;

case FF_PROFILE_VP9_0:
case FF_PROFILE_VP9_1:
case AV_PROFILE_VP9_0:
case AV_PROFILE_VP9_1:
default:
ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VP9;
break;
Expand Down

0 comments on commit 3435565

Please sign in to comment.