diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-02-25 15:27:01 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-02-25 16:59:36 +0100 |
| commit | 52e16fb1be7929072c09e2fd989cd92246ae7b54 (patch) | |
| tree | b76ac674ff0c292da276846523648a5ee64d6515 /jpeg/jpegint.h | |
| parent | 5bd467fa17be55397f433dddc065b57cbb7a0615 (diff) | |
Update bundled libs to current versions
- update README.bundled-libs.txt + some comments
- update bundled jpeg lib from version 9c to 9d
All bundled libs are now up-to-date. For current update status
please see README.bundled-libs.txt.
Diffstat (limited to 'jpeg/jpegint.h')
| -rw-r--r-- | jpeg/jpegint.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jpeg/jpegint.h b/jpeg/jpegint.h index e312e1af9..52c708d4e 100644 --- a/jpeg/jpegint.h +++ b/jpeg/jpegint.h @@ -2,7 +2,7 @@ * jpegint.h * * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2017 by Guido Vollbeding. + * Modified 1997-2019 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -302,6 +302,13 @@ struct jpeg_color_quantizer { #define RIGHT_SHIFT(x,shft) ((x) >> (shft)) #endif +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x,n) RIGHT_SHIFT((x) + ((INT32) 1 << ((n)-1)), n) + /* Short forms of external names for systems with brain-damaged linkers. */ |
