lavc: AV-prefix all codec flags

Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
pull/161/head
Vittorio Giovara 10 years ago
parent 4b6b1082a7
commit 7c6eb0a1b7
  1. 6
      avconv.c
  2. 10
      avconv_opt.c
  3. 3
      avplay.c
  4. 2
      doc/examples/avcodec.c
  5. 4
      doc/examples/output.c
  6. 2
      doc/examples/transcode_aac.c
  7. 2
      libavcodec/4xm.c
  8. 2
      libavcodec/aacdec.c
  9. 6
      libavcodec/aacenc.c
  10. 2
      libavcodec/aacpsy.c
  11. 4
      libavcodec/ac3dec.c
  12. 2
      libavcodec/ac3enc.c
  13. 2
      libavcodec/ac3enc_float.c
  14. 2
      libavcodec/asvdec.c
  15. 2
      libavcodec/asvenc.c
  16. 2
      libavcodec/atrac1.c
  17. 2
      libavcodec/atrac3.c
  18. 2
      libavcodec/atrac3plusdec.c
  19. 101
      libavcodec/avcodec.h
  20. 2
      libavcodec/dcadec.c
  21. 2
      libavcodec/dnxhddata.c
  22. 4
      libavcodec/dnxhddec.c
  23. 2
      libavcodec/dnxhdenc.c
  24. 2
      libavcodec/dpxenc.c
  25. 2
      libavcodec/dump_extradata_bsf.c
  26. 2
      libavcodec/dvenc.c
  27. 4
      libavcodec/eamad.c
  28. 4
      libavcodec/eatgq.c
  29. 2
      libavcodec/eatqi.c
  30. 12
      libavcodec/ffv1enc.c
  31. 2
      libavcodec/h263.h
  32. 4
      libavcodec/h263dec.c
  33. 12
      libavcodec/h264.c
  34. 4
      libavcodec/h264_loopfilter.c
  35. 4
      libavcodec/h264_mb.c
  36. 10
      libavcodec/h264_mb_template.c
  37. 4
      libavcodec/h264_ps.c
  38. 10
      libavcodec/h264_slice.c
  39. 6
      libavcodec/hevc_ps.c
  40. 16
      libavcodec/huffyuvdec.c
  41. 22
      libavcodec/huffyuvenc.c
  42. 2
      libavcodec/imc.c
  43. 2
      libavcodec/ituh263enc.c
  44. 2
      libavcodec/jpeg2000dec.c
  45. 4
      libavcodec/libfaac.c
  46. 8
      libavcodec/libfdk-aacenc.c
  47. 4
      libavcodec/libmp3lame.c
  48. 4
      libavcodec/libopenh264enc.c
  49. 6
      libavcodec/libschroedingerenc.c
  50. 4
      libavcodec/libspeexenc.c
  51. 12
      libavcodec/libtheoraenc.c
  52. 2
      libavcodec/libtwolame.c
  53. 4
      libavcodec/libvo-aacenc.c
  54. 4
      libavcodec/libvorbis.c
  55. 8
      libavcodec/libvpxenc.c
  56. 16
      libavcodec/libx264.c
  57. 6
      libavcodec/libx265.c
  58. 16
      libavcodec/libxavs.c
  59. 20
      libavcodec/libxvid.c
  60. 2
      libavcodec/mdec.c
  61. 2
      libavcodec/mjpegenc_common.c
  62. 16
      libavcodec/motion_est.c
  63. 12
      libavcodec/mpeg12dec.c
  64. 2
      libavcodec/mpeg12enc.c
  65. 4
      libavcodec/mpeg4videodec.c
  66. 16
      libavcodec/mpeg4videoenc.c
  67. 2
      libavcodec/mpegaudiodec_template.c
  68. 16
      libavcodec/mpegvideo.c
  69. 70
      libavcodec/mpegvideo_enc.c
  70. 16
      libavcodec/mpegvideo_motion.c
  71. 2
      libavcodec/mpegvideo_xvmc.c
  72. 2
      libavcodec/nellymoserdec.c
  73. 2
      libavcodec/nellymoserenc.c
  74. 14
      libavcodec/nvenc.c
  75. 2
      libavcodec/on2avc.c
  76. 44
      libavcodec/options_table.h
  77. 2
      libavcodec/opus_celt.c
  78. 6
      libavcodec/parser.c
  79. 2
      libavcodec/pngenc.c
  80. 4
      libavcodec/proresenc.c
  81. 6
      libavcodec/pthread.c
  82. 4
      libavcodec/qsvenc.c
  83. 2
      libavcodec/ra288.c
  84. 14
      libavcodec/ratecontrol.c
  85. 3
      libavcodec/remove_extradata_bsf.c
  86. 2
      libavcodec/svq1dec.c
  87. 2
      libavcodec/svq3.c
  88. 2
      libavcodec/tiffenc.c
  89. 2
      libavcodec/twinvq.c
  90. 4
      libavcodec/utils.c
  91. 2
      libavcodec/vble.c
  92. 36
      libavcodec/vc1_block.c
  93. 6
      libavcodec/vc1_loopfilter.c
  94. 12
      libavcodec/vc1_mc.c
  95. 6
      libavcodec/vc1dec.c
  96. 2
      libavcodec/vorbisdec.c
  97. 2
      libavcodec/vorbisenc.c
  98. 10
      libavcodec/vp3.c
  99. 2
      libavcodec/wma.c
  100. 2
      libavcodec/wmaprodec.c
  101. Some files were not shown because too many files have changed in this diff Show More

