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 {
f->avctx->extradata_size = 10000 + 4 +
(11 * 11 * 5 * 5 * 5 + 11 * 11 * 11) * 32;
- f->avctx->extradata = av_malloc(f->avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ f->avctx->extradata = av_malloc(f->avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!f->avctx->extradata)
return AVERROR(ENOMEM);
ff_init_range_encoder(c, f->avctx->extradata, f->avctx->extradata_size);
s->version = 0;
- if ((avctx->flags & (CODEC_FLAG_PASS1|CODEC_FLAG_PASS2)) || avctx->slices>1)
+ if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) ||
+ avctx->slices > 1)
s->version = FFMAX(s->version, 2);
// Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
s->picture_number = 0;
- if (avctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2)) {
+ if (avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) {
for (i = 0; i < s->quant_table_count; i++) {
s->rc_stat2[i] = av_mallocz(s->context_count[i] *
sizeof(*s->rc_stat2[i]));
return ret;
#define STATS_OUT_SIZE 1024 * 1024 * 6
- if (avctx->flags & CODEC_FLAG_PASS1) {
+ if (avctx->flags & AV_CODEC_FLAG_PASS1) {
avctx->stats_out = av_mallocz(STATS_OUT_SIZE);
if (!avctx->stats_out)
return AVERROR(ENOMEM);
uint8_t keystate = 128;
uint8_t *buf_p;
int i, ret;
- int64_t maxsize = FF_MIN_BUFFER_SIZE
+ int64_t maxsize = AV_INPUT_BUFFER_MIN_SIZE
+ avctx->width*avctx->height*35LL*4;
if(!pict) {
- if (avctx->flags & CODEC_FLAG_PASS1) {
+ if (avctx->flags & AV_CODEC_FLAG_PASS1) {
int j, k, m;
char *p = avctx->stats_out;
char *end = p + STATS_OUT_SIZE;
}
if (f->version > 3)
- maxsize = FF_MIN_BUFFER_SIZE + avctx->width*avctx->height*3LL*4;
+ maxsize = AV_INPUT_BUFFER_MIN_SIZE + avctx->width*avctx->height*3LL*4;
if ((ret = ff_alloc_packet2(avctx, pkt, maxsize, 0)) < 0)
return ret;
buf_p += bytes;
}
- if (avctx->flags & CODEC_FLAG_PASS1)
+ if (avctx->flags & AV_CODEC_FLAG_PASS1)
avctx->stats_out[0] = '\0';
#if FF_API_CODED_FRAME
.init = encode_init,
.encode2 = encode_frame,
.close = encode_close,
- .capabilities = CODEC_CAP_SLICE_THREADS | CODEC_CAP_DELAY,
+ .capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DELAY,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUV444P,
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P,