Revision ef56de32

View differences:

libavcodec/indeo2.c
22 22
 * @file indeo2.c
23 23
 * Intel Indeo 2 decoder.
24 24
 */
25
 
25
#define ALT_BITSTREAM_READER_LE
26 26
#include "avcodec.h"
27 27
#include "bitstream.h"
28 28
#include "indeo2data.h"
......
156 156
    s->decode_delta = buf[18];
157 157
    
158 158
    /* decide whether frame uses deltas or not */
159
    
159
#ifndef ALT_BITSTREAM_READER_LE  
160 160
    for (i = 0; i < buf_size; i++)
161 161
        buf[i] = ff_reverse[buf[i]];
162
        
162
#endif
163 163
    start = 48; /* hardcoded for now */
164 164

  
165 165
    init_get_bits(&s->gb, buf + start, buf_size - start);
......
198 198
    if (!ir2_vlc.table)
199 199
        init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES,
200 200
                 &ir2_codes[0][1], 4, 2,
201
                 &ir2_codes[0][0], 4, 2, 1);    
202

  
201
#ifdef ALT_BITSTREAM_READER_LE
202
                 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC | INIT_VLC_LE);    
203
#else
204
                 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC);    
205
#endif
206
                 
203 207
    return 0;
204 208
}
205 209

  
libavcodec/indeo2data.h
1 1
#define IR2_CODES 143
2 2
static const uint16_t ir2_codes[IR2_CODES][2] = {
3
#ifdef ALT_BITSTREAM_READER_LE
4
{0x0000,  3}, {0x0004,  3}, {0x0006,  3}, {0x0001,  5}, 
5
{0x0009,  5}, {0x0019,  5}, {0x000D,  5}, {0x001D,  5}, 
6
{0x0023,  6}, {0x0013,  6}, {0x0033,  6}, {0x000B,  6}, 
7
{0x002B,  6}, {0x001B,  6}, {0x0007,  8}, {0x0087,  8}, 
8
{0x0027,  8}, {0x00A7,  8}, {0x0067,  8}, {0x00E7,  8}, 
9
{0x0097,  8}, {0x0057,  8}, {0x0037,  8}, {0x00B7,  8}, 
10
{0x00F7,  8}, {0x000F,  9}, {0x008F,  9}, {0x018F,  9}, 
11
{0x014F,  9}, {0x00CF,  9}, {0x002F,  9}, {0x012F,  9}, 
12
{0x01AF,  9}, {0x006F,  9}, {0x00EF,  9}, {0x01EF,  9}, 
13
{0x001F, 10}, {0x021F, 10}, {0x011F, 10}, {0x031F, 10}, 
14
{0x009F, 10}, {0x029F, 10}, {0x019F, 10}, {0x039F, 10}, 
15
{0x005F, 10}, {0x025F, 10}, {0x015F, 10}, {0x035F, 10}, 
16
{0x00DF, 10}, {0x02DF, 10}, {0x01DF, 10}, {0x03DF, 10}, 
17
{0x003F, 13}, {0x103F, 13}, {0x083F, 13}, {0x183F, 13}, 
18
{0x043F, 13}, {0x143F, 13}, {0x0C3F, 13}, {0x1C3F, 13}, 
19
{0x023F, 13}, {0x123F, 13}, {0x0A3F, 13}, {0x1A3F, 13}, 
20
{0x063F, 13}, {0x163F, 13}, {0x0E3F, 13}, {0x1E3F, 13}, 
21
{0x013F, 13}, {0x113F, 13}, {0x093F, 13}, {0x193F, 13}, 
22
{0x053F, 13}, {0x153F, 13}, {0x0D3F, 13}, {0x1D3F, 13}, 
23
{0x033F, 13}, {0x133F, 13}, {0x0B3F, 13}, {0x1B3F, 13}, 
24
{0x073F, 13}, {0x173F, 13}, {0x0F3F, 13}, {0x1F3F, 13}, 
25
{0x00BF, 13}, {0x10BF, 13}, {0x08BF, 13}, {0x18BF, 13}, 
26
{0x04BF, 13}, {0x14BF, 13}, {0x0CBF, 13}, {0x1CBF, 13}, 
27
{0x02BF, 13}, {0x12BF, 13}, {0x0ABF, 13}, {0x1ABF, 13}, 
28
{0x06BF, 13}, {0x16BF, 13}, {0x0EBF, 13}, {0x1EBF, 13}, 
29
{0x01BF, 13}, {0x11BF, 13}, {0x09BF, 13}, {0x19BF, 13}, 
30
{0x05BF, 13}, {0x15BF, 13}, {0x0DBF, 13}, {0x1DBF, 13}, 
31
{0x03BF, 13}, {0x13BF, 13}, {0x0BBF, 13}, {0x1BBF, 13}, 
32
{0x07BF, 13}, {0x17BF, 13}, {0x0FBF, 13}, {0x1FBF, 13}, 
33
{0x007F, 14}, {0x207F, 14}, {0x107F, 14}, {0x307F, 14}, 
34
{0x087F, 14}, {0x287F, 14}, {0x187F, 14}, {0x387F, 14}, 
35
{0x047F, 14}, {0x247F, 14}, {0x147F, 14}, {0x0002,  3}, 
36
{0x0011,  5}, {0x0005,  5}, {0x0015,  5}, {0x0003,  6}, 
37
{0x003B,  6}, {0x0047,  8}, {0x00C7,  8}, {0x0017,  8}, 
38
{0x00D7,  8}, {0x0077,  8}, {0x010F,  9}, {0x004F,  9}, 
39
{0x01CF,  9}, {0x00AF,  9}, {0x016F,  9},
40
#else
3 41
    {0x0000,  3}, {0x0001,  3}, {0x0003,  3}, {0x0010,  5},
4 42
    {0x0012,  5}, {0x0013,  5}, {0x0016,  5}, {0x0017,  5},
5 43
    {0x0031,  6}, {0x0032,  6}, {0x0033,  6}, {0x0034,  6},
......
36 74
    {0x0037,  6}, {0x00E2,  8}, {0x00E3,  8}, {0x00E8,  8},
37 75
    {0x00EB,  8}, {0x00EE,  8}, {0x01E1,  9}, {0x01E4,  9},
38 76
    {0x01E7,  9}, {0x01EA,  9}, {0x01ED,  9}
77
#endif
39 78
};
40 79

  
41 80
static const uint8_t ir2_luma_table[256] = {

Also available in: Unified diff