@ -508,7 +508,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
} else {
int got_packet;
if (enc->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME) &&
if (enc->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) &&
ost->top_field_first >= 0)
in_picture->top_field_first = !!ost->top_field_first;
@ -576,7 +576,7 @@ static void do_video_stats(OutputStream *ost, int frame_size)
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
if (enc->flags&CODEC_FLAG_PSNR)
if (enc->flags & AV_CODEC_FLAG_PSNR)
fprintf(vstats_file, "PSNR= %6.2f ", psnr(enc->coded_frame->error[0] / (enc->width * enc->height * 255.0 * 255.0)));
FF_ENABLE_DEPRECATION_WARNINGS
#endif
@ -891,7 +891,7 @@ static void print_report(int is_last_report, int64_t timer_start)
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
if (enc->flags&CODEC_FLAG_PSNR) {
if (enc->flags & AV_CODEC_FLAG_PSNR) {
int j;
double error, error_sum = 0;
double scale, scale_sum = 0;

@ -984,12 +984,12 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st);
if (qscale >= 0) {
ost->enc_ctx->flags |= CODEC_FLAG_QSCALE;
ost->enc_ctx->flags |= AV_CODEC_FLAG_QSCALE;
ost->enc_ctx->global_quality = FF_QP2LAMBDA * qscale;
}
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
ost->enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
ost->enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
av_opt_get_int(o->g->sws_opts, "sws_flags", 0, &ost->sws_flags);
@ -1165,9 +1165,9 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
MATCH_PER_STREAM_OPT(pass, i, do_pass, oc, st);
if (do_pass) {
if (do_pass == 1) {
video_enc->flags |= CODEC_FLAG_PASS1;
video_enc->flags |= AV_CODEC_FLAG_PASS1;
} else {
video_enc->flags |= CODEC_FLAG_PASS2;
video_enc->flags |= AV_CODEC_FLAG_PASS2;
}
}
@ -1187,7 +1187,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
if (!strcmp(ost->enc->name, "libx264")) {
av_dict_set(&ost->encoder_opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE);
} else {
if (video_enc->flags & CODEC_FLAG_PASS1) {
if (video_enc->flags & AV_CODEC_FLAG_PASS1) {
f = fopen(logfilename, "wb");
if (!f) {
av_log(NULL, AV_LOG_FATAL, "Cannot write log file '%s' for pass-1 encoding: %s\n",

@ -2089,7 +2089,8 @@ static int stream_component_open(VideoState *is, int stream_index)
avctx->skip_loop_filter = skip_loop_filter;
avctx->error_concealment = error_concealment;
if (fast) avctx->flags2 |= CODEC_FLAG2_FAST;
if (fast)
avctx->flags2 |= AV_CODEC_FLAG2_FAST;
if (!av_dict_get(opts, "threads", NULL, 0))
av_dict_set(&opts, "threads", "auto", 0);

@ -481,7 +481,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
picture = av_frame_alloc();
if(codec->capabilities&CODEC_CAP_TRUNCATED)
c->flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */
c->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames
/* For some codecs, such as msmpeg4 and mpeg4, width and height
MUST be initialized there because this information is not

@ -104,7 +104,7 @@ static void add_audio_stream(OutputStream *ost, AVFormatContext *oc,
// some formats want stream headers to be separate
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
/* initialize sample format conversion;
* to simplify the code, we always pass the data through lavr, even
@ -358,7 +358,7 @@ static void add_video_stream(OutputStream *ost, AVFormatContext *oc,
}
/* Some formats want stream headers to be separate. */
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
static AVFrame *alloc_picture(enum AVPixelFormat pix_fmt, int width, int height)

@ -191,7 +191,7 @@ static int open_output_file(const char *filename,
* Mark the encoder so that it behaves accordingly.
*/
if ((*output_format_context)->oformat->flags & AVFMT_GLOBALHEADER)
(*output_codec_context)->flags |= CODEC_FLAG_GLOBAL_HEADER;
(*output_codec_context)->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
/** Open the encoder for the audio stream to use it later. */
if ((error = avcodec_open2(*output_codec_context, output_codec, NULL)) < 0) {

@ -534,7 +534,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]);
}

@ -1063,7 +1063,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
ff_aac_sbr_init();
avpriv_float_dsp_init(&ac->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&ac->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ac->random_state = 0x1f2e3d4c;

@ -581,7 +581,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));
@ -654,7 +654,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);
@ -690,7 +690,7 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
{
int ret = 0;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
// window init
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);

@ -256,7 +256,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);

@ -182,8 +182,8 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
ff_mdct_init(&s->imdct_512, 9, 1, 1.0);
ff_kbd_window_init(s->window, 5.0, 256);
ff_bswapdsp_init(&s->bdsp);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_fmt_convert_init(&s->fmt_conv, avctx);
av_lfg_init(&s->dith_state, 0);

@ -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);

@ -129,7 +129,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;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
return ff_ac3_encode_init(avctx);
}

