comparison dec_video.c @ 4687:2973e997c4a5

some obscure bug fixes to the FLI decoder, with many thanks to Roberto Togni
author melanson
date Wed, 13 Feb 2002 04:06:55 +0000
parents 030b3125e6f0
children d3a52470594c
comparison
equal deleted inserted replaced
4686:b49325176f0d 4687:2973e997c4a5
116 int width, 116 int width,
117 int height, 117 int height,
118 unsigned char *palette_map, 118 unsigned char *palette_map,
119 int bytes_per_pixel); 119 int bytes_per_pixel);
120 120
121 void Decode_Fli( 121 void *init_fli_decoder(int width, int height);
122
123 void decode_fli_frame(
122 unsigned char *encoded, 124 unsigned char *encoded,
123 int encoded_size, 125 int encoded_size,
124 unsigned char *decoded, 126 unsigned char *decoded,
125 int width, 127 int width,
126 int height, 128 int height,
127 int bytes_per_pixel); 129 int bytes_per_pixel,
130 void *context);
128 131
129 void qt_decode_rle( 132 void qt_decode_rle(
130 unsigned char *encoded, 133 unsigned char *encoded,
131 int encoded_size, 134 int encoded_size,
132 unsigned char *decoded, 135 unsigned char *decoded,
710 else 713 else
711 pal[i]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); 714 pal[i]=((r>>3)<<11)|((g>>2)<<5)|((b>>3));
712 } 715 }
713 } 716 }
714 break; 717 break;
718 case VFM_FLI:
719 sh_video->context = init_fli_decoder(sh_video->disp_w, sh_video->disp_h);
715 case VFM_MSVIDC: 720 case VFM_MSVIDC:
716 case VFM_FLI:
717 case VFM_QTRLE: 721 case VFM_QTRLE:
718 case VFM_DUCKTM1: 722 case VFM_DUCKTM1:
719 #ifdef HAVE_PNG 723 #ifdef HAVE_PNG
720 case VFM_MPNG: 724 case VFM_MPNG:
721 #endif 725 #endif
1115 sh_video->disp_w, sh_video->disp_h, 1119 sh_video->disp_w, sh_video->disp_h,
1116 (char *)sh_video->bih+40, ((out_fmt&255)+7)/8); 1120 (char *)sh_video->bih+40, ((out_fmt&255)+7)/8);
1117 blit_frame = 3; 1121 blit_frame = 3;
1118 break; 1122 break;
1119 case VFM_FLI: 1123 case VFM_FLI:
1120 Decode_Fli( 1124 decode_fli_frame(
1121 start, in_size, sh_video->our_out_buffer, 1125 start, in_size, sh_video->our_out_buffer,
1122 sh_video->disp_w, sh_video->disp_h, 1126 sh_video->disp_w, sh_video->disp_h,
1123 ((out_fmt&255)+7)/8); 1127 ((out_fmt&255)+7)/8,
1128 sh_video->context);
1124 blit_frame = 3; 1129 blit_frame = 3;
1125 break; 1130 break;
1126 case VFM_NUV: 1131 case VFM_NUV:
1127 decode_nuv( 1132 decode_nuv(
1128 start, in_size, sh_video->our_out_buffer, 1133 start, in_size, sh_video->our_out_buffer,