52 for(
int n=0;
n<8;
n++)
53 for(
int im=0; im<8; im++)
93 for(
int i=0; i<64; i++)
118 for(
int n=0;
n<4;
n++){
139 for(
int u=0; u<4; u++){
141 int *cbp = tCbBlock[u];
142 int *crp = tCrBlock[u];
144 int sx = ux * 16 + ((u&1) ? 8 : 0);
146 int sy = uy * 16 + ((u>1) ? 8 : 0);
149 for(
int iv=sy; iv<ey; iv++){
151 for(
int ih=sx; ih<ex; ih++){
158 *yp++ =
int((0.2990 * rv) + (0.5870 * gv) + (0.1140 * bv) - 128)
160 *cbp++ =
int(-(0.1687 * rv) - (0.3313 * gv) + (0.5000 * bv));
161 *crp++ =
int((0.5000 * rv) - (0.4187 * gv) - (0.0813 * bv));
167 for(
int b=0; b<4; b++){
174 for(
int y=0; y<8; y+=2){
175 for(
int x=0; x<8; x+=2){
196 int absDiff = std::abs(diff);
214 for(
int n=1;
n<64;
n++){
216 if( absCoefficient ){
222 while( absCoefficient > 0 ){
223 absCoefficient >>= 1;
226 int aIdx = run * 10 + is + (run == 15);
251 for(
int i=0; i<64; i++ ){
260 for(
int v=0; v<8; v++ ){
262 for(
int u=0; u<8; u++ ){
265 for(
int y=0; y<8; y++ )
266 for(
int x=0; x<8; x++ )
267 sum += picData[ y * 8 + x ] *
mCosT[u][x] *
mCosT[v][y];
308 for( i=0; i<64; i++ )
314 for( i=0; i<64; i++ )
void ForwardDCT(int *picData)
G4JpegCoder(u_char *colorR, u_char *colorG, u_char *colorB)
static const G4HuffmanCodeTable YAcHuffmanT
void Quantization(int cs)
static const int AcDhtLength
static const int CQuantumT[]
static const u_char CAcDht[]
static const u_char CDcDht[]
static const G4HuffmanCodeTable CAcHuffmanT
static const int Zigzag[64]
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
static const G4HuffmanCodeTable YDcHuffmanT
static const int DcDhtLength
void CopyByte(const char *src, int n)
void GetJpegData(char **aJpegData, int &size)
static const u_char YDcDht[]
static const G4HuffmanCodeTable CDcHuffmanT
void makeYCC(int ux, int uy)
void SetBits(int v, int numBits)
u_char * GetStreamAddress(void)
static const u_char YAcDht[]
void SetJpegProperty(const G4JpegProperty &aProperty)
static const int YQuantumT[]