comparison mpegvideo.c @ 3305:ceb221c4eca7 libavcodec

add MPEG-2 intra vlc support
author bcoudurier
date Sat, 13 May 2006 17:16:58 +0000
parents d185908c71cb
children 5e2c69db0ef7
comparison
equal deleted inserted replaced
3304:25d315fcca5a 3305:ceb221c4eca7
989 && !s->fixed_qscale; 989 && !s->fixed_qscale;
990 990
991 s->obmc= !!(s->flags & CODEC_FLAG_OBMC); 991 s->obmc= !!(s->flags & CODEC_FLAG_OBMC);
992 s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); 992 s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER);
993 s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN); 993 s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN);
994 s->intra_vlc_format= !!(s->flags2 & CODEC_FLAG2_INTRA_VLC);
994 995
995 if(avctx->rc_max_rate && !avctx->rc_buffer_size){ 996 if(avctx->rc_max_rate && !avctx->rc_buffer_size){
996 av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n"); 997 av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n");
997 return -1; 998 return -1;
998 } 999 }
1070 return -1; 1071 return -1;
1071 } 1072 }
1072 1073
1073 if(s->avctx->scenechange_threshold < 1000000000 && (s->flags & CODEC_FLAG_CLOSED_GOP)){ 1074 if(s->avctx->scenechange_threshold < 1000000000 && (s->flags & CODEC_FLAG_CLOSED_GOP)){
1074 av_log(avctx, AV_LOG_ERROR, "closed gop with scene change detection arent supported yet\n"); 1075 av_log(avctx, AV_LOG_ERROR, "closed gop with scene change detection arent supported yet\n");
1076 return -1;
1077 }
1078
1079 if((s->flags2 & CODEC_FLAG2_INTRA_VLC) && s->codec_id != CODEC_ID_MPEG2VIDEO){
1080 av_log(avctx, AV_LOG_ERROR, "intra vlc table not supported by codec\n");
1075 return -1; 1081 return -1;
1076 } 1082 }
1077 1083
1078 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 1084 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4
1079 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO 1085 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO