diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-27 22:14:31 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-27 23:10:35 +0300 |
commit | 94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f (patch) | |
tree | 0fc97aeec123c1e0eb3166aa34e6da9680831d14 /libavcodec/mpegvideo_enc.c | |
parent | 4a2836eaf33b64512678ed6dc1387f8f042cf387 (diff) | |
parent | 7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615 (diff) |
Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
lavc: AV-prefix all codec flags
Conflicts:
doc/examples/muxing.c
ffmpeg.c
ffmpeg_opt.c
ffplay.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/ac3enc_float.c
libavcodec/atrac1.c
libavcodec/atrac3.c
libavcodec/atrac3plusdec.c
libavcodec/dcadec.c
libavcodec/ffv1enc.c
libavcodec/h264.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mb.c
libavcodec/imc.c
libavcodec/libmp3lame.c
libavcodec/libtheoraenc.c
libavcodec/libtwolame.c
libavcodec/libvpxenc.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpegaudiodec_template.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/nellymoserdec.c
libavcodec/nellymoserenc.c
libavcodec/nvenc.c
libavcodec/on2avc.c
libavcodec/options_table.h
libavcodec/opus_celt.c
libavcodec/pngenc.c
libavcodec/ra288.c
libavcodec/ratecontrol.c
libavcodec/twinvq.c
libavcodec/vc1_block.c
libavcodec/vc1_loopfilter.c
libavcodec/vc1_mc.c
libavcodec/vc1dec.c
libavcodec/vorbisdec.c
libavcodec/vp3.c
libavcodec/wma.c
libavcodec/wmaprodec.c
libavcodec/x86/hpeldsp_init.c
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index b8510ed087..83356a0d22 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -339,7 +339,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) s->max_b_frames = avctx->max_b_frames; s->codec_id = avctx->codec->id; s->strict_std_compliance = avctx->strict_std_compliance; - s->quarter_sample = (avctx->flags & CODEC_FLAG_QPEL) != 0; + s->quarter_sample = (avctx->flags & AV_CODEC_FLAG_QPEL) != 0; s->mpeg_quant = avctx->mpeg_quant; s->rtp_mode = !!avctx->rtp_payload_size; s->intra_dc_precision = avctx->intra_dc_precision; @@ -377,7 +377,7 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif /* Fixed QSCALE */ - s->fixed_qscale = !!(avctx->flags & CODEC_FLAG_QSCALE); + s->fixed_qscale = !!(avctx->flags & AV_CODEC_FLAG_QSCALE); #if FF_API_MPV_OPT FF_DISABLE_DEPRECATION_WARNINGS @@ -395,7 +395,7 @@ FF_ENABLE_DEPRECATION_WARNINGS (s->mpv_flags & FF_MPV_FLAG_QP_RD)) && !s->fixed_qscale; - s->loop_filter = !!(s->avctx->flags & CODEC_FLAG_LOOP_FILTER); + s->loop_filter = !!(s->avctx->flags & AV_CODEC_FLAG_LOOP_FILTER); if (avctx->rc_max_rate && !avctx->rc_buffer_size) { switch(avctx->codec_id) { @@ -476,7 +476,7 @@ FF_ENABLE_DEPRECATION_WARNINGS "specified vbv buffer is too large for the given bitrate!\n"); } - if ((s->avctx->flags & CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 && + if ((s->avctx->flags & AV_CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 && s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P && s->codec_id != AV_CODEC_ID_FLV1) { av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n"); @@ -569,7 +569,7 @@ FF_ENABLE_DEPRECATION_WARNINGS return -1; } - if ((s->avctx->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME)) && + if ((s->avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME)) && s->codec_id != AV_CODEC_ID_MPEG4 && s->codec_id != AV_CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n"); return -1; @@ -595,14 +595,14 @@ FF_ENABLE_DEPRECATION_WARNINGS } if (s->avctx->scenechange_threshold < 1000000000 && - (s->avctx->flags & CODEC_FLAG_CLOSED_GOP)) { + (s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP)) { av_log(avctx, AV_LOG_ERROR, "closed gop with scene change detection are not supported yet, " "set threshold to 1000000000\n"); return -1; } - if (s->avctx->flags & CODEC_FLAG_LOW_DELAY) { + if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY) { if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "low delay forcing is only available for mpeg2\n"); @@ -652,7 +652,7 @@ FF_ENABLE_DEPRECATION_WARNINGS return -1; } - if (avctx->b_frame_strategy && (avctx->flags & CODEC_FLAG_PASS2)) { + if (avctx->b_frame_strategy && (avctx->flags & AV_CODEC_FLAG_PASS2)) { av_log(avctx, AV_LOG_INFO, "notice: b_frame_strategy only affects the first pass\n"); avctx->b_frame_strategy = 0; @@ -708,12 +708,12 @@ FF_ENABLE_DEPRECATION_WARNINGS switch (avctx->codec->id) { case AV_CODEC_ID_MPEG1VIDEO: s->out_format = FMT_MPEG1; - s->low_delay = !!(s->avctx->flags & CODEC_FLAG_LOW_DELAY); + s->low_delay = !!(s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY); avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); break; case AV_CODEC_ID_MPEG2VIDEO: s->out_format = FMT_MPEG1; - s->low_delay = !!(s->avctx->flags & CODEC_FLAG_LOW_DELAY); + s->low_delay = !!(s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY); avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); s->rtp_mode = 1; break; @@ -762,9 +762,9 @@ FF_ENABLE_DEPRECATION_WARNINGS s->out_format = FMT_H263; s->h263_plus = 1; /* Fx */ - s->h263_aic = (avctx->flags & CODEC_FLAG_AC_PRED) ? 1 : 0; + s->h263_aic = (avctx->flags & AV_CODEC_FLAG_AC_PRED) ? 1 : 0; s->modified_quant = s->h263_aic; - s->loop_filter = (avctx->flags & CODEC_FLAG_LOOP_FILTER) ? 1 : 0; + s->loop_filter = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; s->unrestricted_mv = s->obmc || s->loop_filter || s->umvplus; /* /Fx */ @@ -846,8 +846,8 @@ FF_ENABLE_DEPRECATION_WARNINGS s->encoding = 1; s->progressive_frame = - s->progressive_sequence = !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT | - CODEC_FLAG_INTERLACED_ME) || + s->progressive_sequence = !(avctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | + AV_CODEC_FLAG_INTERLACED_ME) || s->alternate_scan); /* init */ @@ -1314,8 +1314,8 @@ static int estimate_best_b_count(MpegEncContext *s) c->width = s->width >> scale; c->height = s->height >> scale; - c->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR; - c->flags |= s->avctx->flags & CODEC_FLAG_QPEL; + c->flags = AV_CODEC_FLAG_QSCALE | AV_CODEC_FLAG_PSNR; + c->flags |= s->avctx->flags & AV_CODEC_FLAG_QPEL; c->mb_decision = s->avctx->mb_decision; c->me_cmp = s->avctx->me_cmp; c->mb_cmp = s->avctx->mb_cmp; @@ -1439,7 +1439,7 @@ static int select_input_picture(MpegEncContext *s) } else { int b_frames; - if (s->avctx->flags & CODEC_FLAG_PASS2) { + if (s->avctx->flags & AV_CODEC_FLAG_PASS2) { for (i = 0; i < s->max_b_frames + 1; i++) { int pict_num = s->input_picture[0]->f->display_picture_number + i; @@ -1508,13 +1508,13 @@ static int select_input_picture(MpegEncContext *s) s->gop_size > s->picture_in_gop_number) { b_frames = s->gop_size - s->picture_in_gop_number - 1; } else { - if (s->avctx->flags & CODEC_FLAG_CLOSED_GOP) + if (s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP) b_frames = 0; s->input_picture[b_frames]->f->pict_type = AV_PICTURE_TYPE_I; } } - if ((s->avctx->flags & CODEC_FLAG_CLOSED_GOP) && b_frames && + if ((s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP) && b_frames && s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_I) b_frames--; @@ -1833,7 +1833,7 @@ vbv_retry: av_assert0(s->avctx->rc_max_rate); } - if (s->avctx->flags & CODEC_FLAG_PASS1) + if (s->avctx->flags & AV_CODEC_FLAG_PASS1) ff_write_pass1_stats(s); for (i = 0; i < 4; i++) { @@ -1843,7 +1843,7 @@ vbv_retry: avctx->error[i] += s->current_picture_ptr->f->error[i]; } - if (s->avctx->flags & CODEC_FLAG_PASS1) + if (s->avctx->flags & AV_CODEC_FLAG_PASS1) assert(avctx->header_bits + avctx->mv_bits + avctx->misc_bits + avctx->i_tex_bits + avctx->p_tex_bits == put_bits_count(&s->pb)); @@ -2145,7 +2145,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, } if (s->mb_intra) { - if (s->avctx->flags & CODEC_FLAG_INTERLACED_DCT) { + if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) { int progressive_score, interlaced_score; s->interlaced_dct = 0; @@ -2176,7 +2176,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, s->pdsp.get_pixels(s->block[2], ptr_y + dct_offset, wrap_y); s->pdsp.get_pixels(s->block[3], ptr_y + dct_offset + 8, wrap_y); - if (s->avctx->flags & CODEC_FLAG_GRAY) { + if (s->avctx->flags & AV_CODEC_FLAG_GRAY) { skip_dct[4] = 1; skip_dct[5] = 1; } else { @@ -2224,7 +2224,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, op_pix, op_qpix); } - if (s->avctx->flags & CODEC_FLAG_INTERLACED_DCT) { + if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) { int progressive_score, interlaced_score; s->interlaced_dct = 0; @@ -2262,7 +2262,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, s->pdsp.diff_pixels(s->block[3], ptr_y + dct_offset + 8, dest_y + dct_offset + 8, wrap_y); - if (s->avctx->flags & CODEC_FLAG_GRAY) { + if (s->avctx->flags & AV_CODEC_FLAG_GRAY) { skip_dct[4] = 1; skip_dct[5] = 1; } else { @@ -2372,7 +2372,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, } } - if ((s->avctx->flags & CODEC_FLAG_GRAY) && s->mb_intra) { + if ((s->avctx->flags & AV_CODEC_FLAG_GRAY) && s->mb_intra) { s->block_last_index[4] = s->block_last_index[5] = 0; s->block[4][0] = @@ -2696,7 +2696,7 @@ static void write_slice_end(MpegEncContext *s){ avpriv_align_put_bits(&s->pb); flush_put_bits(&s->pb); - if ((s->avctx->flags & CODEC_FLAG_PASS1) && !s->partitioned_frame) + if ((s->avctx->flags & AV_CODEC_FLAG_PASS1) && !s->partitioned_frame) s->misc_bits+= get_bits_diff(s); } @@ -2949,7 +2949,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ break; } - if (s->avctx->flags & CODEC_FLAG_PASS1) { + if (s->avctx->flags & AV_CODEC_FLAG_PASS1) { int bits= put_bits_count(&s->pb); s->misc_bits+= bits - s->last_bits; s->last_bits= bits; @@ -3369,7 +3369,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ s->p_mv_table[xy][1]=0; } - if (s->avctx->flags & CODEC_FLAG_PSNR) { + if (s->avctx->flags & AV_CODEC_FLAG_PSNR) { int w= 16; int h= 16; @@ -3534,11 +3534,11 @@ static int encode_picture(MpegEncContext *s, int picture_number) s->no_rounding ^= 1; } - if (s->avctx->flags & CODEC_FLAG_PASS2) { + if (s->avctx->flags & AV_CODEC_FLAG_PASS2) { if (estimate_qp(s,1) < 0) return -1; ff_get_2pass_fcode(s); - } else if (!(s->avctx->flags & CODEC_FLAG_QSCALE)) { + } else if (!(s->avctx->flags & AV_CODEC_FLAG_QSCALE)) { if(s->pict_type==AV_PICTURE_TYPE_B) s->lambda= s->last_lambda_for[s->pict_type]; else @@ -3605,7 +3605,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) if(s->pict_type==AV_PICTURE_TYPE_P || s->pict_type==AV_PICTURE_TYPE_S) { s->f_code= ff_get_best_fcode(s, s->p_mv_table, CANDIDATE_MB_TYPE_INTER); - if (s->avctx->flags & CODEC_FLAG_INTERLACED_ME) { + if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) { int a,b; a= ff_get_best_fcode(s, s->p_field_mv_table[0][0], CANDIDATE_MB_TYPE_INTER_I); //FIXME field_select b= ff_get_best_fcode(s, s->p_field_mv_table[1][1], CANDIDATE_MB_TYPE_INTER_I); @@ -3614,7 +3614,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) ff_fix_long_p_mvs(s); ff_fix_long_mvs(s, NULL, 0, s->p_mv_table, s->f_code, CANDIDATE_MB_TYPE_INTER, 0); - if (s->avctx->flags & CODEC_FLAG_INTERLACED_ME) { + if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) { int j; for(i=0; i<2; i++){ for(j=0; j<2; j++) @@ -3639,7 +3639,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) ff_fix_long_mvs(s, NULL, 0, s->b_back_mv_table, s->b_code, CANDIDATE_MB_TYPE_BACKWARD, 1); ff_fix_long_mvs(s, NULL, 0, s->b_bidir_forw_mv_table, s->f_code, CANDIDATE_MB_TYPE_BIDIR, 1); ff_fix_long_mvs(s, NULL, 0, s->b_bidir_back_mv_table, s->b_code, CANDIDATE_MB_TYPE_BIDIR, 1); - if (s->avctx->flags & CODEC_FLAG_INTERLACED_ME) { + if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) { int dir, j; for(dir=0; dir<2; dir++){ for(i=0; i<2; i++){ @@ -3660,7 +3660,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) if (s->qscale < 3 && s->max_qcoeff <= 128 && s->pict_type == AV_PICTURE_TYPE_I && - !(s->avctx->flags & CODEC_FLAG_QSCALE)) + !(s->avctx->flags & AV_CODEC_FLAG_QSCALE)) s->qscale= 3; //reduce clipping problems if (s->out_format == FMT_MJPEG) { |