1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/nvdec: fix 10bit output pixel formats

Fixes #11655
This commit is contained in:
Timo Rothenpieler
2025-07-04 17:20:40 +02:00
parent 0fe9f25e76
commit bf5f3f1f2e
2 changed files with 14 additions and 3 deletions

View File

@ -754,15 +754,25 @@ int ff_nvdec_frame_params(AVCodecContext *avctx,
}
break;
case 10:
if (chroma_444) {
frames_ctx->sw_format = AV_PIX_FMT_YUV444P16;
#ifdef NVDEC_HAVE_422_SUPPORT
} else if (cuvid_chroma_format == cudaVideoChromaFormat_422) {
frames_ctx->sw_format = AV_PIX_FMT_P210;
#endif
} else {
frames_ctx->sw_format = AV_PIX_FMT_P010;
}
break;
case 12:
if (chroma_444) {
frames_ctx->sw_format = AV_PIX_FMT_YUV444P16;
#ifdef NVDEC_HAVE_422_SUPPORT
} else if (cuvid_chroma_format == cudaVideoChromaFormat_422) {
frames_ctx->sw_format = AV_PIX_FMT_P216LE;
frames_ctx->sw_format = AV_PIX_FMT_P216;
#endif
} else {
frames_ctx->sw_format = AV_PIX_FMT_P016LE;
frames_ctx->sw_format = AV_PIX_FMT_P016;
}
break;
default:

View File

@ -48,7 +48,8 @@ static const enum AVPixelFormat supported_formats[] = {
AV_PIX_FMT_YUV444P,
AV_PIX_FMT_P010,
AV_PIX_FMT_P016,
AV_PIX_FMT_P216LE,
AV_PIX_FMT_P210,
AV_PIX_FMT_P216,
AV_PIX_FMT_YUV444P16,
AV_PIX_FMT_0RGB32,
AV_PIX_FMT_0BGR32,