236 return TRUE; |
236 return TRUE; |
237 } |
237 } |
238 |
238 |
239 |
239 |
240 LOCAL(boolean) |
240 LOCAL(boolean) |
241 get_sof (j_decompress_ptr cinfo, boolean is_baseline, boolean is_prog, boolean is_arith) |
241 get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) |
242 /* Process a SOFn marker */ |
242 /* Process a SOFn marker */ |
243 { |
243 { |
244 INT32 length; |
244 INT32 length; |
245 int c, ci; |
245 int c, ci; |
246 jpeg_component_info * compptr; |
246 jpeg_component_info * compptr; |
247 INPUT_VARS(cinfo); |
247 INPUT_VARS(cinfo); |
248 |
248 |
249 cinfo->is_baseline = is_baseline; |
|
250 cinfo->progressive_mode = is_prog; |
249 cinfo->progressive_mode = is_prog; |
251 cinfo->arith_code = is_arith; |
250 cinfo->arith_code = is_arith; |
252 |
251 |
253 INPUT_2BYTES(cinfo, length, return FALSE); |
252 INPUT_2BYTES(cinfo, length, return FALSE); |
254 |
253 |
997 if (! get_soi(cinfo)) |
996 if (! get_soi(cinfo)) |
998 return JPEG_SUSPENDED; |
997 return JPEG_SUSPENDED; |
999 break; |
998 break; |
1000 |
999 |
1001 case M_SOF0: /* Baseline */ |
1000 case M_SOF0: /* Baseline */ |
1002 if (! get_sof(cinfo, TRUE, FALSE, FALSE)) |
1001 case M_SOF1: /* Extended sequential, Huffman */ |
|
1002 if (! get_sof(cinfo, FALSE, FALSE)) |
1003 return JPEG_SUSPENDED; |
1003 return JPEG_SUSPENDED; |
1004 break; |
1004 break; |
1005 |
1005 |
1006 case M_SOF1: /* Extended sequential, Huffman */ |
1006 case M_SOF2: /* Progressive, Huffman */ |
1007 if (! get_sof(cinfo, FALSE, FALSE, FALSE)) |
1007 if (! get_sof(cinfo, TRUE, FALSE)) |
1008 return JPEG_SUSPENDED; |
1008 return JPEG_SUSPENDED; |
1009 break; |
1009 break; |
1010 |
1010 |
1011 case M_SOF2: /* Progressive, Huffman */ |
1011 case M_SOF9: /* Extended sequential, arithmetic */ |
1012 if (! get_sof(cinfo, FALSE, TRUE, FALSE)) |
1012 if (! get_sof(cinfo, FALSE, TRUE)) |
1013 return JPEG_SUSPENDED; |
1013 return JPEG_SUSPENDED; |
1014 break; |
1014 break; |
1015 |
1015 |
1016 case M_SOF9: /* Extended sequential, arithmetic */ |
|
1017 if (! get_sof(cinfo, FALSE, FALSE, TRUE)) |
|
1018 return JPEG_SUSPENDED; |
|
1019 break; |
|
1020 |
|
1021 case M_SOF10: /* Progressive, arithmetic */ |
1016 case M_SOF10: /* Progressive, arithmetic */ |
1022 if (! get_sof(cinfo, FALSE, TRUE, TRUE)) |
1017 if (! get_sof(cinfo, TRUE, TRUE)) |
1023 return JPEG_SUSPENDED; |
1018 return JPEG_SUSPENDED; |
1024 break; |
1019 break; |
1025 |
1020 |
1026 /* Currently unsupported SOFn types */ |
1021 /* Currently unsupported SOFn types */ |
1027 case M_SOF3: /* Lossless, Huffman */ |
1022 case M_SOF3: /* Lossless, Huffman */ |