idct: Move arm-specific declarations to a header in the arm directory
authorDiego Biurrun <diego@biurrun.de>
Tue, 18 Feb 2014 12:46:32 +0000 (13:46 +0100)
committerDiego Biurrun <diego@biurrun.de>
Sun, 20 Jul 2014 20:02:17 +0000 (13:02 -0700)
libavcodec/arm/idct.h [copied from libavcodec/arm/idctdsp_init_armv5te.c with 60% similarity]
libavcodec/arm/idctdsp_init_arm.c
libavcodec/arm/idctdsp_init_armv5te.c
libavcodec/arm/idctdsp_init_armv6.c
libavcodec/arm/idctdsp_init_neon.c
libavcodec/dct-test.c

similarity index 60%
copy from libavcodec/arm/idctdsp_init_armv5te.c
copy to libavcodec/arm/idct.h
index 1088563..168d64b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
- *
  * This file is part of Libav.
  *
  * Libav is free software; you can redistribute it and/or
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#ifndef AVCODEC_ARM_IDCT_H
+#define AVCODEC_ARM_IDCT_H
+
 #include <stdint.h>
 
-#include "libavutil/attributes.h"
-#include "libavcodec/avcodec.h"
-#include "libavcodec/idctdsp.h"
-#include "idctdsp_arm.h"
+void ff_j_rev_dct_arm(int16_t *data);
+
+void ff_simple_idct_arm(int16_t *data);
 
 void ff_simple_idct_armv5te(int16_t *data);
 void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, int16_t *data);
 void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, int16_t *data);
 
-av_cold void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
-                                     unsigned high_bit_depth)
-{
-    if (!high_bit_depth &&
-        (avctx->idct_algo == FF_IDCT_AUTO ||
-         avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) {
-        c->idct_put  = ff_simple_idct_put_armv5te;
-        c->idct_add  = ff_simple_idct_add_armv5te;
-        c->idct      = ff_simple_idct_armv5te;
-        c->perm_type = FF_IDCT_PERM_NONE;
-    }
-}
+void ff_simple_idct_armv6(int16_t *data);
+void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data);
+void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data);
+
+void ff_simple_idct_neon(int16_t *data);
+void ff_simple_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
+void ff_simple_idct_add_neon(uint8_t *dest, int line_size, int16_t *data);
+
+#endif /* AVCODEC_ARM_IDCT_H */
index cf75383..0b32df0 100644 (file)
 #include "libavutil/arm/cpu.h"
 #include "libavcodec/avcodec.h"
 #include "libavcodec/idctdsp.h"
+#include "idct.h"
 #include "idctdsp_arm.h"
 
-void ff_j_rev_dct_arm(int16_t *data);
-void ff_simple_idct_arm(int16_t *data);
-
 /* XXX: local hack */
 static void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
 static void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
index 1088563..251165d 100644 (file)
 #include "libavutil/attributes.h"
 #include "libavcodec/avcodec.h"
 #include "libavcodec/idctdsp.h"
+#include "idct.h"
 #include "idctdsp_arm.h"
 
-void ff_simple_idct_armv5te(int16_t *data);
-void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, int16_t *data);
-void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, int16_t *data);
-
 av_cold void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
                                      unsigned high_bit_depth)
 {
index 1717421..8f0c49b 100644 (file)
 #include "libavutil/attributes.h"
 #include "libavcodec/avcodec.h"
 #include "libavcodec/idctdsp.h"
+#include "idct.h"
 #include "idctdsp_arm.h"
 
-void ff_simple_idct_armv6(int16_t *data);
-void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data);
-void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data);
-
 void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels,
                                  int line_size);
 
index 66783d8..c94f7b6 100644 (file)
 #include "libavutil/attributes.h"
 #include "libavcodec/avcodec.h"
 #include "libavcodec/idctdsp.h"
+#include "idct.h"
 #include "idctdsp_arm.h"
 
-void ff_simple_idct_neon(int16_t *data);
-void ff_simple_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
-void ff_simple_idct_add_neon(uint8_t *dest, int line_size, int16_t *data);
-
 void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int);
 void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int);
 void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, int);
index baf5a89..d1393c4 100644 (file)
 #include "aandcttab.h"
 #include "faandct.h"
 #include "faanidct.h"
+#include "arm/idct.h"
 #include "ppc/fdct.h"
 #include "x86/fdct.h"
 #include "x86/idct_xvid.h"
 #include "x86/simple_idct.h"
 #include "dctref.h"
 
-// ARM
-void ff_j_rev_dct_arm(int16_t *data);
-void ff_simple_idct_arm(int16_t *data);
-void ff_simple_idct_armv5te(int16_t *data);
-void ff_simple_idct_armv6(int16_t *data);
-void ff_simple_idct_neon(int16_t *data);
-
 struct algo {
     const char *name;
     void (*func)(int16_t *block);