Commit Graph

20640 Commits

Author SHA1 Message Date
Michael Niedermayer acfe69669c bink: reindent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 16:25:29 +02:00
Michael Niedermayer 897d336984 bink: remove unneeded special case in the init code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 16:25:25 +02:00
Michael Niedermayer 574e87943e bink: get rid of double precision float use
Add a small table of integers instead as this is simpler and
avoid rounding issues (though such rounding issues are unlikely in this case)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 16:23:57 +02:00
Michael Niedermayer 6fcd4f3c72 dfa: replace redundant check by assert
The values are checked in the wraper function used to call this code.

This was introduced by: ee715f49a0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 15:34:22 +02:00
Michael Niedermayer b96dc093ea Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wmalosslessdec: increase channel_coeffs/residues size
  wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
  lagarith: check count before writing zeros.
  wmaprodec: check num_vec_coeffs for validity
  avidec: use actually read size instead of requested size
  avidec: return 0, not packet size from read_packet().

Conflicts:
	libavcodec/lagarith.c
	libavcodec/wmalosslessdec.c
	libavcodec/wmaprodec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 15:11:34 +02:00
Michael Niedermayer 8672fc7b04 Merge commit 'b146d74730ab9ec5abede9066f770ad851e45fbc'
* commit 'b146d74730ab9ec5abede9066f770ad851e45fbc':
  indeo4: update AVCodecContext width/height on size change
  dfa: check that the caller set width/height properly.
  indeo5dec: Make sure we have had a valid gop header.
  cavsdec: check for changing w/h.
  lavc: set channel count from channel layout in avcodec_open2().
  doc/platform: Rework the Visual Studio linking section
  doc/faq: Change the Visual Studio entry to reflect current status
  doc/platform: Replace Visual Studio section with build instructions
  doc/platform: Nuke section on linking static MinGW-built libs with MSVC
  doc/platform: Remove false claim about MinGW installer
  doc/platform: Mention MinGW-w64
  dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
  mpegaudiodec: fix short_start calculation

Conflicts:
	doc/faq.texi
	doc/platform.texi
	libavcodec/cavsdec.c
	libavcodec/indeo5.c
	libavcodec/ivi_common.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 14:45:55 +02:00
Anton Khirnov 065b3a1cfa wmalosslessdec: increase channel_coeffs/residues size
Fixes CVE-2012-2792

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 10:29:53 +02:00
Anton Khirnov 4a969030e4 wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14. 2012-09-29 10:29:52 +02:00
Michael Niedermayer b631e4ed64 lagarith: check count before writing zeros.
Fixes CVE-2012-2793

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:28:32 +02:00
Michael Niedermayer 99f392a584 wmaprodec: check num_vec_coeffs for validity
Fixes CVE-2012-2789

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:28:15 +02:00
Michael Niedermayer b146d74730 indeo4: update AVCodecContext width/height on size change
Fixes CVE-2012-2787

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:27:32 +02:00
Anton Khirnov ee715f49a0 dfa: check that the caller set width/height properly.
Fixes CVE-2012-2786.
2012-09-29 09:27:08 +02:00
Michael Niedermayer 891918431d indeo5dec: Make sure we have had a valid gop header.
This prevents decoding happening on a half initialized context.

Fixes CVE-2012-2779

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:26:30 +02:00
Michael Niedermayer c20a696306 cavsdec: check for changing w/h.
Our decoder does not support changing w/h.

Fixes CVE-2012-2777 and CVE-2012-2784.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:26:04 +02:00
Anton Khirnov 12e1e83461 lavc: set channel count from channel layout in avcodec_open2().
Some decoders (e.g. nellymoser) only set channel_layout and do not set
channel count.
2012-09-29 09:25:40 +02:00
Michael Niedermayer bfe735b582 aacdec: detect faac and skip correct amount of startup samples
This also fixes aac in adts and other containers than mov.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 20:30:37 +02:00
Michael Niedermayer 791b5954bc dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
This should fix the utvideoenc valgrind failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 12:25:07 -04:00
Luca Barbato 97cfa55eea mpegaudiodec: fix short_start calculation
The value should be always 3, as it follows from the specification.

Fix a stack buffer overflow in exponents_from_scale_factors as reported
by asan. Thanks to Dale Curtis for the sample vector.
2012-09-28 16:02:39 +02:00
jamal 35e09036c4 avcodec: Add missing include to version.h
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 15:06:08 +02:00
Michael Niedermayer 2acb5cd907 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libopus: Remap channels using libopus' internal remapping.
  Opus decoder using libopus
  avcodec: document the use of AVCodecContext.delay for audio decoding
  vc1dec: add flush function for WMV9 and VC-1 decoders
  http: Increase buffer sizes to cope with longer URIs
  nutenc: const correctness for ff_put_v_trace/put_s_trace function arguments
  h264_refs: Fix debug tprintf argument types
  golomb: const correctness for get_ue()/get_se() function arguments
  get_bits: const correctness for get_bits_trace()/get_xbits_trace() arguments

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/version.h
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 13:54:40 +02:00
Nathan Caldwell d16860a237 libopus: Remap channels using libopus' internal remapping.
This way we can directly remap channels from Opus' channel order to
libav's internal channel order, instead of mapping channels from
Opus' order to Vorbis' order then to libav's order.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-28 11:03:32 +02:00
Nicolas George 44617d6ec9 Opus decoder using libopus
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-28 11:03:20 +02:00
Nathan Caldwell e4aa3831b7 avcodec: document the use of AVCodecContext.delay for audio decoding
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-28 10:50:07 +02:00
Kostya Shishkov 4dc8c8386e vc1dec: add flush function for WMV9 and VC-1 decoders
CC: libav-stable@libav.org
2012-09-28 07:08:54 +02:00
Michael Niedermayer 7ed9ec033f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dwt: Drop unused functions spatial_compose{53|97}i()
  nutdec: Remove unused and broken debug function stub
  avcodec: Drop long-deprecated imgconvert.h header
  Add Opus support to the Ogg muxer.
  Add Opus codec id and codec description.
  avformat: Identify anonymous AVIO typedef structs.

