1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-23 18:01:50 +02:00
Commit Graph

21686 Commits

Author SHA1 Message Date
Michael Niedermayer
cf5f4c5169 aacsbr: check sample_rate before using it, fix division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-20 04:04:30 +01:00
Michael Niedermayer
aed128f07d 4xmdec: fix integer overflow, null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-20 03:00:22 +01:00
Peter Ross
ed27ed9f4f iff: DEEP RLE 32-bit decoder
Fixes ticket #1046.

Signed-off-by: Peter Ross <pross@xvid.org>
2012-11-20 09:49:49 +11:00
Bojan Zivkovic
a74ae4691a mips: Optimization of AC3 FP encoder and EAC3 FP decoder
Signed-off-by: Bojan Zivkovic <bojan@mips.com>
Reveiwed-by: Vitor Sessak <vitor1001@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 22:24:44 +01:00
Michael Niedermayer
ebf4750200 pthreads: increase MAX_BUFFERS due to 24c043c98e
This might fix a hypothetical memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 17:32:13 +01:00
Piotr Bandurski
1b20877f34 vble: remove superfluous braces
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 15:36:20 +01:00
Michael Niedermayer
e6d81ce22e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: h264_intrapred: Fix C function names in comments
  x86: SPLATD: port to cpuflags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 14:24:20 +01:00
Michael Niedermayer
4116151a4b Merge commit '1c5805521c3e406886341d752ebf38f8d41e1d13'
* commit '1c5805521c3e406886341d752ebf38f8d41e1d13':
  PGS subtitles: Set AVSubtitle pts value
  configure: Refactor CPPFLAGS settings for glibc/uclibc
  configure: add basic support for ARM AArch64
  build: set -U__STRICT_ANSI__ for newlib

Conflicts:
	configure
	libavcodec/pgssubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 14:05:41 +01:00
Michael Niedermayer
fdbb6164a2 sbr: increase f_tablelim size, it appears it was too small by 1.
Prevent out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 13:09:02 +01:00
Michael Niedermayer
ba353436a3 h264: dont stop parsing NALs without cleanup on DPC.
Fixes a deadlock with frame threads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 04:08:11 +01:00
Piotr Bandurski
45d8537ccf vble: do not abort when version is not 1
Fixes ticket #1923.

Reviewed-by: Derek Buitenhuis
2012-11-19 01:55:51 +01:00
Michael Niedermayer
24c043c98e mpegvideo: increase MAX_PICTURE_NUMBER.
avoid abort().

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 01:38:06 +01:00
Piotr Bandurski
ade9960fc6 avrndec: support lowres for mjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-19 00:42:39 +01:00
Michael Niedermayer
e8fed4d331 error concealment: check that references are frames and not fields.
frames cant have field references.
Fixes a deadlock

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 23:02:46 +01:00
Michael Niedermayer
8a03a60b4a h264: Check gray scale CBP, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 23:02:46 +01:00
Paul B Mahol
0df7d95a5e pcmenc: remove dead increment
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-18 21:12:25 +00:00
Paul B Mahol
6557c46d91 pcm: move i into for loop to avoid { } inside switch statement
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-18 20:45:03 +00:00
Michael Niedermayer
36cf247e43 ff_h264_direct_ref_list_init: fix B slice check.
Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 19:10:57 +01:00
Paul B Mahol
9f02d4ed0f mjpegenc: yuvj444p support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-18 17:46:45 +00:00
Diego Biurrun
89923fce70 x86: h264_intrapred: Fix C function names in comments
Function names changed after switching to declaration with
PRED4x4/8x8/8x8L/16x16 macros in the C code.
2012-11-18 18:34:05 +01:00
John Stebbins
1c5805521c PGS subtitles: Set AVSubtitle pts value
pts should be that of the packet containing the presentation segment.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-18 18:34:05 +01:00
Diego Biurrun
87af05c575 x86: SPLATD: port to cpuflags 2012-11-18 18:34:05 +01:00
Michael Niedermayer
d6c184880e h264: correct ref count check and limit, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 16:47:29 +01:00
Michael Niedermayer
2d5f1addbe h264: fix integer overflow, assert failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 16:47:29 +01:00
Michael Niedermayer
1a947dfa83 ff_mpeg_update_thread_context: assert context unequality
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 16:47:29 +01:00
Piotr Bandurski
4413a8428a iff: decode HAM8 images with masking correctly.
Fixes ticket #967.

