comparison h263dec.c @ 8596:68e959302527 libavcodec

replace all occurrence of ENABLE_ by the corresponding CONFIG_, HAVE_ or ARCH_ and remove all ENABLE_ definitions.
author aurel
date Wed, 14 Jan 2009 17:19:17 +0000
parents 7a463923ecd1
children b20c590170cc
comparison
equal deleted inserted replaced
8595:2f476018b4ac 8596:68e959302527
109 /* for h263, we allocate the images after having read the header */ 109 /* for h263, we allocate the images after having read the header */
110 if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4) 110 if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4)
111 if (MPV_common_init(s) < 0) 111 if (MPV_common_init(s) < 0)
112 return -1; 112 return -1;
113 113
114 if (ENABLE_MSMPEG4_DECODER && s->h263_msmpeg4) 114 if (CONFIG_MSMPEG4_DECODER && s->h263_msmpeg4)
115 ff_msmpeg4_decode_init(s); 115 ff_msmpeg4_decode_init(s);
116 else 116 else
117 h263_decode_init_vlc(s); 117 h263_decode_init_vlc(s);
118 118
119 return 0; 119 return 0;
353 } 353 }
354 354
355 if(s->flags&CODEC_FLAG_TRUNCATED){ 355 if(s->flags&CODEC_FLAG_TRUNCATED){
356 int next; 356 int next;
357 357
358 if(ENABLE_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){ 358 if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
359 next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size); 359 next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
360 }else if(ENABLE_H263_DECODER && s->codec_id==CODEC_ID_H263){ 360 }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){
361 next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size); 361 next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
362 }else{ 362 }else{
363 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n"); 363 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
364 return -1; 364 return -1;
365 } 365 }
388 int i= ff_find_unused_picture(s, 0); 388 int i= ff_find_unused_picture(s, 0);
389 s->current_picture_ptr= &s->picture[i]; 389 s->current_picture_ptr= &s->picture[i];
390 } 390 }
391 391
392 /* let's go :-) */ 392 /* let's go :-) */
393 if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5) { 393 if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5) {
394 ret= ff_wmv2_decode_picture_header(s); 394 ret= ff_wmv2_decode_picture_header(s);
395 } else if (ENABLE_MSMPEG4_DECODER && s->msmpeg4_version) { 395 } else if (CONFIG_MSMPEG4_DECODER && s->msmpeg4_version) {
396 ret = msmpeg4_decode_picture_header(s); 396 ret = msmpeg4_decode_picture_header(s);
397 } else if (s->h263_pred) { 397 } else if (s->h263_pred) {
398 if(s->avctx->extradata_size && s->picture_number==0){ 398 if(s->avctx->extradata_size && s->picture_number==0){
399 GetBitContext gb; 399 GetBitContext gb;
400 400
618 618
619 ff_er_frame_start(s); 619 ff_er_frame_start(s);
620 620
621 //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type 621 //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type
622 //which is not available before MPV_frame_start() 622 //which is not available before MPV_frame_start()
623 if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5){ 623 if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5){
624 ret = ff_wmv2_decode_secondary_picture_header(s); 624 ret = ff_wmv2_decode_secondary_picture_header(s);
625 if(ret<0) return ret; 625 if(ret<0) return ret;
626 if(ret==1) goto intrax8_decoded; 626 if(ret==1) goto intrax8_decoded;
627 } 627 }
628 628
645 645
646 decode_slice(s); 646 decode_slice(s);
647 } 647 }
648 648
649 if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE) 649 if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE)
650 if(!ENABLE_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){ 650 if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
651 s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR; 651 s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
652 } 652 }
653 653
654 /* divx 5.01+ bistream reorder stuff */ 654 /* divx 5.01+ bistream reorder stuff */
655 if(s->codec_id==CODEC_ID_MPEG4 && s->bitstream_buffer_size==0 && s->divx_packed){ 655 if(s->codec_id==CODEC_ID_MPEG4 && s->bitstream_buffer_size==0 && s->divx_packed){