@ -196,7 +196,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]);
}

@ -206,7 +206,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++)

@ -356,7 +356,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
ff_atrac_generate_tables();
avpriv_float_dsp_init(&q->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&q->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
q->bands[0] = q->low;
q->bands[1] = q->mid;

@ -907,7 +907,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
}
ff_atrac_init_gain_compensation(&q->gainc_ctx, 4, 3);
avpriv_float_dsp_init(&q->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&q->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
q->units = av_mallocz(sizeof(*q->units) * avctx->channels);
if (!q->units) {

@ -148,7 +148,7 @@ static av_cold int atrac3p_decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
avpriv_float_dsp_init(&ctx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&ctx->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
/* initialize IPQF */
ff_mdct_init(&ctx->ipqf_dct_ctx, 5, 1, 32.0 / 32768.0);

@ -613,6 +613,101 @@ typedef struct RcOverride{
Note: Not everything is supported yet.
*/
/**
* 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 (1 << 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)
/**
* 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)
/**
* Allow decoders to produce frames with data planes that are not aligned
* to CPU requirements (e.g. due to cropping).
@ -1160,14 +1255,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.
*/
@ -2482,7 +2577,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];

@ -1514,7 +1514,7 @@ static av_cold int dca_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
dca_init_vlcs();
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_mdct_init(&s->imdct, 6, 1, 1.0);
ff_synth_filter_init(&s->synth);
ff_dcadsp_init(&s->dcadsp);

@ -1208,7 +1208,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 < sizeof(cid->bit_rates); j++) {
if (cid->bit_rates[j] == mbs)

@ -359,7 +359,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]);
@ -372,7 +372,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]);

@ -335,7 +335,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;
}

@ -130,7 +130,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 */

@ -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)*/){

@ -197,7 +197,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) +

@ -98,7 +98,7 @@ static inline void comp_block(MadContext *t, AVFrame *frame,
frame->linesize[0],
t->last_frame->data[0] + (mb_y*16 + ((j&2)<<2) + mv_y)*t->last_frame->linesize[0] + mb_x*16 + ((j&1)<<3) + mv_x,
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;
comp(frame->data[index] + (mb_y*8)*frame->linesize[index] + mb_x * 8,
frame->linesize[index],
@ -114,7 +114,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,

@ -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]);
}

@ -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]);
}

