comparison h264.c @ 7178:9a31b6a8ae52 libavcodec

Don't test for H264 encoding unless an encoder exists.
author astrange
date Wed, 02 Jul 2008 21:46:18 +0000
parents e943e1409077
children 847e1fc5c2a1
comparison
equal deleted inserted replaced
7177:a82e7d9c8c34 7178:9a31b6a8ae52
2724 2724
2725 static void hl_decode_mb(H264Context *h){ 2725 static void hl_decode_mb(H264Context *h){
2726 MpegEncContext * const s = &h->s; 2726 MpegEncContext * const s = &h->s;
2727 const int mb_xy= h->mb_xy; 2727 const int mb_xy= h->mb_xy;
2728 const int mb_type= s->current_picture.mb_type[mb_xy]; 2728 const int mb_type= s->current_picture.mb_type[mb_xy];
2729 int is_complex = FRAME_MBAFF || MB_FIELD || IS_INTRA_PCM(mb_type) || s->codec_id != CODEC_ID_H264 || (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || s->encoding; 2729 int is_complex = FRAME_MBAFF || MB_FIELD || IS_INTRA_PCM(mb_type) || s->codec_id != CODEC_ID_H264 || (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding);
2730 2730
2731 if(!s->decode) 2731 if(ENABLE_H264_ENCODER && !s->decode)
2732 return; 2732 return;
2733 2733
2734 if (is_complex) 2734 if (is_complex)
2735 hl_decode_mb_complex(h); 2735 hl_decode_mb_complex(h);
2736 else hl_decode_mb_simple(h); 2736 else hl_decode_mb_simple(h);