forked from marfrit/libva-v4l2-request-fourier
image: Fix pitches and offsets in the save image
We where first copying the image structure and then setting the pitches and offets, so this information was lost. This fixes vaDerivedImage and vaGetImage implementation. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
This commit is contained in:
committed by
Paul Kocialkowski
parent
7233c5a2ae
commit
fc9252a4d0
+2
-2
@@ -113,13 +113,13 @@ VAStatus RequestCreateImage(VADriverContextP context, VAImageFormat *format,
|
|||||||
image->num_planes = destination_planes_count;
|
image->num_planes = destination_planes_count;
|
||||||
image->data_size = size;
|
image->data_size = size;
|
||||||
|
|
||||||
image_object->image = *image;
|
|
||||||
|
|
||||||
for (i = 0; i < image->num_planes; i++) {
|
for (i = 0; i < image->num_planes; i++) {
|
||||||
image->pitches[i] = destination_bytesperlines[i];
|
image->pitches[i] = destination_bytesperlines[i];
|
||||||
image->offsets[i] = i > 0 ? destination_sizes[i - 1] : 0;
|
image->offsets[i] = i > 0 ? destination_sizes[i - 1] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
image_object->image = *image;
|
||||||
|
|
||||||
return VA_STATUS_SUCCESS;
|
return VA_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user