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 /jcmainct.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 'jcmainct.c')
-rw-r--r-- | jcmainct.c | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -39,9 +39,10 @@ typedef my_main_controller *my_main_ptr; /* Forward declarations */ -METHODDEF(void) process_data_simple_main - (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail); +METHODDEF(void) process_data_simple_main(j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail); /* @@ -49,9 +50,9 @@ METHODDEF(void) process_data_simple_main */ METHODDEF(void) -start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +start_pass_main(j_compress_ptr cinfo, J_BUF_MODE pass_mode) { - my_main_ptr main_ptr = (my_main_ptr) cinfo->main; + my_main_ptr main_ptr = (my_main_ptr)cinfo->main; /* Do nothing in raw-data mode. */ if (cinfo->raw_data_in) @@ -75,19 +76,18 @@ start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) */ METHODDEF(void) -process_data_simple_main (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail) +process_data_simple_main(j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail) { - my_main_ptr main_ptr = (my_main_ptr) cinfo->main; + my_main_ptr main_ptr = (my_main_ptr)cinfo->main; while (main_ptr->cur_iMCU_row < cinfo->total_iMCU_rows) { /* Read input data if we haven't filled the main buffer yet */ if (main_ptr->rowgroup_ctr < DCTSIZE) - (*cinfo->prep->pre_process_data) (cinfo, - input_buf, in_row_ctr, in_rows_avail, - main_ptr->buffer, &main_ptr->rowgroup_ctr, - (JDIMENSION) DCTSIZE); + (*cinfo->prep->pre_process_data) (cinfo, input_buf, in_row_ctr, + in_rows_avail, main_ptr->buffer, + &main_ptr->rowgroup_ctr, + (JDIMENSION)DCTSIZE); /* If we don't have a full iMCU row buffered, return to application for * more data. Note that preprocessor will always pad to fill the iMCU row @@ -97,14 +97,14 @@ process_data_simple_main (j_compress_ptr cinfo, return; /* Send the completed row to the compressor */ - if (! (*cinfo->coef->compress_data) (cinfo, main_ptr->buffer)) { + if (!(*cinfo->coef->compress_data) (cinfo, main_ptr->buffer)) { /* If compressor did not consume the whole row, then we must need to * suspend processing and return to the application. In this situation * we pretend we didn't yet consume the last input row; otherwise, if * it happened to be the last row of the image, the application would * think we were done. */ - if (! main_ptr->suspended) { + if (!main_ptr->suspended) { (*in_row_ctr)--; main_ptr->suspended = TRUE; } @@ -128,16 +128,16 @@ process_data_simple_main (j_compress_ptr cinfo, */ GLOBAL(void) -jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) +jinit_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer) { my_main_ptr main_ptr; int ci; jpeg_component_info *compptr; main_ptr = (my_main_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, sizeof(my_main_controller)); - cinfo->main = (struct jpeg_c_main_controller *) main_ptr; + cinfo->main = (struct jpeg_c_main_controller *)main_ptr; main_ptr->pub.start_pass = start_pass_main; /* We don't need to create a buffer in raw-data mode. */ @@ -154,9 +154,9 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++, compptr++) { main_ptr->buffer[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, + ((j_common_ptr)cinfo, JPOOL_IMAGE, compptr->width_in_blocks * DCTSIZE, - (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + (JDIMENSION)(compptr->v_samp_factor * DCTSIZE)); } } } |