comparison mjpegdec.c @ 5021:d73237575709 libavcodec

add proper prefix to new mjpeg extern func/var
author aurel
date Thu, 17 May 2007 16:45:55 +0000
parents eb0ad6423405
children 325557621708
comparison
equal deleted inserted replaced
5020:eb0ad6423405 5021:d73237575709
49 uint16_t huff_code[256+16]; 49 uint16_t huff_code[256+16];
50 50
51 assert(nb_codes <= 256); 51 assert(nb_codes <= 256);
52 52
53 memset(huff_size, 0, sizeof(huff_size)); 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 if(is_ac){ 56 if(is_ac){
57 memmove(huff_size+16, huff_size, sizeof(uint8_t)*nb_codes); 57 memmove(huff_size+16, huff_size, sizeof(uint8_t)*nb_codes);
58 memmove(huff_code+16, huff_code, sizeof(uint16_t)*nb_codes); 58 memmove(huff_code+16, huff_code, sizeof(uint16_t)*nb_codes);
59 memset(huff_size, 0, sizeof(uint8_t)*16); 59 memset(huff_size, 0, sizeof(uint8_t)*16);
75 s->buffer = NULL; 75 s->buffer = NULL;
76 s->start_code = -1; 76 s->start_code = -1;
77 s->first_picture = 1; 77 s->first_picture = 1;
78 s->org_height = avctx->coded_height; 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); 80 build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance,
81 build_vlc(&s->vlcs[0][1], bits_dc_chrominance, val_dc_chrominance, 12, 0, 0); 81 ff_mjpeg_val_dc_luminance, 12, 0, 0);
82 build_vlc(&s->vlcs[1][0], bits_ac_luminance, val_ac_luminance, 251, 0, 1); 82 build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance,
83 build_vlc(&s->vlcs[1][1], bits_ac_chrominance, val_ac_chrominance, 251, 0, 1); 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 if (avctx->flags & CODEC_FLAG_EXTERN_HUFF) 89 if (avctx->flags & CODEC_FLAG_EXTERN_HUFF)
86 { 90 {
87 av_log(avctx, AV_LOG_INFO, "mjpeg: using external huffman table\n"); 91 av_log(avctx, AV_LOG_INFO, "mjpeg: using external huffman table\n");
88 init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size*8); 92 init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size*8);