Reviewed-by: Peter Ross
2012-11-18 15:48:22 +01:00
Michael Niedermayer
4fecc3cf09 h264: Skip odd NALs in extradata, prevent undefined behavior
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 14:26:58 +01:00
Michael Niedermayer
dab19048a1 mjpegdec: reset h/v_count, fix assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 06:00:44 +01:00
Paul B Mahol
e3edee6d2f eamad: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-17 20:28:52 +00:00
Michael Niedermayer
845724c82c vcr1: check if dimensions are supported, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 20:43:56 +01:00
Paul B Mahol
9ba41ae63e PCM signed 16-bit big-endian planar decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-17 19:30:08 +00:00
Paul B Mahol
467dfd5dfa PCM signed 24-bit/32-bit little-endian planar decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-17 19:09:43 +00:00
Michael Niedermayer
63ac64864c eamad: fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 16:27:18 +01:00
Michael Niedermayer
8ad9b48c9b xxan: check ybuf index before use.
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 04:45:56 +01:00
Michael Niedermayer
774830050a cook: check subbands more completely, fix out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 03:43:17 +01:00
Michael Niedermayer
84281d111c ff_mpeg4videodec_static_init: fix return type
Fixes CID743439
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 02:31:11 +01:00
Michael Niedermayer
31fce39942 tm2: check for invalid vlcs, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 02:09:56 +01:00
Michael Niedermayer
6535d81d87 g723_1dec: Fix lsp2lpc() so it can handle values at the ends of the table.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 21:36:44 +01:00
Michael Niedermayer
2207ea44fb ff_emulated_edge_mc: fix integer anomalies, fix out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 21:33:52 +01:00
Michael Niedermayer
c2cbc80ae9 ffv1enc: consider 2pass float rounding, fix loop
Found-by: "Peter B." <pb@das-werkstatt.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 17:01:13 +01:00
Michael Niedermayer
ff3b59c848 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: port to cpuflags
  crc: av_crc() parameter names should match between .c, .h and doxygen
  avserver: replace av_read_packet with av_read_frame
  avserver: fix constness casting warnings

Conflicts:
	libavcodec/x86/dsputil.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 13:23:35 +01:00
Janne Grunau
e6160bda98 h264: Fix parameters to ff_er_add_slice() call
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.

CC: libav-stable@libav.org
2012-11-16 13:18:28 +01:00
Janne Grunau
60b6b8c019 h264: always check ref_count for validity
Fixes a crash with zuffed files.
2012-11-16 13:18:28 +01:00
Diego Biurrun
8c3849bc76 x86: dsputil: port to cpuflags 2012-11-16 10:38:23 +01:00
Michael Niedermayer
68def00a63 rv34: check image size before using it
fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 05:16:34 +01:00
Michael Niedermayer
7845f8d282 vc1dec: do not allow field_mode to change after the first header
Fixes out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 04:58:46 +01:00
Michael Niedermayer
e31b1938ac zmbv: avoid use of uninitialized data
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 20:58:36 +01:00
Michael Niedermayer
c2409a7c5b vmdav: more complete check for block_align, prevent out of array access.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 20:58:36 +01:00
Michael Niedermayer
ea3eaa37b1 flashsv: only realloc blocks for version 2
Fixes 10l regression introducing a memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 20:58:35 +01:00
Paul B Mahol
eca2eb2dfa pcm: give more descriptive name to codec
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-15 16:04:35 +00:00
Michael Niedermayer
c0d68be555 pgssubdec: check RLE size before copying. Fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 16:46:51 +01:00
Michael Niedermayer
bc08ca841e flashsv: reallocate block array independant of frame type.
Fixes NULL pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 16:46:42 +01:00
Michael Niedermayer
62006b539d ituh263dec: more complete w/h check.
Fixes a division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 02:44:03 +01:00
Michael Niedermayer
caa2fa2c69 rv10: always check image size not just in some cases.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 02:17:26 +01:00
Michael Niedermayer
12eb2fd539 dxa: dont try to use the previous frame if there is none.
Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 00:43:30 +01:00
Michael Niedermayer
e70144cba1 bink: check quant_index, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 23:54:00 +01:00
Xi Wang
b74dbdd5e9 bgmc: Fix av_malloc checks in ff_bgmc_init()
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-14 23:03:36 +01:00
Michael Niedermayer
612ecfbbbb gifdec: check ff_lzw_decode_init() return value, fix out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 23:00:11 +01:00
Michael Niedermayer
50f0a6b4e6 wmaprodec: check num_sfb for validity. Fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 21:15:08 +01:00
Michael Niedermayer
30bce34b67 vpriv_adx_decode_header: avoid underreading the array.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 19:16:08 +01:00
Michael Niedermayer
ab8517b891 vc1dec: require a minimum of 2x2 for the edge pos. Avoid assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 19:16:08 +01:00
Michael Niedermayer
ccce723c6d vc1dec: check first field slices, fix out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 17:35:01 +01:00
Michael Niedermayer
a1b5c9634e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: mmx2 ---> mmxext in asm constructs

Conflicts:
	libavcodec/x86/h264_chromamc_10bit.asm
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264dsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 12:34:30 +01:00
Michael Niedermayer
d4e74d5d6d Remove deprecation of avcodec_get_chroma_sub_sample.
Add explanations what the difference between the 2 functions are and
when either should be used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 12:04:39 +01:00
Michael Niedermayer
e13d5e9a4b Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2'
* commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2':
  x86: h264_weight_10bit: port to cpuflags
  libtheoraenc: add missing pixdesc.h header
  avcodec: remove ff_is_hwaccel_pix_fmt
  pixdesc: add av_pix_fmt_get_chroma_sub_sample
  hlsenc: stand alone hls segmenter

Conflicts:
	doc/muxers.texi
	libavcodec/ffv1enc.c
	libavcodec/imgconvert.c
	libavcodec/mpegvideo_enc.c
	libavcodec/tiffenc.c
	libavformat/Makefile
	libavformat/allformats.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 11:59:20 +01:00
