diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-07-24 14:41:24 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-07-29 04:16:59 +0200 |
commit | 8387241975c5ac8c2da1cecf9ff2dfae3fabc844 (patch) | |
tree | af8c825726f8b3821ed908286d595dc705e4ac20 /libavcodec | |
parent | 096563c1086db8e8ebbb980ef65846b21d1fa010 (diff) | |
download | ffmpeg-8387241975c5ac8c2da1cecf9ff2dfae3fabc844.tar.gz |
avcodec/dct: Move fdct function declarations to fdctdsp.h
It is the more proper place for them given that this is
the only API using them.
Also use a forward-declaration of AVCodecContext in fdctdsp.h
to avoid including avcodec.h in jfdct(fst|int).c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/asvenc.c | 1 | ||||
-rw-r--r-- | libavcodec/dct.h | 7 | ||||
-rw-r--r-- | libavcodec/fdctdsp.c | 1 | ||||
-rw-r--r-- | libavcodec/fdctdsp.h | 15 | ||||
-rw-r--r-- | libavcodec/jfdctfst.c | 2 | ||||
-rw-r--r-- | libavcodec/jfdctint_template.c | 2 | ||||
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 1 | ||||
-rw-r--r-- | libavcodec/ppc/fdctdsp.c | 1 | ||||
-rw-r--r-- | libavcodec/tests/dct.c | 1 |
9 files changed, 15 insertions, 16 deletions
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index 4a14bcf8fa..50da46738c 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -33,7 +33,6 @@ #include "asv.h" #include "avcodec.h" #include "codec_internal.h" -#include "dct.h" #include "encode.h" #include "fdctdsp.h" #include "mpeg12data.h" diff --git a/libavcodec/dct.h b/libavcodec/dct.h index 0a03e256d1..75f40b9f84 100644 --- a/libavcodec/dct.h +++ b/libavcodec/dct.h @@ -52,13 +52,6 @@ void ff_dct_end (DCTContext *s); void ff_dct_init_x86(DCTContext *s); -void ff_fdct_ifast(int16_t *data); -void ff_fdct_ifast248(int16_t *data); -void ff_jpeg_fdct_islow_8(int16_t *data); -void ff_jpeg_fdct_islow_10(int16_t *data); -void ff_fdct248_islow_8(int16_t *data); -void ff_fdct248_islow_10(int16_t *data); - void ff_j_rev_dct(int16_t *data); void ff_j_rev_dct4(int16_t *data); void ff_j_rev_dct2(int16_t *data); diff --git a/libavcodec/fdctdsp.c b/libavcodec/fdctdsp.c index 5306c9d047..f8ba17426c 100644 --- a/libavcodec/fdctdsp.c +++ b/libavcodec/fdctdsp.c @@ -18,7 +18,6 @@ #include "libavutil/attributes.h" #include "avcodec.h" -#include "dct.h" #include "faandct.h" #include "fdctdsp.h" #include "config.h" diff --git a/libavcodec/fdctdsp.h b/libavcodec/fdctdsp.h index 3e1f683b9e..be65efa895 100644 --- a/libavcodec/fdctdsp.h +++ b/libavcodec/fdctdsp.h @@ -21,17 +21,24 @@ #include <stdint.h> -#include "avcodec.h" +struct AVCodecContext; typedef struct FDCTDSPContext { void (*fdct)(int16_t *block /* align 16 */); void (*fdct248)(int16_t *block /* align 16 */); } FDCTDSPContext; -void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx); -void ff_fdctdsp_init_ppc(FDCTDSPContext *c, AVCodecContext *avctx, +void ff_fdctdsp_init(FDCTDSPContext *c, struct AVCodecContext *avctx); +void ff_fdctdsp_init_ppc(FDCTDSPContext *c, struct AVCodecContext *avctx, unsigned high_bit_depth); -void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, +void ff_fdctdsp_init_x86(FDCTDSPContext *c, struct AVCodecContext *avctx, unsigned high_bit_depth); +void ff_fdct_ifast(int16_t *data); +void ff_fdct_ifast248(int16_t *data); +void ff_jpeg_fdct_islow_8(int16_t *data); +void ff_jpeg_fdct_islow_10(int16_t *data); +void ff_fdct248_islow_8(int16_t *data); +void ff_fdct248_islow_10(int16_t *data); + #endif /* AVCODEC_FDCTDSP_H */ diff --git a/libavcodec/jfdctfst.c b/libavcodec/jfdctfst.c index 805e05808c..946b12f379 100644 --- a/libavcodec/jfdctfst.c +++ b/libavcodec/jfdctfst.c @@ -68,7 +68,7 @@ #include <stdint.h> #include "libavutil/attributes.h" -#include "dct.h" +#include "fdctdsp.h" #define DCTSIZE 8 #define GLOBAL(x) x diff --git a/libavcodec/jfdctint_template.c b/libavcodec/jfdctint_template.c index 67fb77b5e1..ca17300c32 100644 --- a/libavcodec/jfdctint_template.c +++ b/libavcodec/jfdctint_template.c @@ -60,7 +60,7 @@ */ #include "libavutil/common.h" -#include "dct.h" +#include "fdctdsp.h" #include "bit_depth_template.c" diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 9bdf5dbe07..64e66ae958 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -43,7 +43,6 @@ #include "libavutil/opt.h" #include "libavutil/thread.h" #include "avcodec.h" -#include "dct.h" #include "encode.h" #include "idctdsp.h" #include "mpeg12codecs.h" diff --git a/libavcodec/ppc/fdctdsp.c b/libavcodec/ppc/fdctdsp.c index 4ab516c6b3..ae3c1b18ff 100644 --- a/libavcodec/ppc/fdctdsp.c +++ b/libavcodec/ppc/fdctdsp.c @@ -25,6 +25,7 @@ #include "libavutil/ppc/cpu.h" #include "libavutil/ppc/util_altivec.h" +#include "libavcodec/avcodec.h" #include "libavcodec/fdctdsp.h" #include "fdct.h" diff --git a/libavcodec/tests/dct.c b/libavcodec/tests/dct.c index c847af2f11..e8d0b8dd1d 100644 --- a/libavcodec/tests/dct.c +++ b/libavcodec/tests/dct.c @@ -43,6 +43,7 @@ #include "libavutil/time.h" #include "libavcodec/dct.h" +#include "libavcodec/fdctdsp.h" #include "libavcodec/idctdsp.h" #include "libavcodec/simple_idct.h" #include "libavcodec/xvididct.h" |