[FFmpeg-devel] [PATCH 5/6] libavutil/hwcontext_qsv: use the Y216 pixel format
James Almer
jamrial at gmail.com
Tue Oct 22 15:48:46 EEST 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/qsv.c | 8 ++++----
libavutil/hwcontext_qsv.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 8a3dc95706..d9eb212b1c 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -218,7 +218,7 @@ enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc)
case MFX_FOURCC_Y410: return AV_PIX_FMT_XV30;
#if QSV_VERSION_ATLEAST(1, 31)
case MFX_FOURCC_P016: return AV_PIX_FMT_P012;
- case MFX_FOURCC_Y216: return AV_PIX_FMT_Y212;
+ case MFX_FOURCC_Y216: return AV_PIX_FMT_Y216;
case MFX_FOURCC_Y416: return AV_PIX_FMT_XV36;
#endif
}
@@ -270,10 +270,10 @@ int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc, uint16_t *shi
*fourcc = MFX_FOURCC_P016;
*shift = 1;
return AV_PIX_FMT_P012;
- case AV_PIX_FMT_Y212:
+ case AV_PIX_FMT_Y216:
*fourcc = MFX_FOURCC_Y216;
*shift = 1;
- return AV_PIX_FMT_Y212;
+ return AV_PIX_FMT_Y216;
case AV_PIX_FMT_XV36:
*fourcc = MFX_FOURCC_Y416;
*shift = 1;
@@ -309,7 +309,7 @@ int ff_qsv_map_frame_to_surface(const AVFrame *frame, mfxFrameSurface1 *surface)
break;
case AV_PIX_FMT_Y210:
- case AV_PIX_FMT_Y212:
+ case AV_PIX_FMT_Y216:
surface->Data.Y16 = (mfxU16 *)frame->data[0];
surface->Data.U16 = (mfxU16 *)frame->data[0] + 1;
surface->Data.V16 = (mfxU16 *)frame->data[0] + 3;
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 721c841c2a..220b2eaa77 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -160,7 +160,7 @@ static const struct {
MFX_FOURCC_P016, 1 },
// Y212 is used for VAAPI child device,
// the SDK only delares support for Y216
- { AV_PIX_FMT_Y212,
+ { AV_PIX_FMT_Y216,
MFX_FOURCC_Y216, 1 },
// XV36 is used for VAAPI child device,
// the SDK only delares support for Y416
@@ -1750,7 +1750,7 @@ static int map_frame_to_surface(const AVFrame *frame, mfxFrameSurface1 *surface)
break;
case AV_PIX_FMT_Y210:
- case AV_PIX_FMT_Y212:
+ case AV_PIX_FMT_Y216:
surface->Data.Y16 = (mfxU16 *)frame->data[0];
surface->Data.U16 = (mfxU16 *)frame->data[0] + 1;
surface->Data.V16 = (mfxU16 *)frame->data[0] + 3;
--
2.47.0
More information about the ffmpeg-devel
mailing list