static boolean get_dri (jpeg_decompress_struct cinfo) /* Process a DRI marker */ { int length; int tmp; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (length != 4) error(); // ERREXIT(cinfo, JERR_BAD_LENGTH); if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); tmp = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); tmp |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; // TRACEMS1(cinfo, 1, JTRC_DRI, tmp); cinfo.restart_interval = tmp; return true; }
static boolean get_dri (jpeg_decompress_struct cinfo) /* Process a DRI marker */ { int length; int tmp; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (length != 4) error(); // ERREXIT(cinfo, JERR_BAD_LENGTH); if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); tmp = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); tmp |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; // TRACEMS1(cinfo, 1, JTRC_DRI, tmp); cinfo.restart_interval = tmp; return true; }
static boolean skip_variable (jpeg_decompress_struct cinfo) /* Skip over an unknown or uninteresting variable-length marker */ { int length; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; length -= 2; // TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo.unread_marker, (int) length); if (length > 0) { skip_input_data (cinfo, length); } return true; }
static boolean skip_variable (jpeg_decompress_struct cinfo) /* Skip over an unknown or uninteresting variable-length marker */ { int length; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; length -= 2; // TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo.unread_marker, (int) length); if (length > 0) { skip_input_data (cinfo, length); } return true; }
static boolean skip_variable (jpeg_decompress_struct cinfo) /* Skip over an unknown or uninteresting variable-length marker */ { int length; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; length -= 2; // TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo.unread_marker, (int) length); if (length > 0) { skip_input_data (cinfo, length); } return true; }
static boolean skip_variable (jpeg_decompress_struct cinfo) /* Skip over an unknown or uninteresting variable-length marker */ { int length; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; length -= 2; // TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo.unread_marker, (int) length); if (length > 0) { skip_input_data (cinfo, length); } return true; }
static boolean skip_variable (jpeg_decompress_struct cinfo) /* Skip over an unknown or uninteresting variable-length marker */ { int length; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; length -= 2; // TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo.unread_marker, (int) length); if (length > 0) { skip_input_data (cinfo, length); } return true; }
static boolean skip_variable (jpeg_decompress_struct cinfo) /* Skip over an unknown or uninteresting variable-length marker */ { int length; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length = (cinfo.buffer[cinfo.bytes_offset++] & 0xFF) << 8; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); length |= cinfo.buffer[cinfo.bytes_offset++] & 0xFF; length -= 2; // TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo.unread_marker, (int) length); if (length > 0) { skip_input_data (cinfo, length); } return true; }
static boolean first_marker (jpeg_decompress_struct cinfo) { /* Like next_marker, but used to obtain the initial SOI marker. */ /* For this marker, we do not allow preceding garbage or fill; otherwise, * we might well scan an entire input file before realizing it ain't JPEG. * If an application wants to process non-JFIF files, it must seek to the * SOI before calling the JPEG library. */ int c, c2; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c2 = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (c != 0xFF || c2 != M_SOI) error(); // ERREXIT2(cinfo, JERR_NO_SOI, c, c2); cinfo.unread_marker = c2; return true; }
static boolean first_marker (jpeg_decompress_struct cinfo) { /* Like next_marker, but used to obtain the initial SOI marker. */ /* For this marker, we do not allow preceding garbage or fill; otherwise, * we might well scan an entire input file before realizing it ain't JPEG. * If an application wants to process non-JFIF files, it must seek to the * SOI before calling the JPEG library. */ int c, c2; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c2 = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (c != 0xFF || c2 != M_SOI) error(); // ERREXIT2(cinfo, JERR_NO_SOI, c, c2); cinfo.unread_marker = c2; return true; }
static boolean first_marker (jpeg_decompress_struct cinfo) { /* Like next_marker, but used to obtain the initial SOI marker. */ /* For this marker, we do not allow preceding garbage or fill; otherwise, * we might well scan an entire input file before realizing it ain't JPEG. * If an application wants to process non-JFIF files, it must seek to the * SOI before calling the JPEG library. */ int c, c2; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c2 = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (c != 0xFF || c2 != M_SOI) error(); // ERREXIT2(cinfo, JERR_NO_SOI, c, c2); cinfo.unread_marker = c2; return true; }
static boolean first_marker (jpeg_decompress_struct cinfo) { /* Like next_marker, but used to obtain the initial SOI marker. */ /* For this marker, we do not allow preceding garbage or fill; otherwise, * we might well scan an entire input file before realizing it ain't JPEG. * If an application wants to process non-JFIF files, it must seek to the * SOI before calling the JPEG library. */ int c, c2; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c2 = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (c != 0xFF || c2 != M_SOI) error(); // ERREXIT2(cinfo, JERR_NO_SOI, c, c2); cinfo.unread_marker = c2; return true; }
static boolean first_marker (jpeg_decompress_struct cinfo) { /* Like next_marker, but used to obtain the initial SOI marker. */ /* For this marker, we do not allow preceding garbage or fill; otherwise, * we might well scan an entire input file before realizing it ain't JPEG. * If an application wants to process non-JFIF files, it must seek to the * SOI before calling the JPEG library. */ int c, c2; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c2 = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (c != 0xFF || c2 != M_SOI) error(); // ERREXIT2(cinfo, JERR_NO_SOI, c, c2); cinfo.unread_marker = c2; return true; }
static boolean first_marker (jpeg_decompress_struct cinfo) { /* Like next_marker, but used to obtain the initial SOI marker. */ /* For this marker, we do not allow preceding garbage or fill; otherwise, * we might well scan an entire input file before realizing it ain't JPEG. * If an application wants to process non-JFIF files, it must seek to the * SOI before calling the JPEG library. */ int c, c2; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo); c2 = cinfo.buffer[cinfo.bytes_offset++] & 0xFF; if (c != 0xFF || c2 != M_SOI) error(); // ERREXIT2(cinfo, JERR_NO_SOI, c, c2); cinfo.unread_marker = c2; return true; }
static void skip_input_data (jpeg_decompress_struct cinfo, int num_bytes) { if (num_bytes > 0) { while (num_bytes > cinfo.bytes_in_buffer - cinfo.bytes_offset) { num_bytes -= cinfo.bytes_in_buffer - cinfo.bytes_offset; if (!fill_input_buffer(cinfo)) error(); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } cinfo.bytes_offset += num_bytes; } }
static void skip_input_data (jpeg_decompress_struct cinfo, int num_bytes) { if (num_bytes > 0) { while (num_bytes > cinfo.bytes_in_buffer - cinfo.bytes_offset) { num_bytes -= cinfo.bytes_in_buffer - cinfo.bytes_offset; if (!fill_input_buffer(cinfo)) error(); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } cinfo.bytes_offset += num_bytes; } }
static void skip_input_data (jpeg_decompress_struct cinfo, int num_bytes) { if (num_bytes > 0) { while (num_bytes > cinfo.bytes_in_buffer - cinfo.bytes_offset) { num_bytes -= cinfo.bytes_in_buffer - cinfo.bytes_offset; if (!fill_input_buffer(cinfo)) error(); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } cinfo.bytes_offset += num_bytes; } }
static void skip_input_data (jpeg_decompress_struct cinfo, int num_bytes) { if (num_bytes > 0) { while (num_bytes > cinfo.bytes_in_buffer - cinfo.bytes_offset) { num_bytes -= cinfo.bytes_in_buffer - cinfo.bytes_offset; if (!fill_input_buffer(cinfo)) error(); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } cinfo.bytes_offset += num_bytes; } }
static void skip_input_data (jpeg_decompress_struct cinfo, int num_bytes) { if (num_bytes > 0) { while (num_bytes > cinfo.bytes_in_buffer - cinfo.bytes_offset) { num_bytes -= cinfo.bytes_in_buffer - cinfo.bytes_offset; if (!fill_input_buffer(cinfo)) error(); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } cinfo.bytes_offset += num_bytes; } }
static void skip_input_data (jpeg_decompress_struct cinfo, int num_bytes) { if (num_bytes > 0) { while (num_bytes > cinfo.bytes_in_buffer - cinfo.bytes_offset) { num_bytes -= cinfo.bytes_in_buffer - cinfo.bytes_offset; if (!fill_input_buffer(cinfo)) error(); /* note we assume that fill_input_buffer will never return FALSE, * so suspension need not be handled. */ } cinfo.bytes_offset += num_bytes; } }