avcodec: Remove FF_API_NVDEC_OLD_PIX_FMTS

The switch to the new pixel formats was announced
on 2025-07-11.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-06-23 17:15:02 +02:00
parent e967ae98f4
commit 7fd9780ab2
3 changed files with 0 additions and 47 deletions
-28
View File
@@ -199,18 +199,10 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
break;
case 2: // 10-bit
if (chroma_444) {
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = AV_PIX_FMT_YUV444P16;
#else
pix_fmts[1] = AV_PIX_FMT_YUV444P10MSB;
#endif
#ifdef NVDEC_HAVE_422_SUPPORT
} else if (format->chroma_format == cudaVideoChromaFormat_422) {
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = AV_PIX_FMT_P216;
#else
pix_fmts[1] = AV_PIX_FMT_P210;
#endif
#endif
} else {
pix_fmts[1] = AV_PIX_FMT_P010;
@@ -219,25 +211,13 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
break;
case 4: // 12-bit
if (chroma_444) {
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = AV_PIX_FMT_YUV444P16;
#else
pix_fmts[1] = AV_PIX_FMT_YUV444P12MSB;
#endif
#ifdef NVDEC_HAVE_422_SUPPORT
} else if (format->chroma_format == cudaVideoChromaFormat_422) {
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = AV_PIX_FMT_P216;
#else
pix_fmts[1] = AV_PIX_FMT_P212;
#endif
#endif
} else {
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = AV_PIX_FMT_P016;
#else
pix_fmts[1] = AV_PIX_FMT_P012;
#endif
}
caps = &ctx->caps12;
break;
@@ -935,18 +915,10 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
// Pick pixel format based on bit depth and chroma sampling.
switch (probed_bit_depth) {
case 10:
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = is_yuv444 ? AV_PIX_FMT_YUV444P16 : (is_yuv422 ? AV_PIX_FMT_P216 : AV_PIX_FMT_P010);
#else
pix_fmts[1] = is_yuv444 ? AV_PIX_FMT_YUV444P10MSB : (is_yuv422 ? AV_PIX_FMT_P210 : AV_PIX_FMT_P010);
#endif
break;
case 12:
#if FF_API_NVDEC_OLD_PIX_FMTS
pix_fmts[1] = is_yuv444 ? AV_PIX_FMT_YUV444P16 : (is_yuv422 ? AV_PIX_FMT_P216 : AV_PIX_FMT_P016);
#else
pix_fmts[1] = is_yuv444 ? AV_PIX_FMT_YUV444P12MSB : (is_yuv422 ? AV_PIX_FMT_P212 : AV_PIX_FMT_P012);
#endif
break;
default:
pix_fmts[1] = is_yuv444 ? AV_PIX_FMT_YUV444P : (is_yuv422 ? AV_PIX_FMT_NV16 : AV_PIX_FMT_NV12);
-16
View File
@@ -764,11 +764,7 @@ int ff_nvdec_frame_params(AVCodecContext *avctx,
break;
case 10:
if (chroma_444) {
#if FF_API_NVDEC_OLD_PIX_FMTS
frames_ctx->sw_format = AV_PIX_FMT_YUV444P16;
#else
frames_ctx->sw_format = AV_PIX_FMT_YUV444P10MSB;
#endif
#ifdef NVDEC_HAVE_422_SUPPORT
} else if (cuvid_chroma_format == cudaVideoChromaFormat_422) {
frames_ctx->sw_format = AV_PIX_FMT_P210;
@@ -779,25 +775,13 @@ int ff_nvdec_frame_params(AVCodecContext *avctx,
break;
case 12:
if (chroma_444) {
#if FF_API_NVDEC_OLD_PIX_FMTS
frames_ctx->sw_format = AV_PIX_FMT_YUV444P16;
#else
frames_ctx->sw_format = AV_PIX_FMT_YUV444P12MSB;
#endif
#ifdef NVDEC_HAVE_422_SUPPORT
} else if (cuvid_chroma_format == cudaVideoChromaFormat_422) {
#if FF_API_NVDEC_OLD_PIX_FMTS
frames_ctx->sw_format = AV_PIX_FMT_P216;
#else
frames_ctx->sw_format = AV_PIX_FMT_P212;
#endif
#endif
} else {
#if FF_API_NVDEC_OLD_PIX_FMTS
frames_ctx->sw_format = AV_PIX_FMT_P016;
#else
frames_ctx->sw_format = AV_PIX_FMT_P012;
#endif
}
break;
default:
-3
View File
@@ -43,9 +43,6 @@
#define FF_API_CODEC_PROPS (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_EXR_GAMMA (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_INTRA_DC_PRECISION (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_NVDEC_OLD_PIX_FMTS (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_MJPEG_EXTERN_HUFF (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_NVENC_H264_MAIN (LIBAVCODEC_VERSION_MAJOR < 63)