Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exporting buffers with 3 planes and VA_EXPORT_SURFACE_SEPARATE_LAYERS #514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/i965_drv_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -6904,16 +6904,17 @@ i965_ExportSurfaceHandle(VADriverContextP ctx, VASurfaceID surface_id,
else
y_offset = obj_surface->y_cr_offset;
} else {
y_offset = obj_surface->y_cr_offset - obj_surface->y_cb_offset;
if (y_offset < 0)
y_offset = -y_offset;
if (obj_surface->y_cb_offset < obj_surface->y_cr_offset)
y_offset = obj_surface->y_cr_offset;
else
y_offset = obj_surface->y_cb_offset;
pitch = obj_surface->cb_cr_pitch;
height = obj_surface->cb_cr_height;
}

desc->layers[p].offset[0] = offset;
desc->layers[p].pitch[0] = pitch;
offset += pitch * y_offset;
offset = obj_surface->width * y_offset;
}
}

Expand Down