diff mbox series

[FFmpeg-devel] avcodec/h264_ps, h264dec: Remove ALLOW_INTERLACED cruft

Message ID AM7PR03MB6660D01B18CD22CE3404732F8F219@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Headers show
Series [FFmpeg-devel] avcodec/h264_ps, h264dec: Remove ALLOW_INTERLACED cruft | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 27, 2022, 4:40 p.m. UTC
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 mbox series

Patch

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