From 705a3e53fb8c9770dee8df95e79ad3f10fd110a3 Mon Sep 17 00:00:00 2001 From: XinfengZhang Date: Wed, 12 Dec 2018 19:52:03 +0800 Subject: [PATCH] add Y410 image change for CreateImage Fixes #431 Signed-off-by: XinfengZhang --- media_driver/linux/common/ddi/media_libva.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp index a79f654aed..add12caede 100755 --- a/media_driver/linux/common/ddi/media_libva.cpp +++ b/media_driver/linux/common/ddi/media_libva.cpp @@ -3926,6 +3926,9 @@ VAStatus DdiMedia_CreateImage( gmmParams.Format = GMM_FORMAT_UYVY; gmmParams.Flags.Info.TiledY = true; break; + case VA_FOURCC_Y410: + gmmParams.Format = GMM_FORMAT_Y410_TYPE; + gmmParams.BaseHeight = MOS_ALIGN_CEIL(height, 32); default: MOS_FreeMemory(vaimg); return VA_STATUS_ERROR_UNIMPLEMENTED; @@ -4018,6 +4021,7 @@ VAStatus DdiMedia_CreateImage( vaimg->pitches[0] = vaimg->pitches[1] = vaimg->pitches[2] = gmmPitch; vaimg->offsets[1] = gmmPitch * gmmHeight; vaimg->offsets[2] = vaimg->offsets[1] + gmmPitch * gmmHeight / 2; + break; case VA_FOURCC_RGBP: vaimg->format.bits_per_pixel = 24; vaimg->num_planes = 3; @@ -4027,6 +4031,12 @@ VAStatus DdiMedia_CreateImage( vaimg->offsets[1] = gmmPitch * gmmHeight; vaimg->offsets[2] = gmmPitch * gmmHeight * 2; break; + case VA_FOURCC_Y410: + vaimg->format.bits_per_pixel = 32; + vaimg->num_planes = 1; + vaimg->pitches[0] = gmmPitch; + vaimg->offsets[0] = 0; + break; } mediaCtx->pGmmClientContext->DestroyResInfoObject(gmmResourceInfo);