Michael Niedermayer
66ff90f4a3 8bps: check index against buffer size before reading line length pointer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 03:34:01 +01:00
Michael Niedermayer
7acee6654c mpeg12data: increase size of ff_mpeg1_default_intra_matrix to prevent harmless overreads from crashing
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 03:17:52 +01:00
Michael Niedermayer
e1631f8ebe aasc: check before reading the first 4 byte, fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 03:03:35 +01:00
Michael Niedermayer
39c5cd601e vmnc: check input size before reading chunk header, fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 02:51:38 +01:00
Diego Biurrun
26301caaa1 x86: mmx2 ---> mmxext in asm constructs 2012-11-14 00:58:51 +01:00
Diego Biurrun
da39cac8de Drop broken and unused CABAC test program. 2012-11-14 00:36:17 +01:00
Michael Niedermayer
2f74f8d7dc imc: sanity check scalefactors.
This fixes undefined behavior

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 00:03:42 +01:00
Michael Niedermayer
001af703c6 alac: check channel count more completely, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 22:08:09 +01:00
Michael Niedermayer
b119133136 avrndec: calculate true_height only when used.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 22:03:21 +01:00
Michael Niedermayer
7373b3ad04 pcmdec: consistently use codec_id, fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 21:45:53 +01:00
Michael Niedermayer
7c76eaeca2 mpeg4video_parser: init static tables before use, fix nulll ptr deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 19:21:59 +01:00
Michael Niedermayer
1bd024ec77 mpeg4videodec: split static decoder table init out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 19:20:59 +01:00
Diego Biurrun
5e9c6ef8f3 x86: h264_weight_10bit: port to cpuflags 2012-11-13 19:07:09 +01:00
Michael Niedermayer
c74cd99986 rv10: consider B frames in low delay streams invalid.
Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 18:00:00 +01:00
Luca Barbato
83f9ed42ec libtheoraenc: add missing pixdesc.h header
Was left out from c1a02e884a.
2012-11-13 17:42:13 +01:00
Michael Niedermayer
a0212ecf84 dcadec: check layout & channel count for consistency.
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 17:33:38 +01:00
Luca Barbato
cc085993f4 avcodec: remove ff_is_hwaccel_pix_fmt
It is used only in one place and is unlikely it would be needed
elsewhere.
2012-11-13 16:21:47 +01:00
Luca Barbato
c1a02e884a pixdesc: add av_pix_fmt_get_chroma_sub_sample
Deprecate avcodec_get_chroma_sub_sample.
2012-11-13 16:14:55 +01:00
Paul B Mahol
1acd2f6ba7 Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
Also remove it in once case when it is not needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-13 13:21:21 +00:00
Michael Niedermayer
e97a24109c avcodec.h: update audioconvert.h header after rename
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 13:30:52 +01:00
Stefano Sabatini
8cb76ef275 lavc/libtheoraenc: return proper error codes 2012-11-13 11:37:48 +01:00
Michael Niedermayer
7eb40d85f2 Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b'
* commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b': (21 commits)
  jvdec: set channel layout
  iss: set channel layout
  ipmovie: set channel layout
  iff: set channel layout
  idroqdec: set channel layout
  gxfdec: set channel layout when applicable
  gsmdec: set channel layout
  flvdec: set channel layout
  dv: set channel layout
  dsicin: set channel layout
  daud: set channel layout
  cdxl: set channel layout
  bmv: set channel layout
  bink: set channel layout
  bfi: set channel layout
  bethsoftvid: set channel layout
  apc: set channel layout
  amr: set channel_layout
  ppc: replace pointer casting with AV_COPY32
  ppc: fix some unused variable warnings
  ...

Conflicts:
	libavformat/amr.c
	libavformat/iff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 10:55:07 +01:00
Michael Niedermayer
d8a1eb11b7 wavpack: check the blocks sample count, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 01:13:07 +01:00
Michael Niedermayer
580021cfc4 wavpack: check ch_offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 01:11:59 +01:00
Michael Niedermayer
e9cb533fbb flashv: check if keyframe is available, fix null deref.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 00:22:24 +01:00
Michael Niedermayer
4b2f696d6e flashv: use avcodec_set_dimensions()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 00:21:45 +01:00
Michael Niedermayer
0a373c31cb svq1dec: dont export the qscale table.
SVQ1 has no qscales so the table is of no use, and it triggers a bug as
SVQ1 does not maintain the size of the table properly causing a crash.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 23:01:42 +01:00
Michael Niedermayer
7ab690bf5f indeo4: more complete check for the scan vs block sizes.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 23:01:42 +01:00
Clément Bœsch
7581ad24a9 lavc/aac: fix shared build failures with MSVC.
This is a workaround until a better solution is found.
2012-11-12 22:28:57 +01:00
Michael Niedermayer
0e239b22db xan: check size_segment before reading, fixes out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 20:50:13 +01:00
Michael Niedermayer
a9456c7c5c mjpegdec: tighten unescaped_buf_size size check, prevent null ptr deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 20:27:57 +01:00
Michael Niedermayer
d1493d2ce5 theora: check that pix fmt is valid, fix null ptr deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 18:12:17 +01:00
Michael Niedermayer
9eef41b848 lagarith: always allocate for 4 planes. Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 18:05:08 +01:00
Michael Niedermayer
c433823750 4xmdec: test version for cfrms, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 14:56:33 +01:00
Michael Niedermayer
be818df547 wavpack: fix out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 14:43:05 +01:00
Paul B Mahol
0cbb31a264 adpcm: reindent after previous commit
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-12 11:46:22 +00:00
Paul B Mahol
e8a9b1a1a0 adpcm: ADPCM IMA SMJPEG stereo decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-12 11:46:22 +00:00
Paul B Mahol
0baec57d09 anm: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-12 11:46:12 +00:00
Michael Niedermayer
4d60e5051e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  binkaudio: set channel layout

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 12:18:58 +01:00
Michael Niedermayer
03b078721c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88'
* commit '97bf7c03b1338a867da52c159a2afecbdedcfa88':
  doc: git-howto: Leave reviewers time to react before pushing patches
  Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
  lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/git-howto.texi
	ffmpeg_filter.c
	libavcodec/flacdec.c
	libavcodec/imc.c
	libavcodec/mpegaudiodec.c
	libavcodec/utils.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffer.c
	libavutil/Makefile
	libavutil/audioconvert.h
	libavutil/channel_layout.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 11:32:11 +01:00
