10 #define JPEG_INTERNALS 114 if (! (*dest->empty_output_buffer) (cinfo))
115 ERREXIT(cinfo, JERR_CANT_SUSPEND);
203 for (i = 1; i <= 16; i++)
209 for (i = 1; i <= 16; i++)
212 for (i = 0; i <
length; i++)
226 #ifdef C_ARITH_CODING_SUPPORTED 233 dc_in_use[i] = ac_in_use[i] = 0;
235 for (i = 0; i < cinfo->comps_in_scan; i++) {
236 compptr = cinfo->cur_comp_info[i];
243 length += dc_in_use[i] + ac_in_use[i];
252 emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));
284 emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1);
287 if ((
long) cinfo->image_height > 65535L ||
288 (
long) cinfo->image_width > 65535L)
289 ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (
unsigned int) 65535);
297 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
315 emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3);
319 for (i = 0; i < cinfo->comps_in_scan; i++) {
320 compptr = cinfo->cur_comp_info[i];
324 if (cinfo->progressive_mode) {
330 if (cinfo->Ss == 0) {
332 if (cinfo->Ah != 0 && !cinfo->arith_code)
343 emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
365 emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1);
372 emit_byte(cinfo, cinfo->JFIF_major_version);
373 emit_byte(cinfo, cinfo->JFIF_minor_version);
414 switch (cinfo->jpeg_color_space) {
440 if (
datalen > (
unsigned int) 65533)
441 ERREXIT(cinfo, JERR_BAD_LENGTH);
475 marker->last_restart_interval = 0;
477 if (cinfo->write_JFIF_header)
479 if (cinfo->write_Adobe_marker)
503 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
512 if (cinfo->arith_code || cinfo->progressive_mode ||
513 cinfo->data_precision != 8) {
517 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
522 if (prec && is_baseline) {
525 TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
530 if (cinfo->arith_code) {
533 if (cinfo->progressive_mode)
535 else if (is_baseline)
556 if (cinfo->arith_code) {
566 for (i = 0; i < cinfo->comps_in_scan; i++) {
567 compptr = cinfo->cur_comp_info[i];
568 if (cinfo->progressive_mode) {
570 if (cinfo->Ss == 0) {
587 if (cinfo->restart_interval !=
marker->last_restart_interval) {
589 marker->last_restart_interval = cinfo->restart_interval;
622 if (cinfo->quant_tbl_ptrs[i] != NULL)
626 if (! cinfo->arith_code) {
628 if (cinfo->dc_huff_tbl_ptrs[i] != NULL)
630 if (cinfo->ac_huff_tbl_ptrs[i] != NULL)
662 marker->last_restart_interval = 0;
UINT16 quantval[DCTSIZE2]
emit_marker(j_compress_ptr cinfo, JPEG_MARKER mark)
emit_dht(j_compress_ptr cinfo, int index, boolean is_ac)
const int jpeg_natural_order[]
struct jpeg_common_struct * j_common_ptr
emit_adobe_app14(j_compress_ptr cinfo)
#define ERREXIT(cinfo, code)
emit_dri(j_compress_ptr cinfo)
write_scan_header(j_compress_ptr cinfo)
write_file_header(j_compress_ptr cinfo)
unsigned int last_restart_interval
jpeg_component_info * compptr
#define TRACEMS(cinfo, lvl, code)
emit_2bytes(j_compress_ptr cinfo, int value)
write_marker_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
emit_dqt(j_compress_ptr cinfo, int index)
emit_byte(j_compress_ptr cinfo, int val)
int const JOCTET unsigned int datalen
write_tables_only(j_compress_ptr cinfo)
write_frame_header(j_compress_ptr cinfo)
emit_sos(j_compress_ptr cinfo)
#define ERREXIT1(cinfo, code, p1)
GLuint GLsizei GLsizei * length
emit_jfif_app0(j_compress_ptr cinfo)
write_file_trailer(j_compress_ptr cinfo)
write_marker_byte(j_compress_ptr cinfo, int val)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLsizei const GLfloat * value
jinit_marker_writer(j_compress_ptr cinfo)
emit_sof(j_compress_ptr cinfo, JPEG_MARKER code)
my_marker_writer * my_marker_ptr
JOCTET * next_output_byte