[Nouveau] [PATCH 1/2] xv: fix last pixel for big-endian machines in YV12 -> NV12 conversion

Ilia Mirkin imirkin at alum.mit.edu
Sun Jul 28 23:40:38 PDT 2013


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/nouveau_xv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index 8eafcf0..567e30c 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -552,8 +552,11 @@ NVCopyNV12ColorPlanes(unsigned char *src1, unsigned char *src2,
 
 		if (e) {
 			unsigned short *vud = (unsigned short *) vuvud;
-
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+			*vud = us[0] | (vs[0]<<8);
+#else
 			*vud = vs[0] | (us[0]<<8);
+#endif
 		}
 
 		dst += dstPitch;
-- 
1.8.1.5



More information about the Nouveau mailing list