Commit Graph

25560 Commits

Author SHA1 Message Date
Maxim Poliakovski
d49f3fa579 atrac3: Generalize gain compensation code
Move it to the ATRAC common code, so it can be reused
in the umpcoming ATRAC3+ decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:44:02 +02:00
Maxim Poliakovski
4fa2484067 atrac3/decode_gain_control: cosmetics
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:42:12 +02:00
Maxim Poliakovski
4978be2bc6 atrac3: rename num_gain_data to num_points
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:37:38 +02:00
Maxim Poliakovski
dc80e250fc atrac3: Rename GainInfo to AtracGainInfo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:37:05 +02:00
Maxim Poliakovski
746cb9bc53 atrac: limit line length to 80 chars
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:21:35 +02:00
Maxim Poliakovski
3d80ab015f atrac: Move doxygen comments to the header
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:21:14 +02:00
Maxim Poliakovski
cc2330fe3a atrac: Update copyright info and file description.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:19:22 +02:00
Maxim Poliakovski
852241561d atrac: Add missing av_cold.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:17:50 +02:00
Michael Niedermayer
286beebdc3 avcodec/wmalosslessdec: check block_align
Code copied from wmaprodec

Fixes null pointer dereference
Fixes Ticket3002

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 01:24:19 +02:00
Michael Niedermayer
795eaf8d69 avcodec/fraps: increase vlc nb_bits
This should fix decoding the file in:
http://ffmpeg.gusari.org/viewtopic.php?f=16&t=1078
No i dont have the file so i cant test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-01 20:37:14 +02:00
Michael Niedermayer
54197c7aae skip_bits: dont call UPDATE_CACHE
UPDATE_CACHE isnt needed and can cause segfaults

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 14:34:12 +02:00
Michael Niedermayer
bbe50a8001 Merge commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f'
* commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f':
  pcx: Return an error on broken palette if err_detect is set to 'explode'

Conflicts:
	libavcodec/pcx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:54:59 +02:00
Michael Niedermayer
c955bac7d5 Merge commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547'
* commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547':
  pcx: Check the packet size before assuming it fits a palette

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:49:21 +02:00
Michael Niedermayer
1eead87766 Merge commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6'
* commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6':
  rpza: Fix a buffer size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:42:33 +02:00
Michael Niedermayer
1ad36551ec Merge commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc'
* commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc':
  xxan: Disallow odd width

See: 77693c541a
See: 8ad9b48c9b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:41:17 +02:00
Michael Niedermayer
7d7fb61e0d Merge commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82'
* commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82':
  xan: Only read within the data that actually was initialized

Conflicts:
	libavcodec/xan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:21:30 +02:00
Michael Niedermayer
b6dfb82913 Merge commit '30db94dc399f6e4ef8905049d9b740556f0fce47'
* commit '30db94dc399f6e4ef8905049d9b740556f0fce47':
  xan: Use bytestream2 to limit reading to within the buffer

Conflicts:
	libavcodec/xan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:12:15 +02:00
Michael Niedermayer
a612bb3099 Merge commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887'
* commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887':
  pcx: Consume the whole packet if giving up due to missing palette

Conflicts:
	libavcodec/pcx.c

See: b4e516e30e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 01:00:50 +02:00
Michael Niedermayer
9834874f8c Merge commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7'
* commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7':
  pngdec: Stop trying to decode once inflate returns Z_STREAM_END

Conflicts:
	libavcodec/pngdec.c

See: 65bf9a44d7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 00:40:17 +02:00
Michael Niedermayer
9e58d46edf Merge commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188'
* commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188':
  alac: Do bounds checking of lpc_order read from the bitstream