@ -204,7 +204,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 {
@ -566,7 +566,7 @@ static av_cold int ffv1_encode_init(AVCodecContext *avctx)
s->version = 0;
if ((avctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2)) ||
if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) ||
avctx->slices > 1)
s->version = FFMAX(s->version, 2);
@ -735,7 +735,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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]));
@ -829,7 +829,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);
for (i = 0; i < s->quant_table_count; i++)
for (j = 0; j < s->slice_count; j++) {
@ -1006,7 +1006,7 @@ static int ffv1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
buf_p += bytes;
}
if ((avctx->flags & CODEC_FLAG_PASS1) && (f->picture_number & 31) == 0) {
if ((avctx->flags & AV_CODEC_FLAG_PASS1) && (f->picture_number & 31) == 0) {
int j, k, m;
char *p = avctx->stats_out;
char *end = p + STATS_OUT_SIZE;
@ -1046,7 +1046,7 @@ static int ffv1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
}
snprintf(p, end - p, "%d\n", f->gob_count);
} else if (avctx->flags & CODEC_FLAG_PASS1)
} else if (avctx->flags & AV_CODEC_FLAG_PASS1)
avctx->stats_out[0] = '\0';
#if FF_API_CODED_FRAME

@ -117,7 +117,7 @@ static inline int h263_get_motion_length(MpegEncContext * s, 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(s, x, f_code)
+h263_get_motion_length(s, y, f_code));

@ -152,7 +152,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)
@ -393,7 +393,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) {

@ -1375,7 +1375,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
int ret = 0;
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;
@ -1493,7 +1493,7 @@ again:
h->cur_pic_ptr->recovered |= !!(h->frame_recovered & FRAME_RECOVERED_IDR);
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 &&
@ -1689,22 +1689,22 @@ out:
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)
return 0;
av_log(avctx, AV_LOG_ERROR, "no frame!\n");
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);
*got_frame = 0;
if (h->next_output_pic && ((avctx->flags & CODEC_FLAG_OUTPUT_CORRUPT) ||
if (h->next_output_pic && ((avctx->flags & AV_CODEC_FLAG_OUTPUT_CORRUPT) ||
h->next_output_pic->recovered)) {
if (!h->next_output_pic->recovered)
h->next_output_pic->f->flags |= AV_FRAME_FLAG_CORRUPT;

@ -244,7 +244,7 @@ static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
unsigned int uvlinesize,
int pixel_shift)
{
int chroma = !(CONFIG_GRAY && (h->flags&CODEC_FLAG_GRAY));
int chroma = !(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
int chroma444 = CHROMA444(h);
int chroma422 = CHROMA422(h);
@ -721,7 +721,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 = !(CONFIG_GRAY && (h->flags&CODEC_FLAG_GRAY));
int chroma = !(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;

@ -249,7 +249,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 */) {
@ -562,7 +562,7 @@ static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceConte
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_top) {
if (deblock_topleft) {

@ -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);
@ -140,7 +140,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 < block_h; i++) {
memset(dest_cb + i * uvlinesize, 128, 8);
@ -162,7 +162,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);
}
@ -193,7 +193,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) {
@ -283,7 +283,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] +

@ -444,7 +444,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
unsigned int crop_top = get_ue_golomb(&h->gb);
unsigned int crop_bottom = get_ue_golomb(&h->gb);
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);
@ -461,7 +461,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
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 "

@ -632,7 +632,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);
@ -675,7 +675,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);
@ -1125,7 +1125,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])
@ -1610,7 +1610,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;
@ -2093,7 +2093,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->pps.cabac) {
/* realign */

@ -519,7 +519,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",
@ -741,7 +741,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",
@ -898,7 +898,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",

@ -571,7 +571,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);
}
@ -604,14 +604,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);
}
@ -626,7 +626,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);
}
@ -638,7 +638,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);
}
@ -650,7 +650,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);
}
@ -661,7 +661,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);
@ -696,7 +696,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);
}

@ -186,10 +186,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->bits_per_coded_sample = s->bitstream_bpp;
s->decorrelate = s->bitstream_bpp >= 24;
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");
@ -308,7 +308,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]++;
@ -317,7 +317,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++) {
@ -364,13 +364,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) {
@ -418,13 +418,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;
@ -645,7 +645,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 + 1024*30;
@ -660,7 +660,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
} else
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);
}

