11 #define JPEG_INTERNALS
104 if (! (*dest->empty_output_buffer) (cinfo))
105 ERREXIT(cinfo, JERR_CANT_SUSPEND);
142 ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);
153 emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);
185 ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
191 for (i = 1; i <= 16; i++)
192 length += htbl->
bits[i];
197 for (i = 1; i <= 16; i++)
200 for (i = 0; i <
length; i++)
214 #ifdef C_ARITH_CODING_SUPPORTED
221 dc_in_use[i] = ac_in_use[i] = 0;
231 length += dc_in_use[i] + ac_in_use[i];
277 ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (
unsigned int) 65535);
285 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
318 if (cinfo->
Ss == 0) {
353 emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1);
429 const JOCTET *dataptr,
unsigned int datalen)
432 if (datalen <= (
unsigned int) 65533) {
487 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
501 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
506 if (prec && is_baseline) {
509 TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
519 else if (is_baseline)
553 if (cinfo->
Ss == 0) {
boolean write_Adobe_marker
UINT8 arith_ac_K[NUM_ARITH_TBLS]
GLsizei const GLfloat * value
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
UINT16 quantval[DCTSIZE2]
J_COLOR_SPACE jpeg_color_space
struct jpeg_common_struct * j_common_ptr
#define ERREXIT(cinfo, code)
METHODDEF void write_any_marker(j_compress_ptr cinfo, int marker, const JOCTET *dataptr, unsigned int datalen)
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
boolean write_JFIF_header
#define TRACEMS(cinfo, lvl, code)
METHODDEF void write_tables_only(j_compress_ptr cinfo)
LOCAL void emit_adobe_app14(j_compress_ptr cinfo)
METHODDEF void write_file_trailer(j_compress_ptr cinfo)
UINT8 arith_dc_U[NUM_ARITH_TBLS]
struct jpeg_destination_mgr * dest
struct jpeg_marker_writer * marker
METHODDEF void write_file_header(j_compress_ptr cinfo)
LOCAL void emit_dac(j_compress_ptr cinfo)
unsigned int restart_interval
LOCAL void emit_jfif_app0(j_compress_ptr cinfo)
METHODDEF void write_scan_header(j_compress_ptr cinfo)
METHODDEF void write_frame_header(j_compress_ptr cinfo)
#define ERREXIT1(cinfo, code, p1)
GLOBAL void jinit_marker_writer(j_compress_ptr cinfo)
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
LOCAL int emit_dqt(j_compress_ptr cinfo, int index)
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]
LOCAL void emit_dht(j_compress_ptr cinfo, int index, boolean is_ac)
GLsizei const GLcharARB const GLint * length
LOCAL void emit_sos(j_compress_ptr cinfo)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
UINT8 arith_dc_L[NUM_ARITH_TBLS]
LOCAL void emit_2bytes(j_compress_ptr cinfo, int value)
LOCAL void emit_sof(j_compress_ptr cinfo, JPEG_MARKER code)
LOCAL void emit_dri(j_compress_ptr cinfo)
JOCTET * next_output_byte
jpeg_component_info * comp_info
LOCAL void emit_marker(j_compress_ptr cinfo, JPEG_MARKER mark)
LOCAL void emit_byte(j_compress_ptr cinfo, int val)