fixing bgr32 output on big-endian systems
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Feb 2002 17:48:00 +0000 (17:48 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Feb 2002 17:48:00 +0000 (17:48 +0000)
Originally committed as revision 4794 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

postproc/swscale.c
postproc/swscale_template.c

index 74797f9..9de8ab1 100644 (file)
@@ -294,6 +294,9 @@ static inline void yuv2rgbXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt
 {
        if(dstFormat==IMGFMT_BGR32)
        {
+#ifdef WORDS_BIGENDIAN
+       dest++;
+#endif
                int i;
                for(i=0; i<(dstW>>1); i++){
                        int j;
index c00e3e0..a14bc97 100644 (file)
@@ -992,6 +992,9 @@ FULL_YSCALEYUV2RGB
 #else
                if(dstFormat==IMGFMT_BGR32)
                {
+#ifdef WORDS_BIGENDIAN
+                       dest++;
+#endif
                        int i;
                        for(i=0;i<dstW;i++){
                                // vertical linear interpolation && yuv2rgb in a single step:
@@ -1115,6 +1118,9 @@ FULL_YSCALEYUV2RGB
 #else
                if(dstFormat==IMGFMT_BGR32)
                {
+#ifdef WORDS_BIGENDIAN
+                       dest++;
+#endif
                        int i;
                        for(i=0; i<dstW-1; i+=2){
                                // vertical linear interpolation && yuv2rgb in a single step:
@@ -1393,6 +1399,9 @@ static inline void RENAME(yuv2rgb1)(uint16_t *buf0, uint16_t *uvbuf0, uint16_t *
 
        if(dstFormat==IMGFMT_BGR32)
        {
+#ifdef WORDS_BIGENDIAN
+               dest++;
+#endif
                int i;
                for(i=0; i<dstW-1; i+=2){
                        // vertical linear interpolation && yuv2rgb in a single step: