Revision 5a6b9443 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
1015 1015
    s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER);
1016 1016
    s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN);
1017 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 1020
    if(avctx->rc_max_rate && !avctx->rc_buffer_size){
1020 1021
        av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n");
......
1115 1116
        }
1116 1117
    }
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");
1126
            return -1;
1127
        }
1128
    }
1129

  
1118 1130
    if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4
1119 1131
       && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO
1120 1132
       && (s->codec_id != CODEC_ID_H263P || !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))){

Also available in: Unified diff