mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
extra/libjpeg-turbo to 1.3.1-3
This commit is contained in:
parent
518fb04e2a
commit
bdb1f2656b
3 changed files with 28 additions and 7 deletions
|
@ -9,25 +9,25 @@
|
|||
|
||||
pkgname=libjpeg-turbo
|
||||
pkgver=1.3.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc='JPEG image codec with accelerated baseline compression and decompression'
|
||||
url='http://libjpeg-turbo.virtualgl.org/'
|
||||
license=('GPL' 'custom')
|
||||
arch=('i686' 'x86_64')
|
||||
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
'libjpeg-turbo-1.3.1-jstdhuff.patch')
|
||||
'jstdhuff.patch'
|
||||
'overrun.patch')
|
||||
sha1sums=('5fa19252e5ca992cfa40446a0210ceff55fbe468'
|
||||
'f459890257df430dc4e2d8bd3060173a1be7516e')
|
||||
'f459890257df430dc4e2d8bd3060173a1be7516e'
|
||||
'438aba2241b19857bab090c6f61bd3f249f27591')
|
||||
provides=('libjpeg=8.0.2' 'turbojpeg')
|
||||
conflicts=('libjpeg' 'turbojpeg')
|
||||
replaces=('libjpeg' 'turbojpeg')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
# Backport fix for motion JPEG video frames that are encoded without the
|
||||
# default Huffman tables. Fixes HD webcam input in Chromium (FS#42747).
|
||||
# http://sourceforge.net/p/libjpeg-turbo/code/1104/
|
||||
patch -Np0 -i ../libjpeg-turbo-1.3.1-jstdhuff.patch
|
||||
patch -p0 -i ../jstdhuff.patch # FS#42747
|
||||
patch -p1 -i ../overrun.patch # FS#42922
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
21
extra/libjpeg-turbo/overrun.patch
Normal file
21
extra/libjpeg-turbo/overrun.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff -Naur old/jchuff.c new/jchuff.c
|
||||
--- old/jchuff.c 2014-11-27 06:48:21.009442853 -1000
|
||||
+++ new/jchuff.c 2014-11-27 06:48:46.289700004 -1000
|
||||
@@ -391,7 +391,16 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#define BUFSIZE (DCTSIZE2 * 2)
|
||||
+/* Although it is exceedingly rare, it is possible for a Huffman-encoded
|
||||
+ * coefficient block to be larger than the 128-byte unencoded block. For each
|
||||
+ * of the 64 coefficients, PUT_BITS is invoked twice, and each invocation can
|
||||
+ * theoretically store 16 bits (for a maximum of 2048 bits or 256 bytes per
|
||||
+ * encoded block.) If, for instance, one artificially sets the AC
|
||||
+ * coefficients to alternating values of 32767 and -32768 (using the JPEG
|
||||
+ * scanning order-- 1, 8, 16, etc.), then this will produce an encoded block
|
||||
+ * larger than 200 bytes.
|
||||
+ */
|
||||
+#define BUFSIZE (DCTSIZE2 * 4)
|
||||
|
||||
#define LOAD_BUFFER() { \
|
||||
if (state->free_in_buffer < BUFSIZE) { \
|
Loading…
Reference in a new issue