PR #26043 opened by Romain Beauxis (toots)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26043
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26043.patch

First PR following https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25789 
moving/renaming some rarely touched files with no active PR on them.


>From 03ccfe47ce835419990cee6227597835b06ac926 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:56:50 -0600
Subject: [PATCH 1/9] doc/developer: name the shared codec tag tables tags.c

---
 doc/developer.texi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/developer.texi b/doc/developer.texi
index 5ab6dbee819..2363b53a40b 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -408,6 +408,8 @@ Abbreviations would be ambiguous across libraries.
 For example, @samp{dec} means a decoder in libavcodec and a demuxer in
 libavformat.
 
+The codec tag tables shared by a demuxer and its muxer live in @file{tags.c}.
+
 A header shared by a subsystem is named after it.
 It sits next to the subsystem's directory, for example 
@file{libavformat/id3v2.h}
 next to @file{libavformat/id3v2/}.
-- 
2.54.0


>From 2a452627227702d450d3ca96f42ffd15369fdf89 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:15 -0600
Subject: [PATCH 2/9] avformat/ast: move to ast/

The demuxer moves to ast/demuxer.c, the muxer to ast/muxer.c and the
codec tag tables to ast/tags.c, following the source tree layout rules,
while ast.h stays next to the directory.
---
 MAINTAINERS                             |  2 +-
 libavformat/Makefile                    |  3 +--
 libavformat/ast/Makefile                |  5 +++++
 libavformat/{astdec.c => ast/demuxer.c} |  8 ++++----
 libavformat/{astenc.c => ast/muxer.c}   | 10 +++++-----
 libavformat/{ast.c => ast/tags.c}       |  2 +-
 6 files changed, 17 insertions(+), 13 deletions(-)
 create mode 100644 libavformat/ast/Makefile
 rename libavformat/{astdec.c => ast/demuxer.c} (96%)
 rename libavformat/{astenc.c => ast/muxer.c} (97%)
 rename libavformat/{ast.c => ast/tags.c} (97%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1269d5833e6..9b627983c4f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -406,7 +406,7 @@ Muxers/Demuxers:
   argo_brp.c                            Zane van Iperen
   argo_cvg.c                            Zane van Iperen
   ass*                                  Aurelien Jacobs
-  astenc.c                              James Almer
+  ast/muxer.c                           James Almer
   avi*                                  Michael Niedermayer
   avisynth.c                            Stephen Hutchinson
   bink.c                                Peter Ross
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 891d7f82d9a..cc5f3affe96 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -42,6 +42,7 @@ OBJS = allformats.o         \
 OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
 
 # subsystems
+include $(SRC_PATH)/libavformat/ast/Makefile
 include $(SRC_PATH)/libavformat/id3v2/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
 include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
@@ -146,8 +147,6 @@ OBJS-$(CONFIG_ASF_DEMUXER)               += asfdec_f.o 
asf.o asfcrypt.o \
 OBJS-$(CONFIG_ASF_MUXER)                 += asfenc.o asf.o asf_tags.o
 OBJS-$(CONFIG_ASS_DEMUXER)               += assdec.o subtitles.o
 OBJS-$(CONFIG_ASS_MUXER)                 += assenc.o
-OBJS-$(CONFIG_AST_DEMUXER)               += ast.o astdec.o
-OBJS-$(CONFIG_AST_MUXER)                 += ast.o astenc.o
 OBJS-$(CONFIG_ASTC_MUXER)                += astcenc.o
 OBJS-$(CONFIG_ASTC_DEMUXER)              += astcdec.o
 OBJS-$(CONFIG_AU_DEMUXER)                += au.o pcm.o
diff --git a/libavformat/ast/Makefile b/libavformat/ast/Makefile
new file mode 100644
index 00000000000..944a391e1f1
--- /dev/null
+++ b/libavformat/ast/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/ast/%)
+
+OBJS-$(CONFIG_AST_DEMUXER) += ast/tags.o ast/demuxer.o
+OBJS-$(CONFIG_AST_MUXER)   += ast/tags.o ast/muxer.o
diff --git a/libavformat/astdec.c b/libavformat/ast/demuxer.c
similarity index 96%
rename from libavformat/astdec.c
rename to libavformat/ast/demuxer.c
index 7185e27fd40..b97808552be 100644
--- a/libavformat/astdec.c
+++ b/libavformat/ast/demuxer.c
@@ -21,10 +21,10 @@
 
 #include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
