diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-18 14:10:49 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-18 13:53:24 +0000 |
commit | 813fbf95af77a531c57a8c497345ad2c61d475b3 (patch) | |
tree | 821b2c8de8365f21b6c9ba17a236fb3006a1d506 /chromium/third_party/libjpeg_turbo | |
parent | af6588f8d723931a298c995fa97259bb7f7deb55 (diff) | |
download | qtwebengine-chromium-813fbf95af77a531c57a8c497345ad2c61d475b3.tar.gz |
BASELINE: Update chromium to 44.0.2403.47
Change-Id: Ie056fedba95cf5e5c76b30c4b2c80fca4764aa2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/libjpeg_turbo')
-rw-r--r-- | chromium/third_party/libjpeg_turbo/README.chromium | 10 | ||||
-rw-r--r-- | chromium/third_party/libjpeg_turbo/google.patch | 66 | ||||
-rw-r--r-- | chromium/third_party/libjpeg_turbo/jdhuff.c | 7 | ||||
-rw-r--r-- | chromium/third_party/libjpeg_turbo/jdhuff.h | 6 |
4 files changed, 81 insertions, 8 deletions
diff --git a/chromium/third_party/libjpeg_turbo/README.chromium b/chromium/third_party/libjpeg_turbo/README.chromium index a4431d8043a..d7723a0324d 100644 --- a/chromium/third_party/libjpeg_turbo/README.chromium +++ b/chromium/third_party/libjpeg_turbo/README.chromium @@ -31,6 +31,16 @@ following changes which are not merged to upstream: * Removed .func / .endfunc lines from arm assembly ( https://sourceforge.net/p/libjpeg-turbo/bugs/72/ , landed at https://sourceforge.net/p/libjpeg-turbo/code/1375 ). +* Fix libjpeg_turbo svn r64 libjpeg6b compat issue: make the fast path Huffman + decoder fallback to slow decoding if the Huffman decoding bit sentinel > 16, + this to match the exact behavior of jpeg_huff_decode(). + http://crbug.com/398235 The 'google.patch' file represents our changes from the original libjpeg-turbo-1.2. + +Refer to working-with-nested-repos [1] for details of how to setup your git +svn client to update the code (for making local changes, cherry picking from +upstream, etc). + +[1] https://www.chromium.org/developers/how-tos/get-the-code/working-with-nested-repos diff --git a/chromium/third_party/libjpeg_turbo/google.patch b/chromium/third_party/libjpeg_turbo/google.patch index de6fadddf5b..4d0af8e013b 100644 --- a/chromium/third_party/libjpeg_turbo/google.patch +++ b/chromium/third_party/libjpeg_turbo/google.patch @@ -1852,9 +1852,44 @@ Index: jdarith.c temp = e->a - qe; Index: jdhuff.c =================================================================== ---- jdhuff.c (revision 829) -+++ jdhuff.c (working copy) -@@ -742,7 +742,7 @@ +--- jdhuff.c (revision 1541) ++++ jdhuff.c (working copy) +@@ -662,7 +662,7 @@ + d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn]; + register int s, k, r, l; + +- HUFF_DECODE_FAST(s, l, dctbl); ++ HUFF_DECODE_FAST(s, l, dctbl, slow_decode_mcu); + if (s) { + FILL_BIT_BUFFER_FAST + r = GET_BITS(s); +@@ -679,7 +679,7 @@ + if (entropy->ac_needed[blkn]) { + + for (k = 1; k < DCTSIZE2; k++) { +- HUFF_DECODE_FAST(s, l, actbl); ++ HUFF_DECODE_FAST(s, l, actbl, slow_decode_mcu); + r = s >> 4; + s &= 15; + +@@ -698,7 +698,7 @@ + } else { + + for (k = 1; k < DCTSIZE2; k++) { +- HUFF_DECODE_FAST(s, l, actbl); ++ HUFF_DECODE_FAST(s, l, actbl, slow_decode_mcu); + r = s >> 4; + s &= 15; + +@@ -715,6 +715,7 @@ + } + + if (cinfo->unread_marker != 0) { ++slow_decode_mcu: + cinfo->unread_marker = 0; + return FALSE; + } +@@ -742,7 +743,7 @@ * this module, since we'll just re-assign them on the next call.) */ @@ -1863,6 +1898,31 @@ Index: jdhuff.c METHODDEF(boolean) decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +Index: jdhuff.h +=================================================================== +--- jdhuff.h (revision 1541) ++++ jdhuff.h (working copy) +@@ -208,7 +208,7 @@ + } \ + } + +-#define HUFF_DECODE_FAST(s,nb,htbl) \ ++#define HUFF_DECODE_FAST(s,nb,htbl,slowlabel) \ + FILL_BIT_BUFFER_FAST; \ + s = PEEK_BITS(HUFF_LOOKAHEAD); \ + s = htbl->lookup[s]; \ +@@ -225,7 +225,9 @@ + s |= GET_BITS(1); \ + nb++; \ + } \ +- s = htbl->pub->huffval[ (int) (s + htbl->valoffset[nb]) & 0xFF ]; \ ++ if (nb > 16) \ ++ goto slowlabel; \ ++ s = htbl->pub->huffval[ (int) (s + htbl->valoffset[nb]) ]; \ + } + + /* Out-of-line case for Huffman code fetching */ + Index: jchuff.c =================================================================== --- jchuff.c (revision 1219) diff --git a/chromium/third_party/libjpeg_turbo/jdhuff.c b/chromium/third_party/libjpeg_turbo/jdhuff.c index 6662107060a..5d023ae86a8 100644 --- a/chromium/third_party/libjpeg_turbo/jdhuff.c +++ b/chromium/third_party/libjpeg_turbo/jdhuff.c @@ -663,7 +663,7 @@ decode_mcu_fast (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn]; register int s, k, r, l; - HUFF_DECODE_FAST(s, l, dctbl); + HUFF_DECODE_FAST(s, l, dctbl, slow_decode_mcu); if (s) { FILL_BIT_BUFFER_FAST r = GET_BITS(s); @@ -680,7 +680,7 @@ decode_mcu_fast (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) if (entropy->ac_needed[blkn]) { for (k = 1; k < DCTSIZE2; k++) { - HUFF_DECODE_FAST(s, l, actbl); + HUFF_DECODE_FAST(s, l, actbl, slow_decode_mcu); r = s >> 4; s &= 15; @@ -699,7 +699,7 @@ decode_mcu_fast (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) } else { for (k = 1; k < DCTSIZE2; k++) { - HUFF_DECODE_FAST(s, l, actbl); + HUFF_DECODE_FAST(s, l, actbl, slow_decode_mcu); r = s >> 4; s &= 15; @@ -716,6 +716,7 @@ decode_mcu_fast (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) } if (cinfo->unread_marker != 0) { +slow_decode_mcu: cinfo->unread_marker = 0; return FALSE; } diff --git a/chromium/third_party/libjpeg_turbo/jdhuff.h b/chromium/third_party/libjpeg_turbo/jdhuff.h index 22014360921..027177b328c 100644 --- a/chromium/third_party/libjpeg_turbo/jdhuff.h +++ b/chromium/third_party/libjpeg_turbo/jdhuff.h @@ -209,7 +209,7 @@ slowlabel: \ } \ } -#define HUFF_DECODE_FAST(s,nb,htbl) \ +#define HUFF_DECODE_FAST(s,nb,htbl,slowlabel) \ FILL_BIT_BUFFER_FAST; \ s = PEEK_BITS(HUFF_LOOKAHEAD); \ s = htbl->lookup[s]; \ @@ -226,7 +226,9 @@ slowlabel: \ s |= GET_BITS(1); \ nb++; \ } \ - s = htbl->pub->huffval[ (int) (s + htbl->valoffset[nb]) & 0xFF ]; \ + if (nb > 16) \ + goto slowlabel; \ + s = htbl->pub->huffval[ (int) (s + htbl->valoffset[nb]) ]; \ } /* Out-of-line case for Huffman code fetching */ |