@ -247,7 +247,7 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
return ret;
}
ff_bswapdsp_init(&q->bdsp);
avpriv_float_dsp_init(&q->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&q->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO
: AV_CH_LAYOUT_STEREO;

@ -461,7 +461,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 */

@ -313,7 +313,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;
if (c->csty & JPEG2000_CSTY_PREC) {

@ -118,7 +118,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;
}
@ -132,7 +132,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;

@ -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);

@ -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;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
return 0;
error:

@ -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++) {

@ -174,7 +174,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,
@ -201,14 +201,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. */

@ -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
@ -176,7 +176,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 */

@ -207,7 +207,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
av_pix_fmt_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) {
/* to be constant with the libvorbis implementation, clip global_quality to 0 - 10
Theora accepts a quality parameter p, which is:
* 0 <= p <=63
@ -238,10 +238,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 (get_stats(avc_context, 0))
return -1;
} else if (avc_context->flags & CODEC_FLAG_PASS2) {
} else if (avc_context->flags & AV_CODEC_FLAG_PASS2) {
if (submit_stats(avc_context))
return -1;
}
@ -278,7 +278,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 (get_stats(avc_context, 1))
return -1;
return 0;
@ -292,7 +292,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 (submit_stats(avc_context))
return -1;
@ -315,7 +315,7 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
return -1;
}
if (avc_context->flags & CODEC_FLAG_PASS1)
if (avc_context->flags & AV_CODEC_FLAG_PASS1)
if (get_stats(avc_context, 0))
return -1;

@ -77,7 +77,7 @@ static av_cold int twolame_encode_init(AVCodecContext *avctx)
twolame_set_num_channels(s->glopts, avctx->channels);
twolame_set_in_samplerate(s->glopts, avctx->sample_rate);
twolame_set_out_samplerate(s->glopts, avctx->sample_rate);
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);

@ -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);

@ -91,14 +91,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,

@ -241,9 +241,9 @@ static av_cold int vpx_init(AVCodecContext *avctx,
if (ctx->lag_in_frames >= 0)
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;
@ -504,7 +504,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out)
stats->sz += pkt->data.twopass_stats.sz;
break;
}
case VPX_CODEC_PSNR_PKT: //FIXME add support for CODEC_FLAG_PSNR
case VPX_CODEC_PSNR_PKT: //FIXME add support for AV_CODEC_FLAG_PSNR
case VPX_CODEC_CUSTOM_PKT:
//ignore unsupported/unrecognized packet types
break;
@ -544,7 +544,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);

@ -346,7 +346,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x264_param_default(&x4->params);
#endif
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) {
@ -368,8 +368,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) {
@ -515,15 +515,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den;
x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num;
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;
@ -537,7 +537,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.vui.i_transfer = avctx->color_trc;
x4->params.vui.i_colmatrix = avctx->colorspace;
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)
x4->params.b_repeat_headers = 0;
if (x4->x264_params) {
@ -568,7 +568,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!x4->enc)
return AVERROR_UNKNOWN;
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;

@ -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;

@ -251,8 +251,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) {
@ -323,7 +323,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;
@ -348,7 +348,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;
@ -372,12 +372,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);
@ -389,7 +389,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) {
if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
xavs_nal_t *nal;
int nnal, s, i, size;
uint8_t *p;

@ -369,13 +369,13 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
/* Bring in VOP flags from avconv 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 */
@ -449,7 +449,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)
@ -489,7 +489,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);
@ -505,7 +505,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;
@ -533,7 +533,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;
@ -593,7 +593,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;
@ -639,13 +639,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;

@ -158,7 +158,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]);
}

@ -110,7 +110,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);

@ -102,7 +102,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);
}
@ -345,7 +345,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)
@ -973,7 +973,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;
@ -981,7 +981,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;
@ -994,7 +994,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){
@ -1002,7 +1002,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){
@ -1520,7 +1520,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;
@ -1651,7 +1651,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 */

@ -824,7 +824,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_XVMC */
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 {
@ -1042,7 +1042,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_XVMC */
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);
@ -1064,7 +1064,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
} 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);
@ -1405,7 +1405,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;
@ -2136,7 +2136,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->codec_id =
s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
s->out_format = FMT_MPEG1;
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)
@ -2635,7 +2635,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);

