comparison mjpeg.h @ 5020:eb0ad6423405 libavcodec

split mjpeg.c into an encoder and a decoder file
author aurel
date Thu, 17 May 2007 16:29:11 +0000
parents ddb28de352bb
children d73237575709
comparison
equal deleted inserted replaced
5019:41cabe79ba25 5020:eb0ad6423405
190 int mjpb_skiptosod; 190 int mjpb_skiptosod;
191 191
192 int cur_scan; /* current scan, used by JPEG-LS */ 192 int cur_scan; /* current scan, used by JPEG-LS */
193 } MJpegDecodeContext; 193 } MJpegDecodeContext;
194 194
195 #define PREDICT(ret, topleft, top, left, predictor)\
196 switch(predictor){\
197 case 1: ret= left; break;\
198 case 2: ret= top; break;\
199 case 3: ret= topleft; break;\
200 case 4: ret= left + top - topleft; break;\
201 case 5: ret= left + ((top - topleft)>>1); break;\
202 case 6: ret= top + ((left - topleft)>>1); break;\
203 default:\
204 case 7: ret= (left + top)>>1; break;\
205 }
206
207 extern const uint8_t bits_dc_luminance[];
208 extern const uint8_t val_dc_luminance[];
209
210 extern const uint8_t bits_dc_chrominance[];
211 extern const uint8_t val_dc_chrominance[];
212
213 extern const uint8_t bits_ac_luminance[];
214 extern const uint8_t val_ac_luminance[];
215
216 extern const uint8_t bits_ac_chrominance[];
217 extern const uint8_t val_ac_chrominance[];
218
219 void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
220 const uint8_t *bits_table, const uint8_t *val_table);
221
195 #endif /* MJPEG_H */ 222 #endif /* MJPEG_H */