Revision 43836928 libavcodec/r210dec.c

View differences:

libavcodec/r210dec.c
63 63
        for (w = 0; w < avctx->width; w++) {
64 64
            uint32_t pixel = av_be2ne32(*src++);
65 65
            uint16_t r, g, b;
66
            if (avctx->codec_id==CODEC_ID_R210) {
66 67
            b =  pixel <<  6;
67 68
            g = (pixel >>  4) & 0xffc0;
68 69
            r = (pixel >> 14) & 0xffc0;
70
            } else {
71
                b =  pixel <<  4;
72
                g = (pixel >>  6) & 0xffc0;
73
                r = (pixel >> 16) & 0xffc0;
74
            }
69 75
            *dst++ = r | (r >> 10);
70 76
            *dst++ = g | (g >> 10);
71 77
            *dst++ = b | (b >> 10);
......
90 96
    return 0;
91 97
}
92 98

  
99
#if CONFIG_R210_DECODER
93 100
AVCodec r210_decoder = {
94 101
    "r210",
95 102
    AVMEDIA_TYPE_VIDEO,
......
102 109
    CODEC_CAP_DR1,
103 110
    .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
104 111
};
112
#endif
113
#if CONFIG_R10K_DECODER
114
AVCodec r10k_decoder = {
115
    "r10k",
116
    AVMEDIA_TYPE_VIDEO,
117
    CODEC_ID_R10K,
118
    0,
119
    decode_init,
120
    NULL,
121
    decode_close,
122
    decode_frame,
123
    CODEC_CAP_DR1,
124
    .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
125
};
126
#endif

Also available in: Unified diff