116 if (--
dest->free_in_buffer == 0) {
117 if (! (*
dest->empty_output_buffer) (cinfo))
118 ERREXIT(cinfo, JERR_CANT_SUSPEND);
158 for (
i = 0;
i <= cinfo->lim_Se;
i++) {
159 if (qtbl->
quantval[cinfo->natural_order[
i]] > 255)
167 prec ? cinfo->lim_Se * 2 + 2 + 1 + 2 : cinfo->lim_Se + 1 + 1 + 2);
171 for (
i = 0;
i <= cinfo->lim_Se;
i++) {
173 unsigned int qval = qtbl->
quantval[cinfo->natural_order[
i]];
194 htbl = cinfo->ac_huff_tbl_ptrs[
index];
197 htbl = cinfo->dc_huff_tbl_ptrs[
index];
207 for (
i = 1;
i <= 16;
i++)
213 for (
i = 1;
i <= 16;
i++)
230#ifdef C_ARITH_CODING_SUPPORTED
237 dc_in_use[
i] = ac_in_use[
i] = 0;
239 for (
i = 0;
i < cinfo->comps_in_scan;
i++) {
242 if (cinfo->Ss == 0 && cinfo->Ah == 0)
251 length += dc_in_use[
i] + ac_in_use[
i];
261 emit_byte(cinfo, cinfo->arith_dc_L[
i] + (cinfo->arith_dc_U[
i]<<4));
291 cinfo->num_components < 3)
292 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
301 emit_byte(cinfo, cinfo->comp_info[1].component_id);
302 emit_byte(cinfo, cinfo->comp_info[0].component_id);
303 emit_byte(cinfo, cinfo->comp_info[2].component_id);
325 emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1);
328 if ((
long) cinfo->jpeg_height > 65535L ||
329 (
long) cinfo->jpeg_width > 65535L)
330 ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (
unsigned int) 65535);
338 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
356 emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3);
360 for (
i = 0;
i < cinfo->comps_in_scan;
i++) {
378 emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);
393 emit_byte(cinfo, cinfo->block_size * cinfo->block_size - 1);
416 emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1);
423 emit_byte(cinfo, cinfo->JFIF_major_version);
424 emit_byte(cinfo, cinfo->JFIF_minor_version);
465 switch (cinfo->jpeg_color_space) {
490 if (
datalen > (
unsigned int) 65533)
491 ERREXIT(cinfo, JERR_BAD_LENGTH);
525 marker->last_restart_interval = 0;
527 if (cinfo->write_JFIF_header)
529 if (cinfo->write_Adobe_marker)
554 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
563 if (cinfo->arith_code || cinfo->progressive_mode ||
564 cinfo->data_precision != 8 || cinfo->block_size !=
DCTSIZE) {
568 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
573 if (prec && is_baseline) {
576 TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
581 if (cinfo->arith_code) {
582 if (cinfo->progressive_mode)
587 if (cinfo->progressive_mode)
589 else if (is_baseline)
596 if (cinfo->color_transform)
600 if (cinfo->progressive_mode && cinfo->block_size !=
DCTSIZE)
618 if (cinfo->arith_code) {
628 for (
i = 0;
i < cinfo->comps_in_scan;
i++) {
631 if (cinfo->Ss == 0 && cinfo->Ah == 0)
642 if (cinfo->restart_interval !=
marker->last_restart_interval) {
644 marker->last_restart_interval = cinfo->restart_interval;
677 if (cinfo->quant_tbl_ptrs[
i] !=
NULL)
681 if (! cinfo->arith_code) {
683 if (cinfo->dc_huff_tbl_ptrs[
i] !=
NULL)
685 if (cinfo->ac_huff_tbl_ptrs[
i] !=
NULL)
706 cinfo->marker = &
marker->pub;
716 marker->last_restart_interval = 0;
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
emit_byte(j_compress_ptr cinfo, int val)
write_file_header(j_compress_ptr cinfo)
my_marker_writer * my_marker_ptr
emit_adobe_app14(j_compress_ptr cinfo)
write_frame_header(j_compress_ptr cinfo)
write_marker_byte(j_compress_ptr cinfo, int val)
emit_dqt(j_compress_ptr cinfo, int index)
emit_pseudo_sos(j_compress_ptr cinfo)
emit_dri(j_compress_ptr cinfo)
emit_dht(j_compress_ptr cinfo, int index, boolean is_ac)
emit_sof(j_compress_ptr cinfo, JPEG_MARKER code)
write_marker_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
emit_dac(j_compress_ptr cinfo)
jinit_marker_writer(j_compress_ptr cinfo)
emit_2bytes(j_compress_ptr cinfo, int value)
write_file_trailer(j_compress_ptr cinfo)
emit_marker(j_compress_ptr cinfo, JPEG_MARKER mark)
emit_jfif_app0(j_compress_ptr cinfo)
write_scan_header(j_compress_ptr cinfo)
emit_sos(j_compress_ptr cinfo)
emit_lse_ict(j_compress_ptr cinfo)
write_tables_only(j_compress_ptr cinfo)
jpeg_component_info * compptr
#define TRACEMS(cinfo, lvl, code)
#define ERREXIT1(cinfo, code, p1)
struct jpeg_common_struct * j_common_ptr
int const JOCTET unsigned int datalen
UINT16 quantval[DCTSIZE2]
unsigned int last_restart_interval