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){
191 const int eobIdx = cs ? CEOBidx : YEOBidx;
192 const int zrlIdx = cs ? CZRLidx : YZRLidx;
196 int absDiff = std::abs(diff);
214 for(
int n=1; n<64; n++){
215 int absCoefficient = std::abs(
mDCTData[ Zigzag[n] ] );
216 if( absCoefficient ){
222 while( absCoefficient > 0 ){
223 absCoefficient >>= 1;
226 int aIdx = run * 10 + is + (run == 15);
250 int* qt = (
int*)(cs ? CQuantumT : YQuantumT);
251 for(
int i=0; i<64; i++ ){
260 for(
int v=0; v<8; v++ ){
262 for(
int u=0; u<8; u++ ){
266 for(
int y=0; y<8; y++ )
267 for(
int x=0; x<8; x++ )
268 sum += picData[ y * 8 + x ] *
mCosT[u][x] *
mCosT[v][y];
269 mDCTData[ v * 8 + u ] = int( sum * cu * cv / 4 );
309 for( i=0; i<64; i++ )
315 for( i=0; i<64; i++ )
void makeYCC(int ux, int uy)
void GetJpegData(char **aJpegData, int &size)
void ForwardDCT(int *picData)
void SetJpegProperty(const G4JpegProperty &aProperty)
G4JpegCoder(u_char *colorR, u_char *colorG, u_char *colorB)
void Quantization(int cs)
void CopyByte(const char *src, int n)
u_char * GetStreamAddress(void)
void SetBits(int v, int numBits)