x->intra_matrix =
x->inter_matrix = NULL;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->mpeg_quant)
- x->mpeg_quant = avctx->mpeg_quant;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (x->mpeg_quant)
x->vol_flags |= XVID_VOL_MPEGQUANT;
if ((avctx->intra_matrix || avctx->inter_matrix)) {
static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *picture, int *got_packet)
{
- int xerr, i, ret, user_packet = !!pkt->data;
+ int xerr, i, ret;
struct xvid_context *x = avctx->priv_data;
int mb_width = (avctx->width + 15) / 16;
int mb_height = (avctx->height + 15) / 16;
else
pict_type = AV_PICTURE_TYPE_I;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
- avctx->coded_frame->quality = xvid_enc_stats.quant * FF_QP2LAMBDA;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_side_data_set_encoder_stats(pkt, xvid_enc_stats.quant * FF_QP2LAMBDA, NULL, 0, pict_type);
if (xvid_enc_frame.out_flags & XVID_KEYFRAME) {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->flags |= AV_PKT_FLAG_KEY;
if (x->quicktime_format)
return xvid_strip_vol_header(avctx, pkt,
xvid_enc_stats.hlength, xerr);
- } else {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
pkt->size = xerr;
return 0;
} else {
- if (!user_packet)
- av_packet_unref(pkt);
if (!xerr)
return 0;
av_log(avctx, AV_LOG_ERROR,
.version = LIBAVUTIL_VERSION_INT,
};
-AVCodec ff_libxvid_encoder = {
+const AVCodec ff_libxvid_encoder = {
.name = "libxvid",
.long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
.type = AVMEDIA_TYPE_VIDEO,