Mans Rullgard
a384f6a7f7 ppc: replace pointer casting with AV_COPY32
This removes warnings about strict aliasing violations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Mans Rullgard
031aac9861 ppc: fix some unused variable warnings
The third argument of OP_U8_ALTIVEC is evaluated at most once so
there is no need for a potentially unused temporary variable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:31:31 +00:00
Michael Niedermayer
da501ea857 Merge commit '802713c4e7b41bc2deed754d78649945c3442063'
* commit '802713c4e7b41bc2deed754d78649945c3442063':
  mss2: prevent potential uninitialized reads
  mss2: reindent after last commit
  mss2: fix handling of unmasked implicit WMV9 rectangles
  configure: add lavu dependency to lavr/lavfi .pc files
  x86inc: Set program_name outside of x86inc.asm

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 10:57:06 +01:00
Justin Ruggles
faf340f60c binkaudio: set channel layout 2012-11-12 00:41:02 -05:00
Michael Niedermayer
3a04c18d89 vc1dec: prevent null ptr dereferences.
The added checks are in line with existing checks but should
probably be replaced by more advanced error concealment at some
point.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 01:43:12 +01:00
Michael Niedermayer
8e749733c1 vc1dec: factorize srcU/V offseting out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 01:43:12 +01:00
Michael Niedermayer
b5f4836f8c vc1: check image height, fix division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 01:43:12 +01:00
Michael Niedermayer
8824a9ed22 mpeg12: clean current picture ptr.
This avoids having a stray pointer left that may not represent the current picture
and state.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 01:43:11 +01:00
Michael Niedermayer
c871244306 proresdec: check input size before reading qmats, prevent overreading.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 20:52:01 +01:00
Diego Biurrun
2b479bcab0 build: Drop AVX assembly ifdefs
An assembler able to cope with AVX instructions is now required.
2012-11-11 20:43:28 +01:00
Michael Niedermayer
7faa17764a dsicinav: update bitmap_frame_size, avoid out of array reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 19:47:01 +01:00
Justin Ruggles
a903f8f087 Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Michael Niedermayer
26452e24ed snow: fix edge emu switch
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 19:02:31 +01:00
Michael Niedermayer
b7b7e2348c msmpeg4dec: check w/h, prevent assert failure later
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 18:46:22 +01:00
Michael Niedermayer
44c23aa1b8 zmbvdec: check decompression buffer size.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 18:09:11 +01:00
Michael Niedermayer
3ba58433e1 diracdec: check wavelet depth, prevent out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 17:20:36 +01:00
Michael Niedermayer
8c4145343d libvorbisdec: dont try to update an empty que
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 16:43:53 +01:00
Michael Niedermayer
0a4087b893 diracdec: Use only one frame per reference
Prevents null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 16:43:53 +01:00
Alberto Delmás
802713c4e7 mss2: prevent potential uninitialized reads
The alternative to zeroing on init is setting the corrupted flag in
all cases where pal_pic is not fully written, at the cost of added
complexity.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-11-11 16:07:50 +01:00
Kostya Shishkov
6d93308c0c mss2: reindent after last commit 2012-11-11 16:07:42 +01:00
Alberto Delmás
b077eb0780 mss2: fix handling of unmasked implicit WMV9 rectangles
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-11-11 16:07:36 +01:00
Michael Niedermayer
039f4ff4c2 h264: 2nd try at getting sm2v working
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 12:50:03 +01:00
Michael Niedermayer
def8588fb5 dwt_yasm/vertical_compose: fix width witdth argument.
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 12:41:35 +01:00
Michael Niedermayer
bec37935ec Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: h264_qpel_10bit: drop unused parameter from MC10/MC20/MC30 macros

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 12:18:05 +01:00
Paul B Mahol
c1947015b2 smackaud: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-11 10:05:20 +00:00
Paul B Mahol
2a374f06c4 targa: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-11 09:44:36 +00:00
Michael Niedermayer
7dab48bb73 diracdec: allocate enough space for blocks
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 04:01:39 +01:00
Michael Niedermayer
dca2fa10d3 diracdec: fix edge emulation check, fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 03:34:40 +01:00
Michael Niedermayer
991f6bf93d h264: Support SMV2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 02:51:23 +01:00
Michael Niedermayer
a39d36146a h264_refs: Print default in case we are missing a reference.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 02:51:23 +01:00
Michael Niedermayer
1f41cffe1e mjpegdec: check SE.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 01:19:44 +01:00
Michael Niedermayer
a1e093a6fb alac: fix bps check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 21:54:30 +01:00
Nedeljko Babic
304a1ed1e8 mips: Add dependencies on HAVE_INLINE_ASM
Add dependencies on HAVE_INLINE_ASM for files and parts of code
 where it is necessary.

Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Reviewed-by: Vitor Sessak <vitor1001@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 19:55:54 +01:00
Michael Niedermayer
2d71f31df2 lag_read_prob_header: fix out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 19:39:05 +01:00
Michael Niedermayer
b53f89710b alac: Check channel indexes more completely, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 18:22:47 +01:00
Michael Niedermayer
3920d13878 alac: fix integer overflow leading to subsequent out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 17:42:35 +01:00
Michael Niedermayer
fd4f4923cc alac: fix nb_samples < order case
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 17:14:04 +01:00
Diego Biurrun
6cd796049d x86: h264_qpel_10bit: drop unused parameter from MC10/MC20/MC30 macros 2012-11-10 14:49:09 +01:00
Michael Niedermayer
2ce64413e2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: PALIGNR: port to cpuflags
  x86: h264_qpel_10bit: port to cpuflags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 12:44:39 +01:00
