Revision 807a058e libavcodec/v210dec.c

View differences:

libavcodec/v210dec.c
30 30
        av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n");
31 31
        return -1;
32 32
    }
33
    avctx->pix_fmt             = PIX_FMT_YUV422P16;
33
    avctx->pix_fmt             = PIX_FMT_YUV422P10;
34 34
    avctx->bits_per_raw_sample = 10;
35 35

  
36 36
    avctx->coded_frame         = avcodec_alloc_frame();
......
68 68

  
69 69
#define READ_PIXELS(a, b, c)         \
70 70
    do {                             \
71
        val  = av_le2ne32(*src++);     \
72
        *a++ =  val <<  6;           \
73
        *b++ = (val >>  4) & 0xFFC0; \
74
        *c++ = (val >> 14) & 0xFFC0; \
71
        val  = av_le2ne32(*src++);   \
72
        *a++ =  val & 0x3FF;         \
73
        *b++ = (val >> 10) & 0x3FF;  \
74
        *c++ = (val >> 20) & 0x3FF;  \
75 75
    } while (0)
76 76

  
77 77
    for (h = 0; h < avctx->height; h++) {
......
87 87
            READ_PIXELS(u, y, v);
88 88

  
89 89
            val  = av_le2ne32(*src++);
90
            *y++ =  val <<  6;
90
            *y++ =  val & 0x3FF;
91 91
        }
92 92
        if (w < avctx->width - 3) {
93
            *u++ = (val >>  4) & 0xFFC0;
94
            *y++ = (val >> 14) & 0xFFC0;
93
            *u++ = (val >> 10) & 0x3FF;
94
            *y++ = (val >> 20) & 0x3FF;
95 95

  
96 96
            val  = av_le2ne32(*src++);
97
            *v++ =  val <<  6;
98
            *y++ = (val >>  4) & 0xFFC0;
97
            *v++ =  val & 0x3FF;
98
            *y++ = (val >> 10) & 0x3FF;
99 99
        }
100 100

  
101 101
        psrc += stride;

Also available in: Unified diff