Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit 01e6028

Browse files
laureatianxhaihao
authored andcommitted
Fix wrong y_cb/cr_offset when the imported surfaces's fourcc is VA_FOURCC_411P
Signed-off-by: Wang Tiantian <[email protected]> Reviewed-by: Zhao Yakui <[email protected]>
1 parent 3827427 commit 01e6028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/i965_drv_video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,8 +1504,8 @@ i965_suface_external_memory(VADriverContextP ctx,
15041504
ASSERT_RET(memory_attibute->pitches[1] == memory_attibute->pitches[2], VA_STATUS_ERROR_INVALID_PARAMETER);
15051505

15061506
obj_surface->subsampling = SUBSAMPLE_YUV411;
1507-
obj_surface->y_cb_offset = 0;
1508-
obj_surface->y_cr_offset = 0;
1507+
obj_surface->y_cb_offset = obj_surface->height;
1508+
obj_surface->y_cr_offset = memory_attibute->offsets[2] / obj_surface->width;
15091509
obj_surface->cb_cr_width = obj_surface->orig_width / 4;
15101510
obj_surface->cb_cr_height = obj_surface->orig_height;
15111511
obj_surface->cb_cr_pitch = memory_attibute->pitches[1];

0 commit comments

Comments
 (0)