[Libva] [PATCH] Fix VA image data_size returned for vaDeriveImage().
Gwenole Beauchesne
gb.devel at gmail.com
Tue Sep 6 09:18:18 PDT 2011
VAImage.data_size represents the allocated size, thus accounting for
any line size alignment.
---
src/i965_drv_video.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 5240570..0f59b6d 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1838,7 +1838,6 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
struct object_surface *obj_surface;
VAImageID image_id;
unsigned int w_pitch, h_pitch;
- unsigned int data_size;
unsigned int fourcc;
VAStatus va_status;
@@ -1850,8 +1849,6 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
w_pitch = obj_surface->width;
h_pitch = obj_surface->height;
- data_size = obj_surface->orig_width * obj_surface->orig_height +
- 2 * (((obj_surface->orig_width + 1) / 2) * ((obj_surface->orig_height + 1) / 2));
image_id = NEW_IMAGE_ID();
@@ -1876,7 +1873,7 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
image->entry_bytes = 0;
image->width = obj_surface->orig_width;
image->height = obj_surface->orig_height;
- image->data_size = data_size;
+ image->data_size = obj_surface->size;
fourcc = obj_surface->fourcc;
if (!fourcc)
--
1.7.4.1
More information about the Libva
mailing list