@ -324,7 +324,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));
put_bits(&s->pb, 1, !!(s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP));
put_bits(&s->pb, 1, 0); // broken link
}
}

@ -2079,7 +2079,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;
}
@ -2421,7 +2421,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;

@ -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;
@ -822,7 +822,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++)
@ -923,7 +923,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
s->last_time_base = time / s->avctx->time_base.den;
@ -1069,7 +1069,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);
@ -1083,7 +1083,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
@ -1312,7 +1312,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);

@ -412,7 +412,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
s->avctx = avctx;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_mpadsp_init(&s->mpadsp);
if (avctx->request_sample_fmt == OUT_FMT &&

@ -280,7 +280,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;
@ -695,7 +695,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;
@ -1121,7 +1121,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;
@ -1533,7 +1533,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
else if (!is_mpeg12 && (s->h263_pred || s->h263_aic))
s->mbintra_table[mb_xy]=1;
if ((s->avctx->flags & CODEC_FLAG_PSNR) ||
if ((s->avctx->flags & AV_CODEC_FLAG_PSNR) ||
!(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;
@ -1624,7 +1624,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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);
@ -1643,7 +1643,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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);
@ -1676,7 +1676,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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);
@ -1695,7 +1695,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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]);

@ -311,7 +311,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;
@ -331,7 +331,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
@ -349,7 +349,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) {
av_log(avctx, AV_LOG_ERROR,
@ -406,7 +406,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");
@ -443,7 +443,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;
@ -468,14 +468,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");
@ -521,7 +521,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;
@ -571,12 +571,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;
@ -624,9 +624,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 */
@ -708,8 +708,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 */
@ -1167,8 +1167,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;
@ -1290,7 +1290,7 @@ static int select_input_picture(MpegEncContext *s)
}
}
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;
@ -1359,13 +1359,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--;
@ -1686,7 +1686,7 @@ vbv_retry:
assert(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++) {
@ -1694,7 +1694,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));
@ -1982,7 +1982,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;
@ -2011,7 +2011,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 {
@ -2054,7 +2054,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;
@ -2091,7 +2091,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 {
@ -2201,7 +2201,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] =
@ -2513,7 +2513,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);
}
@ -2724,7 +2724,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;
@ -3143,7 +3143,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;
@ -3308,11 +3308,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
@ -3370,7 +3370,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);
@ -3379,7 +3379,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++)
@ -3404,7 +3404,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++){
@ -3425,7 +3425,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) {

@ -87,7 +87,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];
@ -164,7 +164,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 << 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 *uvbuf = s->sc.edge_emu_buffer + 18 * s->linesize;
s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
s->uvlinesize, s->uvlinesize,
@ -357,7 +357,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]
@ -545,7 +545,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 *uvbuf = s->sc.edge_emu_buffer + 18 * s->linesize;
s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
s->uvlinesize, s->uvlinesize,
@ -581,7 +581,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);
}
@ -737,7 +737,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);
@ -810,7 +810,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);
}

@ -285,7 +285,7 @@ void ff_xvmc_decode_mb(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

@ -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);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
s->scale_bias = 1.0/(32768*8);
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;

@ -170,7 +170,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;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
/* Generate overlap window */
ff_sine_window_init(ff_sine_128, 128);

