summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-27 21:14:31 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-27 22:10:35 +0200
commit94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f (patch)
tree0fc97aeec123c1e0eb3166aa34e6da9680831d14 /libavcodec
parent4a2836eaf33b64512678ed6dc1387f8f042cf387 (diff)
parent7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615 (diff)
downloadffmpeg-streaming-94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f.zip
ffmpeg-streaming-94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f.tar.gz
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')
-rw-r--r--libavcodec/4xm.c2
-rw-r--r--libavcodec/aacdec_template.c4
-rw-r--r--libavcodec/aacenc.c6
-rw-r--r--libavcodec/aacpsy.c2
-rw-r--r--libavcodec/ac3dec.c6
-rw-r--r--libavcodec/ac3enc.c2
-rw-r--r--libavcodec/ac3enc_float.c2
-rw-r--r--libavcodec/arm/idctdsp_init_arm.c2
-rw-r--r--libavcodec/arm/idctdsp_init_armv6.c2
-rw-r--r--libavcodec/ass.c2
-rw-r--r--libavcodec/asvdec.c2
-rw-r--r--libavcodec/asvenc.c2
-rw-r--r--libavcodec/atrac1.c2
-rw-r--r--libavcodec/atrac3.c2
-rw-r--r--libavcodec/atrac3plusdec.c2
-rw-r--r--libavcodec/avcodec.h120
-rw-r--r--libavcodec/dcadec.c2
-rw-r--r--libavcodec/dnxhddata.c2
-rw-r--r--libavcodec/dnxhddec.c4
-rw-r--r--libavcodec/dnxhdenc.c2
-rw-r--r--libavcodec/dpxenc.c2
-rw-r--r--libavcodec/dump_extradata_bsf.c2
-rw-r--r--libavcodec/dvenc.c2
-rw-r--r--libavcodec/dxa.c2
-rw-r--r--libavcodec/eamad.c4
-rw-r--r--libavcodec/eatgq.c4
-rw-r--r--libavcodec/eatqi.c2
-rw-r--r--libavcodec/ffv1enc.c13
-rw-r--r--libavcodec/frame_thread_encoder.c6
-rw-r--r--libavcodec/h263.h2
-rw-r--r--libavcodec/h263dec.c6
-rw-r--r--libavcodec/h264.c16
-rw-r--r--libavcodec/h264_loopfilter.c4
-rw-r--r--libavcodec/h264_mb.c10
-rw-r--r--libavcodec/h264_mb_template.c10
-rw-r--r--libavcodec/h264_ps.c4
-rw-r--r--libavcodec/h264_slice.c12
-rw-r--r--libavcodec/hevc_ps.c6
-rw-r--r--libavcodec/huffyuvdec.c16
-rw-r--r--libavcodec/huffyuvenc.c36
-rw-r--r--libavcodec/imc.c2
-rw-r--r--libavcodec/ituh263enc.c2
-rw-r--r--libavcodec/j2kenc.c2
-rw-r--r--libavcodec/jpeg2000dec.c2
-rw-r--r--libavcodec/libaacplus.c4
-rw-r--r--libavcodec/libdcadec.c2
-rw-r--r--libavcodec/libfaac.c4
-rw-r--r--libavcodec/libfdk-aacenc.c8
-rw-r--r--libavcodec/libmp3lame.c4
-rw-r--r--libavcodec/libopenh264enc.c4
-rw-r--r--libavcodec/libschroedingerenc.c6
-rw-r--r--libavcodec/libspeexenc.c4
-rw-r--r--libavcodec/libtheoraenc.c12
-rw-r--r--libavcodec/libtwolame.c2
-rw-r--r--libavcodec/libvo-aacenc.c4
-rw-r--r--libavcodec/libvorbisenc.c6
-rw-r--r--libavcodec/libvpxenc.c8
-rw-r--r--libavcodec/libx264.c16
-rw-r--r--libavcodec/libx265.c6
-rw-r--r--libavcodec/libxavs.c16
-rw-r--r--libavcodec/libxvid.c20
-rw-r--r--libavcodec/mdec.c2
-rw-r--r--libavcodec/mjpegenc_common.c2
-rw-r--r--libavcodec/motion-test.c2
-rw-r--r--libavcodec/motion_est.c16
-rw-r--r--libavcodec/mpeg12dec.c16
-rw-r--r--libavcodec/mpeg12enc.c4
-rw-r--r--libavcodec/mpeg4videodec.c4
-rw-r--r--libavcodec/mpeg4videoenc.c16
-rw-r--r--libavcodec/mpegaudiodec_template.c2
-rw-r--r--libavcodec/mpegpicture.c2
-rw-r--r--libavcodec/mpegvideo.c26
-rw-r--r--libavcodec/mpegvideo_enc.c70
-rw-r--r--libavcodec/mpegvideo_motion.c16
-rw-r--r--libavcodec/mpegvideo_xvmc.c2
-rw-r--r--libavcodec/nellymoserdec.c2
-rw-r--r--libavcodec/nellymoserenc.c2
-rw-r--r--libavcodec/nvenc.c14
-rw-r--r--libavcodec/on2avc.c2
-rw-r--r--libavcodec/options_table.h52
-rw-r--r--libavcodec/opus_celt.c2
-rw-r--r--libavcodec/parser.c6
-rw-r--r--libavcodec/pngenc.c2
-rw-r--r--libavcodec/ppc/idctdsp.c2
-rw-r--r--libavcodec/proresdec2.c2
-rw-r--r--libavcodec/proresenc_anatoliy.c2
-rw-r--r--libavcodec/proresenc_kostya.c4
-rw-r--r--libavcodec/pthread.c6
-rw-r--r--libavcodec/qsvenc.c6
-rw-r--r--libavcodec/ra288.c2
-rw-r--r--libavcodec/ratecontrol.c14
-rw-r--r--libavcodec/remove_extradata_bsf.c3
-rw-r--r--libavcodec/snowdec.c2
-rw-r--r--libavcodec/snowenc.c28
-rw-r--r--libavcodec/svq1dec.c2
-rw-r--r--libavcodec/svq3.c2
-rw-r--r--libavcodec/tiffenc.c2
-rw-r--r--libavcodec/twinvq.c2
-rw-r--r--libavcodec/utils.c14
-rw-r--r--libavcodec/vble.c2
-rw-r--r--libavcodec/vc1_block.c40
-rw-r--r--libavcodec/vc1_loopfilter.c20
-rw-r--r--libavcodec/vc1_mc.c12
-rw-r--r--libavcodec/vc1dec.c8
-rw-r--r--libavcodec/vorbisdec.c2
-rw-r--r--libavcodec/vorbisenc.c2
-rw-r--r--libavcodec/vp3.c10
-rw-r--r--libavcodec/wma.c2
-rw-r--r--libavcodec/wmaprodec.c2
-rw-r--r--libavcodec/wmv2.c4
-rw-r--r--libavcodec/x86/hpeldsp_init.c8
-rw-r--r--libavcodec/x86/me_cmp_init.c6
-rw-r--r--libavcodec/x86/mpegvideo.c2
-rw-r--r--libavcodec/x86/mpegvideoencdsp_init.c6
-rw-r--r--libavcodec/x86/vp3dsp_init.c2
115 files changed, 531 insertions, 415 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 3a25622..839dbc3 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -559,7 +559,7 @@ static inline void idct_put(FourXContext *f, int x, int y)
idct(block[i]);
}
- if (!(f->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(f->avctx->flags & AV_CODEC_FLAG_GRAY)) {
for (i = 4; i < 6; i++)
idct(block[i]);
}
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index acca460..dda8d51 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -1129,9 +1129,9 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
AAC_RENAME(ff_aac_sbr_init)();
#if USE_FIXED
- ac->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & CODEC_FLAG_BITEXACT);
+ ac->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#else
- ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#endif /* USE_FIXED */
if (!ac->fdsp) {
return AVERROR(ENOMEM);
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index e82f7b5..043e6fd 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -659,7 +659,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
init_put_bits(&s->pb, avpkt->data, avpkt->size);
- if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & CODEC_FLAG_BITEXACT))
+ if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & AV_CODEC_FLAG_BITEXACT))
put_bitstream_info(s, LIBAVCODEC_IDENT);
start_ch = 0;
memset(chan_el_counter, 0, sizeof(chan_el_counter));
@@ -757,7 +757,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avctx->frame_bits = put_bits_count(&s->pb);
// rate control stuff
- if (!(avctx->flags & CODEC_FLAG_QSCALE)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_QSCALE)) {
float ratio = avctx->bit_rate * 1024.0f / avctx->sample_rate / avctx->frame_bits;
s->lambda *= ratio;
s->lambda = FFMIN(s->lambda, 65536.f);
@@ -794,7 +794,7 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
{
int ret = 0;
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index a5474b9..82b670d 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -262,7 +262,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx)
for (i = 0; i < avctx->channels; i++) {
AacPsyChannel *pch = &ctx->ch[i];
- if (avctx->flags & CODEC_FLAG_QSCALE)
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE)
pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm;
else
pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->channels / 1000);
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 234b469..3982247 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -193,13 +193,13 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
ff_bswapdsp_init(&s->bdsp);
#if (USE_FIXED)
- s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#else
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_fmt_convert_init(&s->fmt_conv, avctx);
#endif
- ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
av_lfg_init(&s->dith_state, 0);
if (USE_FIXED)
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 50803de..0d8a678 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2484,7 +2484,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
ff_audiodsp_init(&s->adsp);
ff_me_cmp_init(&s->mecc, avctx);
- ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
dprint_options(s);
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 766b14e..6c91f45 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -139,7 +139,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
{
AC3EncodeContext *s = avctx->priv_data;
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
return ff_ac3_encode_init(avctx);
diff --git a/libavcodec/arm/idctdsp_init_arm.c b/libavcodec/arm/idctdsp_init_arm.c
index da5da06..0068e3f 100644
--- a/libavcodec/arm/idctdsp_init_arm.c
+++ b/libavcodec/arm/idctdsp_init_arm.c
@@ -64,7 +64,7 @@ av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx,
int cpu_flags = av_get_cpu_flags();
if (!avctx->lowres && !high_bit_depth) {
- if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) ||
+ if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
avctx->idct_algo == FF_IDCT_ARM) {
c->idct_put = j_rev_dct_arm_put;
c->idct_add = j_rev_dct_arm_add;
diff --git a/libavcodec/arm/idctdsp_init_armv6.c b/libavcodec/arm/idctdsp_init_armv6.c
index a3470a8..edf3070 100644
--- a/libavcodec/arm/idctdsp_init_armv6.c
+++ b/libavcodec/arm/idctdsp_init_armv6.c
@@ -33,7 +33,7 @@ av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
if (!avctx->lowres && !high_bit_depth) {
- if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) ||
+ if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
avctx->idct_algo == FF_IDCT_SIMPLEARMV6) {
c->idct_put = ff_simple_idct_put_armv6;
c->idct_add = ff_simple_idct_add_armv6;
diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index 468b8bb6..227d571 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -66,7 +66,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
"\r\n"
"[Events]\r\n"
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n",
- !(avctx->flags & CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
+ !(avctx->flags & AV_CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
ASS_DEFAULT_PLAYRESX, ASS_DEFAULT_PLAYRESY,
font, font_size, color, color, back_color, back_color,
-bold, -italic, -underline, alignment);
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c
index 18e2faa..7f87fe7 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -195,7 +195,7 @@ static inline void idct_put(ASV1Context *a, AVFrame *frame, int mb_x, int mb_y)
a->idsp.idct_put(dest_y + 8 * linesize, linesize, block[2]);
a->idsp.idct_put(dest_y + 8 * linesize + 8, linesize, block[3]);
- if (!(a->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(a->avctx->flags & AV_CODEC_FLAG_GRAY)) {
a->idsp.idct_put(dest_cb, frame->linesize[1], block[4]);
a->idsp.idct_put(dest_cr, frame->linesize[2], block[5]);
}
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index 8473823..4b390b0 100644
--- a/libavcodec/asvenc.c
+++ b/libavcodec/asvenc.c
@@ -207,7 +207,7 @@ static inline void dct_get(ASV1Context *a, const AVFrame *frame,
for (i = 0; i < 4; i++)
a->fdsp.fdct(block[i]);
- if (!(a->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(a->avctx->flags & AV_CODEC_FLAG_GRAY)) {
a->pdsp.get_pixels(block[4], ptr_cb, frame->linesize[1]);
a->pdsp.get_pixels(block[5], ptr_cr, frame->linesize[2]);
for (i = 4; i < 6; i++)
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index f965dcc..3dd781c 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -361,7 +361,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
ff_atrac_generate_tables();
- q->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
q->bands[0] = q->low;
q->bands[1] = q->mid;
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 5aa3d8d..9f9fa7c 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -914,7 +914,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
}
ff_atrac_init_gain_compensation(&q->gainc_ctx, 4, 3);
- q->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
q->units = av_mallocz_array(avctx->channels, sizeof(*q->units));
if (!q->units || !q->fdsp) {
diff --git a/libavcodec/atrac3plusdec.c b/libavcodec/atrac3plusdec.c
index 078d41c..90e8e5c 100644
--- a/libavcodec/atrac3plusdec.c
+++ b/libavcodec/atrac3plusdec.c
@@ -171,7 +171,7 @@ static av_cold int atrac3p_decode_init(AVCodecContext *avctx)
ctx->my_channel_layout = avctx->channel_layout;
ctx->ch_units = av_mallocz_array(ctx->num_channel_blocks, sizeof(*ctx->ch_units));
- ctx->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ ctx->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!ctx->ch_units || !ctx->fdsp) {
atrac3p_decode_close(avctx);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index a89de52..41ceec1 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -716,6 +716,120 @@ typedef struct RcOverride{
* Allow decoders to produce frames with data planes that are not aligned
* to CPU requirements (e.g. due to cropping).
*/
+#define AV_CODEC_FLAG_UNALIGNED (1 << 0)
+/**
+ * Use fixed qscale.
+ */
+#define AV_CODEC_FLAG_QSCALE (1 << 1)
+/**
+ * 4 MV per MB allowed / advanced prediction for H.263.
+ */
+#define AV_CODEC_FLAG_4MV (1 << 2)
+/**
+ * Output even those frames that might be corrupted.
+ */
+#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
+/**
+ * Use qpel MC.
+ */
+#define AV_CODEC_FLAG_QPEL (1 << 4)
+/**
+ * Use internal 2pass ratecontrol in first pass mode.
+ */
+#define AV_CODEC_FLAG_PASS1 (1 << 9)
+/**
+ * Use internal 2pass ratecontrol in second pass mode.
+ */
+#define AV_CODEC_FLAG_PASS2 (1 << 10)
+/**
+ * loop filter.
+ */
+#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
+/**
+ * Only decode/encode grayscale.
+ */
+#define AV_CODEC_FLAG_GRAY (1 << 13)
+/**
+ * error[?] variables will be set during encoding.
+ */
+#define AV_CODEC_FLAG_PSNR (1 << 15)
+/**
+ * Input bitstream might be truncated at a random location
+ * instead of only at frame boundaries.
+ */
+#define AV_CODEC_FLAG_TRUNCATED (1 << 16)
+/**
+ * Use interlaced DCT.
+ */
+#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
+/**
+ * Force low delay.
+ */
+#define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
+/**
+ * Place global headers in extradata instead of every keyframe.
+ */
+#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
+/**
+ * Use only bitexact stuff (except (I)DCT).
+ */
+#define AV_CODEC_FLAG_BITEXACT (1 << 23)
+/* Fx : Flag for h263+ extra options */
+/**
+ * H.263 advanced intra coding / MPEG-4 AC prediction
+ */
+#define AV_CODEC_FLAG_AC_PRED (1 << 24)
+/**
+ * interlaced motion estimation
+ */
+#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
+/**
+ * Allow non spec compliant speedup tricks.
+ */
+#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
+
+#define AV_CODEC_FLAG2_FAST (1 << 0)
+/**
+ * Skip bitstream encoding.
+ */
+#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
+/**
+ * Place global headers at every keyframe instead of in extradata.
+ */
+#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
+
+/**
+ * timecode is in drop frame format. DEPRECATED!!!!
+ */
+#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
+
+/**
+ * Input bitstream might be truncated at a packet boundaries
+ * instead of only at frame boundaries.
+ */
+#define AV_CODEC_FLAG2_CHUNKS (1 << 15)
+/**
+ * Discard cropping information from SPS.
+ */
+#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
+
+/**
+ * Show all frames before the first keyframe
+ */
+#define AV_CODEC_FLAG2_SHOW_ALL 0x00400000
+/**
+ * Export motion vectors through frame side data
+ */
+#define AV_CODEC_FLAG2_EXPORT_MVS 0x10000000
+/**
+ * Do not skip samples and export skip information as frame side data
+ */
+#define AV_CODEC_FLAG2_SKIP_MANUAL 0x20000000
+
+/**
+ * Allow decoders to produce frames with data planes that are not aligned
+ * to CPU requirements (e.g. due to cropping).
+ */
#define CODEC_FLAG_UNALIGNED 0x0001
#define CODEC_FLAG_QSCALE 0x0002 ///< Use fixed qscale.
#define CODEC_FLAG_4MV 0x0004 ///< 4 MV per MB allowed / advanced prediction for H.263.
@@ -1357,14 +1471,14 @@ typedef struct AVCodecContext {
#define FF_COMPRESSION_DEFAULT -1
/**
- * CODEC_FLAG_*.
+ * AV_CODEC_FLAG_*.
* - encoding: Set by user.
* - decoding: Set by user.
*/
int flags;
/**
- * CODEC_FLAG2_*
+ * AV_CODEC_FLAG2_*
* - encoding: Set by user.
* - decoding: Set by user.
*/
@@ -2702,7 +2816,7 @@ typedef struct AVCodecContext {
/**
* error
- * - encoding: Set by libavcodec if flags&CODEC_FLAG_PSNR.
+ * - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.
* - decoding: unused
*/
uint64_t error[AV_NUM_DATA_POINTERS];
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index a1b389f..8dca7c5 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -2000,7 +2000,7 @@ static av_cold int dca_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
dca_init_vlcs();
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c
index ef918b0..64c4447 100644
--- a/libavcodec/dnxhddata.c
+++ b/libavcodec/dnxhddata.c
@@ -1119,7 +1119,7 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) {
const CIDEntry *cid = &ff_dnxhd_cid_table[i];
if (cid->width == avctx->width && cid->height == avctx->height &&
- cid->interlaced == !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT) &&
+ cid->interlaced == !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) &&
cid->bit_depth == bit_depth) {
for (j = 0; j < FF_ARRAY_ELEMS(cid->bit_rates); j++) {
if (cid->bit_rates[j] == mbs)
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index a1376d3..d38a657 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -395,7 +395,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
ctx->idsp.idct_put(dest_y + dct_y_offset, dct_linesize_luma, ctx->blocks[4]);
ctx->idsp.idct_put(dest_y + dct_y_offset + dct_x_offset, dct_linesize_luma, ctx->blocks[5]);
- if (!(ctx->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(ctx->avctx->flags & AV_CODEC_FLAG_GRAY)) {
dct_y_offset = dct_linesize_chroma << 3;
ctx->idsp.idct_put(dest_u, dct_linesize_chroma, ctx->blocks[2]);
ctx->idsp.idct_put(dest_v, dct_linesize_chroma, ctx->blocks[3]);
@@ -408,7 +408,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
ctx->idsp.idct_put(dest_y + dct_y_offset, dct_linesize_luma, ctx->blocks[6]);
ctx->idsp.idct_put(dest_y + dct_y_offset + dct_x_offset, dct_linesize_luma, ctx->blocks[7]);
- if (!(ctx->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(ctx->avctx->flags & AV_CODEC_FLAG_GRAY)) {
dct_y_offset = dct_linesize_chroma << 3;
ctx->idsp.idct_put(dest_u, dct_linesize_chroma, ctx->blocks[2]);
ctx->idsp.idct_put(dest_u + dct_x_offset, dct_linesize_chroma, ctx->blocks[3]);
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 5a6a566..9985deb 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -351,7 +351,7 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
ctx->m.mb_height = (avctx->height + 15) / 16;
ctx->m.mb_width = (avctx->width + 15) / 16;
- if (avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
+ if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
ctx->interlaced = 1;
ctx->m.mb_height /= 2;
}
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index d797489..0d1dd1d 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -207,7 +207,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
memcpy (buf + 8, "V1.0", 4);
write32(buf + 20, 1); /* new image */
write32(buf + 24, HEADER_SIZE);
- if (!(avctx->flags & CODEC_FLAG_BITEXACT))
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT))
memcpy (buf + 160, LIBAVCODEC_IDENT, FFMIN(sizeof(LIBAVCODEC_IDENT), 100));
write32(buf + 660, 0xFFFFFFFF); /* unencrypted */
diff --git a/libavcodec/dump_extradata_bsf.c b/libavcodec/dump_extradata_bsf.c
index 568f920..d40a52a 100644
--- a/libavcodec/dump_extradata_bsf.c
+++ b/libavcodec/dump_extradata_bsf.c
@@ -30,7 +30,7 @@ static int dump_extradata(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx,
int cmd= args ? *args : 0;
/* cast to avoid warning about discarding qualifiers */
if(avctx->extradata){
- if( (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER) && cmd=='a')
+ if( (keyframe && (avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER) && cmd == 'a')
||(keyframe && (cmd=='k' || !cmd))
||(cmd=='e')
/*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
index 3f9c525..5bd0114 100644
--- a/libavcodec/dvenc.c
+++ b/libavcodec/dvenc.c
@@ -204,7 +204,7 @@ static av_always_inline PutBitContext *dv_encode_ac(EncBlockInfo *bi,
static av_always_inline int dv_guess_dct_mode(DVVideoContext *s, uint8_t *data,
int linesize)
{
- if (s->avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
+ if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
int ps = s->ildct_cmp(NULL, data, NULL, linesize, 8) - 400;
if (ps > 0) {
int is = s->ildct_cmp(NULL, data, NULL, linesize << 1, 4) +
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index c8e3f71..19c479d 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -284,7 +284,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
case 5:
if (!tmpptr) {
av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
- if (!(avctx->flags2 & CODEC_FLAG2_SHOW_ALL))
+ if (!(avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL))
return AVERROR_INVALIDDATA;
}
frame->key_frame = 0;
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 7fef1c8..f19dbc8 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -101,7 +101,7 @@ static inline void comp_block(MadContext *t, AVFrame *frame,
frame->linesize[0],
t->last_frame->data[0] + offset,
t->last_frame->linesize[0], add);
- } else if (!(t->avctx->flags & CODEC_FLAG_GRAY)) {
+ } else if (!(t->avctx->flags & AV_CODEC_FLAG_GRAY)) {
int index = j - 3;
unsigned offset = (mb_y * 8 + (mv_y/2))*t->last_frame->linesize[index] + mb_x * 8 + (mv_x/2);
if (offset >= (t->avctx->height/2 - 7) * t->last_frame->linesize[index] - 7)
@@ -120,7 +120,7 @@ static inline void idct_put(MadContext *t, AVFrame *frame, int16_t *block,
ff_ea_idct_put_c(
frame->data[0] + (mb_y*16 + ((j&2)<<2))*frame->linesize[0] + mb_x*16 + ((j&1)<<3),
frame->linesize[0], block);
- } else if (!(t->avctx->flags & CODEC_FLAG_GRAY)) {
+ } else if (!(t->avctx->flags & AV_CODEC_FLAG_GRAY)) {
int index = j - 3;
ff_ea_idct_put_c(
frame->data[index] + (mb_y*8)*frame->linesize[index] + mb_x*8,
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index 771dc2f..998f0a6 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -116,7 +116,7 @@ static void tgq_idct_put_mb(TgqContext *s, int16_t (*block)[64], AVFrame *frame,
ff_ea_idct_put_c(dest_y + 8, linesize, block[1]);
ff_ea_idct_put_c(dest_y + 8 * linesize , linesize, block[2]);
ff_ea_idct_put_c(dest_y + 8 * linesize + 8, linesize, block[3]);
- if (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
ff_ea_idct_put_c(dest_cb, frame->linesize[1], block[4]);
ff_ea_idct_put_c(dest_cr, frame->linesize[2], block[5]);
}
@@ -142,7 +142,7 @@ static void tgq_idct_put_mb_dconly(TgqContext *s, AVFrame *frame,
tgq_dconly(s, dest_y + 8, linesize, dc[1]);
tgq_dconly(s, dest_y + 8 * linesize, linesize, dc[2]);
tgq_dconly(s, dest_y + 8 * linesize + 8, linesize, dc[3]);
- if (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
tgq_dconly(s, dest_cb, frame->linesize[1], dc[4]);
tgq_dconly(s, dest_cr, frame->linesize[2], dc[5]);
}
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 34fc30d..d69ba5b 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -85,7 +85,7 @@ static inline void tqi_idct_put(TqiContext *t, AVFrame *frame, int16_t (*block)[
ff_ea_idct_put_c(dest_y + 8, linesize, block[1]);
ff_ea_idct_put_c(dest_y + 8*linesize , linesize, block[2]);
ff_ea_idct_put_c(dest_y + 8*linesize + 8, linesize, block[3]);
- if(!(s->avctx->flags&CODEC_FLAG_GRAY)) {
+ if(!(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
ff_ea_idct_put_c(dest_cb, frame->linesize[1], block[4]);
ff_ea_idct_put_c(dest_cr, frame->linesize[2], block[5]);
}
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 4aab82f..525cd39 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -312,7 +312,7 @@ static av_always_inline int encode_line(FFV1Context *s, int w,
diff = fold(diff, bits);
if (s->ac) {
- if (s->flags & CODEC_FLAG_PASS1) {
+ if (s->flags & AV_CODEC_FLAG_PASS1) {
put_symbol_inline(c, p->state[context], diff, 1, s->rc_stat,
s->rc_stat2[p->quant_table_index][context]);
} else {
@@ -672,7 +672,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->version = 0;
- if ((avctx->flags & (CODEC_FLAG_PASS1|CODEC_FLAG_PASS2)) || avctx->slices>1)
+ if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) ||
+ avctx->slices > 1)
s->version = FFMAX(s->version, 2);
// Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability
@@ -867,7 +868,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
s->picture_number = 0;
- if (avctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2)) {
+ if (avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) {
for (i = 0; i < s->quant_table_count; i++) {
s->rc_stat2[i] = av_mallocz(s->context_count[i] *
sizeof(*s->rc_stat2[i]));
@@ -980,7 +981,7 @@ slices_ok:
return ret;
#define STATS_OUT_SIZE 1024 * 1024 * 6
- if (avctx->flags & CODEC_FLAG_PASS1) {
+ if (avctx->flags & AV_CODEC_FLAG_PASS1) {
avctx->stats_out = av_mallocz(STATS_OUT_SIZE);
if (!avctx->stats_out)
return AVERROR(ENOMEM);
@@ -1200,7 +1201,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
+ avctx->width*avctx->height*35LL*4;
if(!pict) {
- if (avctx->flags & CODEC_FLAG_PASS1) {
+ if (avctx->flags & AV_CODEC_FLAG_PASS1) {
int j, k, m;
char *p = avctx->stats_out;
char *end = p + STATS_OUT_SIZE;
@@ -1315,7 +1316,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
buf_p += bytes;
}
- if (avctx->flags & CODEC_FLAG_PASS1)
+ if (avctx->flags & AV_CODEC_FLAG_PASS1)
avctx->stats_out[0] = '\0';
#if FF_API_CODED_FRAME
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index 9a49fea..8e40532 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -127,7 +127,7 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
if( !avctx->thread_count
&& avctx->codec_id == AV_CODEC_ID_MJPEG
- && !(avctx->flags & CODEC_FLAG_QSCALE)) {
+ && !(avctx->flags & AV_CODEC_FLAG_QSCALE)) {
av_log(avctx, AV_LOG_DEBUG,
"Forcing thread count to 1 for MJPEG encoding, use -thread_type slice "
"or a constant quantizer if you want to use multiple cpu cores\n");
@@ -135,7 +135,7 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
}
if( avctx->thread_count > 1
&& avctx->codec_id == AV_CODEC_ID_MJPEG
- && !(avctx->flags & CODEC_FLAG_QSCALE))
+ && !(avctx->flags & AV_CODEC_FLAG_QSCALE))
av_log(avctx, AV_LOG_WARNING,
"MJPEG CBR encoding works badly with frame multi-threading, consider "
"using -threads 1, -thread_type slice or a constant quantizer.\n");
@@ -143,7 +143,7 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
if (avctx->codec_id == AV_CODEC_ID_HUFFYUV ||
avctx->codec_id == AV_CODEC_ID_FFVHUFF) {
int warn = 0;
- if (avctx->flags & CODEC_FLAG_PASS1)
+ if (avctx->flags & AV_CODEC_FLAG_PASS1)
warn = 1;
else if(avctx->context_model > 0) {
AVDictionaryEntry *t = av_dict_get(options, "non_deterministic",
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 904073e..3c3f169 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -116,7 +116,7 @@ static inline int h263_get_motion_length(int val, int f_code){
}
static inline void ff_h263_encode_motion_vector(MpegEncContext * s, int x, int y, int f_code){
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) {
skip_put_bits(&s->pb,
h263_get_motion_length(x, f_code)
+h263_get_motion_length(y, f_code));
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 15f073a..86417bd 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -50,7 +50,7 @@ static enum AVPixelFormat h263_get_format(AVCodecContext *avctx)
if (avctx->codec->id == AV_CODEC_ID_MSS2)
return AV_PIX_FMT_YUV420P;
- if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY)) {
+ if (CONFIG_GRAY && (avctx->flags & AV_CODEC_FLAG_GRAY)) {
if (avctx->color_range == AVCOL_RANGE_UNSPECIFIED)
avctx->color_range = AVCOL_RANGE_MPEG;
return AV_PIX_FMT_GRAY8;
@@ -165,7 +165,7 @@ static int get_consumed_bytes(MpegEncContext *s, int buf_size)
/* We would have to scan through the whole buf to handle the weird
* reordering ... */
return buf_size;
- } else if (s->avctx->flags & CODEC_FLAG_TRUNCATED) {
+ } else if (s->avctx->flags & AV_CODEC_FLAG_TRUNCATED) {
pos -= s->parse_context.last_index;
// padding is not really read so this might be -1
if (pos < 0)
@@ -430,7 +430,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return 0;
}
- if (s->avctx->flags & CODEC_FLAG_TRUNCATED) {
+ if (s->avctx->flags & AV_CODEC_FLAG_TRUNCATED) {
int next;
if (CONFIG_MPEG4_DECODER && s->codec_id == AV_CODEC_ID_MPEG4) {
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index bfad253..cb4b6c1 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -293,7 +293,7 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, H264SliceContext *sl,
if(i>=length-1){ //no escaped 0
*dst_length= length;
*consumed= length+1; //+1 for the header
- if(h->avctx->flags2 & CODEC_FLAG2_FAST){
+ if(h->avctx->flags2 & AV_CODEC_FLAG2_FAST){
return src;
}else{
memcpy(dst, src, length);
@@ -1392,7 +1392,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
if(!h->slice_context_count)
h->slice_context_count= 1;
h->max_contexts = h->slice_context_count;
- if (!(avctx->flags2 & CODEC_FLAG2_CHUNKS)) {
+ if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {
h->current_slice = 0;
if (!h->first_field)
h->cur_pic_ptr = NULL;
@@ -1546,8 +1546,8 @@ again:
// "recovered".
if (h->nal_unit_type == NAL_IDR_SLICE)
h->frame_recovered |= FRAME_RECOVERED_IDR;
- h->frame_recovered |= 3*!!(avctx->flags2 & CODEC_FLAG2_SHOW_ALL);
- h->frame_recovered |= 3*!!(avctx->flags & CODEC_FLAG_OUTPUT_CORRUPT);
+ h->frame_recovered |= 3*!!(avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL);
+ h->frame_recovered |= 3*!!(avctx->flags & AV_CODEC_FLAG_OUTPUT_CORRUPT);
#if 1
h->cur_pic_ptr->recovered |= h->frame_recovered;
#else
@@ -1555,7 +1555,7 @@ again:
#endif
if (h->current_slice == 1) {
- if (!(avctx->flags2 & CODEC_FLAG2_CHUNKS))
+ if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS))
decode_postinit(h, nal_index >= nals_needed);
if (h->avctx->hwaccel &&
@@ -1831,7 +1831,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
goto out;
}
- if (!(avctx->flags2 & CODEC_FLAG2_CHUNKS) && !h->cur_pic_ptr) {
+ if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) && !h->cur_pic_ptr) {
if (avctx->skip_frame >= AVDISCARD_NONREF ||
buf_size >= 4 && !memcmp("Q264", buf, 4))
return buf_size;
@@ -1839,9 +1839,9 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- if (!(avctx->flags2 & CODEC_FLAG2_CHUNKS) ||
+ if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS) ||
(h->mb_y >= h->mb_height && h->mb_height)) {
- if (avctx->flags2 & CODEC_FLAG2_CHUNKS)
+ if (avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)
decode_postinit(h, 1);
ff_h264_field_end(h, &h->slice_ctx[0], 0);
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index cb91134..0014927 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -242,7 +242,7 @@ static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
unsigned int uvlinesize,
int pixel_shift)
{
- int chroma = CHROMA(h) && !(CONFIG_GRAY && (h->flags&CODEC_FLAG_GRAY));
+ int chroma = CHROMA(h) && !(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
int chroma444 = CHROMA444(h);
int chroma422 = CHROMA422(h);
@@ -723,7 +723,7 @@ void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl,
const int mb_type = h->cur_pic.mb_type[mb_xy];
const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4;
int first_vertical_edge_done = 0;
- int chroma = CHROMA(h) && !(CONFIG_GRAY && (h->flags&CODEC_FLAG_GRAY));
+ int chroma = CHROMA(h) && !(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
int a = 52 + sl->slice_alpha_c0_offset - qp_bd_offset;
int b = 52 + sl->slice_beta_offset - qp_bd_offset;
diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c
index 634d814..8302de0 100644
--- a/libavcodec/h264_mb.c
+++ b/libavcodec/h264_mb.c
@@ -250,7 +250,7 @@ static av_always_inline void mc_dir_part(const H264Context *h, H264SliceContext
if (!square)
qpix_op[luma_xy](dest_y + delta, src_y + delta, sl->mb_linesize);
- if (CONFIG_GRAY && h->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && h->flags & AV_CODEC_FLAG_GRAY)
return;
if (chroma_idc == 3 /* yuv444 */) {
@@ -425,7 +425,7 @@ static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceCon
int weight1 = 64 - weight0;
luma_weight_avg(dest_y, tmp_y, sl->mb_linesize,
height, 5, weight0, weight1, 0);
- if (!CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
chroma_weight_avg(dest_cb, tmp_cb, sl->mb_uvlinesize,
chroma_height, 5, weight0, weight1, 0);
chroma_weight_avg(dest_cr, tmp_cr, sl->mb_uvlinesize,
@@ -438,7 +438,7 @@ static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceCon
sl->luma_weight[refn1][1][0],
sl->luma_weight[refn0][0][1] +
sl->luma_weight[refn1][1][1]);
- if (!CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
chroma_weight_avg(dest_cb, tmp_cb, sl->mb_uvlinesize, chroma_height,
sl->chroma_log2_weight_denom,
sl->chroma_weight[refn0][0][0][0],
@@ -465,7 +465,7 @@ static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceCon
sl->luma_log2_weight_denom,
sl->luma_weight[refn][list][0],
sl->luma_weight[refn][list][1]);
- if (!CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
if (sl->use_weight_chroma) {
chroma_weight_op(dest_cb, sl->mb_uvlinesize, chroma_height,
sl->chroma_log2_weight_denom,
@@ -566,7 +566,7 @@ static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceConte
XCHG(sl->top_borders[top_idx][sl->mb_x + 1],
src_y + (17 << pixel_shift), 1);
}
- if (simple || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (simple || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
if (chroma444) {
if (deblock_topleft) {
XCHG(top_border_m1 + (24 << pixel_shift), src_cb - (7 << pixel_shift), 1);
diff --git a/libavcodec/h264_mb_template.c b/libavcodec/h264_mb_template.c
index bc68a73..54420b9 100644
--- a/libavcodec/h264_mb_template.c
+++ b/libavcodec/h264_mb_template.c
@@ -112,7 +112,7 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
for (j = 0; j < 16; j++)
tmp_y[j] = get_bits(&gb, bit_depth);
}
- if (SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (SIMPLE || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
if (!h->sps.chroma_format_idc) {
for (i = 0; i < block_h; i++) {
uint16_t *tmp_cb = (uint16_t *)(dest_cb + i * uvlinesize);
@@ -137,7 +137,7 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
} else {
for (i = 0; i < 16; i++)
memcpy(dest_y + i * linesize, sl->intra_pcm_ptr + i * 16, 16);
- if (SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (SIMPLE || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
if (!h->sps.chroma_format_idc) {
for (i = 0; i < 8; i++) {
memset(dest_cb + i * uvlinesize, 1 << (bit_depth - 1), 8);
@@ -159,7 +159,7 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
xchg_mb_border(h, sl, dest_y, dest_cb, dest_cr, linesize,
uvlinesize, 1, 0, SIMPLE, PIXEL_SHIFT);
- if (SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (SIMPLE || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
h->hpc.pred8x8[sl->chroma_pred_mode](dest_cb, uvlinesize);
h->hpc.pred8x8[sl->chroma_pred_mode](dest_cr, uvlinesize);
}
@@ -190,7 +190,7 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
hl_decode_mb_idct_luma(h, sl, mb_type, is_h264, SIMPLE, transform_bypass,
PIXEL_SHIFT, block_offset, linesize, dest_y, 0);
- if ((SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) &&
+ if ((SIMPLE || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) &&
(sl->cbp & 0x30)) {
uint8_t *dest[2] = { dest_cb, dest_cr };
if (transform_bypass) {
@@ -280,7 +280,7 @@ static av_noinline void FUNC(hl_decode_mb_444)(const H264Context *h, H264SliceCo
int i, j, p;
const int *block_offset = &h->block_offset[0];
const int transform_bypass = !SIMPLE && (sl->qscale == 0 && h->sps.transform_bypass);
- const int plane_count = (SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) ? 3 : 1;
+ const int plane_count = (SIMPLE || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) ? 3 : 1;
for (p = 0; p < plane_count; p++) {
dest[p] = h->cur_pic.f->data[p] +
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index ae1b60a..52d235c 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -464,7 +464,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h, int ignore_truncation)
int width = 16 * sps->mb_width;
int height = 16 * sps->mb_height * (2 - sps->frame_mbs_only_flag);
- if (h->avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
+ if (h->avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) {
av_log(h->avctx, AV_LOG_DEBUG, "discarding sps cropping, original "
"values are l:%d r:%d t:%d b:%d\n",
crop_left, crop_right, crop_top, crop_bottom);
@@ -481,7 +481,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h, int ignore_truncation)
int step_y = (2 - sps->frame_mbs_only_flag) << vsub;
if (crop_left & (0x1F >> (sps->bit_depth_luma > 8)) &&
- !(h->avctx->flags & CODEC_FLAG_UNALIGNED)) {
+ !(h->avctx->flags & AV_CODEC_FLAG_UNALIGNED)) {
crop_left &= ~(0x1F >> (sps->bit_depth_luma > 8));
av_log(h->avctx, AV_LOG_WARNING,
"Reducing left cropping to %d "
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 10a50bb..cfbe88e 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -246,7 +246,7 @@ static int alloc_picture(H264Context *h, H264Picture *pic)
pic->hwaccel_picture_private = pic->hwaccel_priv_buf->data;
}
}
- if (CONFIG_GRAY && !h->avctx->hwaccel && h->flags & CODEC_FLAG_GRAY && pic->f->data[2]) {
+ if (CONFIG_GRAY && !h->avctx->hwaccel && h->flags & AV_CODEC_FLAG_GRAY && pic->f->data[2]) {
int h_chroma_shift, v_chroma_shift;
av_pix_fmt_get_chroma_sub_sample(pic->f->format,
&h_chroma_shift, &v_chroma_shift);
@@ -685,7 +685,7 @@ static av_always_inline void backup_mb_border(const H264Context *h, H264SliceCon
AV_COPY128(top_border, src_y + 15 * linesize);
if (pixel_shift)
AV_COPY128(top_border + 16, src_y + 15 * linesize + 16);
- if (simple || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (simple || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
if (chroma444) {
if (pixel_shift) {
AV_COPY128(top_border + 32, src_cb + 15 * uvlinesize);
@@ -728,7 +728,7 @@ static av_always_inline void backup_mb_border(const H264Context *h, H264SliceCon
if (pixel_shift)
AV_COPY128(top_border + 16, src_y + 16 * linesize + 16);
- if (simple || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
+ if (simple || !CONFIG_GRAY || !(h->flags & AV_CODEC_FLAG_GRAY)) {
if (chroma444) {
if (pixel_shift) {
AV_COPY128(top_border + 32, src_cb + 16 * linesize);
@@ -1282,7 +1282,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
h->chroma_format_idc != h->sps.chroma_format_idc)
needs_reinit = 1;
- if (h->flags & CODEC_FLAG_LOW_DELAY ||
+ if (h->flags & AV_CODEC_FLAG_LOW_DELAY ||
(h->sps.bitstream_restriction_flag &&
!h->sps.num_reorder_frames)) {
if (h->avctx->has_b_frames > 1 || h->delayed_pic[0])
@@ -1829,7 +1829,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
sl->deblocking_filter = 0;
if (sl->deblocking_filter == 1 && h->max_contexts > 1) {
- if (h->avctx->flags2 & CODEC_FLAG2_FAST) {
+ if (h->avctx->flags2 & AV_CODEC_FLAG2_FAST) {
/* Cheat slightly for speed:
* Do not bother to deblock across slices. */
sl->deblocking_filter = 2;
@@ -2327,7 +2327,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
avctx->codec_id != AV_CODEC_ID_H264 ||
- (CONFIG_GRAY && (h->flags & CODEC_FLAG_GRAY));
+ (CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->slice_ctx[0].er.error_status_table) {
const int start_i = av_clip(sl->resync_mb_x + sl->resync_mb_y * h->mb_width, 0, h->mb_num - 1);
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 016dec0..d507c9b 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -585,7 +585,7 @@ static void decode_vui(GetBitContext *gb, AVCodecContext *avctx,
vui->def_disp_win.bottom_offset = get_ue_golomb_long(gb) * 2;
if (apply_defdispwin &&
- avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
+ avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) {
av_log(avctx, AV_LOG_DEBUG,
"discarding vui default display window, "
"original values are l:%u r:%u t:%u b:%u\n",
@@ -853,7 +853,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
sps->pic_conf_win.top_offset = get_ue_golomb_long(gb) * 2;
sps->pic_conf_win.bottom_offset = get_ue_golomb_long(gb) * 2;
- if (avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
+ if (avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) {
av_log(avctx, AV_LOG_DEBUG,
"discarding sps conformance window, "
"original values are l:%u r:%u t:%u b:%u\n",
@@ -1057,7 +1057,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
sps->output_window.bottom_offset += sps->vui.def_disp_win.bottom_offset;
}
if (sps->output_window.left_offset & (0x1F >> (sps->pixel_shift)) &&
- !(avctx->flags & CODEC_FLAG_UNALIGNED)) {
+ !(avctx->flags & AV_CODEC_FLAG_UNALIGNED)) {
sps->output_window.left_offset &= ~(0x1F >> (sps->pixel_shift));
av_log(avctx, AV_LOG_WARNING, "Reducing left output window to %d "
"chroma samples to preserve alignment.\n",
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index a99ac71..4751bb0 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -1038,7 +1038,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
decode_422_bitstream(s, width - 2);
lefty = s->hdsp.add_hfyu_left_pred(p->data[0] + 2, s->temp[0],
width - 2, lefty);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
leftu = s->hdsp.add_hfyu_left_pred(p->data[1] + 1, s->temp[1], width2 - 1, leftu);
leftv = s->hdsp.add_hfyu_left_pred(p->data[2] + 1, s->temp[2], width2 - 1, leftv);
}
@@ -1071,14 +1071,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
decode_422_bitstream(s, width);
lefty = s->hdsp.add_hfyu_left_pred(ydst, s->temp[0],
width, lefty);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
leftu = s->hdsp.add_hfyu_left_pred(udst, s->temp[1], width2, leftu);
leftv = s->hdsp.add_hfyu_left_pred(vdst, s->temp[2], width2, leftv);
}
if (s->predictor == PLANE) {
if (cy > s->interlaced) {
s->hdsp.add_bytes(ydst, ydst - fake_ystride, width);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
s->hdsp.add_bytes(udst, udst - fake_ustride, width2);
s->hdsp.add_bytes(vdst, vdst - fake_vstride, width2);
}
@@ -1093,7 +1093,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
decode_422_bitstream(s, width - 2);
lefty = s->hdsp.add_hfyu_left_pred(p->data[0] + 2, s->temp[0],
width - 2, lefty);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
leftu = s->hdsp.add_hfyu_left_pred(p->data[1] + 1, s->temp[1], width2 - 1, leftu);
leftv = s->hdsp.add_hfyu_left_pred(p->data[2] + 1, s->temp[2], width2 - 1, leftv);
}
@@ -1105,7 +1105,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
decode_422_bitstream(s, width);
lefty = s->hdsp.add_hfyu_left_pred(p->data[0] + p->linesize[0],
s->temp[0], width, lefty);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
leftu = s->hdsp.add_hfyu_left_pred(p->data[1] + p->linesize[2], s->temp[1], width2, leftu);
leftv = s->hdsp.add_hfyu_left_pred(p->data[2] + p->linesize[1], s->temp[2], width2, leftv);
}
@@ -1117,7 +1117,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
decode_422_bitstream(s, 4);
lefty = s->hdsp.add_hfyu_left_pred(p->data[0] + fake_ystride,
s->temp[0], 4, lefty);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
leftu = s->hdsp.add_hfyu_left_pred(p->data[1] + fake_ustride, s->temp[1], 2, leftu);
leftv = s->hdsp.add_hfyu_left_pred(p->data[2] + fake_vstride, s->temp[2], 2, leftv);
}
@@ -1128,7 +1128,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->hdsp.add_hfyu_median_pred(p->data[0] + fake_ystride + 4,
p->data[0] + 4, s->temp[0],
width - 4, &lefty, &lefttopy);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
lefttopu = p->data[1][1];
lefttopv = p->data[2][1];
s->hdsp.add_hfyu_median_pred(p->data[1] + fake_ustride + 2, p->data[1] + 2, s->temp[1], width2 - 2, &leftu, &lefttopu);
@@ -1163,7 +1163,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->hdsp.add_hfyu_median_pred(ydst, ydst - fake_ystride,
s->temp[0], width,
&lefty, &lefttopy);
- if (!(s->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->flags & AV_CODEC_FLAG_GRAY)) {
s->hdsp.add_hfyu_median_pred(udst, udst - fake_ustride, s->temp[1], width2, &leftu, &lefttopu);
s->hdsp.add_hfyu_median_pred(vdst, vdst - fake_vstride, s->temp[2], width2, &leftv, &lefttopv);
}
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 994b21f..9c41f52 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -220,7 +220,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
ff_huffyuvencdsp_init(&s->hencdsp);
avctx->extradata = av_mallocz(3*MAX_N + 4);
- if (s->flags&CODEC_FLAG_PASS1) {
+ if (s->flags&AV_CODEC_FLAG_PASS1) {
#define STATS_OUT_SIZE 21*MAX_N*3 + 4
avctx->stats_out = av_mallocz(STATS_OUT_SIZE); // 21*256*3(%llu ) + 3(\n) + 1(0) = 16132
if (!avctx->stats_out)
@@ -314,10 +314,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->bits_per_coded_sample = s->bitstream_bpp;
s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
s->predictor = avctx->prediction_method;
- s->interlaced = avctx->flags&CODEC_FLAG_INTERLACED_ME ? 1 : 0;
+ s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0;
if (avctx->context_model == 1) {
s->context = avctx->context_model;
- if (s->flags & (CODEC_FLAG_PASS1|CODEC_FLAG_PASS2)) {
+ if (s->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) {
av_log(avctx, AV_LOG_ERROR,
"context=1 is not compatible with "
"2 pass huffyuv encoding\n");
@@ -454,7 +454,7 @@ static int encode_422_bitstream(HYuvContext *s, int offset, int count)
count /= 2;
- if (s->flags & CODEC_FLAG_PASS1) {
+ if (s->flags & AV_CODEC_FLAG_PASS1) {
for(i = 0; i < count; i++) {
LOAD4;
s->stats[0][y0]++;
@@ -463,7 +463,7 @@ static int encode_422_bitstream(HYuvContext *s, int offset, int count)
s->stats[2][v0]++;
}
}
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)
return 0;
if (s->context) {
for (i = 0; i < count; i++) {
@@ -539,7 +539,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
put_bits(&s->pb, 2, y1&3);
if (s->bps <= 8) {
- if (s->flags & CODEC_FLAG_PASS1) {
+ if (s->flags & AV_CODEC_FLAG_PASS1) {
for (i = 0; i < count; i++) {
LOAD2;
STAT2;
@@ -549,7 +549,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
STATEND;
}
}
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)
return 0;
if (s->context) {
@@ -575,7 +575,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
}
} else if (s->bps <= 14) {
int mask = s->n - 1;
- if (s->flags & CODEC_FLAG_PASS1) {
+ if (s->flags & AV_CODEC_FLAG_PASS1) {
for (i = 0; i < count; i++) {
LOAD2_14;
STAT2;
@@ -585,7 +585,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
STATEND;
}
}
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)
return 0;
if (s->context) {
@@ -610,7 +610,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
}
}
} else {
- if (s->flags & CODEC_FLAG_PASS1) {
+ if (s->flags & AV_CODEC_FLAG_PASS1) {
for (i = 0; i < count; i++) {
LOAD2_16;
STAT2_16;
@@ -620,7 +620,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane)
STATEND_16;
}
}
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)
return 0;
if (s->context) {
@@ -672,13 +672,13 @@ static int encode_gray_bitstream(HYuvContext *s, int count)
count /= 2;
- if (s->flags & CODEC_FLAG_PASS1) {
+ if (s->flags & AV_CODEC_FLAG_PASS1) {
for (i = 0; i < count; i++) {
LOAD2;
STAT2;
}
}
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)
return 0;
if (s->context) {
@@ -726,13 +726,13 @@ static inline int encode_bgra_bitstream(HYuvContext *s, int count, int planes)
if (planes == 4) \
put_bits(&s->pb, s->len[2][a], s->bits[2][a]);
- if ((s->flags & CODEC_FLAG_PASS1) &&
- (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)) {
+ if ((s->flags & AV_CODEC_FLAG_PASS1) &&
+ (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)) {
for (i = 0; i < count; i++) {
LOAD_GBRA;
STAT_BGRA;
}
- } else if (s->context || (s->flags & CODEC_FLAG_PASS1)) {
+ } else if (s->context || (s->flags & AV_CODEC_FLAG_PASS1)) {
for (i = 0; i < count; i++) {
LOAD_GBRA;
STAT_BGRA;
@@ -1000,7 +1000,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
put_bits(&s->pb, 15, 0);
size /= 4;
- if ((s->flags&CODEC_FLAG_PASS1) && (s->picture_number & 31) == 0) {
+ if ((s->flags & AV_CODEC_FLAG_PASS1) && (s->picture_number & 31) == 0) {
int j;
char *p = avctx->stats_out;
char *end = p + STATS_OUT_SIZE;
@@ -1017,7 +1017,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
} else if (avctx->stats_out)
avctx->stats_out[0] = '\0';
- if (!(s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)) {
+ if (!(s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)) {
flush_put_bits(&s->pb);
s->bdsp.bswap_buf((uint32_t *) pkt->data, (uint32_t *) pkt->data, size);
}
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index e15ac9c..411dd9c 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -256,7 +256,7 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
return ret;
}
ff_bswapdsp_init(&q->bdsp);
- q->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!q->fdsp) {
ff_fft_end(&q->fft);
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 78a47bf..03f4011 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -453,7 +453,7 @@ void ff_h263_encode_mb(MpegEncContext * s,
int16_t pred_dc;
int16_t rec_intradc[6];
int16_t *dc_ptr[6];
- const int interleaved_stats = s->avctx->flags & CODEC_FLAG_PASS1;
+ const int interleaved_stats = s->avctx->flags & AV_CODEC_FLAG_PASS1;
if (!s->mb_intra) {
/* compute cbp */
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index acf8e1e..4777c6b 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -321,7 +321,7 @@ static int put_com(Jpeg2000EncoderContext *s, int compno)
{
int size = 4 + strlen(LIBAVCODEC_IDENT);
- if (s->avctx->flags & CODEC_FLAG_BITEXACT)
+ if (s->avctx->flags & AV_CODEC_FLAG_BITEXACT)
return 0;
if (s->buf_end - s->buf < size + 2)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 49d4151..d579154 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -467,7 +467,7 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c)
}
c->transform = bytestream2_get_byteu(&s->g); // DWT transformation type
/* set integer 9/7 DWT in case of BITEXACT flag */
- if ((s->avctx->flags & CODEC_FLAG_BITEXACT) && (c->transform == FF_DWT97))
+ if ((s->avctx->flags & AV_CODEC_FLAG_BITEXACT) && (c->transform == FF_DWT97))
c->transform = FF_DWT97_INT;
else if (c->transform == FF_DWT53) {
s->avctx->properties |= FF_CODEC_PROPERTY_LOSSLESS;
diff --git a/libavcodec/libaacplus.c b/libavcodec/libaacplus.c
index 64bdb5e..3bf24c7 100644
--- a/libavcodec/libaacplus.c
+++ b/libavcodec/libaacplus.c
@@ -63,7 +63,7 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
aacplus_cfg->bitRate = avctx->bit_rate;
aacplus_cfg->bandWidth = avctx->cutoff;
- aacplus_cfg->outputFormat = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER);
+ aacplus_cfg->outputFormat = !(avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER);
aacplus_cfg->inputFormat = avctx->sample_fmt == AV_SAMPLE_FMT_FLT ? AACPLUS_INPUT_FLOAT : AACPLUS_INPUT_16BIT;
if (!aacplusEncSetConfiguration(s->aacplus_handle, aacplus_cfg)) {
av_log(avctx, AV_LOG_ERROR, "libaacplus doesn't support this output format!\n");
@@ -74,7 +74,7 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
/* Set decoder specific info */
avctx->extradata_size = 0;
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
unsigned char *buffer = NULL;
unsigned long decoder_specific_info_size;
diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
index 7cc1e95..62a3672 100644
--- a/libavcodec/libdcadec.c
+++ b/libavcodec/libdcadec.c
@@ -206,7 +206,7 @@ static av_cold int dcadec_init(AVCodecContext *avctx)
int flags = 0;
/* Affects only lossy DTS profiles. DTS-HD MA is always bitexact */
- if (avctx->flags & CODEC_FLAG_BITEXACT)
+ if (avctx->flags & AV_CODEC_FLAG_BITEXACT)
flags |= DCADEC_FLAG_CORE_BIT_EXACT;
if (avctx->request_channel_layout > 0 && avctx->request_channel_layout != AV_CH_LAYOUT_NATIVE) {
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index 504629d..98193b4 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -117,7 +117,7 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
faac_cfg->allowMidside = 1;
faac_cfg->bitRate = avctx->bit_rate / avctx->channels;
faac_cfg->bandWidth = avctx->cutoff;
- if(avctx->flags & CODEC_FLAG_QSCALE) {
+ if(avctx->flags & AV_CODEC_FLAG_QSCALE) {
faac_cfg->bitRate = 0;
faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA;
}
@@ -131,7 +131,7 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
/* Set decoder specific info */
avctx->extradata_size = 0;
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
unsigned char *buffer = NULL;
unsigned long decoder_specific_info_size;
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index f886fa9..6896a05 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -184,7 +184,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
goto error;
}
- if (avctx->flags & CODEC_FLAG_QSCALE || s->vbr) {
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE || s->vbr) {
int mode = s->vbr ? s->vbr : avctx->global_quality;
if (mode < 1 || mode > 5) {
av_log(avctx, AV_LOG_WARNING,
@@ -224,7 +224,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
/* Choose bitstream format - if global header is requested, use
* raw access units, otherwise use ADTS. */
if ((err = aacEncoder_SetParam(s->handle, AACENC_TRANSMUX,
- avctx->flags & CODEC_FLAG_GLOBAL_HEADER ? 0 : s->latm ? 10 : 2)) != AACENC_OK) {
+ avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER ? 0 : s->latm ? 10 : 2)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to set the transmux format: %s\n",
aac_get_error(err));
goto error;
@@ -243,7 +243,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
* if using mp4 mode (raw access units, with global header) and
* implicit signaling if using ADTS. */
if (s->signaling < 0)
- s->signaling = avctx->flags & CODEC_FLAG_GLOBAL_HEADER ? 2 : 0;
+ s->signaling = avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER ? 2 : 0;
if ((err = aacEncoder_SetParam(s->handle, AACENC_SIGNALING_MODE,
s->signaling)) != AACENC_OK) {
@@ -289,7 +289,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
avctx->initial_padding = info.encoderDelay;
ff_af_queue_init(avctx, &s->afq);
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
avctx->extradata_size = info.confSize;
avctx->extradata = av_mallocz(avctx->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 78af178..443c7d5 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -111,7 +111,7 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
lame_set_quality(s->gfp, avctx->compression_level);
/* rate control */
- if (avctx->flags & CODEC_FLAG_QSCALE) { // VBR
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE) { // VBR
lame_set_VBR(s->gfp, vbr_default);
lame_set_VBR_quality(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA);
} else {
@@ -159,7 +159,7 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
if (ret < 0)
goto error;
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp) {
ret = AVERROR(ENOMEM);
goto error;
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 1d1342a..50d4453 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -137,7 +137,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
goto fail;
}
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
SFrameBSInfo fbi = { 0 };
int i, size = 0;
(*s->encoder)->EncodeParameterSets(s->encoder, &fbi);
@@ -192,7 +192,7 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
// frames have two layers, where the first layer contains the SPS/PPS.
// If using global headers, don't include the SPS/PPS in the returned
// packet - thus, only return one layer.
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)
first_layer = fbi.iLayerNum - 1;
for (layer = first_layer; layer < fbi.iLayerNum; layer++) {
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 406022b..1e18bf5 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -175,7 +175,7 @@ static av_cold int libschroedinger_encode_init(AVCodecContext *avctx)
}
/* FIXME - Need to handle SCHRO_ENCODER_RATE_CONTROL_LOW_DELAY. */
- if (avctx->flags & CODEC_FLAG_QSCALE) {
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE) {
if (!avctx->global_quality) {
/* lossless coding */
schro_encoder_setting_set_double(p_schro_params->encoder,
@@ -202,14 +202,14 @@ static av_cold int libschroedinger_encode_init(AVCodecContext *avctx)
"bitrate", avctx->bit_rate);
}
- if (avctx->flags & CODEC_FLAG_INTERLACED_ME)
+ if (avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)
/* All material can be coded as interlaced or progressive
irrespective of the type of source material. */
schro_encoder_setting_set_double(p_schro_params->encoder,
"interlaced_coding", 1);
schro_encoder_setting_set_double(p_schro_params->encoder, "open_gop",
- !(avctx->flags & CODEC_FLAG_CLOSED_GOP));
+ !(avctx->flags & AV_CODEC_FLAG_CLOSED_GOP));
/* FIXME: Signal range hardcoded to 8-bit data until both libschroedinger
* and libdirac support other bit-depth data. */
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 9554a3d..9486ab1 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -40,7 +40,7 @@
* used to set the encoding mode.
*
* Rate Control
- * VBR mode is turned on by setting CODEC_FLAG_QSCALE in avctx->flags.
+ * VBR mode is turned on by setting AV_CODEC_FLAG_QSCALE in avctx->flags.
* avctx->global_quality is used to set the encoding quality.
* For CBR mode, avctx->bit_rate can be used to set the constant bitrate.
* Alternatively, the 'cbr_quality' option can be set from 0 to 10 to set
@@ -177,7 +177,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
speex_init_header(&s->header, avctx->sample_rate, avctx->channels, mode);
/* rate control method and parameters */
- if (avctx->flags & CODEC_FLAG_QSCALE) {
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE) {
/* VBR */
s->header.vbr = 1;
s->vad = 1; /* VAD is always implicitly activated for VBR */
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 8e13af6..5042f39 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -210,7 +210,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
}
avcodec_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift);
- if (avc_context->flags & CODEC_FLAG_QSCALE) {
+ if (avc_context->flags & AV_CODEC_FLAG_QSCALE) {
/* Clip global_quality in QP units to the [0 - 10] range
to be consistent with the libvorbis implementation.
Theora accepts a quality parameter which is an int value in
@@ -241,10 +241,10 @@ static av_cold int encode_init(AVCodecContext* avc_context)
}
// need to enable 2 pass (via TH_ENCCTL_2PASS_) before encoding headers
- if (avc_context->flags & CODEC_FLAG_PASS1) {
+ if (avc_context->flags & AV_CODEC_FLAG_PASS1) {
if ((ret = get_stats(avc_context, 0)) < 0)
return ret;
- } else if (avc_context->flags & CODEC_FLAG_PASS2) {
+ } else if (avc_context->flags & AV_CODEC_FLAG_PASS2) {
if ((ret = submit_stats(avc_context)) < 0)
return ret;
}
@@ -281,7 +281,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
// EOS, finish and get 1st pass stats if applicable
if (!frame) {
th_encode_packetout(h->t_state, 1, &o_packet);
- if (avc_context->flags & CODEC_FLAG_PASS1)
+ if (avc_context->flags & AV_CODEC_FLAG_PASS1)
if ((ret = get_stats(avc_context, 1)) < 0)
return ret;
return 0;
@@ -295,7 +295,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
t_yuv_buffer[i].data = frame->data[i];
}
- if (avc_context->flags & CODEC_FLAG_PASS2)
+ if (avc_context->flags & AV_CODEC_FLAG_PASS2)
if ((ret = submit_stats(avc_context)) < 0)
return ret;
@@ -318,7 +318,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
return AVERROR_EXTERNAL;
}
- if (avc_context->flags & CODEC_FLAG_PASS1)
+ if (avc_context->flags & AV_CODEC_FLAG_PASS1)
if ((ret = get_stats(avc_context, 0)) < 0)
return ret;
diff --git a/libavcodec/libtwolame.c b/libavcodec/libtwolame.c
index 5408a97..72edb3d 100644
--- a/libavcodec/libtwolame.c
+++ b/libavcodec/libtwolame.c
@@ -81,7 +81,7 @@ static av_cold int twolame_encode_init(AVCodecContext *avctx)
if (!avctx->bit_rate)
avctx->bit_rate = avctx->sample_rate < 28000 ? 160000 : 384000;
- if (avctx->flags & CODEC_FLAG_QSCALE || !avctx->bit_rate) {
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE || !avctx->bit_rate) {
twolame_set_VBR(s->glopts, TRUE);
twolame_set_VBR_level(s->glopts,
avctx->global_quality / (float) FF_QP2LAMBDA);
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index facc817..66e4c02 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -85,7 +85,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
params.sampleRate = avctx->sample_rate;
params.bitRate = avctx->bit_rate;
params.nChannels = avctx->channels;
- params.adtsUsed = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER);
+ params.adtsUsed = !(avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER);
if (s->codec_api.SetParam(s->handle, VO_PID_AAC_ENCPARAM, &params)
!= VO_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
@@ -102,7 +102,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
ret = AVERROR(ENOSYS);
goto error;
}
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
avctx->extradata_size = 2;
avctx->extradata = av_mallocz(avctx->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 8a46691..5859e21 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -86,14 +86,14 @@ static av_cold int libvorbis_setup(vorbis_info *vi, AVCodecContext *avctx)
double cfreq;
int ret;
- if (avctx->flags & CODEC_FLAG_QSCALE || !avctx->bit_rate) {
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE || !avctx->bit_rate) {
/* variable bitrate
* NOTE: we use the oggenc range of -1 to 10 for global_quality for
* user convenience, but libvorbis uses -0.1 to 1.0.
*/
float q = avctx->global_quality / (float)FF_QP2LAMBDA;
/* default to 3 if the user did not set quality or bitrate */
- if (!(avctx->flags & CODEC_FLAG_QSCALE))
+ if (!(avctx->flags & AV_CODEC_FLAG_QSCALE))
q = 3.0;
if ((ret = vorbis_encode_setup_vbr(vi, avctx->channels,
avctx->sample_rate,
@@ -218,7 +218,7 @@ static av_cold int libvorbis_encode_init(AVCodecContext *avctx)
}
vorbis_comment_init(&s->vc);
- if (!(avctx->flags & CODEC_FLAG_BITEXACT))
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT))
vorbis_comment_add_tag(&s->vc, "encoder", LIBAVCODEC_IDENT);
if ((ret = vorbis_analysis_headerout(&s->vd, &s->vc, &header, &header_comm,
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 127b838..47f9254 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -382,7 +382,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
VP8Context *ctx = avctx->priv_data;
struct vpx_codec_enc_cfg enccfg = { 0 };
struct vpx_codec_enc_cfg enccfg_alpha;
- vpx_codec_flags_t flags = (avctx->flags & CODEC_FLAG_PSNR) ? VPX_CODEC_USE_PSNR : 0;
+ vpx_codec_flags_t flags = (avctx->flags & AV_CODEC_FLAG_PSNR) ? VPX_CODEC_USE_PSNR : 0;
int res;
vpx_img_fmt_t img_fmt = VPX_IMG_FMT_I420;
#if CONFIG_LIBVPX_VP9_ENCODER
@@ -423,9 +423,9 @@ static av_cold int vpx_init(AVCodecContext *avctx,
enccfg.g_threads = avctx->thread_count;
enccfg.g_lag_in_frames= ctx->lag_in_frames;
- if (avctx->flags & CODEC_FLAG_PASS1)
+ if (avctx->flags & AV_CODEC_FLAG_PASS1)
enccfg.g_pass = VPX_RC_FIRST_PASS;
- else if (avctx->flags & CODEC_FLAG_PASS2)
+ else if (avctx->flags & AV_CODEC_FLAG_PASS2)
enccfg.g_pass = VPX_RC_LAST_PASS;
else
enccfg.g_pass = VPX_RC_ONE_PASS;
@@ -914,7 +914,7 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
coded_size = queue_frames(avctx, pkt);
- if (!frame && avctx->flags & CODEC_FLAG_PASS1) {
+ if (!frame && avctx->flags & AV_CODEC_FLAG_PASS1) {
unsigned int b64_size = AV_BASE64_SIZE(ctx->twopass_stats.sz);
avctx->stats_out = av_malloc(b64_size);
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 1deadf4..e6c13d8 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -407,7 +407,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
#endif
x264_param_default(&x4->params);
- x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER;
+ x4->params.b_deblocking_filter = avctx->flags & AV_CODEC_FLAG_LOOP_FILTER;
if (x4->preset || x4->tune)
if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) {
@@ -440,8 +440,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
}
x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000;
- x4->params.rc.b_stat_write = avctx->flags & CODEC_FLAG_PASS1;
- if (avctx->flags & CODEC_FLAG_PASS2) {
+ x4->params.rc.b_stat_write = avctx->flags & AV_CODEC_FLAG_PASS1;
+ if (avctx->flags & AV_CODEC_FLAG_PASS2) {
x4->params.rc.b_stat_read = 1;
} else {
if (x4->crf >= 0) {
@@ -663,15 +663,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.i_fps_num = avctx->time_base.den;
x4->params.i_fps_den = avctx->time_base.num * avctx->ticks_per_frame;
- x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
+ x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR;
x4->params.i_threads = avctx->thread_count;
if (avctx->thread_type)
x4->params.b_sliced_threads = avctx->thread_type == FF_THREAD_SLICE;
- x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
+ x4->params.b_interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT;
- x4->params.b_open_gop = !(avctx->flags & CODEC_FLAG_CLOSED_GOP);
+ x4->params.b_open_gop = !(avctx->flags & AV_CODEC_FLAG_CLOSED_GOP);
x4->params.i_slice_count = avctx->slices;
@@ -687,7 +687,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (avctx->color_trc != AVCOL_TRC_UNSPECIFIED)
x4->params.vui.i_transfer = avctx->color_trc;
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)
x4->params.b_repeat_headers = 0;
if(x4->x264opts){
@@ -731,7 +731,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!x4->enc)
return AVERROR_EXTERNAL;
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
x264_nal_t *nal;
uint8_t *p;
int nnal, s, i;
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index c577a72..8afef26 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -119,7 +119,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx->params->fpsDenom = avctx->time_base.num * avctx->ticks_per_frame;
ctx->params->sourceWidth = avctx->width;
ctx->params->sourceHeight = avctx->height;
- ctx->params->bEnablePsnr = !!(avctx->flags & CODEC_FLAG_PSNR);
+ ctx->params->bEnablePsnr = !!(avctx->flags & AV_CODEC_FLAG_PSNR);
if ((avctx->color_primaries <= AVCOL_PRI_BT2020 &&
avctx->color_primaries != AVCOL_PRI_UNSPECIFIED) ||
@@ -179,7 +179,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx->params->rc.rateControlMode = X265_RC_ABR;
}
- if (!(avctx->flags & CODEC_FLAG_GLOBAL_HEADER))
+ if (!(avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER))
ctx->params->bRepeatHeaders = 1;
if (ctx->x265_opts) {
@@ -214,7 +214,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
x265_nal *nal;
int nnal;
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 9a94891..8fb9116 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -249,8 +249,8 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
}
x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000;
- x4->params.rc.b_stat_write = avctx->flags & CODEC_FLAG_PASS1;
- if (avctx->flags & CODEC_FLAG_PASS2) {
+ x4->params.rc.b_stat_write = avctx->flags & AV_CODEC_FLAG_PASS1;
+ if (avctx->flags & AV_CODEC_FLAG_PASS2) {
x4->params.rc.b_stat_read = 1;
} else {
if (x4->crf >= 0) {
@@ -321,7 +321,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.i_scenecut_threshold = avctx->scenechange_threshold;
- // x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER;
+ // x4->params.b_deblocking_filter = avctx->flags & AV_CODEC_FLAG_LOOP_FILTER;
x4->params.rc.i_qp_min = avctx->qmin;
x4->params.rc.i_qp_max = avctx->qmax;
@@ -346,7 +346,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
/* AVS P2 only enables 8x8 transform */
- x4->params.analyse.b_transform_8x8 = 1; //avctx->flags2 & CODEC_FLAG2_8X8DCT;
+ x4->params.analyse.b_transform_8x8 = 1; //avctx->flags2 & AV_CODEC_FLAG2_8X8DCT;
x4->params.analyse.i_trellis = avctx->trellis;
x4->params.analyse.i_noise_reduction = avctx->noise_reduction;
@@ -371,12 +371,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.rc.f_pb_factor = avctx->b_quant_factor;
x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
- x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
+ x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR;
x4->params.i_log_level = XAVS_LOG_DEBUG;
x4->params.i_threads = avctx->thread_count;
- x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
+ x4->params.b_interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT;
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)
x4->params.b_repeat_headers = 0;
x4->enc = xavs_encoder_open(&x4->params);
@@ -388,7 +388,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
/* TAG: Do we have GLOBAL HEADER in AVS */
/* We Have PPS and SPS in AVS */
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER && 0) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER && 0) {
xavs_nal_t *nal;
int nnal, s, i, size;
uint8_t *p;
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index a7b76ce..e6f0dbd 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -382,13 +382,13 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
/* Bring in VOP flags from ffmpeg command-line */
x->vop_flags = XVID_VOP_HALFPEL; /* Bare minimum quality */
- if (xvid_flags & CODEC_FLAG_4MV)
+ if (xvid_flags & AV_CODEC_FLAG_4MV)
x->vop_flags |= XVID_VOP_INTER4V; /* Level 3 */
if (avctx->trellis)
x->vop_flags |= XVID_VOP_TRELLISQUANT; /* Level 5 */
- if (xvid_flags & CODEC_FLAG_AC_PRED)
+ if (xvid_flags & AV_CODEC_FLAG_AC_PRED)
x->vop_flags |= XVID_VOP_HQACPRED; /* Level 6 */
- if (xvid_flags & CODEC_FLAG_GRAY)
+ if (xvid_flags & AV_CODEC_FLAG_GRAY)
x->vop_flags |= XVID_VOP_GREYSCALE;
/* Decide which ME quality setting to use */
@@ -462,7 +462,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
x->vol_flags |= XVID_VOL_GMC;
x->me_flags |= XVID_ME_GME_REFINE;
}
- if (xvid_flags & CODEC_FLAG_QPEL) {
+ if (xvid_flags & AV_CODEC_FLAG_QPEL) {
x->vol_flags |= XVID_VOL_QUARTERPEL;
x->me_flags |= XVID_ME_QUARTERPELREFINE16;
if (x->vop_flags & XVID_VOP_INTER4V)
@@ -514,7 +514,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
x->old_twopassbuffer = NULL;
x->twopassfile = NULL;
- if (xvid_flags & CODEC_FLAG_PASS1) {
+ if (xvid_flags & AV_CODEC_FLAG_PASS1) {
rc2pass1.version = XVID_VERSION;
rc2pass1.context = x;
x->twopassbuffer = av_malloc(BUFFER_SIZE);
@@ -530,7 +530,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
plugins[xvid_enc_create.num_plugins].func = xvid_ff_2pass;
plugins[xvid_enc_create.num_plugins].param = &rc2pass1;
xvid_enc_create.num_plugins++;
- } else if (xvid_flags & CODEC_FLAG_PASS2) {
+ } else if (xvid_flags & AV_CODEC_FLAG_PASS2) {
rc2pass2.version = XVID_VERSION;
rc2pass2.bitrate = avctx->bit_rate;
@@ -561,7 +561,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
plugins[xvid_enc_create.num_plugins].func = xvid_plugin_2pass2;
plugins[xvid_enc_create.num_plugins].param = &rc2pass2;
xvid_enc_create.num_plugins++;
- } else if (!(xvid_flags & CODEC_FLAG_QSCALE)) {
+ } else if (!(xvid_flags & AV_CODEC_FLAG_QSCALE)) {
/* Single Pass Bitrate Control! */
single.version = XVID_VERSION;
single.bitrate = avctx->bit_rate;
@@ -620,7 +620,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
xvid_enc_create.max_key_interval = 240; /* Xvid's best default */
/* Quants */
- if (xvid_flags & CODEC_FLAG_QSCALE)
+ if (xvid_flags & AV_CODEC_FLAG_QSCALE)
x->qscale = 1;
else
x->qscale = 0;
@@ -666,13 +666,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
/* Misc Settings */
xvid_enc_create.frame_drop_ratio = 0;
xvid_enc_create.global = 0;
- if (xvid_flags & CODEC_FLAG_CLOSED_GOP)
+ if (xvid_flags & AV_CODEC_FLAG_CLOSED_GOP)
xvid_enc_create.global |= XVID_GLOBAL_CLOSED_GOP;
/* Determines which codec mode we are operating in */
avctx->extradata = NULL;
avctx->extradata_size = 0;
- if (xvid_flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (xvid_flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
/* In this case, we are claiming to be MPEG4 */
x->quicktime_format = 1;
avctx->codec_id = AV_CODEC_ID_MPEG4;
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 5fd06f4..e398d34 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -160,7 +160,7 @@ static inline void idct_put(MDECContext *a, AVFrame *frame, int mb_x, int mb_y)
a->idsp.idct_put(dest_y + 8 * linesize, linesize, block[2]);
a->idsp.idct_put(dest_y + 8 * linesize + 8, linesize, block[3]);
- if (!(a->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(a->avctx->flags & AV_CODEC_FLAG_GRAY)) {
a->idsp.idct_put(dest_cb, frame->linesize[1], block[4]);
a->idsp.idct_put(dest_cr, frame->linesize[2], block[5]);
}
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index daa5b69..2fccae3 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -135,7 +135,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
}
/* comment */
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
put_marker(p, COM);
flush_put_bits(p);
ptr = put_bits_ptr(p);
diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c
index 7cfe41c..ebcf4aa 100644
--- a/libavcodec/motion-test.c
+++ b/libavcodec/motion-test.c
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
printf("ffmpeg motion test\n");
ctx = avcodec_alloc_context3(NULL);
- ctx->flags |= CODEC_FLAG_BITEXACT;
+ ctx->flags |= AV_CODEC_FLAG_BITEXACT;
av_force_cpu_flags(0);
memset(&cctx, 0, sizeof(cctx));
ff_me_cmp_init(&cctx, ctx);
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 5ec16ad..9f71568 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -99,7 +99,7 @@ static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3
}
static int get_flags(MotionEstContext *c, int direct, int chroma){
- return ((c->avctx->flags&CODEC_FLAG_QPEL) ? FLAG_QPEL : 0)
+ return ((c->avctx->flags&AV_CODEC_FLAG_QPEL) ? FLAG_QPEL : 0)
+ (direct ? FLAG_DIRECT : 0)
+ (chroma ? FLAG_CHROMA : 0);
}
@@ -352,7 +352,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
c->mb_flags = get_flags(c, 0, c->avctx->mb_cmp &FF_CMP_CHROMA);
/*FIXME s->no_rounding b_type*/
- if (s->avctx->flags & CODEC_FLAG_QPEL) {
+ if (s->avctx->flags & AV_CODEC_FLAG_QPEL) {
c->sub_motion_search= qpel_motion_search;
c->qpel_avg = s->qdsp.avg_qpel_pixels_tab;
if (s->no_rounding)
@@ -1003,7 +1003,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
mx <<=shift;
my <<=shift;
}
- if ((s->avctx->flags & CODEC_FLAG_4MV)
+ if ((s->avctx->flags & AV_CODEC_FLAG_4MV)
&& !c->skip && varc>50<<8 && vard>10<<8){
if(h263_mv4_search(s, mx, my, shift) < INT_MAX)
mb_type|=CANDIDATE_MB_TYPE_INTER4V;
@@ -1011,7 +1011,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
set_p_mv_tables(s, mx, my, 0);
}else
set_p_mv_tables(s, mx, my, 1);
- if ((s->avctx->flags & CODEC_FLAG_INTERLACED_ME)
+ if ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)
&& !c->skip){ //FIXME varc/d checks
if(interlaced_search(s, 0, s->p_field_mv_table, s->p_field_select_table, mx, my, 0) < INT_MAX)
mb_type |= CANDIDATE_MB_TYPE_INTER_I;
@@ -1024,7 +1024,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip)
dmin= get_mb_score(s, mx, my, 0, 0, 0, 16, 1);
- if ((s->avctx->flags & CODEC_FLAG_4MV)
+ if ((s->avctx->flags & AV_CODEC_FLAG_4MV)
&& !c->skip && varc>50<<8 && vard>10<<8){
int dmin4= h263_mv4_search(s, mx, my, shift);
if(dmin4 < dmin){
@@ -1032,7 +1032,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
dmin=dmin4;
}
}
- if ((s->avctx->flags & CODEC_FLAG_INTERLACED_ME)
+ if ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)
&& !c->skip){ //FIXME varc/d checks
int dmin_i= interlaced_search(s, 0, s->p_field_mv_table, s->p_field_select_table, mx, my, 0);
if(dmin_i < dmin){
@@ -1550,7 +1550,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
fbmin= bidir_refine(s, mb_x, mb_y) + penalty_factor;
ff_dlog(s, "%d %d %d %d\n", dmin, fmin, bmin, fbmin);
- if (s->avctx->flags & CODEC_FLAG_INTERLACED_ME) {
+ if (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME) {
//FIXME mb type penalty
c->skip=0;
c->current_mv_penalty= c->mv_penalty[s->f_code] + MAX_MV;
@@ -1681,7 +1681,7 @@ void ff_fix_long_p_mvs(MpegEncContext * s)
if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;
- if (s->avctx->flags & CODEC_FLAG_4MV) {
+ if (s->avctx->flags & AV_CODEC_FLAG_4MV) {
const int wrap= s->b8_stride;
/* clip / convert to intra 8x8 type MVs */
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 480cf41..fcf910f 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -844,7 +844,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
ff_xvmc_pack_pblocks(s, -1); // inter are always full blocks
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
- if (s->avctx->flags2 & CODEC_FLAG2_FAST) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++)
mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i);
} else {
@@ -1064,7 +1064,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
ff_xvmc_pack_pblocks(s, cbp);
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
- if (s->avctx->flags2 & CODEC_FLAG2_FAST) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++) {
if (cbp & 32)
mpeg2_fast_decode_block_non_intra(s, *s->pblocks[i], i);
@@ -1086,7 +1086,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
}
}
} else {
- if (s->avctx->flags2 & CODEC_FLAG2_FAST) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++) {
if (cbp & 32)
mpeg1_fast_decode_block_inter(s, *s->pblocks[i], i);
@@ -1235,7 +1235,7 @@ static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
MpegEncContext *s = &s1->mpeg_enc_ctx;
const enum AVPixelFormat *pix_fmts;
- if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (avctx->flags & AV_CODEC_FLAG_GRAY))
return AV_PIX_FMT_GRAY8;
if (s->chroma_format < 2)
@@ -1473,7 +1473,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10;
s->low_delay = get_bits1(&s->gb);
- if (s->avctx->flags & CODEC_FLAG_LOW_DELAY)
+ if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
s1->frame_rate_ext.num = get_bits(&s->gb, 2) + 1;
@@ -2196,7 +2196,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
s->out_format = FMT_MPEG1;
s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER
- if (s->avctx->flags & CODEC_FLAG_LOW_DELAY)
+ if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
@@ -2649,7 +2649,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
}
}
}
- if (s2->pict_type == AV_PICTURE_TYPE_I || (s2->avctx->flags2 & CODEC_FLAG2_SHOW_ALL))
+ if (s2->pict_type == AV_PICTURE_TYPE_I || (s2->avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL))
s->sync = 1;
if (!s2->next_picture_ptr) {
/* Skip P-frames if we do not have a reference frame or
@@ -2770,7 +2770,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data,
return buf_size;
}
- if (s2->avctx->flags & CODEC_FLAG_TRUNCATED) {
+ if (s2->avctx->flags & AV_CODEC_FLAG_TRUNCATED) {
int next = ff_mpeg1_find_frame_end(&s2->parse_context, buf,
buf_size, NULL);
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index d131e48..c009677 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -205,7 +205,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
}
- s->drop_frame_timecode = s->drop_frame_timecode || !!(avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE);
+ s->drop_frame_timecode = s->drop_frame_timecode || !!(avctx->flags2 & AV_CODEC_FLAG2_DROP_FRAME_TIMECODE);
if (s->drop_frame_timecode)
s->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
if (s->drop_frame_timecode && s->frame_rate_index != 4) {
@@ -384,7 +384,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
put_bits(&s->pb, 1, 1);
put_bits(&s->pb, 6, (uint32_t)((time_code / fps) % 60));
put_bits(&s->pb, 6, (uint32_t)((time_code % fps)));
- put_bits(&s->pb, 1, !!(s->avctx->flags & CODEC_FLAG_CLOSED_GOP) || s->intra_only || !s->gop_picture_number);
+ put_bits(&s->pb, 1, !!(s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP) || s->intra_only || !s->gop_picture_number);
put_bits(&s->pb, 1, 0); // broken link
}
}
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 3efa63d..18ec39e 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2228,7 +2228,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s->pict_type = get_bits(gb, 2) + AV_PICTURE_TYPE_I; /* pict type: I = 0 , P = 1 */
if (s->pict_type == AV_PICTURE_TYPE_B && s->low_delay &&
- ctx->vol_control_parameters == 0 && !(s->avctx->flags & CODEC_FLAG_LOW_DELAY)) {
+ ctx->vol_control_parameters == 0 && !(s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)) {
av_log(s->avctx, AV_LOG_ERROR, "low_delay flag set incorrectly, clearing it\n");
s->low_delay = 0;
}
@@ -2607,7 +2607,7 @@ int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb)
}
end:
- if (s->avctx->flags & CODEC_FLAG_LOW_DELAY)
+ if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
s->avctx->has_b_frames = !s->low_delay;
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index bca294e..459dfe6 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -430,7 +430,7 @@ static inline void mpeg4_encode_blocks(MpegEncContext *s, int16_t block[6][64],
int i;
if (scan_table) {
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) {
for (i = 0; i < 6; i++)
skip_put_bits(&s->pb,
mpeg4_get_block_length(s, block[i], i,
@@ -442,7 +442,7 @@ static inline void mpeg4_encode_blocks(MpegEncContext *s, int16_t block[6][64],
intra_dc[i], scan_table[i], dc_pb, ac_pb);
}
} else {
- if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) {
for (i = 0; i < 6; i++)
skip_put_bits(&s->pb,
mpeg4_get_block_length(s, block[i], i, 0,
@@ -507,7 +507,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
PutBitContext *const pb2 = s->data_partitioning ? &s->pb2 : &s->pb;
PutBitContext *const tex_pb = s->data_partitioning && s->pict_type != AV_PICTURE_TYPE_B ? &s->tex_pb : &s->pb;
PutBitContext *const dc_pb = s->data_partitioning && s->pict_type != AV_PICTURE_TYPE_I ? &s->pb2 : &s->pb;
- const int interleaved_stats = (s->avctx->flags & CODEC_FLAG_PASS1) && !s->data_partitioning ? 1 : 0;
+ const int interleaved_stats = (s->avctx->flags & AV_CODEC_FLAG_PASS1) && !s->data_partitioning ? 1 : 0;
if (!s->mb_intra) {
int i, cbp;
@@ -832,7 +832,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
for (i = 0; i < 6; i++)
dc_diff[i] = ff_mpeg4_pred_dc(s, i, block[i][0], &dir[i], 1);
- if (s->avctx->flags & CODEC_FLAG_AC_PRED) {
+ if (s->avctx->flags & AV_CODEC_FLAG_AC_PRED) {
s->ac_pred = decide_ac_pred(s, block, dir, scan_table, zigzag_last_index);
} else {
for (i = 0; i < 6; i++)
@@ -932,7 +932,7 @@ static void mpeg4_encode_gop_header(MpegEncContext *s)
put_bits(&s->pb, 1, 1);
put_bits(&s->pb, 6, seconds);
- put_bits(&s->pb, 1, !!(s->avctx->flags & CODEC_FLAG_CLOSED_GOP));
+ put_bits(&s->pb, 1, !!(s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP));
put_bits(&s->pb, 1, 0); // broken link == NO
ff_mpeg4_stuffing(&s->pb);
@@ -1078,7 +1078,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
ff_mpeg4_stuffing(&s->pb);
/* user data */
- if (!(s->avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(s->avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x1B2); /* user_data */
avpriv_put_string(&s->pb, LIBAVCODEC_IDENT, 0);
@@ -1092,7 +1092,7 @@ void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
int time_div, time_mod;
if (s->pict_type == AV_PICTURE_TYPE_I) {
- if (!(s->avctx->flags & CODEC_FLAG_GLOBAL_HEADER)) {
+ if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, the reference sw is buggy
mpeg4_encode_visual_object_header(s);
if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number == 0) // HACK, the reference sw is buggy
@@ -1325,7 +1325,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->y_dc_scale_table = ff_mpeg4_y_dc_scale_table;
s->c_dc_scale_table = ff_mpeg4_c_dc_scale_table;
- if (s->avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
s->avctx->extradata = av_malloc(1024);
init_put_bits(&s->pb, s->avctx->extradata, 1024);
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 22290cc..b7b9dbd 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -429,7 +429,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
s->avctx = avctx;
#if USE_FLOATS
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
#endif
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index 92f8ead..30581f8 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -199,7 +199,7 @@ static int alloc_picture_tables(AVCodecContext *avctx, Picture *pic, int encodin
}
if (out_format == FMT_H263 || encoding || avctx->debug_mv ||
- (avctx->flags2 & CODEC_FLAG2_EXPORT_MVS)) {
+ (avctx->flags2 & AV_CODEC_FLAG2_EXPORT_MVS)) {
int mv_size = 2 * (b8_array_size + 4) * sizeof(int16_t);
int ref_index_size = 4 * mb_array_size;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 26930fc..dbe8200 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -297,7 +297,7 @@ static av_cold int dct_init(MpegEncContext *s)
s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_c;
s->dct_unquantize_mpeg1_inter = dct_unquantize_mpeg1_inter_c;
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_c;
- if (s->avctx->flags & CODEC_FLAG_BITEXACT)
+ if (s->avctx->flags & AV_CODEC_FLAG_BITEXACT)
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
@@ -731,7 +731,7 @@ static int init_context_frame(MpegEncContext *s)
}
if (s->codec_id == AV_CODEC_ID_MPEG4 ||
- (s->avctx->flags & CODEC_FLAG_INTERLACED_ME)) {
+ (s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)) {
/* interlaced direct mode decoding tables */
for (i = 0; i < 2; i++) {
int j, k;
@@ -1254,7 +1254,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME;
s->current_picture_ptr->f->pict_type = s->pict_type;
- // if (s->avctx->flags && CODEC_FLAG_QSCALE)
+ // if (s->avctx->flags && AV_CODEC_FLAG_QSCALE)
// s->current_picture_ptr->quality = s->new_picture_ptr->quality;
s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I;
@@ -1568,7 +1568,7 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
int *low_delay,
int mb_width, int mb_height, int mb_stride, int quarter_sample)
{
- if ((avctx->flags2 & CODEC_FLAG2_EXPORT_MVS) && mbtype_table && motion_val[0]) {
+ if ((avctx->flags2 & AV_CODEC_FLAG2_EXPORT_MVS) && mbtype_table && motion_val[0]) {
const int shift = 1 + quarter_sample;
const int mv_sample_log2 = avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == AV_CODEC_ID_SVQ3 ? 2 : 1;
const int mv_stride = (mb_width << mv_sample_log2) +
@@ -2096,7 +2096,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
src_x, src_y << field_based, h_edge_pos,
v_edge_pos);
ptr_y = s->sc.edge_emu_buffer;
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
uint8_t *ubuf = s->sc.edge_emu_buffer + 18 * s->linesize;
uint8_t *vbuf =ubuf + 9 * s->uvlinesize;
s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
@@ -2131,7 +2131,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
sy = (sy << 2) >> lowres;
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
uvsx = (uvsx << 2) >> lowres;
uvsy = (uvsy << 2) >> lowres;
@@ -2251,7 +2251,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s,
my += s->mv[dir][i][1];
}
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))
chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture,
pix_op, mx, my);
break;
@@ -2491,7 +2491,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
else if (!is_mpeg12 && (s->h263_pred || s->h263_aic))
s->mbintra_table[mb_xy]=1;
- if ((s->avctx->flags & CODEC_FLAG_PSNR) || s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor ||
+ if ((s->avctx->flags & AV_CODEC_FLAG_PSNR) || s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor ||
!(s->encoding && (s->intra_only || s->pict_type == AV_PICTURE_TYPE_B) &&
s->avctx->mb_decision != FF_MB_DECISION_RD)) { // FIXME precalc
uint8_t *dest_y, *dest_cb, *dest_cr;
@@ -2594,7 +2594,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
add_dequant_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
if (s->chroma_y_shift){
add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
@@ -2613,7 +2613,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
if(s->chroma_y_shift){//Chroma420
add_dct(s, block[4], 4, dest_cb, uvlinesize);
add_dct(s, block[5], 5, dest_cr, uvlinesize);
@@ -2646,7 +2646,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
if(s->chroma_y_shift){
put_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
put_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
@@ -2665,7 +2665,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
s->idsp.idct_put(dest_y + dct_offset, dct_linesize, block[2]);
s->idsp.idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
if(s->chroma_y_shift){
s->idsp.idct_put(dest_cb, uvlinesize, block[4]);
s->idsp.idct_put(dest_cr, uvlinesize, block[5]);
@@ -2691,7 +2691,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
skip_idct:
if(!readable){
s->hdsp.put_pixels_tab[0][0](s->dest[0], dest_y , linesize,16);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
s->hdsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[1], dest_cb, uvlinesize,16 >> s->chroma_y_shift);
s->hdsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[2], dest_cr, uvlinesize,16 >> s->chroma_y_shift);
}
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index b8510ed..83356a0 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) {
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index f1956f0..51ba435 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -88,7 +88,7 @@ static void gmc1_motion(MpegEncContext *s,
}
}
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
motion_x = s->sprite_offset[1][0];
@@ -165,7 +165,7 @@ static void gmc_motion(MpegEncContext *s,
a + 1, (1 << (2 * a + 1)) - s->no_rounding,
s->h_edge_pos, s->v_edge_pos);
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
ox = s->sprite_offset[1][0] + s->sprite_delta[0][0] * s->mb_x * 8 +
@@ -324,7 +324,7 @@ void mpeg_motion_internal(MpegEncContext *s,
src_x, src_y,
s->h_edge_pos, s->v_edge_pos);
ptr_y = s->sc.edge_emu_buffer;
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
uint8_t *ubuf = s->sc.edge_emu_buffer + 18 * s->linesize;
uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
uvsrc_y = (unsigned)uvsrc_y << field_based;
@@ -359,7 +359,7 @@ void mpeg_motion_internal(MpegEncContext *s,
pix_op[0][dxy](dest_y, ptr_y, linesize, h);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
pix_op[s->chroma_x_shift][uvdxy]
(dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
pix_op[s->chroma_x_shift][uvdxy]
@@ -547,7 +547,7 @@ static inline void qpel_motion(MpegEncContext *s,
src_x, src_y << field_based,
s->h_edge_pos, s->v_edge_pos);
ptr_y = s->sc.edge_emu_buffer;
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
uint8_t *ubuf = s->sc.edge_emu_buffer + 18 * s->linesize;
uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
@@ -584,7 +584,7 @@ static inline void qpel_motion(MpegEncContext *s,
qpix_op[1][dxy](dest_y, ptr_y, linesize);
qpix_op[1][dxy](dest_y + 8, ptr_y + 8, linesize);
}
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1);
pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1);
}
@@ -740,7 +740,7 @@ static inline void apply_obmc(MpegEncContext *s,
mx += mv[0][0];
my += mv[0][1];
}
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))
chroma_4mv_motion(s, dest_cb, dest_cr,
ref_picture, pix_op[1],
mx, my);
@@ -813,7 +813,7 @@ static inline void apply_8x8(MpegEncContext *s,
}
}
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))
chroma_4mv_motion(s, dest_cb, dest_cr,
ref_picture, pix_op[1], mx, my);
}
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index 10475e0..b469c4e 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
@@ -298,7 +298,7 @@ static void ff_xvmc_decode_mb(struct MpegEncContext *s)
cbp++;
}
- if (s->avctx->flags & CODEC_FLAG_GRAY) {
+ if (s->avctx->flags & AV_CODEC_FLAG_GRAY) {
if (s->mb_intra) { // intra frames are always full chroma blocks
for (i = 4; i < blocks_per_mb; i++) {
memset(s->pblocks[i], 0, sizeof(*s->pblocks[i])); // so we need to clear them
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index d5a69ed..d3f23c8a 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -121,7 +121,7 @@ static av_cold int decode_init(AVCodecContext * avctx) {
av_lfg_init(&s->random_state, 0);
ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0);
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index de3c978..52ccc71 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -171,7 +171,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->avctx = avctx;
if ((ret = ff_mdct_init(&s->mdct_ctx, 8, 0, 32768.0)) < 0)
goto error;
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp) {
ret = AVERROR(ENOMEM);
goto error;
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index b5e6862..c5b63bf 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -806,7 +806,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
if (avctx->rc_buffer_size > 0)
ctx->encode_config.rcParams.vbvBufferSize = avctx->rc_buffer_size;
- if (avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
+ if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
ctx->encode_config.frameFieldMode = NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD;
} else {
ctx->encode_config.frameFieldMode = NV_ENC_PARAMS_FRAME_FIELD_MODE_FRAME;
@@ -823,8 +823,8 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoFullRangeFlag = avctx->color_range == AVCOL_RANGE_JPEG;
- ctx->encode_config.encodeCodecConfig.h264Config.disableSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
- ctx->encode_config.encodeCodecConfig.h264Config.repeatSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
+ ctx->encode_config.encodeCodecConfig.h264Config.disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
+ ctx->encode_config.encodeCodecConfig.h264Config.repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
if (!ctx->profile) {
switch (avctx->profile) {
@@ -881,8 +881,8 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
break;
case AV_CODEC_ID_H265:
- ctx->encode_config.encodeCodecConfig.hevcConfig.disableSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
- ctx->encode_config.encodeCodecConfig.hevcConfig.repeatSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
+ ctx->encode_config.encodeCodecConfig.hevcConfig.disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
+ ctx->encode_config.encodeCodecConfig.hevcConfig.repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
/* No other profile is supported in the current SDK version 5 */
ctx->encode_config.profileGUID = NV_ENC_HEVC_PROFILE_MAIN_GUID;
@@ -997,7 +997,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
ctx->output_surfaces[surfaceCount].busy = 0;
}
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
uint32_t outSize = 0;
char tmpHeader[256];
NV_ENC_SEQUENCE_PARAM_PAYLOAD payload = { 0 };
@@ -1304,7 +1304,7 @@ static int nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pic_params.outputBitstream = ctx->output_surfaces[i].output_surface;
pic_params.completionEvent = 0;
- if (avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
+ if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
if (frame->top_field_first) {
pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM;
} else {
diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index 7e4b9a4..6aeb1de 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -951,7 +951,7 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx)
ff_fft_init(&c->fft256, 7, 0);
ff_fft_init(&c->fft512, 8, 1);
ff_fft_init(&c->fft1024, 9, 1);
- c->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ c->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!c->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 2b0a046..0fc343a 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -49,11 +49,11 @@ static const AVOption avcodec_options[] = {
"to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality.",
OFFSET(bit_rate_tolerance), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE*20 }, 1, INT_MAX, V|E},
{"flags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, UINT_MAX, V|A|S|E|D, "flags"},
-{"unaligned", "allow decoders to produce unaligned output", 0, AV_OPT_TYPE_CONST, { .i64 = CODEC_FLAG_UNALIGNED }, INT_MIN, INT_MAX, V | D, "flags" },
-{"mv4", "use four motion vectors per macroblock (MPEG-4)", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"},
-{"qpel", "use 1/4-pel motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"},
-{"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"},
-{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"},
+{"unaligned", "allow decoders to produce unaligned output", 0, AV_OPT_TYPE_CONST, { .i64 = AV_CODEC_FLAG_UNALIGNED }, INT_MIN, INT_MAX, V | D, "flags" },
+{"mv4", "use four motion vectors per macroblock (MPEG-4)", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"},
+{"qpel", "use 1/4-pel motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"},
+{"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"},
+{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"},
#if FF_API_GMC
{"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"},
#endif
@@ -63,33 +63,33 @@ static const AVOption avcodec_options[] = {
#if FF_API_INPUT_PRESERVED
{"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"},
#endif
-{"pass1", "use internal 2-pass ratecontrol in first pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
-{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
-{"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
+{"pass1", "use internal 2-pass ratecontrol in first pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
+{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
+{"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
#if FF_API_EMU_EDGE
{"emu_edge", "do not draw edges", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_EMU_EDGE }, INT_MIN, INT_MAX, 0, "flags"},
#endif
-{"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"},
-{"truncated", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, 0, "flags"},
+{"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"},
+{"truncated", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, 0, "flags"},
#if FF_API_NORMALIZE_AQP
{"naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"},
#endif
-{"ildct", "use interlaced DCT", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"},
-{"low_delay", "force low delay", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"},
-{"global_header", "place global headers in extradata instead of every keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"},
-{"bitexact", "use only bitexact functions (except (I)DCT)", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_BITEXACT }, INT_MIN, INT_MAX, A|V|S|D|E, "flags"},
-{"aic", "H.263 advanced intra coding / MPEG-4 AC prediction", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_AC_PRED }, INT_MIN, INT_MAX, V|E, "flags"},
-{"ilme", "interlaced motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INTERLACED_ME }, INT_MIN, INT_MAX, V|E, "flags"},
-{"cgop", "closed GOP", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_CLOSED_GOP }, INT_MIN, INT_MAX, V|E, "flags"},
-{"output_corrupt", "Output even potentially corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_OUTPUT_CORRUPT }, INT_MIN, INT_MAX, V|D, "flags"},
-{"fast", "allow non-spec-compliant speedup tricks", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_FAST }, INT_MIN, INT_MAX, V|E, "flags2"},
-{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},
-{"ignorecrop", "ignore cropping information from sps", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_IGNORE_CROP }, INT_MIN, INT_MAX, V|D, "flags2"},
-{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"},
-{"chunks", "Frame data might be split into multiple chunks", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_CHUNKS }, INT_MIN, INT_MAX, V|D, "flags2"},
-{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"},
-{"export_mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_EXPORT_MVS}, INT_MIN, INT_MAX, V|D, "flags2"},
-{"skip_manual", "do not skip samples and export skip information as frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_SKIP_MANUAL}, INT_MIN, INT_MAX, V|D, "flags2"},
+{"ildct", "use interlaced DCT", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"},
+{"low_delay", "force low delay", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"},
+{"global_header", "place global headers in extradata instead of every keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"},
+{"bitexact", "use only bitexact functions (except (I)DCT)", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_BITEXACT }, INT_MIN, INT_MAX, A|V|S|D|E, "flags"},
+{"aic", "H.263 advanced intra coding / MPEG-4 AC prediction", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_AC_PRED }, INT_MIN, INT_MAX, V|E, "flags"},
+{"ilme", "interlaced motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_ME }, INT_MIN, INT_MAX, V|E, "flags"},
+{"cgop", "closed GOP", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_CLOSED_GOP }, INT_MIN, INT_MAX, V|E, "flags"},
+{"output_corrupt", "Output even potentially corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_OUTPUT_CORRUPT }, INT_MIN, INT_MAX, V|D, "flags"},
+{"fast", "allow non-spec-compliant speedup tricks", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_FAST }, INT_MIN, INT_MAX, V|E, "flags2"},
+{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},
+{"ignorecrop", "ignore cropping information from sps", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_IGNORE_CROP }, INT_MIN, INT_MAX, V|D, "flags2"},
+{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"},
+{"chunks", "Frame data might be split into multiple chunks", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_CHUNKS }, INT_MIN, INT_MAX, V|D, "flags2"},
+{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"},
+{"export_mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_EXPORT_MVS}, INT_MIN, INT_MAX, V|D, "flags2"},
+{"skip_manual", "do not skip samples and export skip information as frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_SKIP_MANUAL}, INT_MIN, INT_MAX, V|D, "flags2"},
#if FF_API_MOTION_EST
{"me_method", "set motion estimation method", OFFSET(me_method), AV_OPT_TYPE_INT, {.i64 = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method"},
{"zero", "zero motion estimation (fastest)", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ZERO }, INT_MIN, INT_MAX, V|E, "me_method" },
diff --git a/libavcodec/opus_celt.c b/libavcodec/opus_celt.c
index 42623d9..9911de3 100644
--- a/libavcodec/opus_celt.c
+++ b/libavcodec/opus_celt.c
@@ -2209,7 +2209,7 @@ int ff_celt_init(AVCodecContext *avctx, CeltContext **ps, int output_channels)
goto fail;
}
- s->dsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->dsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->dsp) {
ret = AVERROR(ENOMEM);
goto fail;
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 1ef207f..c16546b 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -188,8 +188,8 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
const uint8_t *buf, int buf_size, int keyframe)
{
if (s && s->parser->split) {
- if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER ||
- avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER) {
+ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER ||
+ avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER) {
int i = s->parser->split(avctx, buf, buf_size);
buf += i;
buf_size -= i;
@@ -200,7 +200,7 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
*poutbuf = (uint8_t *) buf;
*poutbuf_size = buf_size;
if (avctx->extradata) {
- if (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) {
+ if (keyframe && (avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER)) {
int size = buf_size + avctx->extradata_size;
*poutbuf_size = size;
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 6a5e0f8..ddcd399 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -649,7 +649,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->dpm = s->dpi * 10000 / 254;
}
- s->is_progressive = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
+ s->is_progressive = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);
switch (avctx->pix_fmt) {
case AV_PIX_FMT_RGBA64BE:
s->bit_depth = 16;
diff --git a/libavcodec/ppc/idctdsp.c b/libavcodec/ppc/idctdsp.c
index ea56a70..80e71fd 100644
--- a/libavcodec/ppc/idctdsp.c
+++ b/libavcodec/ppc/idctdsp.c
@@ -261,7 +261,7 @@ av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx,
return;
if (!high_bit_depth && avctx->lowres == 0) {
- if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) ||
+ if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
(avctx->idct_algo == FF_IDCT_ALTIVEC)) {
c->idct = idct_altivec;
c->idct_add = idct_add_altivec;
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index a1d497f..958b903 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -574,7 +574,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
if (ret < 0)
return ret;
- if (!(avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_GRAY)) {
ret = decode_slice_chroma(avctx, slice, (uint16_t*)dest_u, chroma_stride,
buf + y_data_size, u_data_size,
qmat_chroma_scaled, log2_chroma_blocks_per_mb);
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 094320a..ae6db65 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -323,7 +323,7 @@ static av_always_inline unsigned encode_slice_data(AVCodecContext *avctx,
*y_data_size = encode_slice_plane(avctx, mb_count, dest_y, luma_stride,
buf, data_size, ctx->qmat_luma[qp - 1], 0);
- if (!(avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_GRAY)) {
*u_data_size = encode_slice_plane(avctx, mb_count, dest_u,
chroma_stride, buf + *y_data_size, data_size - *y_data_size,
ctx->qmat_chroma[qp - 1], 1);
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index de18298..684ae53 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -963,7 +963,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bytestream_put_be16 (&buf, avctx->height);
frame_flags = ctx->chroma_factor << 6;
- if (avctx->flags & CODEC_FLAG_INTERLACED_DCT)
+ if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT)
frame_flags |= pic->top_field_first ? 0x04 : 0x08;
bytestream_put_byte (&buf, frame_flags);
@@ -1122,7 +1122,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
int mps;
int i, j;
int min_quant, max_quant;
- int interlaced = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
+ int interlaced = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);
avctx->bits_per_raw_sample = 10;
#if FF_API_CODED_FRAME
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 407ca2e..e3bcd29 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -46,9 +46,9 @@
static void validate_thread_parameters(AVCodecContext *avctx)
{
int frame_threading_supported = (avctx->codec->capabilities & CODEC_CAP_FRAME_THREADS)
- && !(avctx->flags & CODEC_FLAG_TRUNCATED)
- && !(avctx->flags & CODEC_FLAG_LOW_DELAY)
- && !(avctx->flags2 & CODEC_FLAG2_CHUNKS);
+ && !(avctx->flags & AV_CODEC_FLAG_TRUNCATED)
+ && !(avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
+ && !(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS);
if (avctx->thread_count == 1) {
avctx->active_thread_type = 0;
} else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) {
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 88e0b48..f219488 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -58,7 +58,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->param.mfx.TargetUsage = q->preset;
q->param.mfx.GopPicSize = FFMAX(0, avctx->gop_size);
q->param.mfx.GopRefDist = FFMAX(-1, avctx->max_b_frames) + 1;
- q->param.mfx.GopOptFlag = avctx->flags & CODEC_FLAG_CLOSED_GOP ?
+ q->param.mfx.GopOptFlag = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ?
MFX_GOP_CLOSED : 0;
q->param.mfx.IdrInterval = q->idr_interval;
q->param.mfx.NumSlice = avctx->slices;
@@ -78,7 +78,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->param.mfx.FrameInfo.BitDepthChroma = 8;
q->param.mfx.FrameInfo.Width = FFALIGN(avctx->width, q->width_align);
- if (avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
+ if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
/* A true field layout (TFF or BFF) is not important here,
it will specified later during frame encoding. But it is important
to specify is frame progressive or not because allowed heigh alignment
@@ -100,7 +100,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->param.mfx.FrameInfo.FrameRateExtD = avctx->time_base.num;
}
- if (avctx->flags & CODEC_FLAG_QSCALE) {
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE) {
q->param.mfx.RateControlMethod = MFX_RATECONTROL_CQP;
ratecontrol_desc = "constant quantization parameter (CQP)";
} else if (avctx->rc_max_rate == avctx->bit_rate) {
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 189d5c5..61d2777 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -81,7 +81,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
return AVERROR_PATCHWELCOME;
}
- ractx->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ ractx->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!ractx->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 4c9b7b5..989816e 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -170,7 +170,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!rcc->buffer_index)
rcc->buffer_index = s->avctx->rc_buffer_size * 3 / 4;
- if (s->avctx->flags & CODEC_FLAG_PASS2) {
+ if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
int i;
char *p;
@@ -238,7 +238,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
// FIXME maybe move to end
- if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->rc_strategy == 1) {
+ if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == 1) {
#if CONFIG_LIBXVID
return ff_xvid_rate_control_init(s);
#else
@@ -249,7 +249,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
- if (!(s->avctx->flags & CODEC_FLAG_PASS2)) {
+ if (!(s->avctx->flags & AV_CODEC_FLAG_PASS2)) {
rcc->short_term_qsum = 0.001;
rcc->short_term_qcount = 0.001;
@@ -318,7 +318,7 @@ av_cold void ff_rate_control_uninit(MpegEncContext *s)
av_freep(&rcc->entry);
#if CONFIG_LIBXVID
- if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->rc_strategy == 1)
+ if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == 1)
ff_xvid_rate_control_uninit(s);
#endif
}
@@ -771,7 +771,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
emms_c();
#if CONFIG_LIBXVID
- if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->rc_strategy == 1)
+ if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == 1)
return ff_xvid_rate_estimate_qscale(s, dry_run);
#endif
@@ -790,7 +790,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
s->frame_bits - s->stuffing_bits);
}
- if (s->avctx->flags & CODEC_FLAG_PASS2) {
+ if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
av_assert0(picture_number >= 0);
if (picture_number >= rcc->num_entries) {
av_log(s, AV_LOG_ERROR, "Input is longer than 2-pass log file\n");
@@ -824,7 +824,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
var = pict_type == AV_PICTURE_TYPE_I ? pic->mb_var_sum : pic->mc_mb_var_sum;
short_term_q = 0; /* avoid warning */
- if (s->avctx->flags & CODEC_FLAG_PASS2) {
+ if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
if (pict_type != AV_PICTURE_TYPE_I)
av_assert0(pict_type == rce->new_pict_type);
diff --git a/libavcodec/remove_extradata_bsf.c b/libavcodec/remove_extradata_bsf.c
index e880b95..6bb3576 100644
--- a/libavcodec/remove_extradata_bsf.c
+++ b/libavcodec/remove_extradata_bsf.c
@@ -33,7 +33,8 @@ static int remove_extradata(AVBitStreamFilterContext *bsfc, AVCodecContext *avct
s= bsfc->parser;
if(s && s->parser->split){
- if( (((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) && cmd=='a')
+ if( (((avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ||
+ (avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER)) && cmd == 'a')
||(!keyframe && cmd=='k')
||(cmd=='e' || !cmd)
){
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index e12cb21..22499db 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -477,7 +477,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
);
av_assert0(!s->avmv);
- if (s->avctx->flags2 & CODEC_FLAG2_EXPORT_MVS) {
+ if (s->avctx->flags2 & AV_CODEC_FLAG2_EXPORT_MVS) {
s->avmv = av_malloc_array(s->b_width * s->b_height, sizeof(AVMotionVector) << (s->block_max_depth*2));
}
s->avmv_index = 0;
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 33aef93..8ecbb46 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -39,7 +39,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
int i;
if(avctx->prediction_method == DWT_97
- && (avctx->flags & CODEC_FLAG_QSCALE)
+ && (avctx->flags & AV_CODEC_FLAG_QSCALE)
&& avctx->global_quality == 0){
av_log(avctx, AV_LOG_ERROR, "The 9/7 wavelet is incompatible with lossless mode.\n");
return -1;
@@ -47,8 +47,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->spatial_decomposition_type= avctx->prediction_method; //FIXME add decorrelator type r transform_type
- s->mv_scale = (avctx->flags & CODEC_FLAG_QPEL) ? 2 : 4;
- s->block_max_depth= (avctx->flags & CODEC_FLAG_4MV ) ? 1 : 0;
+ s->mv_scale = (avctx->flags & AV_CODEC_FLAG_QPEL) ? 2 : 4;
+ s->block_max_depth= (avctx->flags & AV_CODEC_FLAG_4MV ) ? 1 : 0;
for(plane_index=0; plane_index<3; plane_index++){
s->plane[plane_index].diag_mc= 1;
@@ -83,18 +83,18 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->max_ref_frames = av_clip(avctx->refs, 1, MAX_REF_FRAMES);
- if(avctx->flags&CODEC_FLAG_PASS1){
+ if(avctx->flags&AV_CODEC_FLAG_PASS1){
if(!avctx->stats_out)
avctx->stats_out = av_mallocz(256);
if (!avctx->stats_out)
return AVERROR(ENOMEM);
}
- if((avctx->flags&CODEC_FLAG_PASS2) || !(avctx->flags&CODEC_FLAG_QSCALE)){
+ if((avctx->flags&AV_CODEC_FLAG_PASS2) || !(avctx->flags&CODEC_FLAG_QSCALE)){
if(ff_rate_control_init(&s->m) < 0)
return -1;
}
- s->pass1_rc= !(avctx->flags & (CODEC_FLAG_QSCALE|CODEC_FLAG_PASS2));
+ s->pass1_rc= !(avctx->flags & (AV_CODEC_FLAG_QSCALE|CODEC_FLAG_PASS2));
switch(avctx->pix_fmt){
case AV_PIX_FMT_YUV444P:
@@ -241,7 +241,7 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
s->input_picture->data[2] + ((x*block_w)>>s->chroma_h_shift) + ((y*uvstride*block_w)>>s->chroma_v_shift)};
int P[10][2];
int16_t last_mv[3][2];
- int qpel= !!(s->avctx->flags & CODEC_FLAG_QPEL); //unused
+ int qpel= !!(s->avctx->flags & AV_CODEC_FLAG_QPEL); //unused
const int shift= 1+qpel;
MotionEstContext *c= &s->m.me;
int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref);
@@ -1578,10 +1578,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->new_picture = pict;
s->m.picture_number= avctx->frame_number;
- if(avctx->flags&CODEC_FLAG_PASS2){
+ if(avctx->flags&AV_CODEC_FLAG_PASS2){
s->m.pict_type = pic->pict_type = s->m.rc_context.entry[avctx->frame_number].new_pict_type;
s->keyframe = pic->pict_type == AV_PICTURE_TYPE_I;
- if(!(avctx->flags&CODEC_FLAG_QSCALE)) {
+ if(!(avctx->flags&AV_CODEC_FLAG_QSCALE)) {
pic->quality = ff_rate_estimate_qscale(&s->m, 0);
if (pic->quality < 0)
return -1;
@@ -1597,7 +1597,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->qlog = qscale2qlog(pic->quality);
s->lambda = pic->quality * 3/2;
}
- if (s->qlog < 0 || (!pic->quality && (avctx->flags & CODEC_FLAG_QSCALE))) {
+ if (s->qlog < 0 || (!pic->quality && (avctx->flags & AV_CODEC_FLAG_QSCALE))) {
s->qlog= LOSSLESS_QLOG;
s->lambda = 0;
}//else keep previous frame's qlog until after motion estimation
@@ -1653,7 +1653,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->m.me_method= s->avctx->me_method;
s->m.me.scene_change_score=0;
s->m.me.dia_size = avctx->dia_size;
- s->m.quarter_sample= (s->avctx->flags & CODEC_FLAG_QPEL)!=0;
+ s->m.quarter_sample= (s->avctx->flags & AV_CODEC_FLAG_QPEL)!=0;
s->m.out_format= FMT_H263;
s->m.unrestricted_mv= 1;
@@ -1722,7 +1722,7 @@ redo_frame:
if( plane_index==0
&& pic->pict_type == AV_PICTURE_TYPE_P
- && !(avctx->flags&CODEC_FLAG_PASS2)
+ && !(avctx->flags&AV_CODEC_FLAG_PASS2)
&& s->m.me.scene_change_score > s->avctx->scenechange_threshold){
ff_init_range_encoder(c, pkt->data, pkt->size);
ff_build_rac_states(c, (1LL<<32)/20, 256-8);
@@ -1808,7 +1808,7 @@ redo_frame:
predict_plane(s, s->spatial_idwt_buffer, plane_index, 1);
}
}
- if(s->avctx->flags&CODEC_FLAG_PSNR){
+ if(s->avctx->flags&AV_CODEC_FLAG_PSNR){
int64_t error= 0;
if(pict->data[plane_index]) //FIXME gray hack
@@ -1840,7 +1840,7 @@ redo_frame:
if(s->pass1_rc)
if (ff_rate_estimate_qscale(&s->m, 0) < 0)
return -1;
- if(avctx->flags&CODEC_FLAG_PASS1)
+ if(avctx->flags&AV_CODEC_FLAG_PASS1)
ff_write_pass1_stats(&s->m);
s->m.last_pict_type = s->m.pict_type;
avctx->frame_bits = s->m.frame_bits;
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 21d4acf..a5a65a8 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -685,7 +685,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
width = FFALIGN(s->width, 16);
height = FFALIGN(s->height, 16);
} else {
- if (avctx->flags & CODEC_FLAG_GRAY)
+ if (avctx->flags & AV_CODEC_FLAG_GRAY)
break;
width = FFALIGN(s->width / 4, 16);
height = FFALIGN(s->height / 4, 16);
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 0683b0d..15383a7 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -339,7 +339,7 @@ static inline void svq3_mc_dir_part(SVQ3Context *s,
: s->hdsp.put_pixels_tab)[blocksize][dxy](dest, src, sl->linesize,
height);
- if (!(h->flags & CODEC_FLAG_GRAY)) {
+ if (!(h->flags & AV_CODEC_FLAG_GRAY)) {
mx = mx + (mx < (int) x) >> 1;
my = my + (my < (int) y) >> 1;
width = width >> 1;
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 3cfc77e..f5ecd5a 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -475,7 +475,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
ADD_ENTRY(s, TIFF_YRES, TIFF_RATIONAL, 1, res);
ADD_ENTRY1(s, TIFF_RES_UNIT, TIFF_SHORT, 2);
- if (!(avctx->flags & CODEC_FLAG_BITEXACT))
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT))
ADD_ENTRY(s, TIFF_SOFTWARE_NAME, TIFF_STRING,
strlen(LIBAVCODEC_IDENT) + 1, LIBAVCODEC_IDENT);
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 4c289b0..7b2e19e 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -789,7 +789,7 @@ av_cold int ff_twinvq_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
- tctx->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ tctx->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!tctx->fdsp) {
ff_twinvq_decode_close(avctx);
return AVERROR(ENOMEM);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 42d509e..6ccbeb0 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1653,7 +1653,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->pts_correction_last_pts =
avctx->pts_correction_last_dts = INT64_MIN;
- if ( !CONFIG_GRAY && avctx->flags & CODEC_FLAG_GRAY
+ if ( !CONFIG_GRAY && avctx->flags & AV_CODEC_FLAG_GRAY
&& avctx->codec_descriptor->type == AVMEDIA_TYPE_VIDEO)
av_log(avctx, AV_LOG_WARNING,
"gray decoding requested but not enabled at configuration time\n");
@@ -2166,7 +2166,7 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
avctx->internal->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))
return ff_thread_video_encode_frame(avctx, avpkt, frame, got_packet_ptr);
- if ((avctx->flags&CODEC_FLAG_PASS1) && avctx->stats_out)
+ if ((avctx->flags&AV_CODEC_FLAG_PASS1) && avctx->stats_out)
avctx->stats_out[0] = '\0';
if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {
@@ -2621,7 +2621,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
discard_reason = AV_RL8(side + 9);
}
if (avctx->internal->skip_samples && *got_frame_ptr &&
- !(avctx->flags2 & CODEC_FLAG2_SKIP_MANUAL)) {
+ !(avctx->flags2 & AV_CODEC_FLAG2_SKIP_MANUAL)) {
if(frame->nb_samples <= avctx->internal->skip_samples){
*got_frame_ptr = 0;
avctx->internal->skip_samples -= frame->nb_samples;
@@ -2651,7 +2651,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
}
if (discard_padding > 0 && discard_padding <= frame->nb_samples && *got_frame_ptr &&
- !(avctx->flags2 & CODEC_FLAG2_SKIP_MANUAL)) {
+ !(avctx->flags2 & AV_CODEC_FLAG2_SKIP_MANUAL)) {
if (discard_padding == frame->nb_samples) {
*got_frame_ptr = 0;
} else {
@@ -2670,7 +2670,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
}
}
- if ((avctx->flags2 & CODEC_FLAG2_SKIP_MANUAL) && *got_frame_ptr) {
+ if ((avctx->flags2 & AV_CODEC_FLAG2_SKIP_MANUAL) && *got_frame_ptr) {
AVFrameSideData *fside = av_frame_new_side_data(frame, AV_FRAME_DATA_SKIP_SAMPLES, 10);
if (fside) {
AV_WL32(fside->data, avctx->internal->skip_samples);
@@ -3233,10 +3233,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
return;
}
if (encode) {
- if (enc->flags & CODEC_FLAG_PASS1)
+ if (enc->flags & AV_CODEC_FLAG_PASS1)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", pass 1");
- if (enc->flags & CODEC_FLAG_PASS2)
+ if (enc->flags & AV_CODEC_FLAG_PASS2)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", pass 2");
}
diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index e7331b1..fb98177 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -155,7 +155,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
vble_restore_plane(ctx, pic, &gb, 0, offset, avctx->width, avctx->height);
/* Chroma */
- if (!(ctx->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(ctx->avctx->flags & AV_CODEC_FLAG_GRAY)) {
offset += avctx->width * avctx->height;
vble_restore_plane(ctx, pic, &gb, 1, offset, width_uv, height_uv);
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 3541ba7..287d81d 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -99,7 +99,7 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][3],
s->dest[0] - v_dist * s->linesize - 8,
stride_y);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][4],
s->dest[1] - 8 * s->uvlinesize - 8,
s->uvlinesize);
@@ -126,7 +126,7 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][3],
s->dest[0] - v_dist * s->linesize + 8,
stride_y);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][4],
s->dest[1] - 8 * s->uvlinesize,
s->uvlinesize);
@@ -1327,7 +1327,7 @@ static int vc1_decode_p_mb(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, val, mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@@ -1348,7 +1348,7 @@ static int vc1_decode_p_mb(VC1Context *v)
} else if (val) {
pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block,
s->dest[dst_idx] + off, (i & 4) ? s->uvlinesize : s->linesize,
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), &block_tt);
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), &block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
@@ -1438,7 +1438,7 @@ static int vc1_decode_p_mb(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@@ -1460,7 +1460,7 @@ static int vc1_decode_p_mb(VC1Context *v)
pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
(i & 4) ? s->uvlinesize : s->linesize,
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY),
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY),
&block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
@@ -1586,7 +1586,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, val, mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (i < 4) {
@@ -1673,7 +1673,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v)
pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
(i & 4) ? s->uvlinesize : (s->linesize << fieldtx),
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), &block_tt);
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), &block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
@@ -1752,7 +1752,7 @@ static int vc1_decode_p_mb_intfi(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, val, mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);
@@ -1806,7 +1806,7 @@ static int vc1_decode_p_mb_intfi(VC1Context *v)
pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
(i & 4) ? s->uvlinesize : s->linesize,
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY),
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY),
&block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
@@ -1953,7 +1953,7 @@ static void vc1_decode_b_mb(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, val, mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@@ -1967,7 +1967,7 @@ static void vc1_decode_b_mb(VC1Context *v)
vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
(i & 4) ? s->uvlinesize : s->linesize,
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), NULL);
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), NULL);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
first_block = 0;
@@ -2028,7 +2028,7 @@ static void vc1_decode_b_mb_intfi(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, val, mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@@ -2126,7 +2126,7 @@ static void vc1_decode_b_mb_intfi(VC1Context *v)
vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
(i & 4) ? s->uvlinesize : s->linesize,
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), NULL);
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), NULL);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
first_block = 0;
@@ -2251,7 +2251,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v)
vc1_decode_intra_block(v, s->block[i], i, val, mquant,
(i & 4) ? v->codingset2 : v->codingset);
- if (CONFIG_GRAY && i > 3 && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && i > 3 && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (i < 4) {
@@ -2417,7 +2417,7 @@ static int vc1_decode_b_mb_intfr(VC1Context *v)
pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
(i & 4) ? s->uvlinesize : (s->linesize << fieldtx),
- CONFIG_GRAY && (i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), &block_tt);
+ CONFIG_GRAY && (i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), &block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
@@ -2560,7 +2560,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
vc1_decode_i_block(v, s->block[k], k, val, (k < 4) ? v->codingset : v->codingset2);
- if (CONFIG_GRAY && k > 3 && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && k > 3 && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[k]);
if (v->pq >= 9 && v->overlap) {
@@ -2584,7 +2584,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
if (s->mb_x) {
v->vc1dsp.vc1_h_overlap(s->dest[0], s->linesize);
v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
v->vc1dsp.vc1_h_overlap(s->dest[1], s->uvlinesize);
v->vc1dsp.vc1_h_overlap(s->dest[2], s->uvlinesize);
}
@@ -2594,7 +2594,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
if (!s->first_slice_line) {
v->vc1dsp.vc1_v_overlap(s->dest[0], s->linesize);
v->vc1dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
v->vc1dsp.vc1_v_overlap(s->dest[1], s->uvlinesize);
v->vc1dsp.vc1_v_overlap(s->dest[2], s->uvlinesize);
}
@@ -2723,7 +2723,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
vc1_decode_i_block_adv(v, block[k], k, val,
(k < 4) ? v->codingset : v->codingset2, mquant);
- if (CONFIG_GRAY && k > 3 && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && k > 3 && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(block[k]);
}
diff --git a/libavcodec/vc1_loopfilter.c b/libavcodec/vc1_loopfilter.c
index ad0945f..025776b 100644
--- a/libavcodec/vc1_loopfilter.c
+++ b/libavcodec/vc1_loopfilter.c
@@ -40,7 +40,7 @@ void ff_vc1_loop_filter_iblk(VC1Context *v, int pq)
if (s->mb_x)
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize, s->linesize, pq);
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize + 8, s->linesize, pq);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))
for (j = 0; j < 2; j++) {
v->vc1dsp.vc1_v_loop_filter8(s->dest[j + 1], s->uvlinesize, pq);
if (s->mb_x)
@@ -52,7 +52,7 @@ void ff_vc1_loop_filter_iblk(VC1Context *v, int pq)
if (s->mb_y == s->end_mb_y - 1) {
if (s->mb_x) {
v->vc1dsp.vc1_h_loop_filter16(s->dest[0], s->linesize, pq);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
v->vc1dsp.vc1_h_loop_filter8(s->dest[1], s->uvlinesize, pq);
v->vc1dsp.vc1_h_loop_filter8(s->dest[2], s->uvlinesize, pq);
}
@@ -76,7 +76,7 @@ void ff_vc1_loop_filter_iblk_delayed(VC1Context *v, int pq)
if (s->mb_x >= 2)
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize - 16, s->linesize, pq);
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize - 8, s->linesize, pq);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))
for (j = 0; j < 2; j++) {
v->vc1dsp.vc1_v_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize - 8, s->uvlinesize, pq);
if (s->mb_x >= 2) {
@@ -94,7 +94,7 @@ void ff_vc1_loop_filter_iblk_delayed(VC1Context *v, int pq)
if (s->mb_x)
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize, s->linesize, pq);
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize + 8, s->linesize, pq);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))
for (j = 0; j < 2; j++) {
v->vc1dsp.vc1_v_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize, s->uvlinesize, pq);
if (s->mb_x >= 2) {
@@ -110,7 +110,7 @@ void ff_vc1_loop_filter_iblk_delayed(VC1Context *v, int pq)
if (s->mb_x >= 2)
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize - 16, s->linesize, pq);
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize - 8, s->linesize, pq);
- if (s->mb_x >= 2 && (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))) {
+ if (s->mb_x >= 2 && (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))) {
for (j = 0; j < 2; j++) {
v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize - 8, s->uvlinesize, pq);
}
@@ -121,7 +121,7 @@ void ff_vc1_loop_filter_iblk_delayed(VC1Context *v, int pq)
if (s->mb_x)
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize, s->linesize, pq);
v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize + 8, s->linesize, pq);
- if (s->mb_x && (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))) {
+ if (s->mb_x && (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY))) {
for (j = 0; j < 2; j++) {
v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize, s->uvlinesize, pq);
}
@@ -155,7 +155,7 @@ void ff_vc1_smooth_overlap_filter_iblk(VC1Context *v)
v->block[v->cur_blk_idx][0]);
v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][3],
v->block[v->cur_blk_idx][2]);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][4],
v->block[v->cur_blk_idx][4]);
v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][5],
@@ -174,7 +174,7 @@ void ff_vc1_smooth_overlap_filter_iblk(VC1Context *v)
v->block[v->cur_blk_idx][0]);
v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][3],
v->block[v->cur_blk_idx][1]);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][4],
v->block[v->cur_blk_idx][4]);
v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][5],
@@ -194,7 +194,7 @@ void ff_vc1_smooth_overlap_filter_iblk(VC1Context *v)
v->block[v->left_blk_idx][0]);
v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][3],
v->block[v->left_blk_idx][1]);
- if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][4],
v->block[v->left_blk_idx][4]);
v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][5],
@@ -336,7 +336,7 @@ void ff_vc1_apply_p_loop_filter(VC1Context *v)
{
MpegEncContext *s = &v->s;
int i;
- int block_count = CONFIG_GRAY && (s->avctx->flags & CODEC_FLAG_GRAY) ? 4 : 6;
+ int block_count = CONFIG_GRAY && (s->avctx->flags & AV_CODEC_FLAG_GRAY) ? 4 : 6;
for (i = 0; i < block_count; i++) {
vc1_apply_p_v_loop_filter(v, i);
diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
index 5358243..4467646 100644
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -270,7 +270,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
}
/* for grayscale we should not try to read from unknown area */
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY) {
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY) {
srcU = s->sc.edge_emu_buffer + 18 * s->linesize;
srcV = s->sc.edge_emu_buffer + 18 * s->linesize;
}
@@ -332,7 +332,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
s->hdsp.put_no_rnd_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16);
}
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
/* Chroma MC always uses qpel bilinear */
uvmx = (uvmx & 3) << 1;
@@ -518,7 +518,7 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
if (!v->field_mode && !v->s.last_picture.f->data[0])
return;
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
/* calculate chroma MV vector from four luma MVs */
@@ -655,7 +655,7 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
int use_ic;
uint8_t (*lutuv)[256];
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
for (i = 0; i < 4; i++) {
@@ -801,7 +801,7 @@ void ff_vc1_interp_mc(VC1Context *v)
}
/* for grayscale we should not try to read from unknown area */
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY) {
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY) {
srcU = s->sc.edge_emu_buffer + 18 * s->linesize;
srcV = s->sc.edge_emu_buffer + 18 * s->linesize;
}
@@ -865,7 +865,7 @@ void ff_vc1_interp_mc(VC1Context *v)
s->hdsp.avg_no_rnd_pixels_tab[dxy](s->dest[0], srcY, s->linesize, 16);
}
- if (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY)
+ if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
/* Chroma MC always uses qpel blilinear */
uvmx = (uvmx & 3) << 1;
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index d7a0cef..3045ccf 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -191,7 +191,7 @@ static void vc1_draw_sprites(VC1Context *v, SpriteData* sd)
}
alpha = av_clip_uint16(sd->coefs[1][6]);
- for (plane = 0; plane < (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY ? 1 : 3); plane++) {
+ for (plane = 0; plane < (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY ? 1 : 3); plane++) {
int width = v->output_width>>!!plane;
for (row = 0; row < v->output_height>>!!plane; row++) {
@@ -312,7 +312,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx)
wrong but it looks better than doing nothing. */
if (f && f->data[0])
- for (plane = 0; plane < (CONFIG_GRAY && s->avctx->flags & CODEC_FLAG_GRAY ? 1 : 3); plane++)
+ for (plane = 0; plane < (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY ? 1 : 3); plane++)
for (i = 0; i < v->sprite_height>>!!plane; i++)
memset(f->data[plane] + i * f->linesize[plane],
plane ? 128 : 0, f->linesize[plane]);
@@ -428,7 +428,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
if (!avctx->extradata_size || !avctx->extradata)
return -1;
- if (!CONFIG_GRAY || !(avctx->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(avctx->flags & AV_CODEC_FLAG_GRAY))
avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);
else {
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
@@ -630,7 +630,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
v->second_field = 0;
- if(s->avctx->flags & CODEC_FLAG_LOW_DELAY)
+ if(s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
/* no supplementary picture */
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 2926e8e..c191f31 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -998,7 +998,7 @@ static int vorbis_parse_id_hdr(vorbis_context *vc)
ff_mdct_init(&vc->mdct[0], bl0, 1, -1.0);
ff_mdct_init(&vc->mdct[1], bl1, 1, -1.0);
- vc->fdsp = avpriv_float_dsp_alloc(vc->avctx->flags & CODEC_FLAG_BITEXACT);
+ vc->fdsp = avpriv_float_dsp_alloc(vc->avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!vc->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index 40d907e..31a5ceb 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1178,7 +1178,7 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx)
goto error;
avctx->bit_rate = 0;
- if (avctx->flags & CODEC_FLAG_QSCALE)
+ if (avctx->flags & AV_CODEC_FLAG_QSCALE)
venc->quality = avctx->global_quality / (float)FF_QP2LAMBDA;
else
venc->quality = 8;
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 2492026..397e895 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1095,7 +1095,7 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
return residual_eob_run;
/* reverse prediction of the C-plane DC coefficients */
- if (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ if (!(s->avctx->flags & AV_CODEC_FLAG_GRAY)) {
reverse_dc_prediction(s, s->fragment_start[1],
s->fragment_width[1], s->fragment_height[1]);
reverse_dc_prediction(s, s->fragment_start[2],
@@ -1518,7 +1518,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
if (!s->flipped_image)
stride = -stride;
- if (CONFIG_GRAY && plane && (s->avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && plane && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
/* for each superblock row in the slice (both of them)... */
@@ -1738,7 +1738,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
if (avctx->codec_id != AV_CODEC_ID_THEORA)
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
- ff_hpeldsp_init(&s->hdsp, avctx->flags | CODEC_FLAG_BITEXACT);
+ ff_hpeldsp_init(&s->hdsp, avctx->flags | AV_CODEC_FLAG_BITEXACT);
ff_videodsp_init(&s->vdsp, 8);
ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
@@ -2326,7 +2326,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
ret = ff_set_dimensions(avctx, s->width, s->height);
if (ret < 0)
return ret;
- if (!(avctx->flags2 & CODEC_FLAG2_IGNORE_CROP)) {
+ if (!(avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP)) {
avctx->width = visible_width;
avctx->height = visible_height;
// translate offsets from theora axis ([0,0] lower left)
@@ -2334,7 +2334,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
s->offset_x = offset_x;
s->offset_y = s->height - visible_height - offset_y;
- if ((s->offset_x & 0x1F) && !(avctx->flags & CODEC_FLAG_UNALIGNED)) {
+ if ((s->offset_x & 0x1F) && !(avctx->flags & AV_CODEC_FLAG_UNALIGNED)) {
s->offset_x &= ~0x1F;
if (!s->offset_x_warned) {
s->offset_x_warned = 1;
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index 4c1bf00..006d8d5 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -338,7 +338,7 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2)
#endif /* TRACE */
}
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index c319b39..22b10d7 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -288,7 +288,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
s->avctx = avctx;
- s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c
index 0ebe02d..9c3acbc 100644
--- a/libavcodec/wmv2.c
+++ b/libavcodec/wmv2.c
@@ -89,7 +89,7 @@ void ff_wmv2_add_mb(MpegEncContext *s, int16_t block1[6][64],
wmv2_add_block(w, block1[2], dest_y + 8 * s->linesize, s->linesize, 2);
wmv2_add_block(w, block1[3], dest_y + 8 + 8 * s->linesize, s->linesize, 3);
- if (s->avctx->flags & CODEC_FLAG_GRAY)
+ if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
wmv2_add_block(w, block1[4], dest_cb, s->uvlinesize, 4);
@@ -141,7 +141,7 @@ void ff_mspel_motion(MpegEncContext *s, uint8_t *dest_y,
w->wdsp.put_mspel_pixels_tab[dxy](dest_y + 8 * linesize, ptr + 8 * linesize, linesize);
w->wdsp.put_mspel_pixels_tab[dxy](dest_y + 8 + 8 * linesize, ptr + 8 + 8 * linesize, linesize);
- if (s->avctx->flags & CODEC_FLAG_GRAY)
+ if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
dxy = 0;
diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c
index 8c0a0e9..1479992 100644
--- a/libavcodec/x86/hpeldsp_init.c
+++ b/libavcodec/x86/hpeldsp_init.c
@@ -230,7 +230,7 @@ static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int cpu_flags)
c->avg_pixels_tab[1][2] = ff_avg_pixels8_y2_mmxext;
c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_mmxext;
- if (!(flags & CODEC_FLAG_BITEXACT)) {
+ if (!(flags & AV_CODEC_FLAG_BITEXACT)) {
c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmxext;
c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_mmxext;
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_mmxext;
@@ -240,7 +240,7 @@ static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int cpu_flags)
c->avg_pixels_tab[1][3] = ff_avg_approx_pixels8_xy2_mmxext;
}
- if (CONFIG_VP3_DECODER && flags & CODEC_FLAG_BITEXACT) {
+ if (CONFIG_VP3_DECODER && flags & AV_CODEC_FLAG_BITEXACT) {
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_mmxext;
c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_exact_mmxext;
}
@@ -266,7 +266,7 @@ static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int cpu_flags)
c->avg_pixels_tab[1][2] = ff_avg_pixels8_y2_3dnow;
c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_3dnow;
- if (!(flags & CODEC_FLAG_BITEXACT)){
+ if (!(flags & AV_CODEC_FLAG_BITEXACT)){
c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_3dnow;
c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_3dnow;
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_3dnow;
@@ -276,7 +276,7 @@ static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int cpu_flags)
c->avg_pixels_tab[1][3] = ff_avg_approx_pixels8_xy2_3dnow;
}
- if (CONFIG_VP3_DECODER && flags & CODEC_FLAG_BITEXACT) {
+ if (CONFIG_VP3_DECODER && flags & AV_CODEC_FLAG_BITEXACT) {
c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow;
c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_exact_3dnow;
}
diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c
index 255df50..49f50d0 100644
--- a/libavcodec/x86/me_cmp_init.c
+++ b/libavcodec/x86/me_cmp_init.c
@@ -573,7 +573,7 @@ av_cold void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
c->vsad[4] = vsad_intra16_mmx;
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
c->vsad[0] = vsad16_mmx;
}
}
@@ -610,7 +610,7 @@ av_cold void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
c->vsad[4] = ff_vsad_intra16_mmxext;
c->vsad[5] = ff_vsad_intra8_mmxext;
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
c->pix_abs[0][3] = ff_sad16_approx_xy2_mmxext;
c->pix_abs[1][3] = ff_sad8_approx_xy2_mmxext;
@@ -634,7 +634,7 @@ av_cold void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
c->pix_abs[0][2] = ff_sad16_y2_sse2;
c->vsad[4] = ff_vsad_intra16_sse2;
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
c->pix_abs[0][3] = ff_sad16_approx_xy2_sse2;
c->vsad[0] = ff_vsad16_approx_sse2;
}
diff --git a/libavcodec/x86/mpegvideo.c b/libavcodec/x86/mpegvideo.c
index 133ae80..6027874 100644
--- a/libavcodec/x86/mpegvideo.c
+++ b/libavcodec/x86/mpegvideo.c
@@ -454,7 +454,7 @@ av_cold void ff_mpv_common_init_x86(MpegEncContext *s)
s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_mmx;
s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_mmx;
s->dct_unquantize_mpeg1_inter = dct_unquantize_mpeg1_inter_mmx;
- if (!(s->avctx->flags & CODEC_FLAG_BITEXACT))
+ if (!(s->avctx->flags & AV_CODEC_FLAG_BITEXACT))
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_mmx;
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_mmx;
}
diff --git a/libavcodec/x86/mpegvideoencdsp_init.c b/libavcodec/x86/mpegvideoencdsp_init.c
index 2a4db61..532836c 100644
--- a/libavcodec/x86/mpegvideoencdsp_init.c
+++ b/libavcodec/x86/mpegvideoencdsp_init.c
@@ -242,7 +242,7 @@ av_cold void ff_mpegvideoencdsp_init_x86(MpegvideoEncDSPContext *c,
#if HAVE_INLINE_ASM
if (INLINE_MMX(cpu_flags)) {
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
c->try_8x8basis = try_8x8basis_mmx;
}
c->add_8x8basis = add_8x8basis_mmx;
@@ -253,7 +253,7 @@ av_cold void ff_mpegvideoencdsp_init_x86(MpegvideoEncDSPContext *c,
}
if (INLINE_AMD3DNOW(cpu_flags)) {
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
c->try_8x8basis = try_8x8basis_3dnow;
}
c->add_8x8basis = add_8x8basis_3dnow;
@@ -261,7 +261,7 @@ av_cold void ff_mpegvideoencdsp_init_x86(MpegvideoEncDSPContext *c,
#if HAVE_SSSE3_INLINE
if (INLINE_SSSE3(cpu_flags)) {
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
c->try_8x8basis = try_8x8basis_ssse3;
}
c->add_8x8basis = add_8x8basis_ssse3;
diff --git a/libavcodec/x86/vp3dsp_init.c b/libavcodec/x86/vp3dsp_init.c
index 354e1a1..2ece9ab 100644
--- a/libavcodec/x86/vp3dsp_init.c
+++ b/libavcodec/x86/vp3dsp_init.c
@@ -59,7 +59,7 @@ av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags)
if (EXTERNAL_MMXEXT(cpu_flags)) {
c->idct_dc_add = ff_vp3_idct_dc_add_mmxext;
- if (!(flags & CODEC_FLAG_BITEXACT)) {
+ if (!(flags & AV_CODEC_FLAG_BITEXACT)) {
c->v_loop_filter = ff_vp3_v_loop_filter_mmxext;
c->h_loop_filter = ff_vp3_h_loop_filter_mmxext;
}
OpenPOWER on IntegriCloud