changeset 18167:f167814411d4

Fix BGR32 big-endian output
author pacman
date Thu, 20 Apr 2006 22:44:33 +0000
parents e952e8cdf98e
children 826f1b6dbfe6
files libmpcodecs/vd_ijpg.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ijpg.c	Thu Apr 20 21:40:03 2006 +0000
+++ b/libmpcodecs/vd_ijpg.c	Thu Apr 20 22:44:33 2006 +0000
@@ -190,9 +190,15 @@
        // rgb24 -> bgr32
        case IMGFMT_BGR32:
            for(x=0;x<width;x++){
+#ifdef WORDS_BIGENDIAN
+	       drow[4*x+1]=row[3*x+0];
+	       drow[4*x+2]=row[3*x+1];
+	       drow[4*x+3]=row[3*x+2];
+#else
 	       drow[4*x+0]=row[3*x+2];
 	       drow[4*x+1]=row[3*x+1];
 	       drow[4*x+2]=row[3*x+0];
+#endif
 	   }
 	   break;
        }