[FFmpeg-devel] [PATCH 4/4] avcodec/mpeg12enc: Deprecate using MPEG-2 intra VLC table for mpeg1video
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Tue Nov 24 16:41:22 EET 2020
This option just creates broken output because an MPEG-1 bitstream
can't signal whether MPEG-2 intra VLC tables have been used.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
Missing version bump.
doc/APIchanges | 3 +++
libavcodec/mpeg12enc.c | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index b70c78a483..dea54c4415 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first:
+2020-xx-xx - xxxxxxxxxx - lavc 58.xx.100 - avcodec.h
+ Deprecate the "intra_vlc" option for the mpeg1video encoder.
+
2020-xx-xx - xxxxxxxxxx - lavf 58.64.100 - avformat.h
Add AVSTREAM_EVENT_FLAG_NEW_PACKETS.
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 2466db8a91..0b5badde3c 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -1114,6 +1114,7 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
s->min_qcoeff = -255;
s->max_qcoeff = 255;
+ s->intra_vlc_format = 0;
} else {
s->min_qcoeff = -2047;
s->max_qcoeff = 2047;
@@ -1136,8 +1137,6 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
#define COMMON_OPTS \
{ "gop_timecode", "MPEG GOP Timecode in hh:mm:ss[:;.]ff format. Overrides timecode_frame_start.", \
OFFSET(tc_opt_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE },\
- { "intra_vlc", "Use MPEG-2 intra VLC table.", \
- OFFSET(intra_vlc_format), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, \
{ "drop_frame_timecode", "Timecode is in drop frame format.", \
OFFSET(drop_frame_timecode), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, \
{ "scan_offset", "Reserve space for SVCD scan offset user data.", \
@@ -1147,12 +1146,16 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
static const AVOption mpeg1_options[] = {
COMMON_OPTS
+ { "intra_vlc", "deprecated, does nothing",
+ OFFSET(intra_vlc_format), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE | AV_OPT_FLAG_DEPRECATED },
FF_MPV_COMMON_OPTS
{ NULL },
};
static const AVOption mpeg2_options[] = {
COMMON_OPTS
+ { "intra_vlc", "Use MPEG-2 intra VLC table.",
+ OFFSET(intra_vlc_format), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "non_linear_quant", "Use nonlinear quantizer.", OFFSET(q_scale_type), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "seq_disp_ext", "Write sequence_display_extension blocks.", OFFSET(seq_disp_ext), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE, "seq_disp_ext" },
--
2.25.1
More information about the ffmpeg-devel
mailing list