-#include "avformat.h"
-#include "demux.h"
-#include "internal.h"
-#include "ast.h"
+#include "libavformat/avformat.h"
+#include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "libavformat/ast.h"
 
 static int ast_probe(const AVProbeData *p)
 {
diff --git a/libavformat/astenc.c b/libavformat/ast/muxer.c
similarity index 97%
rename from libavformat/astenc.c
rename to libavformat/ast/muxer.c
index 1fa06a2da87..0128b083534 100644
--- a/libavformat/astenc.c
+++ b/libavformat/ast/muxer.c
@@ -19,11 +19,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avformat.h"
-#include "avio_internal.h"
-#include "internal.h"
-#include "ast.h"
-#include "mux.h"
+#include "libavformat/avformat.h"
+#include "libavformat/avio_internal.h"
+#include "libavformat/internal.h"
+#include "libavformat/ast.h"
+#include "libavformat/mux.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
 
diff --git a/libavformat/ast.c b/libavformat/ast/tags.c
similarity index 97%
rename from libavformat/ast.c
rename to libavformat/ast/tags.c
index 856d36f08c7..41c27d7f534 100644
--- a/libavformat/ast.c
+++ b/libavformat/ast/tags.c
@@ -21,7 +21,7 @@
 
 #include <stddef.h>
 #include "libavcodec/codec_id.h"
-#include "internal.h"
+#include "libavformat/internal.h"
 
 const AVCodecTag ff_codec_ast_tags[] = {
     { AV_CODEC_ID_ADPCM_AFC,          0 },
-- 
2.54.0


>From 4773dee18290cf97059de5d7cb81645c7cabad72 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 3/9] avformat/rso: move to rso/

The demuxer moves to rso/demuxer.c, the muxer to rso/muxer.c and the
codec tag tables to rso/tags.c, following the source tree layout rules,
while rso.h stays next to the directory.
---
 libavformat/Makefile                    |  5 +++--
 libavformat/rso/Makefile                |  5 +++++
 libavformat/{rsodec.c => rso/demuxer.c} | 10 +++++-----
 libavformat/{rsoenc.c => rso/muxer.c}   | 12 ++++++------
 libavformat/{rso.c => rso/tags.c}       |  6 +++---
 5 files changed, 22 insertions(+), 16 deletions(-)
 create mode 100644 libavformat/rso/Makefile
 rename libavformat/{rsodec.c => rso/demuxer.c} (94%)
 rename libavformat/{rsoenc.c => rso/muxer.c} (94%)
 rename libavformat/{rso.c => rso/tags.c} (91%)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index cc5f3affe96..eb16a6da112 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -45,6 +45,7 @@ OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
 include $(SRC_PATH)/libavformat/ast/Makefile
 include $(SRC_PATH)/libavformat/id3v2/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
+include $(SRC_PATH)/libavformat/rso/Makefile
 include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
 OBJS-$(CONFIG_CBS_APV_LAVF)              += cbs_apv.o cbs.o
 OBJS-$(CONFIG_CBS_AV1_LAVF)              += cbs_av1.o cbs.o
@@ -525,8 +526,8 @@ OBJS-$(CONFIG_ROQ_DEMUXER)               += idroqdec.o
 OBJS-$(CONFIG_ROQ_MUXER)                 += idroqenc.o rawenc.o
 OBJS-$(CONFIG_RSD_DEMUXER)               += rsd.o
 OBJS-$(CONFIG_RPL_DEMUXER)               += rpl.o
-OBJS-$(CONFIG_RSO_DEMUXER)               += rsodec.o rso.o pcm.o
-OBJS-$(CONFIG_RSO_MUXER)                 += rsoenc.o rso.o rawenc.o
+OBJS-$(CONFIG_RSO_DEMUXER)               += pcm.o
+OBJS-$(CONFIG_RSO_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_RTP_MPEGTS_MUXER)          += rtpenc_mpegts.o
 OBJS-$(CONFIG_RTP_MUXER)                 += rtp.o         \
                                             rtpenc_aac.o     \
diff --git a/libavformat/rso/Makefile b/libavformat/rso/Makefile
new file mode 100644
index 00000000000..81d43faa7de
--- /dev/null
+++ b/libavformat/rso/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/rso/%)
+
+OBJS-$(CONFIG_RSO_DEMUXER) += rso/demuxer.o rso/tags.o
+OBJS-$(CONFIG_RSO_MUXER)   += rso/muxer.o rso/tags.o
diff --git a/libavformat/rsodec.c b/libavformat/rso/demuxer.c
similarity index 94%
rename from libavformat/rsodec.c
rename to libavformat/rso/demuxer.c
index 62a29644146..b54899bb154 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rso/demuxer.c
@@ -22,11 +22,11 @@
 
 #include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