Conflicts:
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/imgconvert.h
	libavcodec/version.h
	libavformat/oggenc.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 05:11:19 +02:00
Michael Niedermayer ac7d0c79c3 mp3dec: ask for 8khz switch point mp3s
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 04:39:10 +02:00
Michael Niedermayer 94041febc5 mp3dec: Fix possibly exploitable crash
I was sadly unable to find a non fuzzed mp3 that uses the
feature that contained the bug (and i searched hard ...), thus
while this fixes the security issue. It may or may not fix
mixed blocks in 8khz mp3s, i cant say due to lack of samples to test.

Security issue exists since: b37d945dd4

Reported-by: Dale Curtis <dalecurtis@google.com>
(Probably) Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 01:45:53 +02:00
Michael Niedermayer 9e9b5159e9 mpegvideo_enc: reduce QMAT_SHIFT to avoid overflow in dnxhd
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 19:43:31 +02:00
Diego Biurrun 6c5b0517e0 h264_refs: Fix debug tprintf argument types 2012-09-27 19:10:10 +02:00
Diego Biurrun 80412997c8 golomb: const correctness for get_ue()/get_se() function arguments 2012-09-27 19:10:10 +02:00
Diego Biurrun e00215040a get_bits: const correctness for get_bits_trace()/get_xbits_trace() arguments 2012-09-27 19:10:10 +02:00
Michael Niedermayer 7e9830d123 dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
This should fix the utvideoenc valgrind failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 16:43:39 +02:00
Michael Niedermayer e760424ddd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  nutdec: const correctness for get_v_trace/get_s_trace function arguments
  truemotion2: Request samples for old TM2 headers
  rtpdec: Remove a useless ff_ prefix from a static symbol
  rtpdec: Support depacketizing speex
  rtpenc: Add support for packetizing speex

Conflicts:
	libavformat/rtpdec.c
	libavformat/sdp.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 14:29:03 +02:00
Diego Biurrun 4e5b7f31f7 dwt: Drop unused functions spatial_compose{53|97}i() 2012-09-27 12:08:09 +02:00
Diego Biurrun 0ae3ba8daa avcodec: Drop long-deprecated imgconvert.h header 2012-09-27 12:02:33 +02:00
Andrew D'Addesio 2a3d82ab46 Add Opus codec id and codec description.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-27 10:48:35 +02:00
Diego Biurrun 2dc1310484 truemotion2: Request samples for old TM2 headers 2012-09-26 19:10:13 +02:00
Michael Niedermayer 3b92075e6c Revert "arm/h264: fix overreads in h264_chroma_mc8-and-h264_chroma_mc4"
This reverts commit d25f87f517.

This breaks decoding of some h264 files
I have tested the original patch with fate but by mistake have
forgotten to specify the fate samples so testing was limited to
the internal regression tests.
2012-09-26 17:31:25 +02:00
Michael Niedermayer 55a6f705ac ffv1dec: support decoding older 1.3 bitstream variant
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 17:04:29 +02:00
Michael Niedermayer ff0c628268 ffv1:update copyright year
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 17:00:15 +02:00
Michael Niedermayer ae0449314c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  xsub: feed init_get_bits the whole buffer
  libfdk-aac: Allow setting VBR modes via a private option
  libfdk-aac: Warn the user that the VBR modes are unsupported
  Revert "cbrt_tablegen: Include libm.h"

Conflicts:
	libavcodec/xsubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 13:51:39 +02:00
Michael Niedermayer f75c5f07a9 diracyasm: fix win64
Fixes Ticket1412

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 01:56:01 +02:00
Michael Niedermayer 5fe808578c libx264: fix open GOP
Found-by: relaxed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 01:56:01 +02:00
Michael Niedermayer c5e2347373 mlpdec: supress layout mismatch warnings for 2 ch upmixed mono
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 22:45:52 +02:00
Michael Niedermayer eda5db6bd1 mlpdec: discard a 2nd substream if the stream is mono
This fixes the rest of Ticket1726

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 22:36:45 +02:00
Michael Niedermayer 2a672652bb mlp_parser: dont override existing channel geometry.
This prevents race conditions
And partly fixes Ticket1726

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 22:35:26 +02:00
Alexandre Colucci 92d2b909a0 xsub: feed init_get_bits the whole buffer
Do not use rlelen field for buffer size in init_get_bits, it is
only the size of the data for the first field.
Since it is not reliable, just use the size of the whole buffer.

Additional comments add removal of unused rlelen variable by
Reimar Döffinger.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-25 22:28:53 +02:00
bruce-wu d25f87f517 arm/h264: fix overreads in h264_chroma_mc8-and-h264_chroma_mc4
Fixes Ticket1227
2012-09-25 20:09:30 +02:00
Martin Storsjö 375bff7084 libfdk-aac: Allow setting VBR modes via a private option
This avoids using the global_quality field and QSCALE flag for
passing the VBR modes, since the value range of the global_quality
field doesn't really map cleanly to this codec's VBR modes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-25 20:51:47 +03:00
Martin Storsjö a10190dcd8 libfdk-aac: Warn the user that the VBR modes are unsupported
These modes were not originally exposed by the library at all.
In practice, only a few of them work for each sample rate/profile
combination, and they don't work at all for the more uncommon
sample rates.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-25 20:51:46 +03:00