Revision 944721c1 libavcodec/mjpeg.c

View differences:

libavcodec/mjpeg.c
62 62

  
63 63
/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
64 64
/* IMPORTANT: these are only valid for 8-bit data precision! */
65
const uint8_t bits_dc_luminance[17] =
65
const uint8_t ff_mjpeg_bits_dc_luminance[17] =
66 66
{ /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
67
const uint8_t val_dc_luminance[] =
67
const uint8_t ff_mjpeg_val_dc_luminance[] =
68 68
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
69 69

  
70
const uint8_t bits_dc_chrominance[17] =
70
const uint8_t ff_mjpeg_bits_dc_chrominance[17] =
71 71
{ /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
72
const uint8_t val_dc_chrominance[] =
72
const uint8_t ff_mjpeg_val_dc_chrominance[] =
73 73
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
74 74

  
75
const uint8_t bits_ac_luminance[17] =
75
const uint8_t ff_mjpeg_bits_ac_luminance[17] =
76 76
{ /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
77
const uint8_t val_ac_luminance[] =
77
const uint8_t ff_mjpeg_val_ac_luminance[] =
78 78
{ 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
79 79
  0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
80 80
  0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
......
98 98
  0xf9, 0xfa
99 99
};
100 100

  
101
const uint8_t bits_ac_chrominance[17] =
101
const uint8_t ff_mjpeg_bits_ac_chrominance[17] =
102 102
{ /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
103 103

  
104
const uint8_t val_ac_chrominance[] =
104
const uint8_t ff_mjpeg_val_ac_chrominance[] =
105 105
{ 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
106 106
  0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
107 107
  0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
......
126 126
};
127 127

  
128 128
/* isn't this function nicer than the one in the libjpeg ? */
129
void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
130
                                const uint8_t *bits_table, const uint8_t *val_table)
129
void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
130
                                  const uint8_t *bits_table,
131
                                  const uint8_t *val_table)
131 132
{
132 133
    int i, j, k,nb, code, sym;
133 134

  

Also available in: Unified diff