See: fd4f4923cc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:17:45 +02:00
Michael Niedermayer
4be0c6ed20 avcodec/tiff_common: fix bprint max sizes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 21:28:22 +02:00
Martin Storsjö
ff07ec143e pcx: Return an error on broken palette if err_detect is set to 'explode'
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 21:05:16 +03:00
Martin Storsjö
d1d99e3bef pcx: Check the packet size before assuming it fits a palette
This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:03:12 +03:00
Martin Storsjö
7ba0cedbfe rpza: Fix a buffer size check
We read 2 bytes for 15 out of 16 pixels, therefore we need to
have at least 30 bytes, not 16.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:42 +03:00
Martin Storsjö
aa0dd52434 xxan: Disallow odd width
Decoded data is always written in pairs within this decoder.
This fixes writes out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:32 +03:00
Martin Storsjö
fc739b3eef xan: Only read within the data that actually was initialized
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:19 +03:00
Martin Storsjö
30db94dc39 xan: Use bytestream2 to limit reading to within the buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:50 +03:00
Martin Storsjö
9fb0de86b4 pcx: Consume the whole packet if giving up due to missing palette
Previously, we returned 0, meaning successful decoding but 0
bytes consumed, leading to an infinite loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:29 +03:00
Martin Storsjö
a81cad8f86 pngdec: Stop trying to decode once inflate returns Z_STREAM_END
If the input buffer contains more data after the deflate stream,
the loop previously left running infinitely, with inflate returning
Z_STREAM_END.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:03 +03:00
Martin Storsjö
59480abce7 alac: Do bounds checking of lpc_order read from the bitstream
In lpc_prediction(), we write up to array element 'lpc_order' in
an array allocated to hold 'max_samples_per_frame' elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:10 +03:00
Michael Niedermayer
e40c96513e avcodec/exif: print bytes and undefined types as scalar lists
This prevents odd characters from ending in the fate test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 12:19:47 +02:00
Michael Niedermayer
7859e89ff0 avcodec/tiff_common: add ff_tadd_bytes_metadata()
The le argument is passed so the function has the same prototype as the
other similar functions. It is otherwise unused

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 12:19:47 +02:00
Ronald S. Bultje
face578d56 Rewrite emu_edge functions to have separate src/dst_stride arguments.
This allows supporting files for which the image stride is smaller than
the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file
or a 16x16 VP8 file with -fflags +emu_edge.
2013-09-28 20:28:08 -04:00
Ronald S. Bultje
f574b4da56 vp8: use 2 registers for dst_stride and src_stride in neon bilin filter. 2013-09-28 20:25:29 -04:00
Michael Niedermayer
2b834a0605 avcodec/huffman: Allow specifying nb_bits to ff_huff_build_tree()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 20:33:56 +02:00
Michael Bradshaw
f46a3e3d6e libopenjpeg: fix encoding of odd sized subsampled images
Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 15:04:48 +02:00
Ronald S. Bultje
c341f734e5 Convert multiplier for MV from int to ptrdiff_t.
This prevents emulated_edge_mc from not undoing mvy*stride-related
integer overflows.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 11:28:09 +02:00
Michael Niedermayer
3e0c78bac6 avcodec/imc: Check flcoeffs5
Fixes infinite loop
Fixes Ticket2996

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 23:13:29 +02:00
Michael Niedermayer
f7bea731d9 avcodec/mlpdec: Fail if the input is too small
This fixes a infinite loop
Fixes Ticket2986

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 20:12:37 +02:00
Michael Niedermayer
b654aa6beb Merge commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3'
* commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3':
  pcm: support 24-bit/32-bit little-endian planar

Conflicts:
	doc/general.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/pcm.c
	libavcodec/version.h
	libavformat/nut.c

See: 467dfd5dfa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 13:05:05 +02:00
Paul B Mahol
7e52080cb1 pcm: support 24-bit/32-bit little-endian planar
Used by LXF.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Michael Niedermayer
f31011e9ab avcodec/parser: reset indexes on realloc failure
Fixes Ticket2982

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 21:03:48 +02:00
Michael Niedermayer
851a6e2f1a avcodec/wmalosslessdec: Fix return code for invalid buffer sizes
Fixes infinite loop
Fixes Ticket2979

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 21:50:27 +02:00
Paul B Mahol
f5498ef38d avcodec/flicvideo: fix infinite loops
Fixes #2995.
Reported-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-25 19:45:49 +00:00
Michael Niedermayer
c99d27287d avcodec/wmaprodec: check that there are input bits left in decode_subframe_length()
Fixes infinite loop
Fixes Ticket2987

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 20:10:24 +02:00
Michael Niedermayer
45f0623ae3 avcodec/lagarith: check scaled probabilities
Prevents infinite loop
Fixes Ticket2988

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 18:26:13 +02:00
Kostya Shishkov
4370f65be8 g2meet: Respect cursor_stride properly everywhere
This fixes a regression with rgb cursors since b1e46988.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-25 17:42:01 +03:00
Michael Niedermayer
ab6fbe8206 avcodec/cabac: remove h264_lps_state
The only use case of it was the selftest code, and there the slightly more
complex indexing that is needed after its removial doesnt matter.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 16:30:25 +02:00
Michael Niedermayer
c3c6999ea1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 11:02:32 +02:00
Michael Niedermayer
4a89868c5f Merge commit 'cab8c5f8e140c96ba3725ab709d823abfd1e31a5'
* commit 'cab8c5f8e140c96ba3725ab709d823abfd1e31a5':
  h264: do not reinitialize the global cabac tables at each slice header

See: 1e2e2c8095
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 10:25:17 +02:00