Skip to content

Commit

Permalink
[VP] fix_putImage
Browse files Browse the repository at this point in the history
fix the condition to check if exist alignment
  • Loading branch information
jiafengy1 authored and intel-mediadev committed Jan 11, 2024
1 parent f447816 commit 9b1895e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,9 @@ VAStatus MediaLibvaInterfaceNext::PutImage(
if (srcWidth == destWidth && srcHeight == destHeight &&
srcWidth == vaimg->width && srcHeight == vaimg->height &&
srcWidth == mediaSurface->iWidth && srcHeight == mediaSurface->iHeight &&
mediaSurface->data_size == vaimg->data_size)
mediaSurface->data_size == vaimg->data_size &&
(vaimg->num_planes == 1 ||
(vaimg->num_planes > 1 && vaimg->offsets[1] == mediaSurface->iPitch * mediaSurface->iHeight)))
{
//Copy data from image to surface
MOS_STATUS eStatus = MOS_SecureMemcpy(surfData, vaimg->data_size, imageData, vaimg->data_size);
Expand Down

0 comments on commit 9b1895e

Please sign in to comment.