Skip to content

Commit

Permalink
Run JPEG lib through AStyle 2015
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Sep 28, 2024
1 parent 86a0124 commit e4de0e0
Show file tree
Hide file tree
Showing 14 changed files with 791 additions and 441 deletions.
4 changes: 2 additions & 2 deletions jpeg/jpeg-6b-2022/jchuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,9 +971,9 @@ jpeg_gen_optimal_table(j_compress_ptr cinfo, JHUFF_TBL* htbl, long freq[])
j--;
}

bits[i] = (UINT8) (bits[i] - 2U); /* remove two symbols */
bits[i] = (UINT8)(bits[i] - 2U); /* remove two symbols */
bits[i - 1]++; /* one goes in this length */
bits[j + 1] = (UINT8) (bits[j + 1] + 2U); /* two new symbols in this length */
bits[j + 1] = (UINT8)(bits[j + 1] + 2U); /* two new symbols in this length */
bits[j]--; /* symbol of this length is now a prefix */
}
}
Expand Down
2 changes: 1 addition & 1 deletion jpeg/jpeg-6b-2022/jcmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ per_scan_setup(j_compress_ptr cinfo)
/* For noninterleaved scans, it is convenient to define last_row_height
* as the number of block rows present in the last iMCU row.
*/
tmp = (int) (compptr->height_in_blocks % (JDIMENSION) compptr->v_samp_factor);
tmp = (int)(compptr->height_in_blocks % (JDIMENSION) compptr->v_samp_factor);

if(tmp == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions jpeg/jpeg-6b-2022/jcparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ add_huff_table(j_compress_ptr cinfo,
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
}

MEMCOPY((*htblptr)->huffval, val, (size_t) ((size_t) nsymbols * SIZEOF(UINT8)));
MEMCOPY((*htblptr)->huffval, val, (size_t)((size_t) nsymbols * SIZEOF(UINT8)));

/* Initialize sent_table FALSE so table will be written to JPEG file. */
(*htblptr)->sent_table = FALSE;
Expand Down Expand Up @@ -657,7 +657,7 @@ jpeg_simple_progression(j_compress_ptr cinfo)
cinfo->script_space_size = MAX(nscans, 10);
cinfo->script_space = (jpeg_scan_info*)
(*cinfo->mem->alloc_small)((j_common_ptr) cinfo, JPOOL_PERMANENT,
(size_t) ((size_t) cinfo->script_space_size * SIZEOF(jpeg_scan_info)));
(size_t)((size_t) cinfo->script_space_size * SIZEOF(jpeg_scan_info)));
}

scanptr = cinfo->script_space;
Expand Down
2 changes: 1 addition & 1 deletion jpeg/jpeg-6b-2022/jcphuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ emit_eobrun(phuff_entropy_ptr entropy)
unsigned int temp = entropy->EOBRUN;
int nbits = 0;

while((unsigned int) (temp >>= 1U) != 0U)
while((unsigned int)(temp >>= 1U) != 0U)
{
nbits++;
}
Expand Down
4 changes: 2 additions & 2 deletions jpeg/jpeg-6b-2022/jcprepct.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ create_context_buffer(j_compress_ptr cinfo)
*/
fake_buffer = (JSAMPARRAY)
(*cinfo->mem->alloc_small)((j_common_ptr) cinfo, JPOOL_IMAGE,
(size_t) (cinfo->num_components * 5 * rgroup_height) *
(size_t)(cinfo->num_components * 5 * rgroup_height) *
SIZEOF(JSAMPROW));

for(ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
Expand All @@ -334,7 +334,7 @@ create_context_buffer(j_compress_ptr cinfo)
(JDIMENSION)(3 * rgroup_height));
/* Copy true buffer row pointers into the middle of the fake row array */
MEMCOPY(fake_buffer + rgroup_height, true_buffer,
(size_t) (3 * rgroup_height) * SIZEOF(JSAMPROW));
(size_t)(3 * rgroup_height) * SIZEOF(JSAMPROW));

/* Fill in the above and below wraparound pointers */
for(i = 0; i < rgroup_height; i++)
Expand Down
Loading

0 comments on commit e4de0e0

Please sign in to comment.