use image offsets from libva instead of Gmmlib

Change-Id: I6f5fcfa1eb41e53abbc64e52ce38c81b7337e027
Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
This commit is contained in:
Jacek Danecki
2018-06-14 12:32:36 +02:00
committed by sys_ocldev
parent 4e802fdb93
commit 33ec97148d
4 changed files with 56 additions and 4 deletions

View File

@@ -71,8 +71,6 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
imgSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &imgFormat);
sharingFunctions->destroyImage(vaImage.image_id);
sharingFunctions->extGetSurfaceHandle(surface, &sharedHandle);
auto alloc = memoryManager->createGraphicsAllocationFromSharedHandle(sharedHandle, false, true);
@@ -88,7 +86,10 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
if (plane == 1) {
imgDesc.image_width /= 2;
imgDesc.image_height /= 2;
imgInfo.offset = vaImage.offsets[1];
imgInfo.yOffsetForUVPlane = static_cast<uint32_t>(imgInfo.offset / vaImage.pitches[0]);
}
sharingFunctions->destroyImage(vaImage.image_id);
auto vaSurface = new VASurface(sharingFunctions, imageId, plane, surface, context->getInteropUserSyncEnabled());