Mercurial > libavcodec.hg
comparison mpegvideo.c @ 4621:5464e5021a67 libavcodec
dummy support for mpeg2 non linear quant
author | bcoudurier |
---|---|
date | Sun, 04 Mar 2007 02:26:20 +0000 |
parents | c81aa982b72b |
children | f0ce30e115ac |
comparison
equal
deleted
inserted
replaced
4620:f23c20cf7579 | 4621:5464e5021a67 |
---|---|
1013 | 1013 |
1014 s->obmc= !!(s->flags & CODEC_FLAG_OBMC); | 1014 s->obmc= !!(s->flags & CODEC_FLAG_OBMC); |
1015 s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); | 1015 s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); |
1016 s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN); | 1016 s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN); |
1017 s->intra_vlc_format= !!(s->flags2 & CODEC_FLAG2_INTRA_VLC); | 1017 s->intra_vlc_format= !!(s->flags2 & CODEC_FLAG2_INTRA_VLC); |
1018 s->q_scale_type= !!(s->flags2 & CODEC_FLAG2_NON_LINEAR_QUANT); | |
1018 | 1019 |
1019 if(avctx->rc_max_rate && !avctx->rc_buffer_size){ | 1020 if(avctx->rc_max_rate && !avctx->rc_buffer_size){ |
1020 av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n"); | 1021 av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n"); |
1021 return -1; | 1022 return -1; |
1022 } | 1023 } |
1109 av_log(avctx, AV_LOG_ERROR, "low delay forcing is only available for mpeg1/2\n"); | 1110 av_log(avctx, AV_LOG_ERROR, "low delay forcing is only available for mpeg1/2\n"); |
1110 return -1; | 1111 return -1; |
1111 } | 1112 } |
1112 if (s->max_b_frames != 0){ | 1113 if (s->max_b_frames != 0){ |
1113 av_log(avctx, AV_LOG_ERROR, "b frames cannot be used with low delay\n"); | 1114 av_log(avctx, AV_LOG_ERROR, "b frames cannot be used with low delay\n"); |
1115 return -1; | |
1116 } | |
1117 } | |
1118 | |
1119 if(s->q_scale_type == 1){ | |
1120 if(s->codec_id != CODEC_ID_MPEG2VIDEO){ | |
1121 av_log(avctx, AV_LOG_ERROR, "non linear quant is only available for mpeg2\n"); | |
1122 return -1; | |
1123 } | |
1124 if(avctx->qmax > 12){ | |
1125 av_log(avctx, AV_LOG_ERROR, "non linear quant only supports qmax <= 12 currently\n"); | |
1114 return -1; | 1126 return -1; |
1115 } | 1127 } |
1116 } | 1128 } |
1117 | 1129 |
1118 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 | 1130 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 |