xf86-video-intel: src/sna/sna_video.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Aug 17 15:35:55 PDT 2013


 src/sna/sna_video.c |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit db41bec0fd4dc8eec1f44a988f1c5a531594604f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 17 23:33:17 2013 +0100

    sna/video: Return the planar offset calculations to the planar branch
    
    They where accidentally move the packed branch in
    commit 85e89f2121bad96d34ff8df9456e2fbaa9ff7881
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Fri Aug 16 21:11:33 2013 +0100
    
        sna/video: YUV420 is not supported by sprites, replace it with a RGB passthrough
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index 2f4a7e4..9f41edd 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -225,6 +225,16 @@ sna_video_frame_init(struct sna_video *video,
 			frame->size = height;
 		}
 		frame->size *= frame->pitch[0] + frame->pitch[1];
+
+		if (video->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
+			frame->UBufOffset = (int)frame->pitch[1] * width;
+			frame->VBufOffset =
+				frame->UBufOffset + (int)frame->pitch[0] * width / 2;
+		} else {
+			frame->UBufOffset = (int)frame->pitch[1] * height;
+			frame->VBufOffset =
+				frame->UBufOffset + (int)frame->pitch[0] * height / 2;
+		}
 	} else {
 		switch (frame->id) {
 		case FOURCC_RGB888:
@@ -256,15 +266,6 @@ sna_video_frame_init(struct sna_video *video,
 				frame->pitch[0] = ALIGN((width << 1), align);
 				frame->size = (int)frame->pitch[0] * height;
 			}
-			if (video->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
-				frame->UBufOffset = (int)frame->pitch[1] * width;
-				frame->VBufOffset =
-					frame->UBufOffset + (int)frame->pitch[0] * width / 2;
-			} else {
-				frame->UBufOffset = (int)frame->pitch[1] * height;
-				frame->VBufOffset =
-					frame->UBufOffset + (int)frame->pitch[0] * height / 2;
-			}
 			break;
 		}
 		frame->pitch[1] = 0;


More information about the xorg-commit mailing list