New Upstream Release - libjpeg
Ready changes
Summary
Merged new upstream version: 0.0~git20230221.db33a6e+ds (was: 0.0~git20220805.54ec643).
Resulting package
Built on 2023-03-13T17:06 (took 5m42s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases libjpeg-tools-dbgsymapt install -t fresh-releases libjpeg-tools
Lintian Result
- libjpeg-tools-dbgsym_0.0~git20230221.db33a6e+ds-1~jan+nur1_amd64.deb
- libjpeg-tools_0.0~git20230221.db33a6e+ds-1~jan+nur1_amd64.deb
- libjpeg_0.0~git20230221.db33a6e+ds-1~jan+nur1.dsc
- libjpeg_0.0~git20230221.db33a6e+ds-1~jan+nur1_amd64.buildinfo
- libjpeg_0.0~git20230221.db33a6e+ds-1~jan+nur1_amd64.changes
Diff
diff --git a/Makefile b/Makefile
index 5001c96..ef82543 100755
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#! make
#######################################################################
##
-## $Id: Makefile,v 1.17 2022/03/07 15:54:33 thor Exp $
+## $Id: Makefile,v 1.18 2023/02/21 09:17:28 thor Exp $
##
#######################################################################
## Makefile for the jpeg project,
@@ -358,7 +358,7 @@ ITUDistrib.zip : doc configure autoconfig.h.in
@ touch autoconfig.h.in
@ sleep 2
@ touch configure
- @ rm *~
+ @ rm -f *~
@ $(MAKE) --no-print-directory $(DIRLIBS) TARGET="ituzip"
@ mv README.license README.license.back
@ cp README.license.itu README.license
diff --git a/README.history b/README.history
index aea66e7..1166d43 100644
--- a/README.history
+++ b/README.history
@@ -569,3 +569,18 @@ The code now also checks the consistency of the MCU sizes in the
hierarchical process and fails if they differ across levels.
--------------------------------------------------------------------------
+
+Release 1.65:
+
+The components requested through DisplayRectangle() are always codestream
+component (i.e. Y, U, V) and not RGB components in the target image.
+This led to some confusion and lack of initialization of bitmap descriptors
+if less components were requested than present in the image.
+The large-range scan did not properly check whether the DCT precision exceeds
+the range decodable by the Huffman encoder. It now aborts faithfully if such
+coefficients are detected.
+The code did not check if the number of components present in a JPEG LS-2
+transformation are identical to the number of components indicated in the
+frame header. The code now aborts with an error if such a condition is
+detected.
+
diff --git a/codestream/sequentialscan.cpp b/codestream/sequentialscan.cpp
index c48fd9d..a1b3d78 100644
--- a/codestream/sequentialscan.cpp
+++ b/codestream/sequentialscan.cpp
@@ -43,7 +43,7 @@
** A sequential scan, also the first scan of a progressive scan,
** Huffman coded.
**
-** $Id: sequentialscan.cpp,v 1.93 2022/08/03 08:49:34 thor Exp $
+** $Id: sequentialscan.cpp,v 1.94 2023/02/21 10:17:41 thor Exp $
**
*/
@@ -740,6 +740,11 @@ void SequentialScan::DecodeBlock(LONG *block,
// take up the run.
s = r + 15; // This maps 16 into 16, 32 into 17 and so on.
r = m_Stream.Get(4); // The run is decoded separately, without using Huffman.
+ // Check whether this is too large. As we have only 16 bit output at most,
+ // we should get away with most 16 here.
+ if (s >= 24)
+ JPG_THROW(NOT_IMPLEMENTED,"SequentialScan::DecodeBlock",
+ "AC coefficient too large, cannot decode");
// Continues with the regular case.
} else {
JPG_THROW(MALFORMED_STREAM,"SequentialScan::DecodeBlock",
diff --git a/colortrafo/colortransformerfactory.cpp b/colortrafo/colortransformerfactory.cpp
index 7a25c68..55e2a68 100644
--- a/colortrafo/colortransformerfactory.cpp
+++ b/colortrafo/colortransformerfactory.cpp
@@ -42,7 +42,7 @@
** This class builds the proper color transformer from the information
** in the MergingSpecBox
**
-** $Id: colortransformerfactory.cpp,v 1.79 2022/08/05 11:25:28 thor Exp $
+** $Id: colortransformerfactory.cpp,v 1.80 2023/02/21 10:17:46 thor Exp $
**
*/
@@ -65,6 +65,7 @@
#include "colortrafo/lslosslesstrafo.hpp"
#include "colortrafo/multiplicationtrafo.hpp"
#include "colortrafo/colortransformerfactory.hpp"
+#include "marker/lscolortrafo.hpp"
#include "marker/frame.hpp"
#define FIX_BITS ColorTrafo::FIX_BITS
///
@@ -630,6 +631,17 @@ class ColorTrafo *ColorTransformerFactory::BuildLSTransformation(UBYTE type,
}
break;
case 3:
+ const class LSColorTrafo *marker = m_pTables->LSColorTrafoOf();
+ if (marker) {
+ if (marker->DepthOf() != 3) {
+ JPG_THROW(MALFORMED_STREAM,"ColorTransformerFactory::BuildLSTransformation",
+ "JPEG LS color transformation component count does not match frame depth");
+ break;
+ }
+ } else {
+ assert(!"JPEG LS trafo indicated, but not included in the tables");
+ break;
+ }
switch(type) {
case CTYP_UBYTE:
if (outmax > MAX_UBYTE) {
diff --git a/control/blockbitmaprequester.cpp b/control/blockbitmaprequester.cpp
index ba6a9a8..a959a96 100644
--- a/control/blockbitmaprequester.cpp
+++ b/control/blockbitmaprequester.cpp
@@ -43,7 +43,7 @@
** This class pulls blocks from the frame and reconstructs from those
** quantized block lines or encodes from them.
**
-** $Id: blockbitmaprequester.cpp,v 1.75 2022/08/05 11:25:28 thor Exp $
+** $Id: blockbitmaprequester.cpp,v 1.76 2023/02/21 09:17:33 thor Exp $
**
*/
@@ -1039,11 +1039,12 @@ void BlockBitmapRequester::ReconstructUnsampled(const struct RectangleRequest *r
for(i = 0;i < m_ucCount;i++) {
LONG *dst = m_ppCTemp[i];
+ // Bitmap extraction must go here as the components requested
+ // refer to components in YUV space, and not in target RGB space.
+ ExtractBitmap(m_ppTempIBM[i],r,i);
if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent && m_ppDCT[i]) {
class QuantizedRow *qrow = *m_pppQImage[i];
const LONG *src = (qrow)?(qrow->BlockAt(x)->m_Data):(NULL);
- //
- ExtractBitmap(m_ppTempIBM[i],r,i);
m_ppDCT[i]->InverseTransformBlock(dst,src,(maxval + 1) >> 1);
} else {
memset(dst,0,sizeof(LONG) * 64);
@@ -1173,8 +1174,8 @@ void BlockBitmapRequester::PushReconstructedData(const struct RectangleRequest *
r.ra_MaxX = region.ra_MaxX;
for(i = 0;i < m_ucCount;i++) {
+ ExtractBitmap(m_ppTempIBM[i],r,i);
if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) {
- ExtractBitmap(m_ppTempIBM[i],r,i);
if (m_ppUpsampler[i]) {
// Upsampled case, take from the upsampler, transform
// into the color buffer.
diff --git a/control/hierarchicalbitmaprequester.cpp b/control/hierarchicalbitmaprequester.cpp
index 6d617d3..dca9596 100644
--- a/control/hierarchicalbitmaprequester.cpp
+++ b/control/hierarchicalbitmaprequester.cpp
@@ -45,7 +45,7 @@
** decoding. It also keeps the top-level color transformer and the
** toplevel subsampling expander.
**
-** $Id: hierarchicalbitmaprequester.cpp,v 1.45 2022/08/05 11:25:28 thor Exp $
+** $Id: hierarchicalbitmaprequester.cpp,v 1.46 2023/02/21 09:17:33 thor Exp $
**
*/
@@ -775,8 +775,10 @@ void HierarchicalBitmapRequester::ReconstructRegion(const RectAngle<LONG> &orgre
r.ra_MaxX = orgregion.ra_MaxX;
for(i = 0;i < m_ucCount;i++) {
+ // Component extraction must go here as the requested components
+ // refer to components in YUV space, not in RGB space.
+ ExtractBitmap(m_ppTempIBM[i],r,i);
if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) {
- ExtractBitmap(m_ppTempIBM[i],r,i);
if (m_ppUpsampler[i]) {
// Upsampled case, take from the upsampler, transform
// into the color buffer.
@@ -830,8 +832,8 @@ void HierarchicalBitmapRequester::ReconstructRegion(const RectAngle<LONG> &orgre
for(i = 0;i < m_ucCount;i++) {
LONG *dst = m_ppCTemp[i];
+ ExtractBitmap(m_ppTempIBM[i],r,i);
if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) {
- ExtractBitmap(m_ppTempIBM[i],r,i);
FetchRegion(x,m_ppDecodingMCU + (i << 3),dst);
} else {
memset(dst,0,sizeof(LONG) * 64);
diff --git a/control/linebitmaprequester.cpp b/control/linebitmaprequester.cpp
index 803f785..13093a7 100644
--- a/control/linebitmaprequester.cpp
+++ b/control/linebitmaprequester.cpp
@@ -43,7 +43,7 @@
** This class pulls blocks from the frame and reconstructs from those
** quantized block lines or encodes from them.
**
-** $Id: linebitmaprequester.cpp,v 1.39 2022/08/05 11:25:28 thor Exp $
+** $Id: linebitmaprequester.cpp,v 1.40 2023/02/21 09:17:33 thor Exp $
**
*/
@@ -511,8 +511,11 @@ void LineBitmapRequester::ReconstructRegion(const RectAngle<LONG> &orgregion,con
r.ra_MaxX = orgregion.ra_MaxX;
for(i = 0;i < m_ucCount;i++) {
+ // ExtractBitMap must go here, noting that the requested components
+ // correspond to transformed components in YUV space, not to components
+ // in RGB space.
+ ExtractBitmap(m_ppTempIBM[i],r,i);
if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) {
- ExtractBitmap(m_ppTempIBM[i],r,i);
if (m_ppUpsampler[i]) {
// Upsampled case, take from the upsampler, transform
// into the color buffer.
@@ -563,8 +566,8 @@ void LineBitmapRequester::ReconstructRegion(const RectAngle<LONG> &orgregion,con
for(i = 0;i < m_ucCount;i++) {
LONG *dst = m_ppCTemp[i];
+ ExtractBitmap(m_ppTempIBM[i],r,i);
if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) {
- ExtractBitmap(m_ppTempIBM[i],r,i);
if (*m_pppImage[i]) {
FetchRegion(x,*m_pppImage[i],dst);
} else {
diff --git a/debian/changelog b/debian/changelog
index 1d915fa..8a67806 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libjpeg (0.0~git20230221.db33a6e+ds-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Mon, 13 Mar 2023 17:00:57 -0000
+
libjpeg (0.0~git20220805.54ec643-1) unstable; urgency=medium
* New upstream version 0.0~git20220805.54ec643
diff --git a/debian/patches/bug1013649.patch b/debian/patches/bug1013649.patch
index 1ab9b40..eef3764 100644
--- a/debian/patches/bug1013649.patch
+++ b/debian/patches/bug1013649.patch
@@ -5,10 +5,10 @@ Bug-Debian: https://bugs.debian.org/1013649
Forwarded: https://github.com/thorfdbg/libjpeg/issues/80
Last-Update: 2022-08-11
-Index: libjpeg/Makefile
+Index: libjpeg.git/Makefile
===================================================================
---- libjpeg.orig/Makefile
-+++ libjpeg/Makefile
+--- libjpeg.git.orig/Makefile
++++ libjpeg.git/Makefile
@@ -46,12 +46,12 @@ help:
## Varous Autoconf related settings ##
#####################################################################
@@ -114,10 +114,10 @@ Index: libjpeg/Makefile
@ gzip distrib.tar
@ mv distrib.tar.gz distrib.tgz
-Index: libjpeg/autoconfig.h.in
+Index: libjpeg.git/autoconfig.h.in
===================================================================
---- libjpeg.orig/autoconfig.h.in
-+++ libjpeg/autoconfig.h.in
+--- libjpeg.git.orig/autoconfig.h.in
++++ libjpeg.git/autoconfig.h.in
@@ -1,4 +1,4 @@
-/* autoconfig.h.in. Generated from configure.in by autoheader. */
+/* autoconfig.h.in. Generated from configure.ac by autoheader. */
@@ -150,10 +150,10 @@ Index: libjpeg/autoconfig.h.in
#undef TIME_WITH_SYS_TIME
/* Define if you want to use multithreading. */
-Index: libjpeg/configure.ac
+Index: libjpeg.git/configure.ac
===================================================================
--- /dev/null
-+++ libjpeg/configure.ac
++++ libjpeg.git/configure.ac
@@ -0,0 +1,968 @@
+#/*************************************************************************
+#** Written by Thomas Richter (THOR Software) **
@@ -1123,9 +1123,9 @@ Index: libjpeg/configure.ac
+AC_CONFIG_FILES([automakefile])
+AC_OUTPUT
+#
-Index: libjpeg/configure.in
+Index: libjpeg.git/configure.in
===================================================================
---- libjpeg.orig/configure.in
+--- libjpeg.git.orig/configure.in
+++ /dev/null
@@ -1,968 +0,0 @@
-#/*************************************************************************
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
index e804ffa..fd6b5ed 100644
--- a/debian/patches/cross.patch
+++ b/debian/patches/cross.patch
@@ -4,10 +4,10 @@ Bug-Debian: https://bugs.debian.org/947139
Forwarded: https://github.com/thorfdbg/libjpeg/issues/22
Last-Update: 2019-12-21
-Index: libjpeg/configure.in
+Index: libjpeg.git/configure.in
===================================================================
---- libjpeg.orig/configure.in
-+++ libjpeg/configure.in
+--- libjpeg.git.orig/configure.in
++++ libjpeg.git/configure.in
@@ -444,7 +444,7 @@ AC_MSG_RESULT($ac_atomic_compare_and_swa
# and b) large enough, and c) cover the alignment constraints of all basic types. This
# is required for the built-in memory manager
diff --git a/debian/patches/cross2.patch b/debian/patches/cross2.patch
index 3dd1671..61fe661 100644
--- a/debian/patches/cross2.patch
+++ b/debian/patches/cross2.patch
@@ -5,10 +5,10 @@ Forwarded: no
Reviewed-By: Mathieu Malaterre <malat@debian.org>
Last-Update: 2021-09-19
-Index: libjpeg/configure.in
+Index: libjpeg.git/configure.in
===================================================================
---- libjpeg.orig/configure.in
-+++ libjpeg/configure.in
+--- libjpeg.git.orig/configure.in
++++ libjpeg.git/configure.in
@@ -69,13 +69,13 @@ AC_C_BIGENDIAN([AC_DEFINE(JPG_BIG_ENDIAN
# or a generic compiler
if test "$ac_compiler_gnu" = "yes"; then
diff --git a/debian/patches/sbuild.patch b/debian/patches/sbuild.patch
index 70ebdea..5635e1f 100644
--- a/debian/patches/sbuild.patch
+++ b/debian/patches/sbuild.patch
@@ -4,10 +4,10 @@ Bug-Debian: https://bugs.debian.org/939654
Forwarded: https://github.com/thorfdbg/libjpeg/issues/20
Last-Update: 2019-09-30
-Index: libjpeg/configure.in
+Index: libjpeg.git/configure.in
===================================================================
---- libjpeg.orig/configure.in
-+++ libjpeg/configure.in
+--- libjpeg.git.orig/configure.in
++++ libjpeg.git/configure.in
@@ -50,7 +50,7 @@
AC_INIT(jpeg,thomas.richter@iis.fraunhofer.de)
AC_CONFIG_SRCDIR([config.h])
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/lib/debug/.build-id/d8/422c15aa10aa17fb05f9cf62de748e6b408f93.debug
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/lib/debug/.build-id/ee/c5f2f5acad464a3d416a47aee2ce558b755842.debug
No differences were encountered between the control files of package libjpeg-tools
Control files of package libjpeg-tools-dbgsym: lines which differ (wdiff format)
Build-Ids: eec5f2f5acad464a3d416a47aee2ce558b755842 d8422c15aa10aa17fb05f9cf62de748e6b408f93