Mercurial > libavcodec.hg
comparison dsputil.h @ 10407:57acce8b1380 libavcodec
Move/add COSTABLE/SINTABLE macros to dsputil to add extern definitions
for ff_cos_* and ff_sin_* without introducing too much code duplication.
author | reimar |
---|---|
date | Thu, 15 Oct 2009 17:55:51 +0000 |
parents | 06bdadf410a9 |
children | 8fd8f6c1cdcc |
comparison
equal
deleted
inserted
replaced
10406:825c7f57cfac | 10407:57acce8b1380 |
---|---|
741 #define FF_MDCT_PERM_NONE 0 | 741 #define FF_MDCT_PERM_NONE 0 |
742 #define FF_MDCT_PERM_INTERLEAVE 1 | 742 #define FF_MDCT_PERM_INTERLEAVE 1 |
743 } FFTContext; | 743 } FFTContext; |
744 | 744 |
745 #if CONFIG_HARDCODED_TABLES | 745 #if CONFIG_HARDCODED_TABLES |
746 extern const FFTSample* const ff_cos_tabs[13]; | 746 #define COSTABLE_CONST const |
747 #else | 747 #else |
748 extern FFTSample* const ff_cos_tabs[13]; | 748 #define COSTABLE_CONST |
749 #endif | 749 #endif |
750 | |
751 #define COSTABLE(size) \ | |
752 COSTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_cos_##size[size/2]) | |
753 #define SINTABLE(size) \ | |
754 DECLARE_ALIGNED_16(FFTSample, ff_sin_##size[size/2]) | |
755 extern COSTABLE(16); | |
756 extern COSTABLE(32); | |
757 extern COSTABLE(64); | |
758 extern COSTABLE(128); | |
759 extern COSTABLE(256); | |
760 extern COSTABLE(512); | |
761 extern COSTABLE(1024); | |
762 extern COSTABLE(2048); | |
763 extern COSTABLE(4096); | |
764 extern COSTABLE(8192); | |
765 extern COSTABLE(16384); | |
766 extern COSTABLE(32768); | |
767 extern COSTABLE(65536); | |
768 extern COSTABLE_CONST FFTSample* const ff_cos_tabs[13]; | |
769 | |
770 extern SINTABLE(16); | |
771 extern SINTABLE(32); | |
772 extern SINTABLE(64); | |
773 extern SINTABLE(128); | |
774 extern SINTABLE(256); | |
775 extern SINTABLE(512); | |
776 extern SINTABLE(1024); | |
777 extern SINTABLE(2048); | |
778 extern SINTABLE(4096); | |
779 extern SINTABLE(8192); | |
780 extern SINTABLE(16384); | |
781 extern SINTABLE(32768); | |
782 extern SINTABLE(65536); | |
750 | 783 |
751 /** | 784 /** |
752 * Sets up a complex FFT. | 785 * Sets up a complex FFT. |
753 * @param nbits log2 of the length of the input array | 786 * @param nbits log2 of the length of the input array |
754 * @param inverse if 0 perform the forward transform, if 1 perform the inverse | 787 * @param inverse if 0 perform the forward transform, if 1 perform the inverse |