summaryrefslogtreecommitdiffstats
path: root/libavcodec/webp.c
Commit message (Collapse)AuthorAgeFilesLines
* get_bits: Move BITSTREAM_READER_LE definition before all relevant #includesDiego Biurrun2016-06-071-2/+3
| | | | | | | This avoids the danger that get_bits.h might get indirectly #included before BITSTREAM_READER_LE is defined. Also sort headers into canonical order where appropriate.
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-1/+1
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* webp: Make sure enough bytes are availableAndreas Cadhalpun2015-07-031-1/+1
| | | | | | | | Every chunk needs at least 8 bytes for chunk_type and chunk_size. Prevent a possible infinite loop. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* webp: ensure that each transform is only used onceAndreas Cadhalpun2015-03-191-1/+9
| | | | | | | | | | | According to the WebP Lossless Bitstream Specification "each transform is allowed to be used only once". If a transform is more than once this can lead to memory corruption. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* webp: validate the distance prefix codeAndreas Cadhalpun2015-03-051-0/+5
| | | | | | | | | | | According to the WebP Lossless Bitstream Specification the highest allowed value for a prefix code is 39. If prefix_code is too large, the calculated extra_bits has an invalid value and triggers an assertion in get_bits. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* webpdec: Fix decoding of the huffman group indices.Justin Ruggles2014-07-031-2/+6
| | | | | | Per the specification, "The red and green components of a pixel define the meta Huffman code used in a particular block of the ARGB image."
* webp: add a special case for a huffman table with only 1 symbolJustin Ruggles2013-12-051-1/+17
| | | | | | | | | The vlc reader cannot handle 0-bit huffman codes. For most situations WebP uses the "simple" huffman coding for this case, but that will only handle symbols up to 255. For the LZ77 distance codes, larger symbol values are needed, so it can happen in rare cases that a normal huffman table is used that only has a single symbol.
* webp: do not call av_frame_free() on the user-provided frameJustin Ruggles2013-12-051-6/+2
| | | | Fixes double-free on error.
* webp: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-311-2/+2
|
* Add a WebP decoderJustin Ruggles2013-09-181-0/+1455
Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org> Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
OpenPOWER on IntegriCloud