summaryrefslogtreecommitdiffstats
path: root/libavcodec/webp.c
Commit message (Collapse)AuthorAgeFilesLines
* webp: Fix alpha initialisationMark Thompson2017-12-191-11/+5
| | | | | | | | ff_get_format() in the next patch will reject formats which aren't in the offered list, so the hack in 7cb9296db872c4221453e5411f242ebcfca62664 is no longer valid. Change the hack by adding a new field in the VP8 decoder context to indicate that it's actually WebP and don't call ff_get_format() at all in that case.
* webp: Fix alpha decodingMark Thompson2017-02-181-2/+11
| | | | | | | | | This was broken by 4e528206bc4d968706401206cf54471739250ec7 - the webp decoder was assuming that it could set the output pixfmt of the vp8 decoder directly, but after that change it no longer could because ff_get_format() was used instead. This adds an internal get_format() callback to webp use of the vp8 decoder to override the pixfmt appropriately.
* Use bitstream_init8() where appropriateDiego Biurrun2017-02-071-2/+2
|
* webp: Convert to the new bitstream readerAlexandra Hájková2016-12-031-56/+50
|
* 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