diff mbox series

[FFmpeg-devel,10/13] lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse

Message ID 20220124170014.17189-10-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/13] lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT | expand

Checks

Context Check Description
andriy/configurex86 warning Failed to apply patch
andriy/configure_aarch64_jetson warning Failed to apply patch

Commit Message

Anton Khirnov Jan. 24, 2022, 5 p.m. UTC
Allows to stop including h264dec.h in h264data.c.
---
 libavcodec/h264_parse.h | 3 +++
 libavcodec/h264data.c   | 2 +-
 libavcodec/h264dec.h    | 2 --
 3 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h
index 95a80c425f..9b6391edda 100644
--- a/libavcodec/h264_parse.h
+++ b/libavcodec/h264_parse.h
@@ -34,6 +34,9 @@ 
 #include "h264_ps.h"
 #include "internal.h"
 
+#define MB_TYPE_REF0       MB_TYPE_ACPRED // dirty but it fits in 16 bit
+#define MB_TYPE_8x8DCT     0x01000000
+
 // This table must be here because scan8[constant] must be known at compiletime
 static const uint8_t scan8[16 * 3 + 3] = {
     4 +  1 * 8, 5 +  1 * 8, 4 +  2 * 8, 5 +  2 * 8,
diff --git a/libavcodec/h264data.c b/libavcodec/h264data.c
index eb8728a9db..3e9e68cb04 100644
--- a/libavcodec/h264data.c
+++ b/libavcodec/h264data.c
@@ -30,7 +30,7 @@ 
 
 #include "libavutil/avutil.h"
 
-#include "h264dec.h"
+#include "h264_parse.h"
 #include "h264data.h"
 #include "mpegutils.h"
 
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 4441cf6613..6b72588854 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -96,8 +96,6 @@ 
 #define CHROMA422(h) ((h)->ps.sps->chroma_format_idc == 2)
 #define CHROMA444(h) ((h)->ps.sps->chroma_format_idc == 3)
 
-#define MB_TYPE_REF0       MB_TYPE_ACPRED // dirty but it fits in 16 bit
-#define MB_TYPE_8x8DCT     0x01000000
 #define IS_REF0(a)         ((a) & MB_TYPE_REF0)
 #define IS_8x8DCT(a)       ((a) & MB_TYPE_8x8DCT)