Lines Matching refs:surface_image
435 VAImage surface_image; in upload_yuv_to_surface() local
449 … va_status = vaDeriveImage(ctx->va_dpy, surface_ids[ctx->current_upload_surface], &surface_image); in upload_yuv_to_surface()
452 vaMapBuffer(ctx->va_dpy, surface_image.buf, &surface_p); in upload_yuv_to_surface()
459 y_dst = surface_p + surface_image.offsets[0]; in upload_yuv_to_surface()
460 u_dst = surface_p + surface_image.offsets[1]; /* UV offset for NV12 */ in upload_yuv_to_surface()
461 v_dst = surface_p + surface_image.offsets[2]; in upload_yuv_to_surface()
464 for (row = 0; row < surface_image.height; row++) { in upload_yuv_to_surface()
465 memcpy(y_dst, y_src, surface_image.width); in upload_yuv_to_surface()
466 y_dst += surface_image.pitches[0]; in upload_yuv_to_surface()
470 if (surface_image.format.fourcc == VA_FOURCC_NV12) { /* UV plane */ in upload_yuv_to_surface()
471 for (row = 0; row < surface_image.height / 2; row++) { in upload_yuv_to_surface()
472 for (col = 0; col < surface_image.width / 2; col++) { in upload_yuv_to_surface()
477 u_dst += surface_image.pitches[1]; in upload_yuv_to_surface()
482 for (row = 0; row < surface_image.height / 2; row++) { in upload_yuv_to_surface()
483 for (col = 0; col < surface_image.width / 2; col++) { in upload_yuv_to_surface()
488 u_dst += surface_image.pitches[1]; in upload_yuv_to_surface()
489 v_dst += surface_image.pitches[2]; in upload_yuv_to_surface()
495 vaUnmapBuffer(ctx->va_dpy, surface_image.buf); in upload_yuv_to_surface()
496 vaDestroyImage(ctx->va_dpy, surface_image.image_id); in upload_yuv_to_surface()