git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avcodec/faanidct: replace #define by typedef
[ffmpeg.git]
/
libavcodec
/
faanidct.c
diff --git
a/libavcodec/faanidct.c
b/libavcodec/faanidct.c
index
dc3d8fb
..
bbaaa3f
100644
(file)
--- a/
libavcodec/faanidct.c
+++ b/
libavcodec/faanidct.c
@@
-19,9
+19,10
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "faanidct.h"
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "faanidct.h"
+#include "libavutil/common.h"
/* To allow switching to double. */
/* To allow switching to double. */
-#define FLOAT float
+typedef float FLOAT;
#define B0 1.0000000000000000000000
#define B1 1.3870398453221474618216 // cos(pi*1/16)sqrt(2)
#define B0 1.0000000000000000000000
#define B1 1.3870398453221474618216 // cos(pi*1/16)sqrt(2)
@@
-46,9
+47,8
@@
B6*B0/8, B6*B1/8, B6*B2/8, B6*B3/8, B6*B4/8, B6*B5/8, B6*B6/8, B6*B7/8,
B7*B0/8, B7*B1/8, B7*B2/8, B7*B3/8, B7*B4/8, B7*B5/8, B7*B6/8, B7*B7/8,
};
B7*B0/8, B7*B1/8, B7*B2/8, B7*B3/8, B7*B4/8, B7*B5/8, B7*B6/8, B7*B7/8,
};
-static inline void p8idct(
DCTELEM
data[64], FLOAT temp[64], uint8_t *dest, int stride, int x, int y, int type){
+static inline void p8idct(
int16_t
data[64], FLOAT temp[64], uint8_t *dest, int stride, int x, int y, int type){
int i;
int i;
- FLOAT av_unused tmp0;
FLOAT s04, d04, s17, d17, s26, d26, s53, d53;
FLOAT os07, os16, os25, os34;
FLOAT od07, od16, od25, od34;
FLOAT s04, d04, s17, d17, s26, d26, s53, d53;
FLOAT os07, os16, os25, os34;
FLOAT od07, od16, od25, od34;
@@
-63,9
+63,12
@@
static inline void p8idct(DCTELEM data[64], FLOAT temp[64], uint8_t *dest, int s
od25= (s17 - s53)*(2*A4);
#if 0 //these 2 are equivalent
od25= (s17 - s53)*(2*A4);
#if 0 //these 2 are equivalent
- tmp0= (d17 + d53)*(2*A2);
- od34= d17*( 2*B6) - tmp0;
- od16= d53*(-2*B2) + tmp0;
+ {
+ FLOAT tmp0;
+ tmp0 = (d17 + d53) * (2 * A2);
+ od34 = d17 * (2 * B6) - tmp0;
+ od16 = d53 * (-2 * B2) + tmp0;
+ }
#else
od34= d17*(2*(B6-A2)) - d53*(2*A2);
od16= d53*(2*(A2-B2)) + d17*(2*A2);
#else
od34= d17*(2*(B6-A2)) - d53*(2*A2);
od16= d53*(2*(A2-B2)) + d17*(2*A2);
@@
-128,7
+131,7
@@
static inline void p8idct(DCTELEM data[64], FLOAT temp[64], uint8_t *dest, int s
}
}
}
}
-void ff_faanidct(
DCTELEM
block[64]){
+void ff_faanidct(
int16_t
block[64]){
FLOAT temp[64];
int i;
FLOAT temp[64];
int i;
@@
-141,7
+144,7
@@
void ff_faanidct(DCTELEM block[64]){
p8idct(block, temp, NULL, 0, 8, 1, 1);
}
p8idct(block, temp, NULL, 0, 8, 1, 1);
}
-void ff_faanidct_add(uint8_t *dest, int line_size,
DCTELEM
block[64]){
+void ff_faanidct_add(uint8_t *dest, int line_size,
int16_t
block[64]){
FLOAT temp[64];
int i;
FLOAT temp[64];
int i;
@@
-154,7
+157,7
@@
void ff_faanidct_add(uint8_t *dest, int line_size, DCTELEM block[64]){
p8idct(NULL , temp, dest, line_size, 8, 1, 2);
}
p8idct(NULL , temp, dest, line_size, 8, 1, 2);
}
-void ff_faanidct_put(uint8_t *dest, int line_size,
DCTELEM
block[64]){
+void ff_faanidct_put(uint8_t *dest, int line_size,
int16_t
block[64]){
FLOAT temp[64];
int i;
FLOAT temp[64];
int i;