} else if (transparent == 1 && backcolor_index != transIndex) {
image_backcolor = backcolor_parsing;
} else {
- image_backcolor = backcolor_parsing;
+ image_backcolor = backcolor_parsing;
}
} else {
- image_backcolor = backcolor_parsing;
+ image_backcolor = backcolor_parsing;
}
#if MODE == 0
if (pFrameData == NULL) {
return;
}
-
+
if (pFrameData->pPrevImg) {
IfegMemFree(pFrameData->pPrevImg);
pFrameData->pPrevImg = 0;
/* Input stream index set to 0 */
inputPos = 0;
inter_step = 1;
- interLaced = 0;
- transparent = 0;
+ interLaced = 0;
+ transparent = 0;
/* read a GIF HEADER */
IfegMemcpy(buffer, pInputStream, 13);
pImage32 = (unsigned int *)(pDecBuf);
/* Only make a first image frame as a thumbnail */
- image_left_pos = 0;
+ image_left_pos = 0;
image_top_pos = 0;
len = decwdt;
for (i = 0, k = image_top_pos+margin_hgt1_2; i < dechgt; i++) {
pImage16 = (unsigned short *)((unsigned char *)pOutBits + ((image_left_pos+margin_wdt1_2 + expected_width * k) << 1));
for (j = 0; j < decwdt; j++) {
- *pImage16++ = ui_backcolor;
+ *pImage16++ = ui_backcolor;
}
- k++;
+ k++;
}
}
}
-
+
for (i = 0, k = image_top_pos+margin_hgt1_2; i < dechgt; i++) {
pImage16 = (unsigned short *)((unsigned char*)pOutBits + ((image_left_pos+margin_wdt1_2 + (expected_width) * k) << 1));
pImage32 = (unsigned int *)(pDecBuf) + (i * len);
for (i = 0, k = image_top_pos+margin_hgt1_2; i < dechgt; i++) {
pImage16 = (unsigned short *)((pFrameData->pPrevImg) + ((image_left_pos+margin_wdt1_2 + expected_width * k) << 1));
for (j = 0; j < decwdt; j++) {
- *pImage16++ = ui_backcolor;
+ *pImage16++ = ui_backcolor;
}
- k++;
+ k++;
}
} else {
for (i = 0, k = image_top_pos+margin_hgt1_2; i < dechgt; i++) {
pImage16 = (unsigned short *)((pFrameData->pPrevImg) + ((image_left_pos+margin_wdt1_2 + expected_width * k) << 1));
for (j = 0; j < decwdt; j++) {
- *pImage16++ = image_backcolor;
+ *pImage16++ = image_backcolor;
}
- k++;
+ k++;
}
}
break;
/* Input stream index set to 0 */
inputPos = 0;
inter_step = 1;
- interLaced = 0;
+ interLaced = 0;
transparent = 0;
/* read a GIF HEADER */
inputPos += 2; /* Delay time (skip) */
transIndex = pInputStream[inputPos++];
inputPos++; /* block end */
-
+
if (backgroundIndex == transIndex && transparent == 1) {
backcolor888 = 0x1000000;
backcolor565 = pFrameData->ui_backcolor;
inputPos += 9;
if (pFrameData->imgCount == 0) {
- image_left_pos_N = (buffer[0] | (buffer[1] << 8));
- image_top_pos_N = (buffer[2] | (buffer[3] << 8));
+ image_left_pos_N = (buffer[0] | (buffer[1] << 8));
+ image_top_pos_N = (buffer[2] | (buffer[3] << 8));
image_left_pos = image_left_pos_N;
image_top_pos = image_top_pos_N;
pImage32 = (unsigned int *)pFrameData->pPrevImg;
for (i = 0; i < logi_wdt * logi_hgt; i++) {
*pImage32++ = 0x1000000;
- }
+ }
} else {
pImage32 = (unsigned int *)pFrameData->pPrevImg;
for (i = 0; i < logi_wdt * logi_hgt; i++) {
*pImage32++ = backcolor888;
- }
+ }
}
if (transparent == 1) {
/* Background Color */
/***************************************************************************
- decoder(WDT, pInputStream, pBitmapElem->pBits); //this does the grunt work
- int decoder(int linewidth, UCHAR* pInputStream, UCHAR *pBitmapElem->pBits)
+ decoder(WDT, pInputStream, pBitmapElem->pBits); //this does the grunt work
+ int decoder(int linewidth, UCHAR* pInputStream, UCHAR *pBitmapElem->pBits)
***************************************************************************/
size = pInputStream[inputPos++];
bufcnt = orgwdt_1;
/************************
- init_exp(size);
+ init_exp(size);
int init_exp(int size)
************************/
curr_size = size + 1;
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
} while (c == clear);
if (c == ending) {
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
if (c == ending) {
break;
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
} while (c == clear);
if (c == ending) {
val1 = buf[i] & (numcolors-1);
if (val1 == transIndex) {
- *pImage32++ = backGround[i+image_left_pos] << 2;
+ *pImage32++ = backGround[i+image_left_pos] << 2;
backGround[i+image_left_pos] = 0x1000000;
} else {
*pImage32++ = pDacbox[val1] << 2;
backGround[i+image_left_pos] = 0x1000000;
out_x += decwdt;
}
- for (i = image_left_pos+orgwdt; i < logi_wdt; i++) {
+ for (i = image_left_pos+orgwdt; i < logi_wdt; i++) {
d1 = a_x - out_x;
d2 = b_x - out_x;
if (0 <= d1 && d1 < decwdt) {
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
if (c == ending) {
break;
}
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
} while (c == clear);
if (c == ending) {
}
out_x += decwdt;
}
- for (i = image_left_pos+orgwdt; i < logi_wdt; i++) {
+ for (i = image_left_pos+orgwdt; i < logi_wdt; i++) {
d1 = a_x - out_x;
d2 = b_x - out_x;
if (0 <= d1 && d1 < decwdt) {
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
if (c == ending) {
break;
}
__get_next_code_first_nbits_left_not_0(pInputStream)
__get_next_code_first_while(pInputStream)
} else {
- if (nbits_left == 0)
+ if (nbits_left == 0)
__get_next_code_second_nbits_left_0(pInputStream)
else
__get_next_code_second_nbits_left_not_0(pInputStream)
__get_next_code_second_while(pInputStream)
- }
+ }
} while (c == clear);
if (c == ending) {
}
backGround += logi_wdt;
}
-
if (bCenterAlign) {
margin_wdt1_2 = (expected_width - resized_width) >> 1;
/* 565 Conversion */
pImage32 = (unsigned int *)(pDecBuf);
-
+
for (i = 0, k = margin_hgt1_2; i < dechgt; i++) {
pImage16 = (unsigned short *)((unsigned char *)pOutBits + ((margin_wdt1_2 + (expected_width) * k) << 1));
for (j = 0; j < decwdt; j++) {