summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-31 14:20:06 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-01 16:51:32 +0200
commit88720f3d810560f7018315b959318a07f5eaf7f3 (patch)
tree9fd9c53aff965569668b715ad139a9ffbd6c5ff2 /libavcodec
parent046736f3429920f2beac48518e2f5a96b53d793e (diff)
avcodec/mpegvideo: Remove strict_std_compliance from MpegEncContext
It just duplicates AVCodecContext.strict_std_compliance. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12enc.c2
-rw-r--r--libavcodec/mpeg4videoenc.c4
-rw-r--r--libavcodec/mpegvideo.h1
-rw-r--r--libavcodec/mpegvideo_enc.c3
4 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 77cbb60ea1..65afcf6f3a 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -223,7 +223,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
return ret;
if (find_frame_rate_index(mpeg12) < 0) {
- if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
+ if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
av_log(avctx, AV_LOG_ERROR, "MPEG-1/2 does not support %d/%d fps\n",
avctx->time_base.den, avctx->time_base.num);
return AVERROR(EINVAL);
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 1140c33a70..945c49cc5d 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1062,9 +1062,9 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
if (s->pict_type == AV_PICTURE_TYPE_I) {
if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
- if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, the reference sw is buggy
+ if (s->avctx->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
+ if (s->avctx->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number == 0) // HACK, the reference sw is buggy
mpeg4_encode_vol_header(s, 0, 0);
}
if (!(s->workaround_bugs & FF_BUG_MS))
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 51d524f1fe..5cc35a772a 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -101,7 +101,6 @@ typedef struct MpegEncContext {
int max_b_frames; ///< max number of B-frames for encoding
int luma_elim_threshold;
int chroma_elim_threshold;
- int strict_std_compliance; ///< strictly follow the std (MPEG-4, ...)
int workaround_bugs; ///< workaround bugs in encoders which cannot be detected automatically
int codec_tag; ///< internal codec_tag upper case converted from avctx codec_tag
/* the following fields are managed internally by the encoder */
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 5abd463430..4b329428b0 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -366,7 +366,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- s->strict_std_compliance = avctx->strict_std_compliance;
s->quarter_sample = (avctx->flags & AV_CODEC_FLAG_QPEL) != 0;
s->rtp_mode = !!s->rtp_payload_size;
s->intra_dc_precision = avctx->intra_dc_precision;
@@ -581,7 +580,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
if (avctx->flags & AV_CODEC_FLAG_LOW_DELAY) {
if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO &&
- s->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
+ avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
av_log(avctx, AV_LOG_ERROR,
"low delay forcing is only available for mpeg2, "
"set strict_std_compliance to 'unofficial' or lower in order to allow it\n");