[FFmpeg-devel] [PATCH] swscale/utils: split off format code into new file

Niklas Haas ffmpeg at haasn.xyz
Mon Mar 10 17:20:42 EET 2025


On Mon, 10 Mar 2025 16:18:11 +0100 Niklas Haas <ffmpeg at haasn.xyz> wrote:
> From: Niklas Haas <git at haasn.dev>
>
> utils.c is getting quite crowded, and I need a new place to dump a lot of
> format handling code for the ongoing rewrite. Rather than bloating this file
> even more, start splitting format handling helpers off into a new file.
>
> This also renames the existing utils.h header, which didn't really contain
> anything except the SwsFormat definition anyway (the prototypes for what should
> have been in utils.h are all still in the legacy swscale_internal.h).
> ---
>  libswscale/Makefile              |   1 +
>  libswscale/cms.c                 |   2 +-
>  libswscale/cms.h                 |   2 +-
>  libswscale/csputils.c            |   2 +-
>  libswscale/format.c              | 583 +++++++++++++++++++++++++++++++
>  libswscale/{utils.h => format.h} |   6 +-
>  libswscale/graph.c               |   2 +-
>  libswscale/graph.h               |   2 +-
>  libswscale/lut3d.h               |   2 +-
>  libswscale/utils.c               | 559 -----------------------------
>  10 files changed, 593 insertions(+), 568 deletions(-)
>  create mode 100644 libswscale/format.c
>  rename libswscale/{utils.h => format.h} (98%)

Decided to send this commit early to minimize merge conflicts with my
ongoing rewrite.


More information about the ffmpeg-devel mailing list