@ -478,8 +478,8 @@ static int nvenc_setup_h264_config(AVCodecContext *avctx)
vui->videoFullRangeFlag = avctx->color_range == AVCOL_RANGE_JPEG;
h264->disableSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
h264->repeatSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
h264->disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
h264->repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
h264->maxNumRefFrames = avctx->refs;
h264->idrPeriod = cc->gopLength;
@ -521,8 +521,8 @@ static int nvenc_setup_hevc_config(AVCodecContext *avctx)
NV_ENC_CONFIG *cc = &ctx->config;
NV_ENC_CONFIG_HEVC *hevc = &cc->encodeCodecConfig.hevcConfig;
hevc->disableSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
hevc->repeatSPSPPS = (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
hevc->disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0;
hevc->repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1;
hevc->maxNumRefFramesInDPB = avctx->refs;
hevc->idrPeriod = cc->gopLength;
@ -629,7 +629,7 @@ static int nvenc_setup_encoder(AVCodecContext *avctx)
nvenc_setup_rate_control(avctx);
if (avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
ctx->config.frameFieldMode = NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD;
} else {
ctx->config.frameFieldMode = NV_ENC_PARAMS_FRAME_FIELD_MODE_FRAME;
@ -812,7 +812,7 @@ av_cold int ff_nvenc_encode_init(AVCodecContext *avctx)
if ((ret = nvenc_setup_surfaces(avctx)) < 0)
return ret;
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
if ((ret = nvenc_setup_extradata(avctx)) < 0)
return ret;
}
@ -1088,7 +1088,7 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
params.outputBitstream = out->out;
params.inputTimeStamp = frame->pts;
if (avctx->flags & CODEC_FLAG_INTERLACED_DCT) {
if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
if (frame->top_field_first)
params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM;
else

@ -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);
avpriv_float_dsp_init(&c->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&c->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (init_vlc(&c->scale_diff, 9, ON2AVC_SCALE_DIFFS,
ff_on2avc_scale_diff_bits, 1, 1,

@ -47,11 +47,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|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
@ -61,29 +61,29 @@ 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", 1, 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"},
{"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", 1, 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"},
#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" },

@ -2208,7 +2208,7 @@ int ff_celt_init(AVCodecContext *avctx, CeltContext **ps, int output_channels)
goto fail;
}
avpriv_float_dsp_init(&s->dsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_celt_flush(s);

@ -179,8 +179,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;
@ -191,7 +191,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;

@ -243,7 +243,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
uint8_t *rgba_buf = NULL;
uint8_t *top_buf = NULL;
is_progressive = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
is_progressive = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);
switch (avctx->pix_fmt) {
case AV_PIX_FMT_RGBA64BE:
bit_depth = 16;

@ -969,7 +969,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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);
@ -1131,7 +1131,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;

@ -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)) {

@ -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;
@ -88,7 +88,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) {

@ -67,7 +67,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
avctx->channel_layout = AV_CH_LAYOUT_MONO;
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
return 0;
}

@ -159,7 +159,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
rcc->buffer_index = s->avctx->rc_initial_buffer_occupancy;
if (s->avctx->flags & CODEC_FLAG_PASS2) {
if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
int i;
char *p;
@ -227,7 +227,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
@ -238,7 +238,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;
@ -307,7 +307,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
}
@ -757,7 +757,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
@ -773,7 +773,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
sqrt(last_var), s->frame_bits);
}
if (s->avctx->flags & CODEC_FLAG_PASS2) {
if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
assert(picture_number >= 0);
assert(picture_number < rcc->num_entries);
rce = &rcc->entry[picture_number];
@ -804,7 +804,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)
assert(pict_type == rce->new_pict_type);

@ -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)
){

@ -686,7 +686,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);

@ -332,7 +332,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;

@ -446,7 +446,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);

