#include "internal.h"
#include "bytestream.h"
#include "wmv2.h"
+#include "rv10.h"
#include <limits.h>
#define QUANT_BIAS_SHIFT 8
s->inter_quant_bias = -(1 << (QUANT_BIAS_SHIFT - 2));
}
- if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
+#if FF_API_QUANT_BIAS
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (s->intra_quant_bias == FF_DEFAULT_QUANT_BIAS &&
+ avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
s->intra_quant_bias = avctx->intra_quant_bias;
- if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
+ if (s->inter_quant_bias == FF_DEFAULT_QUANT_BIAS &&
+ avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
s->inter_quant_bias = avctx->inter_quant_bias;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
s->avctx->time_base.den > (1 << 16) - 1) {
ff_pixblockdsp_init(&s->pdsp, avctx);
ff_qpeldsp_init(&s->qdsp);
- s->avctx->coded_frame = s->current_picture.f;
-
if (s->msmpeg4_version) {
FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_stats,
2 * 2 * (MAX_LEVEL + 1) *
}
}
- s->avctx->coded_frame = s->current_picture_ptr->f;
-
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+ av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
static void update_noise_reduction(MpegEncContext *s)
/* output? */
if (s->new_picture.f->data[0]) {
+ uint8_t *sd;
if (!pkt->data &&
(ret = ff_alloc_packet(pkt, s->mb_width*s->mb_height*MAX_MB_BYTES)) < 0)
return ret;
frame_end(s);
+ sd = av_packet_new_side_data(pkt, AV_PKT_DATA_QUALITY_FACTOR,
+ sizeof(int));
+ if (!sd)
+ return AVERROR(ENOMEM);
+ *(int *)sd = s->current_picture.f->quality;
+
if (CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG)
ff_mjpeg_encode_picture_trailer(&s->pb, s->header_bits);
.priv_class = &h263p_class,
};
-FF_MPV_GENERIC_CLASS(msmpeg4v2)
+static const AVClass msmpeg4v2_class = {
+ .class_name = "msmpeg4v2 encoder",
+ .item_name = av_default_item_name,
+ .option = ff_mpv_generic_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
AVCodec ff_msmpeg4v2_encoder = {
.name = "msmpeg4v2",
.priv_class = &msmpeg4v2_class,
};
-FF_MPV_GENERIC_CLASS(msmpeg4v3)
+static const AVClass msmpeg4v3_class = {
+ .class_name = "msmpeg4v3 encoder",
+ .item_name = av_default_item_name,
+ .option = ff_mpv_generic_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
AVCodec ff_msmpeg4v3_encoder = {
.name = "msmpeg4",
.priv_class = &msmpeg4v3_class,
};
-FF_MPV_GENERIC_CLASS(wmv1)
+static const AVClass wmv1_class = {
+ .class_name = "wmv1 encoder",
+ .item_name = av_default_item_name,
+ .option = ff_mpv_generic_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
AVCodec ff_wmv1_encoder = {
.name = "wmv1",