Merge tag '2.1.3' into master-moz
* tag '2.1.3': (56 commits) Neon/AArch64: Explicitly unroll quant loop w/Clang Neon/AArch64: Fix/suppress UBSan warnings Neon/AArch64: Accelerate Huffman encoding AppVeyor: Test strict MSVC compiler warnings Eliminate incompatible pointer type warnings MSVC: Eliminate int conversion warnings (C4244) MSVC: Eliminate C4996 warnings in API libs BUILDING.md: Clarify that Ninja works with Windows BUILDING.md: Remove NASM RPM rebuild instructions BUILDING.md: Document NASM/Yasm path variables "YASM" = "Yasm" Build: Fix Neon capability detection w/ MSVC Ensure that strncpy() dest strings are terminated Eliminate unnecessary JFREAD()/JFWRITE() macros Build: Embed version/API/(C) info in MSVC DLLs Fix segv w/ h2v2 merged upsamp, jpeg_crop_scanline TJBench: Remove innocuous always-true condition GitHub Actions: Specify Catalina for macOS build Fix -Wpedantic compiler warnings Eliminate non-ANSI C compatibility macros ...
This commit is contained in:
12
jcarith.c
12
jcarith.c
@@ -4,7 +4,7 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Developed 1997-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2015, 2018, D. R. Commander.
|
||||
* Copyright (C) 2015, 2018, 2021-2022, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -342,14 +342,14 @@ emit_restart(j_compress_ptr cinfo, int restart_num)
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
/* DC needs no table for refinement scan */
|
||||
if (cinfo->progressive_mode == 0 || (cinfo->Ss == 0 && cinfo->Ah == 0)) {
|
||||
MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS);
|
||||
memset(entropy->dc_stats[compptr->dc_tbl_no], 0, DC_STAT_BINS);
|
||||
/* Reset DC predictions to 0 */
|
||||
entropy->last_dc_val[ci] = 0;
|
||||
entropy->dc_context[ci] = 0;
|
||||
}
|
||||
/* AC needs no table when not present */
|
||||
if (cinfo->progressive_mode == 0 || cinfo->Se) {
|
||||
MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS);
|
||||
memset(entropy->ac_stats[compptr->ac_tbl_no], 0, AC_STAT_BINS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,7 +841,7 @@ start_pass(j_compress_ptr cinfo, boolean gather_statistics)
|
||||
* We are fully adaptive here and need no extra
|
||||
* statistics gathering pass!
|
||||
*/
|
||||
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
||||
ERREXIT(cinfo, JERR_NOTIMPL);
|
||||
|
||||
/* We assume jcmaster.c already validated the progressive scan parameters. */
|
||||
|
||||
@@ -876,7 +876,7 @@ start_pass(j_compress_ptr cinfo, boolean gather_statistics)
|
||||
if (entropy->dc_stats[tbl] == NULL)
|
||||
entropy->dc_stats[tbl] = (unsigned char *)(*cinfo->mem->alloc_small)
|
||||
((j_common_ptr)cinfo, JPOOL_IMAGE, DC_STAT_BINS);
|
||||
MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS);
|
||||
memset(entropy->dc_stats[tbl], 0, DC_STAT_BINS);
|
||||
/* Initialize DC predictions to 0 */
|
||||
entropy->last_dc_val[ci] = 0;
|
||||
entropy->dc_context[ci] = 0;
|
||||
@@ -889,7 +889,7 @@ start_pass(j_compress_ptr cinfo, boolean gather_statistics)
|
||||
if (entropy->ac_stats[tbl] == NULL)
|
||||
entropy->ac_stats[tbl] = (unsigned char *)(*cinfo->mem->alloc_small)
|
||||
((j_common_ptr)cinfo, JPOOL_IMAGE, AC_STAT_BINS);
|
||||
MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS);
|
||||
memset(entropy->ac_stats[tbl], 0, AC_STAT_BINS);
|
||||
#ifdef CALCULATE_SPECTRAL_CONDITIONING
|
||||
if (progressive_mode)
|
||||
/* Section G.1.3.2: Set appropriate arithmetic conditioning value Kx */
|
||||
|
||||
Reference in New Issue
Block a user