Peter Ross
8b67ec77f0 pictordec: fill any unset portion of the image
Fixes ticket #1710

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 02:02:35 +01:00
Michael Niedermayer
dab70c62d2 ivi_common: check ref_tile size, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-10 01:52:14 +01:00
Michael Niedermayer
a93c7ca6ef ivi_common: more MV Checks, fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 23:39:41 +01:00
Diego Biurrun
4b60fac419 x86: PALIGNR: port to cpuflags 2012-11-09 21:31:31 +01:00
Michael Niedermayer
98b377004d twinvq: make ibps check unsigned
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 21:22:12 +01:00
Diego Biurrun
4d1f69f244 x86: h264_qpel_10bit: port to cpuflags 2012-11-09 21:17:05 +01:00
Michael Niedermayer
2fbb37b51b iff/ilbm: check remaining buffer size.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 21:06:01 +01:00
Michael Niedermayer
b8551f8ea7 pcmdec: check that channels is valid.
Prevents a division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 21:06:01 +01:00
Michael Niedermayer
ac7ff0963b aacdec: fix temporary array size
Avoids out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 21:05:43 +01:00
Michael Niedermayer
623cfc93d9 pngdec: check that format matches too not just dimensions
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 19:59:05 +01:00
Michael Niedermayer
02a325cb6f tiffdec: check rps, fix infinite loop.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 19:28:57 +01:00
Michael Niedermayer
b8dc5f8bb3 twinvq: check bitrate for validity avoid division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 18:46:17 +01:00
Michael Niedermayer
fb6a72cde5 iff: avoid out of array reads, due to too many planes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 17:47:51 +01:00
Michael Niedermayer
9195377bc5 vp56dec: Fix handling of alpha configuration changes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 17:03:47 +01:00
Michael Niedermayer
4c6e7c2d4d ivi_common: dont dereference null pointers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 14:17:42 +01:00
Michael Niedermayer
13451f5520 atrac3dec: Check coding mode against channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 13:26:20 +01:00
Michael Niedermayer
5ee008e01d qdm2: check that coding_method is valid before using it.
Fixes out of array reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 13:13:50 +01:00
Michael Niedermayer
909a18f73b mjpegbdec: dont return a picture when there is no picture.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 12:44:26 +01:00
Michael Niedermayer
6d1c5ea04a tiffdec: check count in metadata reading.
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 12:14:28 +01:00
Michael Niedermayer
ce1ebb31a9 tiffdec: use checked reads for tget*()
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 12:05:03 +01:00
Michael Niedermayer
1b5a6d3c49 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flacenc: ensure the order is within the min/max range in LPC order search
  avconv: rescale packet duration to muxer time base when flushing encoders
  add 24-bit FLAC encoding to Changelog
  rtpenc_aac: Fix calculation of the header size
  x86: h264_intrapred: port to cpuflags

Conflicts:
	Changelog
	libavformat/rtpenc_aac.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 10:29:51 +01:00
Justin Ruggles
3a2731cbd3 flacenc: ensure the order is within the min/max range in LPC order search
This fixes use of uninitialized values when the FLAC encoder uses the
2-level, 4-level, and 8-level search methods. Fixes failure of the
fate-flac-24-comp-8 test when run using valgrind.
2012-11-08 13:57:34 -05:00
Michael Niedermayer
3affcc99a8 frame_thread_encoder: silence integer to pointer without cast warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-08 18:25:24 +01:00
Diego Biurrun
6ca60d4ddd x86: h264_intrapred: port to cpuflags 2012-11-08 18:05:23 +01:00
Michael Niedermayer
4a28962454 libopencore-amr: fix av_log() argument
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-08 15:46:51 +01:00
Michael Niedermayer
bc17a6f5c0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libvpxenc: Allow enabling constrained quality (CQ) mode

Conflicts:
	configure
	libavcodec/libvpxenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-08 08:07:05 +01:00
James Zern
12776d5d2a libvpxenc: Allow enabling constrained quality (CQ) mode
The CQ mode was introduced in libvpx 0.9.6.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 00:01:54 +02:00
Michael Niedermayer
4d2f83f8ac gsm_parser: fix infinite loop
Fixes Ticket1894
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 18:08:23 +01:00
Paul B Mahol
08101e62cb adpcm: improve smjpeg decoding
Previous version had significant artifacts.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-07 13:03:50 +00:00
Michael Niedermayer
fdfbb793c3 ffv1dec: propagate return code from ffv1_common_init()
Fixes Ticket1824
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 13:27:01 +01:00
Michael Niedermayer
dd11615bbc ffv1dec: more completely check slice count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 13:26:37 +01:00
Michael Niedermayer
cb395929e3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libopencore-amr: Check the return value of amr_decode_fix_avctx

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 10:26:40 +01:00
Michael Niedermayer
de0aa9e5a4 kgv1dec: fix end condition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 01:51:24 +01:00
Martin Storsjö
ad961726dc libopencore-amr: Check the return value of amr_decode_fix_avctx
This allows getting rid of redundant checks later in the codec
specific init functions.

