Mercurial > libavcodec.hg
comparison fdctref.c @ 9293:dc9005dec909 libavcodec
Give better names to reference DCT functions.
patch by Dylan Yudaken, dyudaken gmail com
author | diego |
---|---|
date | Tue, 31 Mar 2009 08:55:22 +0000 |
parents | e9d9d946f213 |
children |
comparison
equal
deleted
inserted
replaced
9292:f0732d44f655 | 9293:dc9005dec909 |
---|---|
38 # define PI 3.14159265358979323846 | 38 # define PI 3.14159265358979323846 |
39 # endif | 39 # endif |
40 #endif | 40 #endif |
41 | 41 |
42 /* global declarations */ | 42 /* global declarations */ |
43 void init_fdct (void); | 43 void ff_ref_dct_init (void); |
44 void fdct (short *block); | 44 void ff_ref_fdct (short *block); |
45 | 45 |
46 /* private data */ | 46 /* private data */ |
47 static double c[8][8]; /* transform coefficients */ | 47 static double c[8][8]; /* transform coefficients */ |
48 | 48 |
49 void init_fdct(void) | 49 void ff_ref_dct_init(void) |
50 { | 50 { |
51 int i, j; | 51 int i, j; |
52 double s; | 52 double s; |
53 | 53 |
54 for (i=0; i<8; i++) | 54 for (i=0; i<8; i++) |
58 for (j=0; j<8; j++) | 58 for (j=0; j<8; j++) |
59 c[i][j] = s * cos((PI/8.0)*i*(j+0.5)); | 59 c[i][j] = s * cos((PI/8.0)*i*(j+0.5)); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 void fdct(block) | 63 void ff_ref_fdct(block) |
64 short *block; | 64 short *block; |
65 { | 65 { |
66 register int i, j; | 66 register int i, j; |
67 double s; | 67 double s; |
68 double tmp[64]; | 68 double tmp[64]; |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 /* perform IDCT matrix multiply for 8x8 coefficient block */ | 123 /* perform IDCT matrix multiply for 8x8 coefficient block */ |
124 | 124 |
125 void idct(block) | 125 void ff_ref_idct(block) |
126 short *block; | 126 short *block; |
127 { | 127 { |
128 int i, j, k, v; | 128 int i, j, k, v; |
129 double partial_product; | 129 double partial_product; |
130 double tmp[64]; | 130 double tmp[64]; |