Revision d87d5025 libavcodec/v210dec.c

View differences:

libavcodec/v210dec.c
32 32
    }
33 33
    if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0)
34 34
        return -1;
35
    avctx->pix_fmt = PIX_FMT_YUV422P16;
35
    avctx->pix_fmt             = PIX_FMT_YUV422P16;
36 36
    avctx->bits_per_raw_sample = 10;
37 37

  
38
    avctx->coded_frame = avcodec_alloc_frame();
38
    avctx->coded_frame         = avcodec_alloc_frame();
39 39

  
40 40
    return 0;
41 41
}
42 42

  
43
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
43
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
44
                        AVPacket *avpkt)
44 45
{
45 46
    int h, w;
46 47
    AVFrame *pic = avctx->coded_frame;
......
67 68
    pic->pict_type = FF_I_TYPE;
68 69
    pic->key_frame = 1;
69 70

  
70
#define READ_PIXELS(a, b, c)       \
71
    do {                           \
72
        val = le2me_32(*src++);      \
71
#define READ_PIXELS(a, b, c)         \
72
    do {                             \
73
        val  = le2me_32(*src++);     \
73 74
        *a++ =  val <<  6;           \
74 75
        *b++ = (val >>  4) & 0xFFC0; \
75 76
        *c++ = (val >> 14) & 0xFFC0; \
......
100 101
        }
101 102

  
102 103
        psrc += stride;
103
        y += pic->linesize[0]/2 - avctx->width;
104
        u += pic->linesize[1]/2 - avctx->width/2;
105
        v += pic->linesize[2]/2 - avctx->width/2;
104
        y += pic->linesize[0] / 2 - avctx->width;
105
        u += pic->linesize[1] / 2 - avctx->width / 2;
106
        v += pic->linesize[2] / 2 - avctx->width / 2;
106 107
    }
107 108

  
108 109
    *data_size = sizeof(AVFrame);

Also available in: Unified diff