gen8_render_src_surface_state(ctx, 1, region, 0, rw, rh, region_pitch, I965_SURFACEFORMAT_R8_UNORM, flags); /* Y */
gen8_render_src_surface_state(ctx, 2, region, 0, rw, rh, region_pitch, I965_SURFACEFORMAT_R8_UNORM, flags);
+ if (obj_surface->fourcc == VA_FOURCC_Y800) /* single plane for grayscale */
+ return;
+
if (obj_surface->fourcc == VA_FOURCC_NV12) {
gen8_render_src_surface_state(ctx, 3, region,
region_pitch * obj_surface->y_cb_offset,
case VA_FOURCC_YUY2:
return 2;
+ case VA_FOURCC_Y800:
case VA_FOURCC_YV12:
case VA_FOURCC_IMC3:
case VA_FOURCC_IYUV:
case VA_FOURCC_Y800:
assert(subsampling == SUBSAMPLE_YUV400);
- obj_surface->cb_cr_pitch = obj_surface->width;
+ obj_surface->cb_cr_pitch = 0;
obj_surface->cb_cr_width = 0;
obj_surface->cb_cr_height = 0;
- obj_surface->y_cb_offset = obj_surface->height;
- obj_surface->y_cr_offset = obj_surface->y_cb_offset + ALIGN(obj_surface->cb_cr_height, 32);
+ obj_surface->y_cb_offset = 0;
+ obj_surface->y_cr_offset = 0;
region_width = obj_surface->width;
- region_height = obj_surface->height + ALIGN(obj_surface->cb_cr_height, 32) * 2;
+ region_height = obj_surface->height;
break;
i965_render_src_surface_state(ctx, 1, region, 0, rw, rh, region_pitch, I965_SURFACEFORMAT_R8_UNORM, flags); /* Y */
i965_render_src_surface_state(ctx, 2, region, 0, rw, rh, region_pitch, I965_SURFACEFORMAT_R8_UNORM, flags);
+ if (obj_surface->fourcc == VA_FOURCC_Y800) /* single plane for grayscale */
+ return;
+
if (obj_surface->fourcc == VA_FOURCC_NV12) {
i965_render_src_surface_state(ctx, 3, region,
region_pitch * obj_surface->y_cb_offset,