Skip to content

Commit

Permalink
add Y410 image change for CreateImage
Browse files Browse the repository at this point in the history
Fixes #431

Signed-off-by: XinfengZhang <carl.zhang@intel.com>
  • Loading branch information
XinfengZhang committed Apr 10, 2019
1 parent 03f4df3 commit 705a3e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 705a3e5

Please sign in to comment.