summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/va/image.c')
-rw-r--r--src/gallium/state_trackers/va/image.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c
index 022240df84f..b37a9714437 100644
--- a/src/gallium/state_trackers/va/image.c
+++ b/src/gallium/state_trackers/va/image.c
@@ -116,7 +116,7 @@ vlVaCreateImage(VADriverContextP ctx, VAImageFormat *format, int width, int heig
img->width = width;
img->height = height;
w = align(width, 2);
- h = align(width, 2);
+ h = align(height, 2);
switch (format->fourcc) {
case VA_FOURCC('N','V','1','2'):
@@ -240,9 +240,11 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
return VA_STATUS_ERROR_OPERATION_FAILED;
if (format != surf->buffer->buffer_format) {
- /* support NV12 to YV12 conversion now only */
- if (format == PIPE_FORMAT_YV12 &&
- surf->buffer->buffer_format == PIPE_FORMAT_NV12)
+ /* support NV12 to YV12 and IYUV conversion now only */
+ if ((format == PIPE_FORMAT_YV12 &&
+ surf->buffer->buffer_format == PIPE_FORMAT_NV12) ||
+ (format == PIPE_FORMAT_IYUV &&
+ surf->buffer->buffer_format == PIPE_FORMAT_NV12))
convert = true;
else
return VA_STATUS_ERROR_OPERATION_FAILED;