Move the check to before actually initializing the decoder lib,
to simplify error handling.

This fixes a case of returning a value from a void function, present since
d40dab907.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-07 00:48:50 +02:00
Paul B Mahol
4744f67d4f wavpack: check if number of samples is not too big
Wavpack format documentation mentions that 131072 is
max number of samples.

This fixes huge memory allocations in sample from ticket #1889.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-06 16:15:19 +00:00
Paul B Mahol
0fe8c9f458 wavpack: use more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-06 12:56:44 +00:00
Michael Niedermayer
6493842900 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  FATE: add a 24-bit FLAC encoding test
  FATE: rename FLAC tests from flac-* to flac-16-*
  flacenc: use RICE2 entropy coding mode for 24-bit
  flacenc: add 24-bit encoding
  flacdsp: move lpc encoding from FLAC encoder to FLACDSPContext

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 23:01:34 +01:00
Michael Niedermayer
7d26be63c2 Merge commit '5ff998a233d759d0de83ea6f95c383d03d25d88e'
* commit '5ff998a233d759d0de83ea6f95c383d03d25d88e':
  flacenc: use uint64_t for bit counts
  flacenc: remove wasted trailing 0 bits
  lavu: add av_ctz() for trailing zero bit count
  flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
  fate: aac: Place LATM tests and general AAC tests in different groups
  build: The A64 muxer depends on rawenc.o for ff_raw_write_packet()

Conflicts:
	doc/APIchanges
	libavutil/version.h
	tests/fate/aac.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 22:51:20 +01:00
Michael Niedermayer
e859339e7a Merge commit '930e26a3ea9d223e04bac4cdde13697cec770031'
* commit '930e26a3ea9d223e04bac4cdde13697cec770031':
  x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled
  x86: PABSW: port to cpuflags
  x86: vc1dsp: port to cpuflags
  rtmp: Use av_strlcat instead of strncat

Conflicts:
	libavcodec/x86/h264_qpel.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 22:36:05 +01:00
Paul B Mahol
10ac70d249 avrndec: use more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-05 20:47:22 +00:00
Paul B Mahol
efbe162f7d cljr: use meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-05 20:47:13 +00:00
Justin Ruggles
5ff998a233 flacenc: use uint64_t for bit counts
Needed to avoid integer overflows for 24-bit encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles
e783316322 flacenc: remove wasted trailing 0 bits 2012-11-05 15:32:30 -05:00
Justin Ruggles
2e76f34387 flacenc: use RICE2 entropy coding mode for 24-bit 2012-11-05 15:32:30 -05:00
Justin Ruggles
13e1ee6c84 flacenc: add 24-bit encoding 2012-11-05 15:32:30 -05:00
Justin Ruggles
799e232490 flacdsp: move lpc encoding from FLAC encoder to FLACDSPContext
Also, templatize the functions for 16-bit and 32-bit sample range. This will
be used for 24-bit FLAC encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles
6a744d2619 flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
This is much faster than calculating the MD5 one sample at a time.
2012-11-05 15:32:29 -05:00
Diego Biurrun
930e26a3ea x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled
This fixes compilation with --disable-everything and components enabled.
2012-11-05 20:48:43 +01:00
Piotr Bandurski
8d88920578 dpcm: use AV_LOG_ERROR for error message. 2012-11-05 17:44:24 +01:00
Diego Biurrun
dbb37e7711 x86: PABSW: port to cpuflags 2012-11-05 14:51:10 +01:00
Diego Biurrun
6c104826bd x86: vc1dsp: port to cpuflags 2012-11-05 14:51:10 +01:00
Michael Niedermayer
f4aaf987a5 frame_thread_encoder: fix handling of case where the encoder does not output a packet.
This case could cause a deadlock

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 13:30:08 +01:00
Carl Eugen Hoyos
c673ef1288 Write tiff tag YCbCrPositioning if chroma_sample_location is top-left. 2012-11-05 04:43:17 +01:00
Paul B Mahol
cc5bcaa48e pnm: cosmetics: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 23:35:09 +00:00
Paul B Mahol
ae5ecb8e60 pnm: remove duplicated check for maxval > 255
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 23:33:17 +00:00
Paul B Mahol
a0348d0966 pnm: remove nonsense code
If maxval is more than 255 than each value takes 2 bytes with most
significant byte first.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 23:17:12 +00:00
Michael Niedermayer
5eaeb4237b ivi_common: dc_transform is needed for intra
Fixes CID90582 CID90536
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 19:27:15 +01:00
Michael Niedermayer
712287ef45 ff_ac3_apply_rematrixing: set flags to NULL
This makes the code more robust

Related to CID703820
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 19:26:54 +01:00
Paul B Mahol
1b3dbe3f75 lcldec: fix decoding of uncompressed rgb24 sample
Sample from ticket #1216 does not use any compression but bitstream
claims it is. Reference decoder decodes sample just fine.

