Revision 3dd2f87e libavcodec/rawdec.c

View differences:

libavcodec/rawdec.c
26 26

  
27 27
#include "avcodec.h"
28 28
#include "raw.h"
29
#include "libavutil/intreadwrite.h"
29 30

  
30 31
typedef struct RawVideoContext {
31 32
    unsigned char * buffer;  /* block of memory for holding one frame */
......
144 145
        picture->data[2] = tmp;
145 146
    }
146 147

  
148
    if(avctx->codec_tag == AV_RL32("yuv2") &&
149
       avctx->pix_fmt   == PIX_FMT_YUYV422) {
150
        int x, y;
151
        uint8_t *line = picture->data[0];
152
        for(y = 0; y < avctx->height; y++) {
153
            for(x = 0; x < avctx->width; x++)
154
                line[2*x + 1] ^= 0x80;
155
            line += picture->linesize[0];
156
        }
157
    }
158

  
147 159
    *data_size = sizeof(AVPicture);
148 160
    return buf_size;
149 161
}

Also available in: Unified diff