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>
pull/389/head
Andreas Rheinhardt 1 year ago
parent 096563c108
commit 8387241975
  1. 1
      libavcodec/asvenc.c
  2. 7
      libavcodec/dct.h
  3. 1
      libavcodec/fdctdsp.c
  4. 15
      libavcodec/fdctdsp.h
  5. 2
      libavcodec/jfdctfst.c
  6. 2
      libavcodec/jfdctint_template.c
  7. 1
      libavcodec/mpegvideo_enc.c
  8. 1
      libavcodec/ppc/fdctdsp.c
  9. 1
      libavcodec/tests/dct.c

@ -33,7 +33,6 @@
#include "asv.h" #include "asv.h"
#include "avcodec.h" #include "avcodec.h"
#include "codec_internal.h" #include "codec_internal.h"
#include "dct.h"
#include "encode.h" #include "encode.h"
#include "fdctdsp.h" #include "fdctdsp.h"
#include "mpeg12data.h" #include "mpeg12data.h"

@ -52,13 +52,6 @@ void ff_dct_end (DCTContext *s);
void ff_dct_init_x86(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_dct(int16_t *data);
void ff_j_rev_dct4(int16_t *data); void ff_j_rev_dct4(int16_t *data);
void ff_j_rev_dct2(int16_t *data); void ff_j_rev_dct2(int16_t *data);

@ -18,7 +18,6 @@
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "avcodec.h" #include "avcodec.h"
#include "dct.h"
#include "faandct.h" #include "faandct.h"
#include "fdctdsp.h" #include "fdctdsp.h"
#include "config.h" #include "config.h"

@ -21,17 +21,24 @@
#include <stdint.h> #include <stdint.h>
#include "avcodec.h" struct AVCodecContext;
typedef struct FDCTDSPContext { typedef struct FDCTDSPContext {
void (*fdct)(int16_t *block /* align 16 */); void (*fdct)(int16_t *block /* align 16 */);
void (*fdct248)(int16_t *block /* align 16 */); void (*fdct248)(int16_t *block /* align 16 */);
} FDCTDSPContext; } FDCTDSPContext;
void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx); void ff_fdctdsp_init(FDCTDSPContext *c, struct AVCodecContext *avctx);
void ff_fdctdsp_init_ppc(FDCTDSPContext *c, AVCodecContext *avctx, void ff_fdctdsp_init_ppc(FDCTDSPContext *c, struct AVCodecContext *avctx,
unsigned high_bit_depth); 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); 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 */ #endif /* AVCODEC_FDCTDSP_H */

@ -68,7 +68,7 @@
#include <stdint.h> #include <stdint.h>
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "dct.h" #include "fdctdsp.h"
#define DCTSIZE 8 #define DCTSIZE 8
#define GLOBAL(x) x #define GLOBAL(x) x

@ -60,7 +60,7 @@
*/ */
#include "libavutil/common.h" #include "libavutil/common.h"
#include "dct.h" #include "fdctdsp.h"
#include "bit_depth_template.c" #include "bit_depth_template.c"

@ -43,7 +43,6 @@
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/thread.h" #include "libavutil/thread.h"
#include "avcodec.h" #include "avcodec.h"
#include "dct.h"
#include "encode.h" #include "encode.h"
#include "idctdsp.h" #include "idctdsp.h"
#include "mpeg12codecs.h" #include "mpeg12codecs.h"

@ -25,6 +25,7 @@
#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h" #include "libavutil/ppc/util_altivec.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/fdctdsp.h" #include "libavcodec/fdctdsp.h"
#include "fdct.h" #include "fdct.h"

@ -43,6 +43,7 @@
#include "libavutil/time.h" #include "libavutil/time.h"
#include "libavcodec/dct.h" #include "libavcodec/dct.h"
#include "libavcodec/fdctdsp.h"
#include "libavcodec/idctdsp.h" #include "libavcodec/idctdsp.h"
#include "libavcodec/simple_idct.h" #include "libavcodec/simple_idct.h"
#include "libavcodec/xvididct.h" #include "libavcodec/xvididct.h"

Loading…
Cancel
Save