@ -790,7 +790,7 @@ av_cold int ff_twinvq_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
avpriv_float_dsp_init(&tctx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&tctx->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
if ((ret = init_mdct_win(tctx))) {
av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n");
ff_twinvq_decode_close(avctx);

@ -2083,10 +2083,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");
}

@ -151,7 +151,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
vble_restore_plane(ctx, pic, 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, 1, offset, width_uv, height_uv);

@ -1416,7 +1416,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 ((i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
if ((i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@ -1437,7 +1437,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,
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), &block_tt);
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), &block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
@ -1527,7 +1527,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 ((i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
if ((i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@ -1549,7 +1549,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,
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY),
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY),
&block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
@ -1675,7 +1675,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 ((i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
if ((i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (i < 4) {
@ -1767,7 +1767,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),
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), &block_tt);
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), &block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
@ -1846,7 +1846,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 ((i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
if ((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);
@ -1903,7 +1903,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,
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY),
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY),
&block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8) ttmb = -1;
@ -2049,7 +2049,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 ((i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
if ((i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@ -2063,7 +2063,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,
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), NULL);
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), NULL);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
first_block = 0;
@ -2124,7 +2124,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 ((i > 3) && (s->avctx->flags & CODEC_FLAG_GRAY))
if ((i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
@ -2219,7 +2219,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,
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), NULL);
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), NULL);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
first_block = 0;
@ -2342,7 +2342,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 (i > 3 && (s->avctx->flags & CODEC_FLAG_GRAY))
if (i > 3 && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (i < 4) {
@ -2508,7 +2508,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),
(i & 4) && (s->avctx->flags & CODEC_FLAG_GRAY), &block_tt);
(i & 4) && (s->avctx->flags & AV_CODEC_FLAG_GRAY), &block_tt);
block_cbp |= pat << (i << 2);
if (!v->ttmbf && ttmb < 8)
ttmb = -1;
@ -2651,7 +2651,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 (k > 3 && (s->avctx->flags & CODEC_FLAG_GRAY))
if (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) {
@ -2675,7 +2675,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 (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(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);
}
@ -2685,7 +2685,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 (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(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);
}
@ -2814,7 +2814,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 (k > 3 && (s->avctx->flags & CODEC_FLAG_GRAY))
if (k > 3 && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
continue;
v->vc1dsp.vc1_inv_trans_8x8(block[k]);
}

@ -150,7 +150,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 (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(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],
@ -169,7 +169,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 (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(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],
@ -189,7 +189,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 (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
if (!(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],

@ -136,7 +136,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
}
/* for grayscale we should not try to read from unknown area */
if (s->avctx->flags & CODEC_FLAG_GRAY) {
if (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;
}
@ -228,7 +228,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 (s->avctx->flags & CODEC_FLAG_GRAY)
if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
/* Chroma MC always uses qpel bilinear */
uvmx = (uvmx & 3) << 1;
@ -515,7 +515,7 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
if (!v->field_mode && !v->s.last_picture.f->data[0])
return;
if (s->avctx->flags & CODEC_FLAG_GRAY)
if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
for (k = 0; k < 4; k++) {
@ -686,7 +686,7 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
int use_ic;
uint8_t (*lutuv)[256];
if (s->avctx->flags & CODEC_FLAG_GRAY)
if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
for (i = 0; i < 4; i++) {
@ -837,7 +837,7 @@ void ff_vc1_interp_mc(VC1Context *v)
}
/* for grayscale we should not try to read from unknown area */
if (s->avctx->flags & CODEC_FLAG_GRAY) {
if (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;
}
@ -934,7 +934,7 @@ void ff_vc1_interp_mc(VC1Context *v)
s->hdsp.avg_no_rnd_pixels_tab[dxy](s->dest[0] + off, srcY, s->linesize, 16);
}
if (s->avctx->flags & CODEC_FLAG_GRAY)
if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
/* Chroma MC always uses qpel blilinear */
uvmx = (uvmx & 3) << 1;

@ -184,7 +184,7 @@ static void vc1_draw_sprites(VC1Context *v, SpriteData* sd)
}
alpha = av_clip_uint16(sd->coefs[1][6]);
for (plane = 0; plane < (s->avctx->flags & CODEC_FLAG_GRAY ? 1 : 3); plane++) {
for (plane = 0; plane < (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++) {
@ -302,7 +302,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 < (s->avctx->flags & CODEC_FLAG_GRAY ? 1 : 3); plane++)
for (plane = 0; plane < (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]);
@ -416,7 +416,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
if (!avctx->extradata_size || !avctx->extradata)
return -1;
if (!(avctx->flags & CODEC_FLAG_GRAY))
if (!(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;

@ -1015,7 +1015,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avctx)
vc->avctx = avctx;
ff_vorbisdsp_init(&vc->dsp);
avpriv_float_dsp_init(&vc->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&vc->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;

@ -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 = 3.0;

@ -1081,7 +1081,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],
@ -1504,7 +1504,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)... */
@ -1728,7 +1728,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
if (avctx->pix_fmt == AV_PIX_FMT_NONE)
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);
@ -2282,7 +2282,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) &&
(visible_width != s->width || visible_height != s->height)) {
avctx->width = visible_width;
avctx->height = visible_height;
@ -2291,7 +2291,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;
av_log(avctx, AV_LOG_WARNING, "Reducing offset_x from %d to %d"
"chroma samples to preserve alignment.\n",

@ -95,7 +95,7 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2)
avctx->bit_rate <= 0)
return -1;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (avctx->codec->id == AV_CODEC_ID_WMAV1)
s->version = 1;

@ -286,7 +286,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
s->avctx = avctx;
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save