Merge branch 'ijg.lossless' into dev

Refer to #402
This commit is contained in:
DRC
2022-11-14 15:36:25 -06:00
52 changed files with 3585 additions and 533 deletions

View File

@@ -42,6 +42,9 @@ LOCAL(void) transencode_coef_controller(j_compress_ptr cinfo,
GLOBAL(void)
jpeg_write_coefficients(j_compress_ptr cinfo, jvirt_barray_ptr *coef_arrays)
{
if (cinfo->master->lossless)
ERREXIT(cinfo, JERR_NOTIMPL);
if (cinfo->global_state != CSTATE_START)
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
/* Mark all tables to be written */
@@ -72,6 +75,9 @@ jpeg_copy_critical_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo)
JQUANT_TBL *c_quant, *slot_quant;
int tblno, ci, coefi;
if (srcinfo->master->lossless)
ERREXIT(dstinfo, JERR_NOTIMPL);
/* Safety check to ensure start_compress not called yet. */
if (dstinfo->global_state != CSTATE_START)
ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state);