-#include "avformat.h"
-#include "demux.h"
-#include "internal.h"
-#include "pcm.h"
-#include "rso.h"
+#include "libavformat/avformat.h"
+#include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "libavformat/pcm.h"
+#include "libavformat/rso.h"
 
 static int rso_read_header(AVFormatContext *s)
 {
diff --git a/libavformat/rsoenc.c b/libavformat/rso/muxer.c
similarity index 94%
rename from libavformat/rsoenc.c
rename to libavformat/rso/muxer.c
index 552fe5816a0..1f52ecace35 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rso/muxer.c
@@ -20,12 +20,12 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avformat.h"
-#include "internal.h"
-#include "mux.h"
-#include "rawenc.h"
-#include "riff.h"
-#include "rso.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+#include "libavformat/mux.h"
+#include "libavformat/rawenc.h"
+#include "libavformat/riff.h"
+#include "libavformat/rso.h"
 
 static int rso_write_header(AVFormatContext *s)
 {
diff --git a/libavformat/rso.c b/libavformat/rso/tags.c
similarity index 91%
rename from libavformat/rso.c
rename to libavformat/rso/tags.c
index 765c0d0d666..00a7ed18689 100644
--- a/libavformat/rso.c
+++ b/libavformat/rso/tags.c
@@ -19,9 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avformat.h"
-#include "internal.h"
-#include "rso.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+#include "libavformat/rso.h"
 
 const AVCodecTag ff_codec_rso_tags[] = {
     { AV_CODEC_ID_PCM_U8,          0x0100 },
-- 
2.54.0


>From 0ed89c54cb94d609ff73b465e3c4808fb7018328 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 4/9] avformat/smjpeg: move to smjpeg/

The demuxer moves to smjpeg/demuxer.c, the muxer to smjpeg/muxer.c
and the codec tag tables to smjpeg/tags.c, following the source tree
layout rules, while smjpeg.h stays next to the directory.
---
 libavformat/Makefile                          | 3 +--
 libavformat/smjpeg/Makefile                   | 5 +++++
 libavformat/{smjpegdec.c => smjpeg/demuxer.c} | 8 ++++----
 libavformat/{smjpegenc.c => smjpeg/muxer.c}   | 8 ++++----
 libavformat/{smjpeg.c => smjpeg/tags.c}       | 6 +++---
 5 files changed, 17 insertions(+), 13 deletions(-)
 create mode 100644 libavformat/smjpeg/Makefile
 rename libavformat/{smjpegdec.c => smjpeg/demuxer.c} (97%)
 rename libavformat/{smjpegenc.c => smjpeg/muxer.c} (97%)
 rename libavformat/{smjpeg.c => smjpeg/tags.c} (92%)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index eb16a6da112..4d7fbd4eb2f 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -46,6 +46,7 @@ include $(SRC_PATH)/libavformat/ast/Makefile
 include $(SRC_PATH)/libavformat/id3v2/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
 include $(SRC_PATH)/libavformat/rso/Makefile
+include $(SRC_PATH)/libavformat/smjpeg/Makefile
 include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
 OBJS-$(CONFIG_CBS_APV_LAVF)              += cbs_apv.o cbs.o
 OBJS-$(CONFIG_CBS_AV1_LAVF)              += cbs_av1.o cbs.o
@@ -573,8 +574,6 @@ OBJS-$(CONFIG_SIFF_DEMUXER)              += siff.o
 OBJS-$(CONFIG_SIMBIOSIS_IMX_DEMUXER)     += imx.o
 OBJS-$(CONFIG_SLN_DEMUXER)               += pcmdec.o pcm.o
 OBJS-$(CONFIG_SMACKER_DEMUXER)           += smacker.o
-OBJS-$(CONFIG_SMJPEG_DEMUXER)            += smjpegdec.o smjpeg.o
-OBJS-$(CONFIG_SMJPEG_MUXER)              += smjpegenc.o smjpeg.o
 OBJS-$(CONFIG_SMOOTHSTREAMING_MUXER)     += smoothstreamingenc.o
 OBJS-$(CONFIG_SMUSH_DEMUXER)             += smush.o
 OBJS-$(CONFIG_SOL_DEMUXER)               += sol.o pcm.o
diff --git a/libavformat/smjpeg/Makefile b/libavformat/smjpeg/Makefile
new file mode 100644
index 00000000000..f7a8844eba9
--- /dev/null
+++ b/libavformat/smjpeg/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/smjpeg/%)
+
+OBJS-$(CONFIG_SMJPEG_DEMUXER) += smjpeg/demuxer.o smjpeg/tags.o
+OBJS-$(CONFIG_SMJPEG_MUXER)   += smjpeg/muxer.o smjpeg/tags.o
diff --git a/libavformat/smjpegdec.c b/libavformat/smjpeg/demuxer.c
similarity index 97%
rename from libavformat/smjpegdec.c
rename to libavformat/smjpeg/demuxer.c
index 9f058d8eb70..afe8589bdc4 100644
--- a/libavformat/smjpegdec.c
+++ b/libavformat/smjpeg/demuxer.c
@@ -27,10 +27,10 @@
 #include <inttypes.h>
 
 #include "libavutil/mem.h"
-#include "avformat.h"
-#include "demux.h"
-#include "internal.h"
-#include "smjpeg.h"
+#include "libavformat/avformat.h"
+#include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "libavformat/smjpeg.h"
 
 typedef struct SMJPEGContext {
     int audio_stream_index;
diff --git a/libavformat/smjpegenc.c b/libavformat/smjpeg/muxer.c
similarity index 97%
rename from libavformat/smjpegenc.c
rename to libavformat/smjpeg/muxer.c
index 5b8f41d76d5..fbcdb90074e 100644
--- a/libavformat/smjpegenc.c
+++ b/libavformat/smjpeg/muxer.c
@@ -24,10 +24,10 @@
  * This is a muxer for Loki SDL Motion JPEG files
  */
 
-#include "avformat.h"
-#include "internal.h"
-#include "mux.h"
-#include "smjpeg.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+#include "libavformat/mux.h"
+#include "libavformat/smjpeg.h"
 
 typedef struct SMJPEGMuxContext {
     uint32_t duration;
diff --git a/libavformat/smjpeg.c b/libavformat/smjpeg/tags.c
similarity index 92%
rename from libavformat/smjpeg.c
rename to libavformat/smjpeg/tags.c
index 4edf5e8ac40..c7788890007 100644
--- a/libavformat/smjpeg.c
+++ b/libavformat/smjpeg/tags.c
@@ -24,9 +24,9 @@
  * SMJPEG common code
  */
 
-#include "avformat.h"
-#include "internal.h"
-#include "smjpeg.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+#include "libavformat/smjpeg.h"
 
 const AVCodecTag ff_codec_smjpeg_video_tags[] = {
     { AV_CODEC_ID_MJPEG,             MKTAG('J', 'F', 'I', 'F') },
-- 
2.54.0


>From d5b6ac03b596efcb983e5efcb6b709bc54c8d5b6 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 5/9] avformat/ircam: move to ircam/

The demuxer moves to ircam/demuxer.c, the muxer to ircam/muxer.c and
the codec tag tables to ircam/tags.c, following the source tree layout
rules, while ircam.h stays next to the directory.
---
 libavformat/Makefile                        |  5 +++--
 libavformat/ircam/Makefile                  |  5 +++++
 libavformat/{ircamdec.c => ircam/demuxer.c} | 10 +++++-----
 libavformat/{ircamenc.c => ircam/muxer.c}   | 12 ++++++------
 libavformat/{ircam.c => ircam/tags.c}       |  4 ++--
 5 files changed, 21 insertions(+), 15 deletions(-)
 create mode 100644 libavformat/ircam/Makefile
 rename libavformat/{ircamdec.c => ircam/demuxer.c} (95%)
 rename libavformat/{ircamenc.c => ircam/muxer.c} (90%)
 rename libavformat/{ircam.c => ircam/tags.c} (96%)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 4d7fbd4eb2f..28bc28e87c4 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -44,6 +44,7 @@ OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
 # subsystems
 include $(SRC_PATH)/libavformat/ast/Makefile
 include $(SRC_PATH)/libavformat/id3v2/Makefile
+include $(SRC_PATH)/libavformat/ircam/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
 include $(SRC_PATH)/libavformat/rso/Makefile
 include $(SRC_PATH)/libavformat/smjpeg/Makefile
@@ -340,8 +341,8 @@ OBJS-$(CONFIG_IMF_DEMUXER)               += imfdec.o 
imf_cpl.o
 OBJS-$(CONFIG_INGENIENT_DEMUXER)         += ingenientdec.o rawdec.o
 OBJS-$(CONFIG_IPMOVIE_DEMUXER)           += ipmovie.o
 OBJS-$(CONFIG_IPU_DEMUXER)               += ipudec.o rawdec.o
-OBJS-$(CONFIG_IRCAM_DEMUXER)             += ircamdec.o ircam.o pcm.o
-OBJS-$(CONFIG_IRCAM_MUXER)               += ircamenc.o ircam.o rawenc.o
+OBJS-$(CONFIG_IRCAM_DEMUXER)             += pcm.o
+OBJS-$(CONFIG_IRCAM_MUXER)               += rawenc.o
 OBJS-$(CONFIG_ISS_DEMUXER)               += iss.o
 OBJS-$(CONFIG_ITERM2_MUXER)              += iterm2enc.o
 OBJS-$(CONFIG_IV8_DEMUXER)               += iv8.o
diff --git a/libavformat/ircam/Makefile b/libavformat/ircam/Makefile
new file mode 100644
index 00000000000..c44a16b9daa
--- /dev/null
+++ b/libavformat/ircam/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/ircam/%)
+
+OBJS-$(CONFIG_IRCAM_DEMUXER) += ircam/demuxer.o ircam/tags.o
+OBJS-$(CONFIG_IRCAM_MUXER)   += ircam/muxer.o ircam/tags.o
diff --git a/libavformat/ircamdec.c b/libavformat/ircam/demuxer.c
similarity index 95%
rename from libavformat/ircamdec.c
rename to libavformat/ircam/demuxer.c
index a39ae78bebd..a391de0ae6b 100644
--- a/libavformat/ircamdec.c
+++ b/libavformat/ircam/demuxer.c
@@ -22,11 +22,11 @@
 #include "libavutil/intfloat.h"
 #include "libavutil/intreadwrite.h"
 #include "libavcodec/internal.h"
-#include "avformat.h"
-#include "demux.h"
-#include "internal.h"
-#include "pcm.h"
-#include "ircam.h"
+#include "libavformat/avformat.h"
+#include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "libavformat/pcm.h"
+#include "libavformat/ircam.h"
 
 static int ircam_probe(const AVProbeData *p)
 {
diff --git a/libavformat/ircamenc.c b/libavformat/ircam/muxer.c
similarity index 90%
rename from libavformat/ircamenc.c
rename to libavformat/ircam/muxer.c
index 7600d9a8a90..ab2dc1fb8b4 100644
--- a/libavformat/ircamenc.c
+++ b/libavformat/ircam/muxer.c
@@ -20,12 +20,12 @@
  */
 
 #include "libavutil/intreadwrite.h"
-#include "avformat.h"
-#include "avio_internal.h"
-#include "internal.h"
-#include "mux.h"
-#include "rawenc.h"
-#include "ircam.h"
+#include "libavformat/avformat.h"
+#include "libavformat/avio_internal.h"
+#include "libavformat/internal.h"
+#include "libavformat/mux.h"
+#include "libavformat/rawenc.h"
+#include "libavformat/ircam.h"
 
 static int ircam_write_header(AVFormatContext *s)
 {
diff --git a/libavformat/ircam.c b/libavformat/ircam/tags.c
similarity index 96%
rename from libavformat/ircam.c
rename to libavformat/ircam/tags.c
index a267c18a083..c2a0796ecd0 100644
--- a/libavformat/ircam.c
+++ b/libavformat/ircam/tags.c
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avformat.h"
-#include "internal.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
 
 const AVCodecTag ff_codec_ircam_le_tags[] = {
     { AV_CODEC_ID_PCM_ALAW,  0x10001 },
-- 
2.54.0


>From b5e35c186a0c4f94d58ee611edc8da8033cf6f3b Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 6/9] avformat/swf: move to swf/

The demuxer moves to swf/demuxer.c, the muxer to swf/muxer.c and the
codec tag tables to swf/tags.c, following the source tree layout rules,
while swf.h stays next to the directory.
---
 MAINTAINERS                             | 2 +-
 libavformat/Makefile                    | 4 +---
 libavformat/swf/Makefile                | 6 ++++++
 libavformat/{swfdec.c => swf/demuxer.c} | 6 +++---
 libavformat/{swfenc.c => swf/muxer.c}   | 8 ++++----
 libavformat/{swf.c => swf/tags.c}       | 2 +-
 6 files changed, 16 insertions(+), 12 deletions(-)
 create mode 100644 libavformat/swf/Makefile
 rename libavformat/{swfdec.c => swf/demuxer.c} (99%)
 rename libavformat/{swfenc.c => swf/muxer.c} (99%)
 rename libavformat/{swf.c => swf/tags.c} (96%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9b627983c4f..7b6de5a6292 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -502,7 +502,7 @@ Muxers/Demuxers:
   smush.c                               Manuel Lauss
   spdif*                                Anssi Hannula
   srtdec.c                              Aurelien Jacobs
-  swf.c                                 Baptiste Coudurier
+  swf/tags.c                            Baptiste Coudurier
   tta.c                                 Alex Beregszaszi
   txd.c                                 Ivo van Poorten
   voc.c                                 Aurelien Jacobs
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 28bc28e87c4..eccff5ac4e5 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -48,6 +48,7 @@ include $(SRC_PATH)/libavformat/ircam/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
 include $(SRC_PATH)/libavformat/rso/Makefile
 include $(SRC_PATH)/libavformat/smjpeg/Makefile
+include $(SRC_PATH)/libavformat/swf/Makefile
 include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
 OBJS-$(CONFIG_CBS_APV_LAVF)              += cbs_apv.o cbs.o
 OBJS-$(CONFIG_CBS_AV1_LAVF)              += cbs_av1.o cbs.o
@@ -156,7 +157,6 @@ OBJS-$(CONFIG_AU_DEMUXER)                += au.o pcm.o
 OBJS-$(CONFIG_AU_MUXER)                  += au.o rawenc.o
 OBJS-$(CONFIG_AVI_DEMUXER)               += avidec.o
 OBJS-$(CONFIG_AVI_MUXER)                 += avienc.o mpegtsenc.o rawutils.o
-OBJS-$(CONFIG_AVM2_MUXER)                += swfenc.o swf.o
 OBJS-$(CONFIG_AVR_DEMUXER)               += avr.o pcm.o
 OBJS-$(CONFIG_AVS_DEMUXER)               += avs.o voc_packet.o voc.o
 OBJS-$(CONFIG_AVS2_DEMUXER)              += avs2dec.o rawdec.o
@@ -595,8 +595,6 @@ OBJS-$(CONFIG_SUP_DEMUXER)               += supdec.o
 OBJS-$(CONFIG_SUP_MUXER)                 += supenc.o
 OBJS-$(CONFIG_SVAG_DEMUXER)              += svag.o
 OBJS-$(CONFIG_SVS_DEMUXER)               += svs.o
-OBJS-$(CONFIG_SWF_DEMUXER)               += swfdec.o swf.o
-OBJS-$(CONFIG_SWF_MUXER)                 += swfenc.o swf.o
 OBJS-$(CONFIG_TAK_DEMUXER)               += takdec.o apetag.o img2.o rawdec.o
 OBJS-$(CONFIG_TEDCAPTIONS_DEMUXER)       += tedcaptionsdec.o subtitles.o
 OBJS-$(CONFIG_TEE_MUXER)                 += tee.o tee_common.o
diff --git a/libavformat/swf/Makefile b/libavformat/swf/Makefile
new file mode 100644
index 00000000000..e1f19139478
--- /dev/null
+++ b/libavformat/swf/Makefile
@@ -0,0 +1,6 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/swf/%)
+
+OBJS-$(CONFIG_AVM2_MUXER)  += swf/muxer.o swf/tags.o
+OBJS-$(CONFIG_SWF_DEMUXER) += swf/demuxer.o swf/tags.o
+OBJS-$(CONFIG_SWF_MUXER)   += swf/muxer.o swf/tags.o
diff --git a/libavformat/swfdec.c b/libavformat/swf/demuxer.c
similarity index 99%
rename from libavformat/swfdec.c
rename to libavformat/swf/demuxer.c
index 1290f2c70f4..b7c7f9d52a0 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swf/demuxer.c
@@ -33,9 +33,9 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/mem.h"
 #include "libavcodec/get_bits.h"
-#include "demux.h"
-#include "swf.h"
-#include "flv.h"
+#include "libavformat/demux.h"
+#include "libavformat/swf.h"
+#include "libavformat/flv.h"
 
 typedef struct SWFDecContext {
     int samples_per_frame;
diff --git a/libavformat/swfenc.c b/libavformat/swf/muxer.c
similarity index 99%
rename from libavformat/swfenc.c
rename to libavformat/swf/muxer.c
index fc883b80233..5cbfc81bed1 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swf/muxer.c
@@ -25,10 +25,10 @@
 #include "libavcodec/put_bits.h"
 #include "libavutil/avassert.h"
 #include "libavutil/fifo.h"
-#include "avformat.h"
-#include "flv.h"
-#include "mux.h"
-#include "swf.h"
+#include "libavformat/avformat.h"
+#include "libavformat/flv.h"
+#include "libavformat/mux.h"
+#include "libavformat/swf.h"
 
 #define AUDIO_FIFO_SIZE 65536
 
diff --git a/libavformat/swf.c b/libavformat/swf/tags.c
similarity index 96%
rename from libavformat/swf.c
rename to libavformat/swf/tags.c
index a3471d917a1..cdfa48ccadb 100644
--- a/libavformat/swf.c
+++ b/libavformat/swf/tags.c
@@ -20,7 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "internal.h"
+#include "libavformat/internal.h"
 
 const AVCodecTag ff_swf_codec_tags[] = {
     { AV_CODEC_ID_FLV1,     0x02 },
-- 
2.54.0


>From 176fffc7cb5ee35765f7a19675b801cae4fc2061 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 7/9] avformat/ffmeta: move to ffmeta/

The demuxer moves to ffmeta/demuxer.c, and the muxer to ffmeta/muxer.c,
following the source tree layout rules, while ffmeta.h stays next to
the directory.
---
 libavformat/Makefile                          | 3 +--
 libavformat/ffmeta/Makefile                   | 5 +++++
 libavformat/{ffmetadec.c => ffmeta/demuxer.c} | 6 +++---
 libavformat/{ffmetaenc.c => ffmeta/muxer.c}   | 6 +++---
 4 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 libavformat/ffmeta/Makefile
 rename libavformat/{ffmetadec.c => ffmeta/demuxer.c} (98%)
 rename libavformat/{ffmetaenc.c => ffmeta/muxer.c} (96%)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index eccff5ac4e5..9465ada31b6 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -43,6 +43,7 @@ OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
 
 # subsystems
 include $(SRC_PATH)/libavformat/ast/Makefile
+include $(SRC_PATH)/libavformat/ffmeta/Makefile
 include $(SRC_PATH)/libavformat/id3v2/Makefile
 include $(SRC_PATH)/libavformat/ircam/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
@@ -222,8 +223,6 @@ OBJS-$(CONFIG_EA_DEMUXER)                += electronicarts.o
 OBJS-$(CONFIG_EAC3_DEMUXER)              += ac3dec.o rawdec.o
 OBJS-$(CONFIG_EAC3_MUXER)                += rawenc.o
 OBJS-$(CONFIG_EPAF_DEMUXER)              += epafdec.o pcm.o
-OBJS-$(CONFIG_FFMETADATA_DEMUXER)        += ffmetadec.o
-OBJS-$(CONFIG_FFMETADATA_MUXER)          += ffmetaenc.o
 OBJS-$(CONFIG_FIFO_MUXER)                += fifo.o
 OBJS-$(CONFIG_FILMSTRIP_DEMUXER)         += filmstripdec.o
 OBJS-$(CONFIG_FILMSTRIP_MUXER)           += filmstripenc.o rawenc.o
diff --git a/libavformat/ffmeta/Makefile b/libavformat/ffmeta/Makefile
new file mode 100644
index 00000000000..9fa8a446308
--- /dev/null
+++ b/libavformat/ffmeta/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/ffmeta/%)
+
+OBJS-$(CONFIG_FFMETADATA_DEMUXER) += ffmeta/demuxer.o
+OBJS-$(CONFIG_FFMETADATA_MUXER)   += ffmeta/muxer.o
diff --git a/libavformat/ffmetadec.c b/libavformat/ffmeta/demuxer.c
similarity index 98%
rename from libavformat/ffmetadec.c
rename to libavformat/ffmeta/demuxer.c
index 69c93e6b3bb..3db7571273a 100644
--- a/libavformat/ffmetadec.c
+++ b/libavformat/ffmeta/demuxer.c
@@ -22,9 +22,9 @@
 #include "libavutil/bprint.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/mem.h"
-#include "avformat.h"
-#include "demux.h"
-#include "ffmeta.h"
+#include "libavformat/avformat.h"
+#include "libavformat/demux.h"
+#include "libavformat/ffmeta.h"
 #include "libavutil/dict.h"
 
 static int probe(const AVProbeData *p)
diff --git a/libavformat/ffmetaenc.c b/libavformat/ffmeta/muxer.c
similarity index 96%
rename from libavformat/ffmetaenc.c
rename to libavformat/ffmeta/muxer.c
index ef076407b5d..1ad358b5d4c 100644
--- a/libavformat/ffmetaenc.c
+++ b/libavformat/ffmeta/muxer.c
@@ -21,9 +21,9 @@
 
 #include <inttypes.h>
 
-#include "avformat.h"
-#include "ffmeta.h"
-#include "mux.h"
+#include "libavformat/avformat.h"
+#include "libavformat/ffmeta.h"
+#include "libavformat/mux.h"
 #include "libavutil/dict.h"
 
 
-- 
2.54.0


>From a57970a66e901a05a943690eca9653c0511f5624 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 8/9] avformat/sox: move to sox/

The demuxer moves to sox/demuxer.c, and the muxer to sox/muxer.c,
following the source tree layout rules, while sox.h stays next to
the directory.
---
 libavformat/Makefile                    |  5 +++--
 libavformat/sox/Makefile                |  5 +++++
 libavformat/{soxdec.c => sox/demuxer.c} | 12 ++++++------
 libavformat/{soxenc.c => sox/muxer.c}   | 10 +++++-----
 4 files changed, 19 insertions(+), 13 deletions(-)
 create mode 100644 libavformat/sox/Makefile
 rename libavformat/{soxdec.c => sox/demuxer.c} (96%)
 rename libavformat/{soxenc.c => sox/muxer.c} (95%)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9465ada31b6..d03d3471e3e 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -49,6 +49,7 @@ include $(SRC_PATH)/libavformat/ircam/Makefile
 include $(SRC_PATH)/libavformat/ogg/Makefile
 include $(SRC_PATH)/libavformat/rso/Makefile
 include $(SRC_PATH)/libavformat/smjpeg/Makefile
+include $(SRC_PATH)/libavformat/sox/Makefile
 include $(SRC_PATH)/libavformat/swf/Makefile
 include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
 OBJS-$(CONFIG_CBS_APV_LAVF)              += cbs_apv.o cbs.o
@@ -577,8 +578,8 @@ OBJS-$(CONFIG_SMACKER_DEMUXER)           += smacker.o
 OBJS-$(CONFIG_SMOOTHSTREAMING_MUXER)     += smoothstreamingenc.o
 OBJS-$(CONFIG_SMUSH_DEMUXER)             += smush.o
 OBJS-$(CONFIG_SOL_DEMUXER)               += sol.o pcm.o
-OBJS-$(CONFIG_SOX_DEMUXER)               += soxdec.o pcm.o
-OBJS-$(CONFIG_SOX_MUXER)                 += soxenc.o rawenc.o
+OBJS-$(CONFIG_SOX_DEMUXER)               += pcm.o
+OBJS-$(CONFIG_SOX_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_SPDIF_DEMUXER)             += spdif.o spdifdec.o
 OBJS-$(CONFIG_SPDIF_MUXER)               += spdif.o spdifenc.o
 OBJS-$(CONFIG_SPEEX_MUXER)               += vorbis/comment/writer.o
diff --git a/libavformat/sox/Makefile b/libavformat/sox/Makefile
new file mode 100644
index 00000000000..efd90bb5721
--- /dev/null
+++ b/libavformat/sox/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/sox/%)
+
+OBJS-$(CONFIG_SOX_DEMUXER) += sox/demuxer.o
+OBJS-$(CONFIG_SOX_MUXER)   += sox/muxer.o
diff --git a/libavformat/soxdec.c b/libavformat/sox/demuxer.c
similarity index 96%
rename from libavformat/soxdec.c
rename to libavformat/sox/demuxer.c
index 2f16a2a4371..b98d98677fb 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/sox/demuxer.c
@@ -33,12 +33,12 @@
 #include "libavutil/intfloat.h"
 #include "libavutil/dict.h"
 #include "libavutil/mem.h"
-#include "avformat.h"
-#include "avio_internal.h"
-#include "demux.h"
-#include "internal.h"
-#include "pcm.h"
-#include "sox.h"
+#include "libavformat/avformat.h"
+#include "libavformat/avio_internal.h"
+#include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "libavformat/pcm.h"
+#include "libavformat/sox.h"
 
 static int sox_probe(const AVProbeData *p)
 {
diff --git a/libavformat/soxenc.c b/libavformat/sox/muxer.c
similarity index 95%
rename from libavformat/soxenc.c
rename to libavformat/sox/muxer.c
index 6217eec0431..7b242a9a10e 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/sox/muxer.c
@@ -32,11 +32,11 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/intfloat.h"
 #include "libavutil/dict.h"
-#include "avformat.h"
-#include "avio_internal.h"
-#include "mux.h"
-#include "rawenc.h"
-#include "sox.h"
+#include "libavformat/avformat.h"
+#include "libavformat/avio_internal.h"
+#include "libavformat/mux.h"
+#include "libavformat/rawenc.h"
+#include "libavformat/sox.h"
 
 typedef struct SoXContext {
     int64_t header_size;
-- 
2.54.0


>From 9f9ed3cae3f4dca0b50e9f849dd777e66b8be333 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <[email protected]>
Date: Fri, 13 Nov 2026 19:57:23 -0600
Subject: [PATCH 9/9] avformat/yuv4mpeg: move to yuv4mpeg/

The demuxer moves to yuv4mpeg/demuxer.c, and the muxer to
yuv4mpeg/muxer.c, following the source tree layout rules, while
yuv4mpeg.h stays next to the directory.
---
 libavformat/Makefile                              | 3 +--
 libavformat/yuv4mpeg/Makefile                     | 5 +++++
 libavformat/{yuv4mpegdec.c => yuv4mpeg/demuxer.c} | 8 ++++----
 libavformat/{yuv4mpegenc.c => yuv4mpeg/muxer.c}   | 8 ++++----
 4 files changed, 14 insertions(+), 10 deletions(-)
 create mode 100644 libavformat/yuv4mpeg/Makefile
 rename libavformat/{yuv4mpegdec.c => yuv4mpeg/demuxer.c} (99%)
 rename libavformat/{yuv4mpegenc.c => yuv4mpeg/muxer.c} (98%)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index d03d3471e3e..0dce907cff1 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -52,6 +52,7 @@ include $(SRC_PATH)/libavformat/smjpeg/Makefile
 include $(SRC_PATH)/libavformat/sox/Makefile
 include $(SRC_PATH)/libavformat/swf/Makefile
 include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
+include $(SRC_PATH)/libavformat/yuv4mpeg/Makefile
 OBJS-$(CONFIG_CBS_APV_LAVF)              += cbs_apv.o cbs.o
 OBJS-$(CONFIG_CBS_AV1_LAVF)              += cbs_av1.o cbs.o
 OBJS-$(CONFIG_ISO_MEDIA)                 += isom.o
@@ -664,8 +665,6 @@ OBJS-$(CONFIG_XMV_DEMUXER)               += xmv.o
 OBJS-$(CONFIG_XVAG_DEMUXER)              += xvag.o
 OBJS-$(CONFIG_XWMA_DEMUXER)              += xwma.o
 OBJS-$(CONFIG_YOP_DEMUXER)               += yop.o
-OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER)      += yuv4mpegdec.o
-OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER)        += yuv4mpegenc.o
 
 # external library muxers/demuxers
 OBJS-$(CONFIG_AVISYNTH_DEMUXER)          += avisynth.o
diff --git a/libavformat/yuv4mpeg/Makefile b/libavformat/yuv4mpeg/Makefile
new file mode 100644
index 00000000000..30f265b8419
--- /dev/null
+++ b/libavformat/yuv4mpeg/Makefile
@@ -0,0 +1,5 @@
+clean::
+       $(RM) $(CLEANSUFFIXES:%=libavformat/yuv4mpeg/%)
+
+OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER) += yuv4mpeg/demuxer.o
+OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER)   += yuv4mpeg/muxer.o
diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpeg/demuxer.c
similarity index 99%
rename from libavformat/yuv4mpegdec.c
rename to libavformat/yuv4mpeg/demuxer.c
index 20e7834d987..2c4718ad36c 100644
--- a/libavformat/yuv4mpegdec.c
+++ b/libavformat/yuv4mpeg/demuxer.c
@@ -22,10 +22,10 @@
 #include "libavutil/avstring.h"
 #include "libavutil/imgutils.h"
 
-#include "avformat.h"
-#include "demux.h"
-#include "internal.h"
-#include "yuv4mpeg.h"
+#include "libavformat/avformat.h"
+#include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "libavformat/yuv4mpeg.h"
 
 /* Header size increased to allow room for optional flags */
 #define MAX_YUV4_HEADER 128
diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpeg/muxer.c
similarity index 98%
rename from libavformat/yuv4mpegenc.c
rename to libavformat/yuv4mpeg/muxer.c
index 493ddd1e38d..527607d3eb5 100644
--- a/libavformat/yuv4mpegenc.c
+++ b/libavformat/yuv4mpeg/muxer.c
@@ -21,10 +21,10 @@
 
 #include "libavutil/frame.h"
 #include "libavutil/pixdesc.h"
-#include "avformat.h"
-#include "internal.h"
-#include "mux.h"
-#include "yuv4mpeg.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+#include "libavformat/mux.h"
+#include "libavformat/yuv4mpeg.h"
 
 static int yuv4_write_header(AVFormatContext *s)
 {
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to