From 5714cf1b5bf520192ddfde4115f3c447a86ba061 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 25 Aug 2022 02:31:18 +0200 Subject: [PATCH] avcodec/internal: Move ff_dvdsub_parse_palette() to new header dvdsub.h Signed-off-by: Andreas Rheinhardt --- libavcodec/dvdsub.c | 3 ++- libavcodec/dvdsub.h | 26 ++++++++++++++++++++++++++ libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/internal.h | 2 -- 5 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 libavcodec/dvdsub.h diff --git a/libavcodec/dvdsub.c b/libavcodec/dvdsub.c index 87215d2bd1..fb415677d9 100644 --- a/libavcodec/dvdsub.c +++ b/libavcodec/dvdsub.c @@ -19,10 +19,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "internal.h" #include "libavutil/avstring.h" #include +#include "dvdsub.h" + void ff_dvdsub_parse_palette(uint32_t *palette, const char *p) { for (int i = 0; i < 16; i++) { diff --git a/libavcodec/dvdsub.h b/libavcodec/dvdsub.h new file mode 100644 index 0000000000..3f51c3f805 --- /dev/null +++ b/libavcodec/dvdsub.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DVDSUB_H +#define AVCODEC_DVDSUB_H + +#include + +void ff_dvdsub_parse_palette(uint32_t *palette, const char *p); + +#endif /* AVCODEC_DVDSUB_H */ diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 4b692c093f..3338cd6b92 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -22,8 +22,8 @@ #include "avcodec.h" #include "codec_internal.h" #include "decode.h" +#include "dvdsub.h" #include "get_bits.h" -#include "internal.h" #include "libavutil/attributes.h" #include "libavutil/colorspace.h" diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index 3fe50ae199..37d6efdd5d 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -21,7 +21,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "dvdsub.h" #include "libavutil/avassert.h" #include "libavutil/bprint.h" #include "libavutil/imgutils.h" diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 0065ccec8c..e2a914c271 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -243,6 +243,4 @@ int64_t ff_guess_coded_bitrate(AVCodecContext *avctx); int ff_int_from_list_or_default(void *ctx, const char * val_name, int val, const int * array_valid_values, int default_value); -void ff_dvdsub_parse_palette(uint32_t *palette, const char *p); - #endif /* AVCODEC_INTERNAL_H */