51 for(
int n=0;
n<8;
n++)
52 for(
int im=0; im<8; im++)
92 for(
int i=0; i<64; i++)
117 for(
int n=0;
n<4;
n++){
138 for(
int u=0; u<4; u++){
140 int *cbp = tCbBlock[u];
141 int *crp = tCrBlock[u];
143 int sx = ux * 16 + ((u&1) ? 8 : 0);
145 int sy = uy * 16 + ((u>1) ? 8 : 0);
148 for(
int iv=sy; iv<ey; iv++){
150 for(
int ih=sx; ih<ex; ih++){
157 *yp++ = int((0.2990 * rv) + (0.5870 * gv) + (0.1140 * bv) - 128)
159 *cbp++ = int(-(0.1687 * rv) - (0.3313 * gv) + (0.5000 * bv));
160 *crp++ = int((0.5000 * rv) - (0.4187 * gv) - (0.0813 * bv));
166 for(
int b=0; b<4; b++){
173 for(
int y=0; y<8; y+=2){
174 for(
int x=0; x<8; x+=2){
195 int absDiff = std::abs(diff);
213 for(
int n=1;
n<64;
n++){
215 if( absCoefficient ){
221 while( absCoefficient > 0 ){
222 absCoefficient >>= 1;
225 int aIdx =
run * 10 + is + (
run == 15);
250 for(
int i=0; i<64; i++ ){
259 for(
int v=0; v<8; v++ ){
261 for(
int u=0; u<8; u++ ){
264 for(
int y=0; y<8; y++ )
265 for(
int x=0; x<8; x++ )
266 sum += picData[ y * 8 + x ] *
mCosT[u][x] *
mCosT[v][y];
267 mDCTData[ v * 8 + u ] = int( sum * cu * cv / 4 );
307 for( i=0; i<64; i++ )
313 for( i=0; i<64; i++ )
static const G4HuffmanCodeTable CDcHuffmanT
static const G4HuffmanCodeTable CAcHuffmanT
static const u_char YAcDht[]
static const int DcDhtLength
static const int CQuantumT[]
static const u_char CAcDht[]
static const u_char CDcDht[]
static const G4HuffmanCodeTable YAcHuffmanT
static const int YQuantumT[]
static const G4HuffmanCodeTable YDcHuffmanT
static const int AcDhtLength
static const u_char YDcDht[]
static const int Zigzag[64]
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)