Revision 944721c1 libavcodec/mjpegdec.c

View differences:

libavcodec/mjpegdec.c
51 51
    assert(nb_codes <= 256);
52 52

  
53 53
    memset(huff_size, 0, sizeof(huff_size));
54
    build_huffman_codes(huff_size, huff_code, bits_table, val_table);
54
    ff_mjpeg_build_huffman_codes(huff_size, huff_code, bits_table, val_table);
55 55

  
56 56
    if(is_ac){
57 57
        memmove(huff_size+16, huff_size, sizeof(uint8_t)*nb_codes);
......
77 77
    s->first_picture = 1;
78 78
    s->org_height = avctx->coded_height;
79 79

  
80
    build_vlc(&s->vlcs[0][0], bits_dc_luminance, val_dc_luminance, 12, 0, 0);
81
    build_vlc(&s->vlcs[0][1], bits_dc_chrominance, val_dc_chrominance, 12, 0, 0);
82
    build_vlc(&s->vlcs[1][0], bits_ac_luminance, val_ac_luminance, 251, 0, 1);
83
    build_vlc(&s->vlcs[1][1], bits_ac_chrominance, val_ac_chrominance, 251, 0, 1);
80
    build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance,
81
              ff_mjpeg_val_dc_luminance, 12, 0, 0);
82
    build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance,
83
              ff_mjpeg_val_dc_chrominance, 12, 0, 0);
84
    build_vlc(&s->vlcs[1][0], ff_mjpeg_bits_ac_luminance,
85
              ff_mjpeg_val_ac_luminance, 251, 0, 1);
86
    build_vlc(&s->vlcs[1][1], ff_mjpeg_bits_ac_chrominance,
87
              ff_mjpeg_val_ac_chrominance, 251, 0, 1);
84 88

  
85 89
    if (avctx->flags & CODEC_FLAG_EXTERN_HUFF)
86 90
    {

Also available in: Unified diff