Fixes #1216.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 16:58:14 +00:00
Michael Niedermayer
a15adabdd3 aacsbr: fix integer overflow
Fixes CID603186
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 17:37:28 +01:00
Carl Eugen Hoyos
b5d496f3a4 Support new transparency colour-spaces with libopenjpeg.
Reviewed-by: Michael Bradshaw
2012-11-04 17:32:31 +01:00
Paul B Mahol
b0428741c6 indeo3: move get_buffer() above decode_plane() calls
This ensure that decode_plane() mmx code like AV_COPY64()
does not interfere with possible float instructions in
release_buffer/get_buffer.

Found-by: Carl Eugen Hoyos

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 14:42:32 +00:00
Michael Niedermayer
bbd7b46b94 sab_diamond_search: add assert to double check the minima_count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 13:00:20 +01:00
Michael Niedermayer
c9e4554329 cook: fix use of uninitialized variable
Fixes CID741418
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 01:03:52 +01:00
Stefano Sabatini
aa48446c9a lavc/xfaceenc: prefer do{}while() over for(){} construct in xface_encode_frame() loop
Slightly simplify readability, since the initial check is unnecessary.
2012-11-03 23:35:50 +01:00
Xidorn Quan
0ecef3a0ef amr_decode_fix_avctx should not return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 21:38:37 +01:00
Stefano Sabatini
0372ecfa48 lavc/options_table: force non-negative bitrate range
It does not make sense to set a negative bitrate.
2012-11-03 20:38:02 +01:00
Michael Niedermayer
930226cf52 crystalhd: fix missing braces warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 20:22:53 +01:00
Michael Niedermayer
37e81996dc Merge commit '9221efef7968463f3e3d9ce79ea72eaca082e73f'
* commit '9221efef7968463f3e3d9ce79ea72eaca082e73f':
  lavf: fix av_interleaved_write_frame() doxy.
  lavf: clarify the lifetime of demuxed packets.
  avconv: do not free muxed packet on streamcopy.
  crc: move doxy to the header
  vf_drawtext: do not use deprecated av_tree_node_size
  x86: Refactor PSWAPD fallback implementations and port to cpuflags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 14:24:11 +01:00
Michael Niedermayer
1885ffb03d Merge commit '9a07c1332cfe092b57b5758f22b686ca58806c60'
* commit '9a07c1332cfe092b57b5758f22b686ca58806c60':
  parser: Move Doxygen documentation to the header files
  PGS subtitles: Expose forced flag
  x86: PMINUB: port to cpuflags

Conflicts:
	libavcodec/avcodec.h
	libavcodec/pgssubdec.c
	libavcodec/version.h
	libavcodec/x86/ac3dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 14:13:45 +01:00
Michael Niedermayer
1dad486714 Merge commit '9ce02e14f01de50fcc6f7f459544b140be66d615'
* commit '9ce02e14f01de50fcc6f7f459544b140be66d615':
  x86: ac3dsp: port to cpuflags
  x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
  x86inc: Only define program_name if the macro is unset

Conflicts:
	libavcodec/x86/ac3dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 13:38:38 +01:00
Stefano Sabatini
1c755f7667 lavc/options_table: make "request_sample_fmt" an AV_OPT_TYPE_SAMPLE_FMT option
Simplify, increase robustness in case a new sample format is added.
2012-11-03 12:15:42 +01:00
Michael Niedermayer
d3dfe99bc5 libgsmdec: fix decoding of non 8khz gsm files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 00:50:22 +01:00
Michael Niedermayer
6e6033b793 gsmdec: fix decoding of non 8khz gsm files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 00:50:22 +01:00
Paul B Mahol
20ac916e6d indeo3: release buffer before calling decode_plane 2012-11-02 23:43:23 +00:00
Paul B Mahol
b02116cc4a Revert "Partly revert f174fba: indeo3 decoder does not support direct rendering."
f174fba did not introduce DR1 flag it was already available before that.

This reverts commit 8bf44d5c96.
2012-11-02 23:36:57 +00:00
Michael Niedermayer
4ad6ef00a2 libvo-amrwbenc: allow sampling rates other than 16khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer
b30f4510d8 libopencore-amr: allow sampling rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer
0aaf0a07d4 libopencore-amrdec: allow sampling rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer
2c1e9383a2 amrwbdec: allow sample rates other than 16khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer
d8aaec38fc amrnbdec: allow sample rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Paul B Mahol
f58f600c68 lclenc: make compression level user selectable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-02 22:14:14 +00:00
Heesuk Jung
25b7aa980b Fix bit_rate in MPEG1/2 Video
In ISO/IEC 13818-2, bit rate is differently determined according to video type

1) MPEG1 Video
 Bit_rate and vbv_delay are set to 3FFFF and FFFF respectively
 to indicate variable bitrate. Other values are for constant bitrate.
 VBV is only defined for constant bit rate operation.
 Ths STD supersedes the VBV model for vbr.

2) MPEG2 Video
 Even if the bitrate is constant, the value of bit_rate may not be the actual bitrate
 since bit_rate need only be an upper bound to that actual bitrate.
 VBV is only defined for variable bit rate operation.
 Constant bit rate is viewed as a special case of vbr.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 22:27:17 +01:00
Paul B Mahol
77d89a5b16 apedec: consume packet after it has been fully decoded
Timestamp handling of decoded frames are much simpler now.

