Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it
@ 2022-09-30  2:17 Andreas Rheinhardt
  2022-09-30  2:18 ` [FFmpeg-devel] [PATCH 2/5] avcodec/mpeg12dec: Don't call ff_mpeg12_common_init() Andreas Rheinhardt
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Andreas Rheinhardt @ 2022-09-30  2:17 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

It is better place for these declarations than
mpeg12data.h as RL VLC are just a variant of VLCs.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpeg12data.c |  1 +
 libavcodec/mpeg12data.h |  4 ----
 libavcodec/mpeg12dec.h  | 10 ----------
 libavcodec/mpeg12enc.c  |  1 +
 libavcodec/mpeg12enc.h  |  3 ---
 libavcodec/mpeg12vlc.h  | 15 +++++++++++++++
 libavcodec/speedhq.c    |  2 +-
 libavcodec/speedhqenc.c |  2 +-
 8 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/libavcodec/mpeg12data.c b/libavcodec/mpeg12data.c
index 4da96d7da3..e301310b9f 100644
--- a/libavcodec/mpeg12data.c
+++ b/libavcodec/mpeg12data.c
@@ -26,6 +26,7 @@
  */
 
 #include "mpeg12data.h"
+#include "mpeg12vlc.h"
 
 const uint16_t ff_mpeg1_default_intra_matrix[256] = {
         8, 16, 19, 22, 26, 27, 29, 34,
diff --git a/libavcodec/mpeg12data.h b/libavcodec/mpeg12data.h
index f51faf4607..bc39655fbf 100644
--- a/libavcodec/mpeg12data.h
+++ b/libavcodec/mpeg12data.h
@@ -30,7 +30,6 @@
 
 #include <stdint.h>
 #include "libavutil/rational.h"
-#include "rl.h"
 
 extern const uint16_t ff_mpeg1_default_intra_matrix[];
 extern const uint16_t ff_mpeg1_default_non_intra_matrix[64];
@@ -40,9 +39,6 @@ extern const unsigned char ff_mpeg12_vlc_dc_lum_bits[12];
 extern const uint16_t ff_mpeg12_vlc_dc_chroma_code[12];
 extern const unsigned char ff_mpeg12_vlc_dc_chroma_bits[12];
 
-extern RLTable ff_rl_mpeg1;
-extern RLTable ff_rl_mpeg2;
-
 extern const uint8_t ff_mpeg12_mbAddrIncrTable[36][2];
 extern const uint8_t ff_mpeg12_mbPatTable[64][2];
 
diff --git a/libavcodec/mpeg12dec.h b/libavcodec/mpeg12dec.h
index b4e94a92ce..4c015d3096 100644
--- a/libavcodec/mpeg12dec.h
+++ b/libavcodec/mpeg12dec.h
@@ -24,16 +24,6 @@
 
 #include "get_bits.h"
 #include "mpeg12vlc.h"
-#include "rl.h"
-
-#define INIT_2D_VLC_RL(rl, static_size, flags)\
-{\
-    static RL_VLC_ELEM rl_vlc_table[static_size];\
-    rl.rl_vlc[0] = rl_vlc_table;\
-    ff_init_2d_vlc_rl(&rl, static_size, flags);\
-}
-
-void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags);
 
 static inline int decode_dc(GetBitContext *gb, int component)
 {
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index e1f09b7ede..f636afe42d 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -43,6 +43,7 @@
 #include "mpeg12.h"
 #include "mpeg12data.h"
 #include "mpeg12enc.h"
+#include "mpeg12vlc.h"
 #include "mpegutils.h"
 #include "mpegvideo.h"
 #include "mpegvideoenc.h"
diff --git a/libavcodec/mpeg12enc.h b/libavcodec/mpeg12enc.h
index fbbc43f891..0455e5e4e2 100644
--- a/libavcodec/mpeg12enc.h
+++ b/libavcodec/mpeg12enc.h
@@ -25,9 +25,6 @@
 #include <stdint.h>
 
 #include "mpegvideo.h"
-#include "rl.h"
-
-void ff_mpeg1_init_uni_ac_vlc(const RLTable *rl, uint8_t *uni_ac_vlc_len);
 
 void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
 void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64],
diff --git a/libavcodec/mpeg12vlc.h b/libavcodec/mpeg12vlc.h
index 70aca645cb..4fb19371f0 100644
--- a/libavcodec/mpeg12vlc.h
+++ b/libavcodec/mpeg12vlc.h
@@ -28,6 +28,7 @@
 #ifndef AVCODEC_MPEG12VLC_H
 #define AVCODEC_MPEG12VLC_H
 
+#include "rl.h"
 #include "vlc.h"
 
 #define DC_VLC_BITS 9
@@ -49,4 +50,18 @@ extern VLC ff_mv_vlc;
 
 void ff_mpeg12_init_vlcs(void);
 
+#define INIT_2D_VLC_RL(rl, static_size, flags)\
+{\
+    static RL_VLC_ELEM rl_vlc_table[static_size];\
+    rl.rl_vlc[0] = rl_vlc_table;\
+    ff_init_2d_vlc_rl(&rl, static_size, flags);\
+}
+
+extern RLTable ff_rl_mpeg1;
+extern RLTable ff_rl_mpeg2;
+
+void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags);
+
+void ff_mpeg1_init_uni_ac_vlc(const RLTable *rl, uint8_t *uni_ac_vlc_len);
+
 #endif /* AVCODEC_MPEG12VLC_H */
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index 11d3311794..6dbba02776 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -38,9 +38,9 @@
 #include "idctdsp.h"
 #include "libavutil/thread.h"
 #include "mathops.h"
-#include "mpeg12dec.h"
 #include "mpeg12data.h"
 #include "mpeg12vlc.h"
+#include "rl.h"
 
 #define MAX_INDEX (64 - 1)
 
diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c
index 747ed679bd..4a009bd070 100644
--- a/libavcodec/speedhqenc.c
+++ b/libavcodec/speedhqenc.c
@@ -34,7 +34,7 @@
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "mpeg12data.h"
-#include "mpeg12enc.h"
+#include "mpeg12vlc.h"
 #include "mpegvideo.h"
 #include "mpegvideoenc.h"
 #include "speedhqenc.h"
-- 
2.34.1

_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2022-10-02 23:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30  2:17 [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it Andreas Rheinhardt
2022-09-30  2:18 ` [FFmpeg-devel] [PATCH 2/5] avcodec/mpeg12dec: Don't call ff_mpeg12_common_init() Andreas Rheinhardt
2022-09-30  2:18 ` [FFmpeg-devel] [PATCH 3/5] avcodec/mpeg12: Inline ff_mpeg12_common_init() into mpeg12enc.c Andreas Rheinhardt
2022-09-30  2:18 ` [FFmpeg-devel] [PATCH 4/5] configure, avcodec/Makefile: Remove obsolete mpegvideo dependencies Andreas Rheinhardt
2022-09-30  2:18 ` [FFmpeg-devel] [PATCH 5/5] avcodec/mpeg12: Move ff_mpeg1_clean_buffers decl to a new header Andreas Rheinhardt
2022-10-02 23:08 ` [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it 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