summaryrefslogtreecommitdiff
path: root/src/i965_post_processing.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2012-06-28 12:01:32 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-06-28 12:48:39 +0800
commitac254ae493b15fdf041bbc55030b68124b138292 (patch)
treee63985c20897f415ec07c9fcb463ea93c7038437 /src/i965_post_processing.c
parent8ecb68e5c4eb1c5b94eac47c0d92057b2ec27c03 (diff)
downloadvaapi-intel-driver-ac254ae493b15fdf041bbc55030b68124b138292.tar.gz
vaapi-intel-driver-ac254ae493b15fdf041bbc55030b68124b138292.tar.bz2
vaapi-intel-driver-ac254ae493b15fdf041bbc55030b68124b138292.zip
Add support for UYVY
Tested on SNB and IVB. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'src/i965_post_processing.c')
-rwxr-xr-xsrc/i965_post_processing.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index 499d786..b3d5f81 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -1365,7 +1365,7 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
const int V = (fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
fourcc == VA_FOURCC('I', 'M', 'C', '1')) ? 1 : 2;
int interleaved_uv = fourcc == VA_FOURCC('N', 'V', '1', '2');
- int packed_yuv = (fourcc == VA_FOURCC('Y', 'U', 'Y', '2'));
+ int packed_yuv = (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') || fourcc == VA_FOURCC('U', 'Y', 'V', 'Y'));
if (surface->type == I965_SURFACE_TYPE_SURFACE) {
obj_surface = SURFACE(surface->id);
@@ -1458,6 +1458,10 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
format0 = SURFACE_FORMAT_YCRCB_NORMAL;
break;
+ case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ format0 = SURFACE_FORMAT_YCRCB_SWAPY;
+ break;
+
default:
break;
}
@@ -2203,6 +2207,10 @@ static void gen7_update_src_surface_uv_offset(VADriverContextP ctx,
pp_static_parameter->grf2.di_destination_packed_y_component_offset = 0;
pp_static_parameter->grf2.di_destination_packed_u_component_offset = 1;
pp_static_parameter->grf2.di_destination_packed_v_component_offset = 3;
+ } else if (fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
+ pp_static_parameter->grf2.di_destination_packed_y_component_offset = 1;
+ pp_static_parameter->grf2.di_destination_packed_u_component_offset = 0;
+ pp_static_parameter->grf2.di_destination_packed_v_component_offset = 2;
}
}
@@ -4021,7 +4029,8 @@ i965_image_pl3_processing(VADriverContextP ctx,
dst_rect,
PP_PL3_LOAD_SAVE_PL3,
NULL);
- } else if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2')) {
+ } else if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') ||
+ fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4070,7 +4079,8 @@ i965_image_pl2_processing(VADriverContextP ctx,
dst_rect,
PP_NV12_LOAD_SAVE_PL3,
NULL);
- } else if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2')) {
+ } else if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') ||
+ fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4159,6 +4169,7 @@ i965_image_processing(VADriverContextP ctx,
dst_rect);
break;
case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC('U', 'Y', 'V', 'Y'):
status = i965_image_pl1_processing(ctx,
src_surface,
src_rect,