Fixes #1675.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-02 19:44:49 +00:00
Diego Biurrun
0a7a94f2e5 x86: Refactor PSWAPD fallback implementations and port to cpuflags 2012-11-02 17:05:29 +01:00
Diego Biurrun
9a07c1332c parser: Move Doxygen documentation to the header files 2012-11-02 16:44:23 +01:00
John Stebbins
85f67c4865 PGS subtitles: Expose forced flag
Useful for detection of subtitles displayed during foreign language
scenes.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-02 16:13:35 +01:00
Diego Biurrun
26f01bd106 x86: PMINUB: port to cpuflags 2012-11-02 15:38:15 +01:00
Diego Biurrun
9ce02e14f0 x86: ac3dsp: port to cpuflags 2012-11-02 15:24:50 +01:00
Nicolas George
805b57001f lavc/pngdec: decode textual data (tEXt and zTXt).
Requested in trac ticket #1857.
2012-11-02 15:12:29 +01:00
Michael Niedermayer
8551c6bec0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dv1394: Swap the min and max values of the 'standard' option
  rtpdec_vp8: Don't parse fields that aren't used
  lavc: add some AVPacket doxy.
  audiointerleave: deobfuscate a function call.
  rtpdec: factorize identical code used in several handlers
  a64: remove interleaved mode.
  doc: Point to the new location of the c99-to-c89 tool
  decode_audio3: initialize AVFrame
  ws-snd1: set channel layout
  wmavoice: set channel layout
  wmapro: use AVCodecContext.channels instead of keeping a private copy
  wma: do not keep private copies of some AVCodecContext fields

Conflicts:
	libavcodec/wmadec.c
	libavcodec/wmaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:57:36 +01:00
Michael Niedermayer
6788350281 Merge commit '50a65e7a540ce6747f81d6dbf6a602ad35be77ff'
* commit '50a65e7a540ce6747f81d6dbf6a602ad35be77ff': (24 commits)
  vmdaudio: set channel layout
  twinvq: validate sample rate code
  twinvq: set channel layout
  twinvq: validate that channels is not <= 0
  truespeech: set channel layout
  sipr: set channel layout
  shorten: validate that the channel count in the header is not <= 0
  ra288dec: set channel layout
  ra144dec: set channel layout
  qdm2: remove unneeded checks for channel count
  qdm2: make sure channels is not <= 0 and set channel layout
  qcelpdec: set channel layout
  nellymoserdec: set channels to 1
  libopencore-amr: set channel layout for amr-nb or if not set by the user
  libilbc: set channel layout
  dpcm: use AVCodecContext.channels instead of keeping a private copy
  imc: set channels to 1 instead of validating it
  gsmdec: always set channel layout and sample rate at initialization
  libgsmdec: always set channel layout and sample rate at initialization
  g726dec: do not validate sample rate
  ...

Conflicts:
	libavcodec/dpcm.c
	libavcodec/qdm2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:20:33 +01:00
Michael Niedermayer
00aa7fa786 pcm: fix handling of more than 8 channels for planar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:00:23 +01:00
Michael Niedermayer
db9f426cab Merge commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03'
* commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03':
  dcadec: allow the decoder to change the channel layout mid-stream
  cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR
  cook: move samples_per_frame from COOKSubpacket to where it is used
  cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels()
  cook: reverse a condition so that the code makes more sense
  cook: remove unneeded COOKContext variable, sample_rate
  cook: remove unneeded COOKContext variable, bit_rate
  cook: use AVCodecContext.channels instead of keeping a private copy
  bmvaudio: set channel layout at init() rather than validating it
  atrac1: do not keep a copy of channel count in the private context
  dsicinaudio: set channels and channel layout
  g722dec: set channel layout at initialization instead of validating it
  amrwbdec: set channels, channel_layout, and sample_rate
  amrnbdec: set channels, channel_layout, and sample_rate
  dca_parser: allow the parser to change the sample rate
  lavc: check channel count after decoder init
  lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders

Conflicts:
	libavcodec/dcadec.c
	libavcodec/pcm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 13:43:57 +01:00
Anton Khirnov
0876c28080 lavc: add some AVPacket doxy. 2012-11-02 07:58:38 +01:00
Ilkka Ollakka
6d1270a0f9 decode_audio3: initialize AVFrame
Same fix and issue as in a25d912dca

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-01 19:43:05 +01:00
Justin Ruggles
5459848b14 ws-snd1: set channel layout 2012-11-01 11:30:04 -04:00
Justin Ruggles
f7b8506573 wmavoice: set channel layout 2012-11-01 11:30:04 -04:00
Justin Ruggles
50a65e7a54 vmdaudio: set channel layout 2012-11-01 11:29:19 -04:00
Justin Ruggles
002097a00b wmapro: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:19 -04:00
Justin Ruggles
b5f628e227 twinvq: validate sample rate code
A large invalid value could cause undefined behavior when left-shifted
by 8 later in the function.
2012-11-01 11:29:19 -04:00
Justin Ruggles
2ed40608e9 wma: do not keep private copies of some AVCodecContext fields
channels, sample_rate, bit_rate, and block_align can be used directly from
the AVCodecContext
2012-11-01 11:29:19 -04:00
Justin Ruggles
335826cf5f twinvq: set channel layout 2012-11-01 11:29:19 -04:00
Justin Ruggles
8cc72ce5a0 twinvq: validate that channels is not <= 0
This could occur due to integer overflow when reading the channel count from
the extradata.
2012-11-01 11:29:19 -04:00
Justin Ruggles
cebea00c8a truespeech: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles
523734eb6a sipr: set channel layout 2012-11-01 11:29:18 -04:00