1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
|
/*************************************************************
Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
Group. If you use this software, you agree to the following: This
program package is purely experimental, and is licensed "as is".
Permission is granted to use, modify, and distribute this program
without charge for any purpose, provided this license/ disclaimer
notice appears in the copies. No warranty or maintenance is given,
either expressed or implied. In no event shall the author(s) be
liable to you or a third party for any special, incidental,
consequential, or other damages, arising out of the use or inability
to use the program for any purpose (or the loss of data), even if we
have been advised of such possibilities. Any public reference or
advertisement of this source code should refer to it as the Portable
Video Research Group (PVRG) code, and not by any author(s) (or
Stanford University) name.
*************************************************************/
/*
************************************************************
dct.h
This file contains the basic DCT matrix values for the reference DCT
transform. It doesn't matter if it is slow because it is rarely used.
A butterfly would be much faster.
************************************************************
*/
#ifndef DCT_DONE
#define DCT_DONE
#define DC_QUARTER 1.41421356237309504880
#define DC_THREE_EIGHTHS 0.76536686473017954348
#define DC_ONE_EIGHTH 1.84775906502257351226
/* Bitshifted Twelve */
#define IC_QUARTER 2896
#define IC_THREE_EIGHTHS 1567
#define IC_ONE_EIGHTH 3784
double DctMatrix[] = {
0.3535533905932737,
0.3535533905932737,
0.3535533905932737,
0.3535533905932737,
0.3535533905932737,
0.3535533905932737,
0.3535533905932737,
0.3535533905932737,
0.4903926402016152,
0.4157348061512727,
0.2777851165098011,
0.0975451610080642,
-0.0975451610080641,
-0.2777851165098010,
-0.4157348061512727,
-0.4903926402016152,
0.4619397662556434,
0.1913417161825449,
-0.1913417161825449,
-0.4619397662556434,
-0.4619397662556434,
-0.1913417161825452,
0.1913417161825450,
0.4619397662556432,
0.4157348061512727,
-0.0975451610080641,
-0.4903926402016152,
-0.2777851165098011,
0.2777851165098009,
0.4903926402016153,
0.0975451610080640,
-0.4157348061512721,
0.3535533905932738,
-0.3535533905932737,
-0.3535533905932738,
0.3535533905932737,
0.3535533905932738,
-0.3535533905932733,
-0.3535533905932736,
0.3535533905932733,
0.2777851165098011,
-0.4903926402016152,
0.0975451610080641,
0.4157348061512728,
-0.4157348061512726,
-0.0975451610080649,
0.4903926402016152,
-0.2777851165098008,
0.1913417161825449,
-0.4619397662556434,
0.4619397662556432,
-0.1913417161825449,
-0.1913417161825453,
0.4619397662556437,
-0.4619397662556435,
0.1913417161825431,
0.0975451610080642,
-0.2777851165098011,
0.4157348061512728,
-0.4903926402016153,
0.4903926402016152,
-0.4157348061512720,
0.2777851165098022,
-0.0975451610080625};
static double IDctMatrix[] = {
0.3535533905932737,
0.4903926402016152,
0.4619397662556434,
0.4157348061512727,
0.3535533905932738,
0.2777851165098011,
0.1913417161825449,
0.0975451610080642,
0.3535533905932737,
0.4157348061512727,
0.1913417161825449,
-0.0975451610080641,
-0.3535533905932737,
-0.4903926402016152,
-0.4619397662556434,
-0.2777851165098011,
0.3535533905932737,
0.2777851165098011,
-0.1913417161825449,
-0.4903926402016152,
-0.3535533905932738,
0.0975451610080641,
0.4619397662556432,
0.4157348061512728,
0.3535533905932737,
0.0975451610080642,
-0.4619397662556434,
-0.2777851165098011,
0.3535533905932737,
0.4157348061512728,
-0.1913417161825449,
-0.4903926402016153,
0.3535533905932737,
-0.0975451610080641,
-0.4619397662556434,
0.2777851165098009,
0.3535533905932738,
-0.4157348061512726,
-0.1913417161825453,
0.4903926402016152,
0.3535533905932737,
-0.2777851165098010,
-0.1913417161825452,
0.4903926402016153,
-0.3535533905932733,
-0.0975451610080649,
0.4619397662556437,
-0.4157348061512720,
0.3535533905932737,
-0.4157348061512727,
0.1913417161825450,
0.0975451610080640,
-0.3535533905932736,
0.4903926402016152,
-0.4619397662556435,
0.2777851165098022,
0.3535533905932737,
-0.4903926402016152,
0.4619397662556432,
-0.4157348061512721,
0.3535533905932733,
-0.2777851165098008,
0.1913417161825431,
-0.0975451610080625};
#endif
|