diff options
author | Leon Scroggins III <scroggo@google.com> | 2018-07-16 10:43:45 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2018-08-28 13:49:52 +0000 |
commit | 3993b37fb9b483af215e7e3712e5087d7f35b9c7 (patch) | |
tree | a279b3c434699ae6969c7c36068cf79b86cf0d21 /jcapimin.c | |
parent | f5c8ca7bb600d1e5488f65c6d5447b19b18d899c (diff) |
Update libjpeg-turbo to 2.0.0
Bug: 78329453
Update to upstream at https://github.com/libjpeg-turbo/libjpeg-turbo/tree/2.0.0
This includes a fix for a bug that could result in an infinite loop.
ChangeLog.md contains detailed changes about the upstream library. Changes
I made are below:
- Remove files that are no longer in upstream, and include all current
files from upstream.
- Update various references to the version.
Android.bp:
- Update to build new files/files in new locations.
- Run bpfmt
README.android:
- Remove cherry-pick references, as they are no longer needed.
- Remove modification in jsimdext.inc, which no longer appears to be
necessary.
README.version:
- Use the github URL, as it is now the official upstream build
- Replace msarett as OWNER, as he no longer works on this project
- Update the version
Change-Id: Ie6cfee5a8f820f28656bbb305f500e75e7ce7915
Diffstat (limited to 'jcapimin.c')
-rw-r--r-- | jcapimin.c | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -31,7 +31,7 @@ */ GLOBAL(void) -jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) +jpeg_CreateCompress(j_compress_ptr cinfo, int version, size_t structsize) { int i; @@ -41,7 +41,7 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); if (structsize != sizeof(struct jpeg_compress_struct)) ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, - (int) sizeof(struct jpeg_compress_struct), (int) structsize); + (int)sizeof(struct jpeg_compress_struct), (int)structsize); /* For debugging purposes, we zero the whole master structure. * But the application has already set the err pointer, and may have set @@ -59,7 +59,7 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) cinfo->is_decompressor = FALSE; /* Initialize a memory manager instance for this object */ - jinit_memory_mgr((j_common_ptr) cinfo); + jinit_memory_mgr((j_common_ptr)cinfo); /* Zero out pointers to permanent structures. */ cinfo->progress = NULL; @@ -83,7 +83,7 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) /* Must do it here for emit_dqt in case jpeg_write_tables is used */ cinfo->block_size = DCTSIZE; cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; + cinfo->lim_Se = DCTSIZE2 - 1; #endif cinfo->script_space = NULL; @@ -100,9 +100,9 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) */ GLOBAL(void) -jpeg_destroy_compress (j_compress_ptr cinfo) +jpeg_destroy_compress(j_compress_ptr cinfo) { - jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ + jpeg_destroy((j_common_ptr)cinfo); /* use common routine */ } @@ -112,9 +112,9 @@ jpeg_destroy_compress (j_compress_ptr cinfo) */ GLOBAL(void) -jpeg_abort_compress (j_compress_ptr cinfo) +jpeg_abort_compress(j_compress_ptr cinfo) { - jpeg_abort((j_common_ptr) cinfo); /* use common routine */ + jpeg_abort((j_common_ptr)cinfo); /* use common routine */ } @@ -131,7 +131,7 @@ jpeg_abort_compress (j_compress_ptr cinfo) */ GLOBAL(void) -jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) +jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress) { int i; JQUANT_TBL *qtbl; @@ -159,7 +159,7 @@ jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) */ GLOBAL(void) -jpeg_finish_compress (j_compress_ptr cinfo) +jpeg_finish_compress(j_compress_ptr cinfo) { JDIMENSION iMCU_row; @@ -172,18 +172,18 @@ jpeg_finish_compress (j_compress_ptr cinfo) } else if (cinfo->global_state != CSTATE_WRCOEFS) ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); /* Perform any remaining passes */ - while (! cinfo->master->is_last_pass) { + while (!cinfo->master->is_last_pass) { (*cinfo->master->prepare_for_pass) (cinfo); for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) iMCU_row; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + cinfo->progress->pass_counter = (long)iMCU_row; + cinfo->progress->pass_limit = (long)cinfo->total_iMCU_rows; + (*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo); } /* We bypass the main controller and invoke coef controller directly; * all work is being done from the coefficient buffer. */ - if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) + if (!(*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE)NULL)) ERREXIT(cinfo, JERR_CANT_SUSPEND); } (*cinfo->master->finish_pass) (cinfo); @@ -192,7 +192,7 @@ jpeg_finish_compress (j_compress_ptr cinfo) (*cinfo->marker->write_file_trailer) (cinfo); (*cinfo->dest->term_destination) (cinfo); /* We can use jpeg_abort to release memory and reset global_state */ - jpeg_abort((j_common_ptr) cinfo); + jpeg_abort((j_common_ptr)cinfo); } @@ -204,8 +204,8 @@ jpeg_finish_compress (j_compress_ptr cinfo) */ GLOBAL(void) -jpeg_write_marker (j_compress_ptr cinfo, int marker, - const JOCTET *dataptr, unsigned int datalen) +jpeg_write_marker(j_compress_ptr cinfo, int marker, const JOCTET *dataptr, + unsigned int datalen) { void (*write_marker_byte) (j_compress_ptr info, int val); @@ -226,7 +226,7 @@ jpeg_write_marker (j_compress_ptr cinfo, int marker, /* Same, but piecemeal. */ GLOBAL(void) -jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +jpeg_write_m_header(j_compress_ptr cinfo, int marker, unsigned int datalen) { if (cinfo->next_scanline != 0 || (cinfo->global_state != CSTATE_SCANNING && @@ -238,7 +238,7 @@ jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) } GLOBAL(void) -jpeg_write_m_byte (j_compress_ptr cinfo, int val) +jpeg_write_m_byte(j_compress_ptr cinfo, int val) { (*cinfo->marker->write_marker_byte) (cinfo, val); } @@ -266,13 +266,13 @@ jpeg_write_m_byte (j_compress_ptr cinfo, int val) */ GLOBAL(void) -jpeg_write_tables (j_compress_ptr cinfo) +jpeg_write_tables(j_compress_ptr cinfo) { if (cinfo->global_state != CSTATE_START) ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->err->reset_error_mgr) ((j_common_ptr)cinfo); (*cinfo->dest->init_destination) (cinfo); /* Initialize the marker writer ... bit of a crock to do it here. */ jinit_marker_writer(cinfo); |