* [FFmpeg-devel] [PATCH] avcodec/h264_ps, h264dec: Remove ALLOW_INTERLACED cruft
@ 2022-01-27 16:40 Andreas Rheinhardt
0 siblings, 0 replies; only message in thread
From: Andreas Rheinhardt @ 2022-01-27 16:40 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Since e1027aba680c4382c103fd1100cc5567a1530abc,
ALLOW_INTERLACED is no longer defined in h264_ps.c,
leading to a warning when encountering an SPS compatible
with MBAFF. This warning was always nonsense, because
ff_h264_decode_seq_parameter_set() is also used by the parser
and it makes no sense for the parser to warn about missing
decoder features; after all, it is not a parser's job
to warn when a feature is unsupported by a decoder
(and in this case it is even weirder, because even if the H.264
decoder is disabled, the warning will only be shown for MBAFF
sequence parameter sets). So remove the warning in h264_ps.c.
Given that there is no proper configure option to disable
interlaced H.264 decoding, all of the ALLOW_INTERLACED macros
are removed in h264dec.h, too.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264_ps.c | 5 -----
libavcodec/h264dec.h | 17 -----------------
2 files changed, 22 deletions(-)
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index f68d5bf81c..6927fa7198 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -517,11 +517,6 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
sps->direct_8x8_inference_flag = get_bits1(gb);
-#ifndef ALLOW_INTERLACE
- if (sps->mb_aff)
- av_log(avctx, AV_LOG_ERROR,
- "MBAFF support not included; enable it at compile-time.\n");
-#endif
sps->crop = get_bits1(gb);
if (sps->crop) {
unsigned int crop_left = get_ue_golomb(gb);
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 8168c8e97b..accb0de3b1 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -49,10 +49,6 @@
#define H264_MAX_PICTURE_COUNT 36
-/* Compiling in interlaced support reduces the speed
- * of progressive decoding by about 2%. */
-#define ALLOW_INTERLACE
-
#define FMO 0
/**
@@ -61,7 +57,6 @@
*/
#define MAX_SLICES 32
-#ifdef ALLOW_INTERLACE
#define MB_MBAFF(h) (h)->mb_mbaff
#define MB_FIELD(sl) (sl)->mb_field_decoding_flag
#define FRAME_MBAFF(h) (h)->mb_aff_frame
@@ -70,18 +65,6 @@
#define LTOP 0
#define LBOT 1
#define LEFT(i) (i)
-#else
-#define MB_MBAFF(h) 0
-#define MB_FIELD(sl) 0
-#define FRAME_MBAFF(h) 0
-#define FIELD_PICTURE(h) 0
-#undef IS_INTERLACED
-#define IS_INTERLACED(mb_type) 0
-#define LEFT_MBS 1
-#define LTOP 0
-#define LBOT 0
-#define LEFT(i) 0
-#endif
#define FIELD_OR_MBAFF_PICTURE(h) (FRAME_MBAFF(h) || FIELD_PICTURE(h))
#ifndef CABAC
--
2.32.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-27 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 16:40 [FFmpeg-devel] [PATCH] avcodec/h264_ps, h264dec: Remove ALLOW_INTERLACED cruft Andreas Rheinhardt
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git