First public contribution.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
18 #ifndef _JPEG_INTERNAL_H_
19 #define _JPEG_INTERNAL_H_
22 #include "jpeg_huffman.h"
23 #include "jpeg_bits.h"
24 #include "jpeg_debug.h"
34 #define JPEG_MAX_COMPONENTS 256
36 typedef struct _JpegScan JpegScan;
37 typedef struct _JpegQuantTable JpegQuantTable;
39 #define JPEG_ENTROPY_SEGMENT 0x0001
40 #define JPEG_LENGTH 0x0002
42 struct _JpegQuantTable {
44 int16_t quantizer[64];
64 unsigned int data_len;
76 } components[JPEG_MAX_COMPONENTS];
78 JpegQuantTable quant_tables[4];
79 HuffmanTable dc_huff_table[4];
80 HuffmanTable ac_huff_table[4];
114 int jpeg_decoder_sof_baseline_dct(JpegDecoder *dec, JpegBits *bits);
115 int jpeg_decoder_define_quant_table(JpegDecoder *dec, JpegBits *bits);
116 int jpeg_decoder_define_huffman_table(JpegDecoder *dec, JpegBits *bits);
117 int jpeg_decoder_sos(JpegDecoder *dec, JpegBits *bits);
118 int jpeg_decoder_soi(JpegDecoder *dec, JpegBits *bits);
119 int jpeg_decoder_eoi(JpegDecoder *dec, JpegBits *bits);
120 int jpeg_decoder_application0(JpegDecoder *dec, JpegBits *bits);
121 int jpeg_decoder_application_misc(JpegDecoder *dec, JpegBits *bits);
122 int jpeg_decoder_comment(JpegDecoder *dec, JpegBits *bits);
123 int jpeg_decoder_restart_interval(JpegDecoder *dec, JpegBits *bits);
124 int jpeg_decoder_restart(JpegDecoder *dec, JpegBits *bits);
125 void jpeg_decoder_decode_entropy_segment(JpegDecoder *dec);