This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 7fd9780ab2f4e67bc3596286f96843e2eb3905bc Author: Andreas Rheinhardt <[email protected]> AuthorDate: Sun Mar 8 21:11:08 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Tue Jun 23 17:15:02 2026 +0200 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 <[email protected]> --- libavcodec/cuviddec.c | 28 ---------------------------- libavcodec/nvdec.c | 16 ---------------- libavcodec/version_major.h | 3 --- 3 files changed, 47 deletions(-) diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 10e4cb3e21..d423d2611b 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -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); diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c index e64ee7a9d6..6420483f38 100644 --- a/libavcodec/nvdec.c +++ b/libavcodec/nvdec.c @@ -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: diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h index d018680d9b..f3d5880d55 100644 --- a/libavcodec/version_major.h +++ b/libavcodec/version_major.h @@ -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) _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
