Fix BGR32 big-endian output
authorpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 20 Apr 2006 22:44:33 +0000 (22:44 +0000)
committerpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 20 Apr 2006 22:44:33 +0000 (22:44 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@18168 b3059339-0415-0410-9bf9-f77b7e298cf2

libmpcodecs/vd_ijpg.c

index e4c127a..7cdc04e 100644 (file)
@@ -190,9 +190,15 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
        // 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;
        }