Skip to content

Commit

Permalink
Bug 1278648 - Update libjpeg-turbo to version 1.5.0. r=jrmuizel
Browse files Browse the repository at this point in the history
--HG--
rename : media/libjpeg/README => media/libjpeg/README.ijg
rename : media/libjpeg/README-turbo.txt => media/libjpeg/README.md
  • Loading branch information
rvandermeulen committed Jun 26, 2016
1 parent 9fb4466 commit 02d34ad
Show file tree
Hide file tree
Showing 175 changed files with 17,022 additions and 4,514 deletions.
23 changes: 12 additions & 11 deletions media/libjpeg/1050342.diff
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This change comes from the blink repo https://codereview.appspot.com/229430043/
diff --git jdhuff.c jdhuff.c
--- jdhuff.c
+++ jdhuff.c
@@ -661,34 +661,34 @@ decode_mcu_fast (j_decompress_ptr cinfo,
@@ -664,17 +664,17 @@ decode_mcu_fast (j_decompress_ptr cinfo,
ASSIGN_STATE(state, entropy->saved);

for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
JBLOCKROW block = MCU_data[blkn];
d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
JBLOCKROW block = MCU_data ? MCU_data[blkn] : NULL;
d_derived_tbl *dctbl = entropy->dc_cur_tbls[blkn];
d_derived_tbl *actbl = entropy->ac_cur_tbls[blkn];
register int s, k, r, l;

- HUFF_DECODE_FAST(s, l, dctbl);
Expand All @@ -24,12 +24,13 @@ diff --git jdhuff.c jdhuff.c

if (entropy->dc_needed[blkn]) {
int ci = cinfo->MCU_membership[blkn];
s += state.last_dc_val[ci];
@@ -682,17 +682,17 @@ decode_mcu_fast (j_decompress_ptr cinfo,
state.last_dc_val[ci] = s;
(*block)[0] = (JCOEF) s;
if (block)
(*block)[0] = (JCOEF) s;
}

if (entropy->ac_needed[blkn]) {
if (entropy->ac_needed[blkn] && block) {

for (k = 1; k < DCTSIZE2; k++) {
- HUFF_DECODE_FAST(s, l, actbl);
Expand All @@ -42,7 +43,7 @@ diff --git jdhuff.c jdhuff.c
FILL_BIT_BUFFER_FAST
r = GET_BITS(s);
s = HUFF_EXTEND(r, s);
@@ -697,33 +697,34 @@ decode_mcu_fast (j_decompress_ptr cinfo,
@@ -701,33 +701,34 @@ decode_mcu_fast (j_decompress_ptr cinfo,
if (r != 15) break;
k += 15;
}
Expand Down Expand Up @@ -81,7 +82,7 @@ diff --git jdhuff.c jdhuff.c
diff --git jdhuff.h jdhuff.h
--- jdhuff.h
+++ jdhuff.h
@@ -200,32 +200,34 @@ EXTERN(boolean) jpeg_fill_bit_buffer
@@ -203,32 +203,34 @@ EXTERN(boolean) jpeg_fill_bit_buffer
} else { \
slowlabel: \
if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
Expand Down Expand Up @@ -116,5 +117,5 @@ diff --git jdhuff.h jdhuff.h

/* Out-of-line case for Huffman code fetching */
EXTERN(int) jpeg_huff_decode
(bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, d_derived_tbl * htbl, int min_bits);
(bitread_working_state *state, register bit_buf_type get_buffer,
register int bits_left, d_derived_tbl *htbl, int min_bits);
88 changes: 88 additions & 0 deletions media/libjpeg/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
libjpeg-turbo Licenses
======================

libjpeg-turbo is covered by three compatible BSD-style open source licenses:

- The IJG (Independent JPEG Group) License, which is listed in
[README.ijg](README.ijg)

This license applies to the libjpeg API library and associated programs
(any code inherited from libjpeg, and any modifications to that code.)

- The Modified (3-clause) BSD License, which is listed in
[turbojpeg.c](turbojpeg.c)

This license covers the TurboJPEG API library and associated programs.

- The zlib License, which is listed in [simd/jsimdext.inc](simd/jsimdext.inc)

This license is a subset of the other two, and it covers the libjpeg-turbo
SIMD extensions.


Complying with the libjpeg-turbo Licenses
=========================================

This section provides a roll-up of the libjpeg-turbo licensing terms, to the
best of our understanding.

1. If you are distributing a modified version of the libjpeg-turbo source,
then:

1. You cannot alter or remove any existing copyright or license notices
from the source.

**Origin**
- Clause 1 of the IJG License
- Clause 1 of the Modified BSD License
- Clauses 1 and 3 of the zlib License

2. You must add your own copyright notice to the header of each source
file you modified, so others can tell that you modified that file (if
there is not an existing copyright header in that file, then you can
simply add a notice stating that you modified the file.)

**Origin**
- Clause 1 of the IJG License
- Clause 2 of the zlib License

3. You must include the IJG README file, and you must not alter any of the
copyright or license text in that file.

**Origin**
- Clause 1 of the IJG License

2. If you are distributing only libjpeg-turbo binaries without the source, or
if you are distributing an application that statically links with
libjpeg-turbo, then:

1. Your product documentation must include a message stating:

This software is based in part on the work of the Independent JPEG
Group.

**Origin**
- Clause 2 of the IJG license

2. If your binary distribution includes or uses the TurboJPEG API, then
your product documentation must include the text of the Modified BSD
License.

**Origin**
- Clause 2 of the Modified BSD License

3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
contributors thereof in advertising, publicity, etc.

**Origin**
- IJG License
- Clause 3 of the Modified BSD License

4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be
free of defects, nor do we accept any liability for undesirable
consequences resulting from your use of the software.

**Origin**
- IJG License
- Modified BSD License
- zlib License
8 changes: 6 additions & 2 deletions media/libjpeg/MOZCHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ To upgrade to a new revision of libjpeg-turbo, do the following:

You can easily look for all non *.c, *.h, *.asm, and *.inc files by running

$ hg status -nu | grep -v '\(c\|h\|asm\|inc\)$'
$ hg status -nu | grep -v '\(c\|h\|asm\|inc\|md\|ijg\)$'

Once you're comfortable that you're only deleting files you want to delete
(and you've hg add'ed the files you want to keep), you can nuke the remaining
files with

$ hg status -nu | grep -v '\(c\|h\|asm\|inc\)$' | xargs rm
$ hg status -nu | grep -v '\(c\|h\|asm\|inc\|md\|ijg\)$' | xargs rm

A helpful command for finding the *.c files which aren't *currently* part of
the build is
Expand All @@ -48,6 +48,10 @@ To upgrade to a new revision of libjpeg-turbo, do the following:

$ hg addremove

== June 23, 2016 (libjpeg-turbo v1.5.0 3ff13e651bbe6de9c6f15d05235d1d4f26f63ffc 2016-05-31) ==

* Updated to v1.5.0 release.

== October 5, 2015 (libjpeg-turbo v1.4.2 d8da49effe6460d55239c4c009c57f42d8e4a494 2015-09-21) ==

* Updated to v1.4.2 release.
Expand Down
Loading

0 comments on commit 02d34ad

Please sign in to comment.