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

21996 Commits

Author SHA1 Message Date
Michael Niedermayer
6ca2465556 ass_split_section: dont overread array
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 18:10:35 +01:00
Michael Niedermayer
3c5c6b9d61 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ivi_common: check that scan pattern is set before using it.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 16:05:12 +01:00
Michael Niedermayer
be26232efa Merge commit '07acdd651d1e2f4cfa5f610e616e70e323bb69cd'
* commit '07acdd651d1e2f4cfa5f610e616e70e323bb69cd':
  ivi_common: use proper logging context in ivi_decode_blocks().
  ivi_common: make some functions and tables static.
  asyncts: ignore min_delta only if first_pts is set

Conflicts:
	libavcodec/ivi_common.c
	libavcodec/ivi_common.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:56:56 +01:00
Michael Niedermayer
a01fe55077 Merge commit 'c0dc57f1264dad1e121772d03abdb9e14ed8857f'
* commit 'c0dc57f1264dad1e121772d03abdb9e14ed8857f':
  asyncts: merge two conditions
  x86inc: fully concatenate tokens to fix macro expansion for nasm
  h264: initialize frame-mt context copies properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:43:46 +01:00
Michael Niedermayer
2f265d9087 Merge commit '6a27ae28f9bde981e85c82cf5bf42c5f43fb6f13'
* commit '6a27ae28f9bde981e85c82cf5bf42c5f43fb6f13':
  mpegvideo: treat delayed pictures as used

Conflicts:
	libavcodec/h264.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:36:37 +01:00
Michael Niedermayer
86b4dc6277 Merge commit 'bd255f9feb4deea4c990e582f0ba3b90d7b64b4c'
* commit 'bd255f9feb4deea4c990e582f0ba3b90d7b64b4c':
  lavc: set frame parameters after decoding only if necessary

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:30:12 +01:00
Michael Niedermayer
3b5c0f5e36 h264: remove low_delay/has_b_frame setting code from nal loop
This code is now executed in h264_set_parameter_from_sps()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:22:19 +01:00
Michael Niedermayer
b9d887c225 Merge commit '072be3e8969f24113d599444be4d6a0ed04a6602'
* commit '072be3e8969f24113d599444be4d6a0ed04a6602':
  h264: set parameters from SPS whenever it changes
  asyncts: cosmetics: reindent

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:17:51 +01:00
Michael Niedermayer
593f5c0f3c Merge commit '8083332c2de9ee189f96844ff4c2d9be1844116f'
* commit '8083332c2de9ee189f96844ff4c2d9be1844116f':
  asyncts: use clipped delta value when setting resample compensation
  asyncts: fix flushing of final samples at EOF
  vp6: properly fail on unsupported feature

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 13:51:20 +01:00
Luca Barbato
f33b5ba63e vp56: release frames on error
Fixes CVE-2012-2783

CC: libav-stable@libav.org
2012-12-14 13:21:59 +01:00
Luca Barbato
bb675d3ac6 vp56: make parse_header return standard error codes
Returning 0 for failure is misleading.

CC: libav-stable@libav.org
2012-12-14 13:21:59 +01:00
Anton Khirnov
deabb52ab4 ivi_common: check that scan pattern is set before using it.
Fixes CVE-2012-2791.

CC: libav-stable@libav.org
2012-12-14 07:10:53 +01:00
Anton Khirnov
07acdd651d ivi_common: use proper logging context in ivi_decode_blocks(). 2012-12-14 07:10:48 +01:00
Anton Khirnov
8ab42021f2 ivi_common: make some functions and tables static. 2012-12-14 07:08:38 +01:00
Michael Niedermayer
a974adc3c7 g729dec: check pitch_delay_int.
Fix out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 01:13:21 +01:00
Michael Niedermayer
56d09250ef nuv: dont try to copy an empty frame
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 00:31:18 +01:00
Janne Grunau
6a27ae28f9 mpegvideo: treat delayed pictures as used
This requires to move the avcodec_default_free_buffers() call to
ff_MPV_common_end() since otherwise delayed pictures would get freed
during a size change.
2012-12-13 21:02:42 +01:00
Janne Grunau
bd255f9feb lavc: set frame parameters after decoding only if necessary
Direct rendering capable decoders call get_buffer() which will set the
frame parameters.

Prevents frames with wrong parameters when a decoder outputs delayed
frames after a resolution or pixel format change.
2012-12-13 21:02:42 +01:00
Janne Grunau
072be3e896 h264: set parameters from SPS whenever it changes
Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with
alternating bit depths.
2012-12-13 21:02:42 +01:00
Janne Grunau
0eae920c3c h264: initialize frame-mt context copies properly 2012-12-13 21:02:42 +01:00
Luca Barbato
be75fed975 vp6: properly fail on unsupported feature
Interlacing is not supported at all and mismanaged down the normal
codepaths causing possible buffer management issues.

CC: libav-stable@libav.org
2012-12-13 17:05:45 +01:00
Michael Niedermayer
eee8c94f50 cavsdec: check ff_get_buffer() return value
Fixes CID747721
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 14:32:58 +01:00
Michael Niedermayer
5cb080fa5e snowenc: check ff_get_buffer() return value
Fixes CID747722
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 14:26:03 +01:00
Michael Niedermayer
7effc26ba7 svq1enc: check ff_get_buffer() return value
Fixes CID747723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 14:20:24 +01:00
Michael Niedermayer
1818a1130d alsdec: propagate error codes in read_block()
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 13:59:15 +01:00
Michael Niedermayer
0213d5ad86 alsdec: make return checking for read_*_block_data() consistent
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 13:59:11 +01:00
Michael Niedermayer
79bfba14b7 alsdec: Use AVERROR_INVALIDDATA in read_const_block_data
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 13:58:52 +01:00
Nedeljko Babic
d7117138cf mips: ac3 downmix updated to the new data layout.
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 13:51:05 +01:00
Michael Niedermayer
9c0ec23c7d Merge commit '998fdcff41bbda8ef13c991743376556f910efa9'
* commit '998fdcff41bbda8ef13c991743376556f910efa9':
  lavc: replace some forgotten instances of PixelFormat with AVPixelFormat
  svq1: unmacroify macros used only once.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 11:53:15 +01:00
Michael Niedermayer
e7f255d89b Merge commit '95baf701db719ecad6b31000429e20eca2526ed6'
* commit '95baf701db719ecad6b31000429e20eca2526ed6':
  svq1: deMpegEncContextize

Conflicts:
	libavcodec/svq1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 11:49:12 +01:00
Alex Converse
6d5b009267 aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
Found-by: pawlkt
CC: libav-stable@libav.org
2012-12-12 13:22:10 -08:00
Michael Niedermayer
a01679586c mpeg1video: fix regression with slices != threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 20:12:11 +01:00
Michael Niedermayer
03df972016 mpeg1video: support multi threaded slice encoding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 19:29:32 +01:00
Michael Niedermayer
f18c873ab5 adpcm: fix off by 1 error and out of array access in DK4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 17:46:05 +01:00
Michael Niedermayer
03b9d4a7dc msmpeg4dec: fix coeff index
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 17:46:05 +01:00
Michael Niedermayer
0ceca269b6 alsdec: check block length
Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 14:12:47 +01:00
Martin Storsjö
48238fd00b svq1: Fix building with -DDEBUG
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:17:52 +02:00
Ronald S. Bultje
ce58642ed0 x86inc: support stack mem allocation and re-alignment in PROLOGUE.
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 10:37:52 +01:00
Anton Khirnov
c4182d72c9 svq1: return meaningful error codes. 2012-12-12 10:00:08 +01:00
Anton Khirnov
998fdcff41 lavc: replace some forgotten instances of PixelFormat with AVPixelFormat 2012-12-12 09:59:58 +01:00
Anton Khirnov
84a0806680 svq1: unmacroify macros used only once. 2012-12-12 09:59:41 +01:00
Anton Khirnov
95baf701db svq1: deMpegEncContextize
This decoder is quite simple and none of the MpegEncContext complexity
is actually needed.
2012-12-12 09:57:21 +01:00
Michael Niedermayer
be5389d585 Merge commit 'e70c5b034c4787377e82cab2d5565486baec0c2a'
* commit 'e70c5b034c4787377e82cab2d5565486baec0c2a':
  swfdec: do better validation of tag length
  Make LOCAL_ALIGNED syntactically similar on all systems

Conflicts:
	libavformat/swfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 09:55:56 +01:00
Ronald S. Bultje
6f40e9f070 x86inc: support stack mem allocation and re-alignment in PROLOGUE
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-12 05:23:46 +01:00
Michael Niedermayer
2fb240ddb6 ac3dec: fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 01:22:09 +01:00
Michael Niedermayer
e8e575633f lavc/utils: Do not require dimensions for PNG.
pngenc doesnt need them and mplayer doesnt set them.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 22:04:00 +01:00
Mans Rullgard
02823f6d71 Make LOCAL_ALIGNED syntactically similar on all systems
This changes the LOCAL_ALIGNED definition on systems where
DECLARE_ALIGNED is used so it matches the manual alignment
case, ensuring invalid use will not compile on x86 only to
fail on everything else.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-11 11:59:15 +00:00
Michael Niedermayer
7dee5f04ac svq3: fix cast type to be independant of "sizeof(int)"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 12:50:34 +01:00
Paul B Mahol
17d5746d96 build: fix dca encoder dependencies
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-11 11:46:22 +00:00
Peter Ross
7016aa655b iff decoder: support RGB8 and RGBN 2012-12-11 20:17:30 +11:00
Michael Niedermayer
9696ad6a76 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: fix 'clean' target
  ZeroCodec: Flip output

Conflicts:
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 08:24:45 +01:00
Clément Bœsch
7eafd274d8 build: fix prores decoder dependencies.
According to lavc/proresdsp.c, both prores and prores-lgpl decoders need
lavc/x86/proresdsp_init.c:ff_proresdsp_x86_init().
2012-12-11 02:54:55 +01:00
Carl Eugen Hoyos
71b1912963 Print bpc (for bits per component) with pixel format if it is smaller than expected. 2012-12-11 01:26:32 +01:00
Michael Niedermayer
e7101a7f3f libavcodec/x86/mpegvideo: switch to av_assert2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 23:30:16 +01:00
Michael Niedermayer
623184afa2 itu H.263: Fix handling of PB blocks
This fixes artifacts in Ticket744

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 23:23:27 +01:00
Michael Niedermayer
c3bb3334f6 h264: dont try to allocate scratchpad if linesize is not known
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 20:52:14 +01:00
Carl Eugen Hoyos
2ddf7c88d1 ZeroCodec: Flip output
The initial testing of the VFW binary codec was flawed,
likely due to an AviSynth bug.

Re-testing using VirtualDub and various professional editing
applications has revealed it should have been flipped.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-12-10 11:19:42 -05:00
Paul B Mahol
a354839bfa build: update mxf muxer dependencies
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-10 13:59:15 +00:00
Paul B Mahol
d880c34408 lavc: fix typo and avrn build dependencies
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-10 13:49:53 +00:00
Michael Niedermayer
ddbf0702c5 dsputil_mmx: switch to av_assert2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 14:41:31 +01:00
Paul B Mahol
4c7515286b takdec: silence/fix warning for undefined behavior
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-10 12:06:30 +00:00
Michael Niedermayer
4a5289ade3 mips: disable ac3 downmix, until its updated to the new data layout.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 12:45:11 +01:00
Michael Niedermayer
6321e02896 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Remove an outdated todo comment
  rtpdec: Rename a static variable to normal naming conventions
  sh4: dsputil: remove duplicate of ff_gmc_c()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 12:13:42 +01:00
Peter Ross
e044cd4123 codec_desc: AV_CODEC_ID_SMPTE_KLV is data 2012-12-10 21:08:09 +11:00
Mans Rullgard
f9e493c6f5 sh4: dsputil: remove duplicate of ff_gmc_c()
This function is an exact duplicate of the generic one.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-10 09:53:58 +00:00
Michael Niedermayer
7aabeea9ba ac3dec: fix bugs in direct buffer use.
This fixes potentially exploitable out of array writes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 04:45:30 +01:00
Michael Niedermayer
529d3e0026 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputil: remove unused macro WRAPPER8_16
  configure: fix automatic processing of _extralibs in check_deps
  libvpxenc: Support forcing keyframes
  ac3dec: decode directly into output buffers

Conflicts:
	libavcodec/ac3dec.c
	libavcodec/libvpxenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 02:16:33 +01:00
Michael Niedermayer
a933698457 Merge commit '30b39164256999efc8d77edc85e2e0b963c24834'
* commit '30b39164256999efc8d77edc85e2e0b963c24834':
  ac3dec: make downmix() take array of pointers to channel data

Conflicts:
	libavcodec/ac3dsp.c
	libavcodec/ac3dsp.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 02:06:50 +01:00
Michael Niedermayer
b7d8484f27 Merge commit 'b8f3ab8e6a7ce3627764da53b809628c828d4047'
* commit 'b8f3ab8e6a7ce3627764da53b809628c828d4047':
  ac3dec: output planar float only
  svq3: make slice type value unsigned to match svq3_get_ue_golomb return type
  configure: Have protocols select network code instead of depending on it

Conflicts:
	libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 01:32:37 +01:00
Michael Niedermayer
78ac7ee970 Merge commit '5d471b73d20616f5ac701ff62e5de49465cda264'
* commit '5d471b73d20616f5ac701ff62e5de49465cda264':
  rtpdec: K&R formatting and spelling cosmetics
  cosmetics: Fix dropable --> droppable typo

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 01:27:10 +01:00
Mans Rullgard
2dd95bd7cf dsputil: remove unused macro WRAPPER8_16
This macro has never been used.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 22:21:04 +00:00
Paul B Mahol
cef28b5602 tak: reduce difference with qatar
Mostly cosmetics changes, but also makes
decoding little faster here.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-09 22:01:00 +00:00
Stefano Sabatini
461b5bf4ab lavc/avcodec: extend/clarify/fix documentation for avcodec_fill_audio_frame() 2012-12-09 21:55:46 +01:00
Michael Niedermayer
0af7ccd9e2 mpeg12: move current_picture_ptr reset to the end of decode_frame.
This fixes passing fields instead of frames into the decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 19:49:51 +01:00
Martin Storsjö
774e6fc9ed libvpxenc: Support forcing keyframes
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-09 20:28:08 +02:00
Peter Ross
9282fbb9ad mpegts: demux asynchronous SMPTE 336M Key-Length-Value (KLV) metadata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 17:15:46 +01:00
Michael Niedermayer
3193a5cdbf arm: put prefetch under matching #ifdef as the actual code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 17:14:15 +01:00
Mans Rullgard
30b3916425 ac3dec: make downmix() take array of pointers to channel data 2012-12-09 15:52:01 +00:00
Mans Rullgard
b8f3ab8e6a ac3dec: output planar float only
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 15:52:01 +00:00
Mans Rullgard
ec5da7aee2 ac3dec: decode directly into output buffers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 15:52:01 +00:00
Janne Grunau
288bb3da16 svq3: make slice type value unsigned to match svq3_get_ue_golomb return type 2012-12-09 15:51:45 +01:00
Michael Niedermayer
e7d924da30 Merge commit '91ac403b1316d59b4f43c4ea0f237e24cec2819a'
* commit '91ac403b1316d59b4f43c4ea0f237e24cec2819a':
  lavf: fix arithmetic overflows in avformat_seek_file()
  mjpeg: initialize input padding after unescaped buffer to zero

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 13:56:46 +01:00
Diego Biurrun
ba0c898120 cosmetics: Fix dropable --> droppable typo 2012-12-09 13:36:11 +01:00
Carl Eugen Hoyos
66dc3ba356 Flip zerocodec output.
Fixes ticket #1218
2012-12-09 10:24:16 +01:00
Michael Niedermayer
e8ca7cfa4f h264: avoid calling idr() twice
Fixes rare race condition leading to null pointer dereferences.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 06:06:15 +01:00
Clément Bœsch
4c554c967f lavc/libcelt: add missing internal.h include.
This should fix build (include is necessary for ff_get_buffer).
2012-12-09 03:43:03 +01:00
Paul B Mahol
92f630eaf2 add forgotten AV_ prefix to some CODEC_IDs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-09 01:47:58 +00:00
Piotr Bandurski
7f01247572 tiff: support zlib with invertedFillOrder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 01:00:54 +01:00
Piotr Bandurski
e5550c0d09 mjpegdec: support more pix_fmt_ids for grayscale
samples created with

"cjpeg -grayscale -sample 1x3 / 1x4 / 3x1 / 3x3 / 4x1 / 4x3 / 4x4"

http://www.datafilehost.com/download-d828329d.html

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 19:24:09 +01:00
Michael Niedermayer
0110108a7c sbr_hf_gen_sse: Optimize code a bit more.
Core I7 (Sandy Bridge) 135 to 107 cycles
Core i5 (Arrandale) 162 to 142 (Thanks to Christophe Gisquet for testing)

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 17:30:11 +01:00
Janne Grunau
6a1aa5cb26 mjpeg: initialize input padding after unescaped buffer to zero
Fixes valgrind --undef-value-errors=yes warnings caused by valid
overreads in the fate vsynth jpegls, cover-art-ape and cover-art-wv
tests.
2012-12-08 17:05:45 +01:00
Ronald S. Bultje
ddd7559ad9 h264: check for invalid zeros_left before writing
Prevent an invalid write into coeffs[scantable[-1]] if zeros_left
itself was an invalid VLC code (and thus -1).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-08 17:04:22 +01:00
Michael Niedermayer
5c076205a6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  golomb: use unsigned arithmetics in svq3_get_ue_golomb()
  x86: float_dsp: fix loading of the len parameter on x86-32
  takdec: fix initialisation of LOCAL_ALIGNED array
  takdec: fix initialisation of LOCAL_ALIGNED array

Conflicts:
	libavcodec/rv30.c
	libavcodec/svq3.c
	libavcodec/takdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 16:36:47 +01:00
Michael Niedermayer
3a7ef8dc44 Merge commit '57231e4d5b467833fb289439cd35a92513bb55c1'
* commit '57231e4d5b467833fb289439cd35a92513bb55c1':
  tak: demuxer, parser, and decoder

Not merged as requested by Author and Maintainer of tak in FFmpeg.
I just merged a few typo fixes and minor cosmetic improvments.

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/tak.c
	libavcodec/tak.h
	libavcodec/tak_parser.c
	libavcodec/takdec.c
	libavcodec/version.h
	libavformat/takdec.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 15:54:18 +01:00
Michael Niedermayer
57cee85023 Merge commit '096abfa15052977eed93f0b5e01afd2d47c53c1f'
* commit '096abfa15052977eed93f0b5e01afd2d47c53c1f':
  parser: fix large overreads
  bitstream: add get_bits64() to support reading more than 32 bits at once
  arm: detect cpu features at runtime on Linux

Conflicts:
	libavcodec/parser.c
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 14:58:56 +01:00
Michael Niedermayer
7efee140d7 get_bits: rename get_bits_longlong to get_bits64
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 14:53:01 +01:00
Michael Niedermayer
aba1a48cc5 Merge commit 'b326755989b346d0d935e0628e8865f9b2951c30'
* commit 'b326755989b346d0d935e0628e8865f9b2951c30':
  arm: rename ARMVFP config symbol to VFP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 14:24:16 +01:00
Michael Niedermayer
89c8eaa321 Merge commit '637606de2d2e0af0a9fa2f23f943765d7d7c5cd5'
* commit '637606de2d2e0af0a9fa2f23f943765d7d7c5cd5':
  configure: arm: make _inline arch ext symbols depend on inline_asm
  arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation

Conflicts:
	configure
	libavcodec/arm/dca.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 14:19:55 +01:00
Michael Niedermayer
7181806dc1 Merge commit '9ebd45c2d58ad9241ad09718679f0cf7fb57da52'
* commit '9ebd45c2d58ad9241ad09718679f0cf7fb57da52':
  configure: do not bypass cpuflags section if --cpu not given
  dct-test: arm: indicate required cpu features for optimised funcs
  snow: fix build after 594d4d5df3
  arm: fix use of uninitialised value in ff_fft_fixed_init_arm()
  avpicture: Don't assume a valid pix fmt in avpicture_get_size

Conflicts:
	libavcodec/avpicture.c
	libavcodec/snow.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 13:49:26 +01:00
Janne Grunau
9a2e79116d golomb: use unsigned arithmetics in svq3_get_ue_golomb()
This prevents undefined behaviour of signed left shift if the coded
value is larger than 2^31. Large values are most likely invalid and
caused errors or by feeding random.

Validate every use of svq3_get_ue_golomb() and changed the place there
the return value was compared with negative numbers. dirac.c was clean,
fixed rv30 and svq3.
2012-12-08 12:55:10 +01:00
Nicolas George
e6701d51e1 lavc/mlpdec: reset layout when channels change.
Triggered by the sample for trac ticket #1726.
2012-12-08 10:12:38 +01:00
Paul B Mahol
3fd60d8049 gifdec: port to bytestream2 API
While here remove ff_lzw_cur_ptr() as it become obsolete.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-08 01:13:07 +00:00
Josh Allmann
b3deec3253 takdec: fix initialisation of LOCAL_ALIGNED array
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-12-08 00:00:30 +01:00
Mans Rullgard
cd71af90a9 takdec: fix initialisation of LOCAL_ALIGNED array
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 22:13:57 +00:00
Michael Niedermayer
419ade4b61 lavc: check dimensions for video encoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 22:58:13 +01:00
Paul B Mahol
57231e4d5b tak: demuxer, parser, and decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Michael Niedermayer
096abfa150 parser: fix large overreads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Michael Niedermayer
41540b36a1 bitstream: add get_bits64() to support reading more than 32 bits at once
Also remove a duplicate function in the MPEG-TS demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Mans Rullgard
b326755989 arm: rename ARMVFP config symbol to VFP
This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard
a7831d509f arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation
These macros reflect the actual capabilities required here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard
c29d49c1b3 dct-test: arm: indicate required cpu features for optimised funcs
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Anton Khirnov
380232fac3 snow: fix build after 594d4d5df3 2012-12-07 16:35:06 +01:00
Michael Niedermayer
857d7194ca Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: add a pointer for weighted prediction temporary buffer

Conflicts:
	libavcodec/h264.c
	libavcodec/h264.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 16:29:07 +01:00
Paul B Mahol
6777aa6387 lavc/takdec: s/get_b/get_bits_esc4
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-07 15:19:49 +00:00
Martin Storsjö
4ed0c35c40 avcodec: Fix a typo in an option description
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
2012-12-07 16:16:20 +01:00
Paul B Mahol
1c779854b5 lavc/takdec: simplify code
Merge get_scale/get_shift into set_sample_rate_params().
Rename tak_set_bps to set_bps_params and remove 2nd argument.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-07 15:01:02 +00:00
Michael Niedermayer
7c425e4f2d Merge commit 'd7d6efe42b0d2057e67999b96b9a391f533d2333'
* commit 'd7d6efe42b0d2057e67999b96b9a391f533d2333':
  h264: check sps.log2_max_frame_num for validity
  mov: validate number of DataReferenceBox entries against box size
  mov: compute avg_frame_rate only if duration is known
  flac: change minimum and default of lpc_passes option to 1

Conflicts:
	libavcodec/h264_ps.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 15:52:43 +01:00
Michael Niedermayer
af164d7d9f Merge commit 'c25fc5c2bb6ae8c93541c9427df3e47206d95152'
* commit 'c25fc5c2bb6ae8c93541c9427df3e47206d95152':
  fate: dpcm: Add dependencies
  SBR DSP x86: implement SSE sbr_hf_gen
  AAC SBR: use AVFloatDSPContext's vector_fmul
  fate: image: Add dependencies
  Changelog: add an entry for deprecating the avconv -vol option
  x86: float_dsp: fix compilation of ff_vector_dmul_scalar_avx() on x86-32

Conflicts:
	Changelog
	libavutil/x86/float_dsp.asm
	tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 15:21:41 +01:00
Mans Rullgard
92dad6687f arm: fix use of uninitialised value in ff_fft_fixed_init_arm()
When initialising an FFTContext for a plain FFT, mdct_bits is not set
and can contain a garbage value.  Since nbits is always valid and for
MDCT operation is mdct_bits - 2 checking this instead avoids using an
uninitialised value while having the same effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 13:11:57 +00:00
Michael Niedermayer
ea6da80cb4 diracdec: check dimensions against chroma format.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 13:43:40 +01:00
Martin Storsjö
2c96392277 avpicture: Don't assume a valid pix fmt in avpicture_get_size
When called from the v4l2 input device, pix_fmt can be
AV_PIX_FMT_NONE (for jpeg formats). Before 50ba57e0, this wasn't
an issue for avpicture_get_size, but after that commit, this
lead to crashes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-07 14:28:47 +02:00
Janne Grunau
a394959bbe h264: add a pointer for weighted prediction temporary buffer
Reusing MpegEncContext's obmc_scratchpad for this becomes a mess with
adaptive frame-mt.
2012-12-07 11:43:28 +01:00
Janne Grunau
d7d6efe42b h264: check sps.log2_max_frame_num for validity
Fixes infinite or long taking loop in frame num gap code in
the fuzzed sample bipbop234.ts_s223302.

CC: libav-stable@libav.org
2012-12-07 11:43:28 +01:00
Janne Grunau
480be07a96 flac: change minimum and default of lpc_passes option to 1
Avoid use of uninitialized and uncomputed linear least square models
during ff_lpc_calc_coefs() for FF_LPC_TYPE_CHOLESKY. Fixes running
make fate-flac-16-lpc-cholesk with valgrind --undef-value-errors=yes.
2012-12-07 11:43:28 +01:00
Christophe Gisquet
2aef3d66c9 SBR DSP x86: implement SSE sbr_hf_gen
Start and end index are multiple of 2, therefore guaranteeing aligned access.
Also, this allows to generate 4 floats per loop, keeping the alignment all
along.

Timing:
- 32 bits: 326c -> 172c
- 64 bits: 323c -> 156c

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-12-07 11:04:26 +01:00
Christophe Gisquet
9a16359c38 AAC SBR: use AVFloatDSPContext's vector_fmul
Around 5% speedup on the code block using 'vector_fmul_add's.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-12-07 10:33:39 +01:00
Michael Niedermayer
f5d6b0c9c2 diracdec: fix typo in mctmp allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 02:24:14 +01:00
Michael Niedermayer
2f6ec9fdd7 diracdec: Test mctmp and mcscratch for malloc failure.
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 02:24:14 +01:00
Michael Niedermayer
b84d1bf193 diracdec: fix emulated_edge condition, fix out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 02:24:14 +01:00
Paul B Mahol
f8d68822c0 takdec: use samplefmt.h from libavutil
Instead of having own code for calculating decoded buffer size
just use already provided functions from libavutil.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-07 01:11:55 +00:00
Paul B Mahol
6a7fed193c add missing dependency for tak demuxer 2012-12-07 00:15:47 +00:00
Paul B Mahol
4e4a95b18e takdec: remove get_code() and use get_sbits() directly
As found by Justin, this is probably bug in reference decoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-07 00:03:47 +00:00
Michael Niedermayer
4b6869d6e0 bitstream: make vlc init of static tables thread safe.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 21:46:42 +01:00
Paul B Mahol
586c2528a0 dxa: port to bytestream2 API
Protects against overreads in input buffer.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-06 19:09:48 +00:00
Paul B Mahol
4d1912ff4d huffyuv: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-06 16:56:40 +00:00
Paul B Mahol
4a722a5cab huffyuv: check for malloc failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-06 16:44:43 +00:00
Paul B Mahol
7f261ac850 huffyuv: make use of av_fast_padded_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-06 16:31:54 +00:00
Michael Niedermayer
71949ef715 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: slice-mt: check master context for valid current_picture_ptr
  h264: slice-mt: get last_pic_dropable from master context
  alacenc: add support for multi-channel encoding

Conflicts:
	Changelog
	libavcodec/alac.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 16:14:38 +01:00
Janne Grunau
3ab5f7dc13 h264: slice-mt: check master context for valid current_picture_ptr
Fixes errors in slice based multithreading introduced in 0b300daad2.
2012-12-06 04:45:04 +01:00
Janne Grunau
24c62ea7a5 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
2012-12-06 04:44:57 +01:00
Michael Niedermayer
7885fa7685 ff_lock_avcodec: make the lock state be consistent in case of failure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 03:12:34 +01:00
Michael Niedermayer
2dec950f49 avcodec_open: if obtaining a lock fails, dont attempt to unlock it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 02:52:46 +01:00
Michael Niedermayer
0393cf15db Revert "Acquire lock when initializing parsers."
This reverts commit 7feef7dbca.

This commit causes assertion failures due to use of parser_init from multiple
threads, for example indirectly by ffmpeg.c and more directly from the
packet read functions.

I dont know how to fix this quickly, and fixing ffmpeg.c leaves
the possibility of other applications being affected.
Crashing the applications until this is resolved is clearly no good
thus this revert, so we have time to think about the problem.

Crashes can be reproduced by using multiple input files in ffmpeg.
2012-12-06 02:52:46 +01:00
Michael Niedermayer
eed865540a Revert "Add assert that the avcodec lock is held when initializing static VLC tables."
This reverts commit dd154198b1.
2012-12-06 02:52:07 +01:00
Michael Niedermayer
d7169280a6 frame_thread_encoder: fix locking while locks are held
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 02:51:26 +01:00
Michael Niedermayer
bde6f6eadc vc1dec: prevent v_edge_pos from becoming negative.
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 02:51:26 +01:00
Michael Niedermayer
b6a7f66f93 resample: remove disabled debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 02:51:26 +01:00
Janne Grunau
5945c7b35d h264: slice-mt: check master context for valid current_picture_ptr
Fixes errors in slice based multithreading introduced in 0b300daad2.

CC: libav-stable@libav.org
2012-12-05 23:16:37 +01:00
Janne Grunau
a8cb1746c5 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .

CC: libav-stable@libav.org
2012-12-05 23:16:37 +01:00
Justin Ruggles
5e1bbb8c7e alacenc: add support for multi-channel encoding 2012-12-05 16:13:37 -05:00
Paul B Mahol
9f66531d46 lavc/dxa: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-05 20:28:45 +00:00
Reimar Döffinger
dd154198b1 Add assert that the avcodec lock is held when initializing static VLC tables.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-12-05 21:01:17 +01:00
Reimar Döffinger
7feef7dbca Acquire lock when initializing parsers.
This is necessary since they might be initializing or
even using static VLC tables.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-12-05 21:01:17 +01:00
Reimar Döffinger
25fec8595d avcodec: add ff_lock/unlock_avcodec functions.
Will be used in future patches, together with the
variable that allows checking whether the lock is held.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-12-05 21:01:17 +01:00
Piotr Bandurski
5381960501 wmaenc: add new line to some error messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 20:29:27 +01:00
Wolfram Gloger
928346091a mpegvideo_parser: fix buffer access beyond end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 20:29:18 +01:00
Michael Niedermayer
6d7effa9bd mpegvideo_enc: use av_log() in debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 19:31:27 +01:00
Michael Niedermayer
911c00e60f motion_est: use av_log() in debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 19:31:27 +01:00
Michael Niedermayer
7c2481f2d7 j2kenc: remove duplicate debug functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 19:31:27 +01:00
Michael Niedermayer
9bb188da96 j2k: avoid printf() useage in debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 19:31:27 +01:00
Michael Niedermayer
b023392f34 mpegvideo: remove #if/define PARANOID code
This code never did anything as far as i can remember

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 19:31:27 +01:00
Paul B Mahol
4012cd6c4f lavc: fix decode_frame() third parameter semantics for rest of video decoders
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-05 18:24:43 +00:00
Michael Niedermayer
835fd779a4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: workaround for slighly broken 'test' shell builtin
  mimic: initialize padding of swap_buf through av_fast_padded_malloc
  eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()
  raw demuxer: initialize end of partial packets

Conflicts:
	tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 17:33:12 +01:00
Michael Niedermayer
fc1152de41 Merge commit 'df9b9567518f2840d79a4a96b447ebe1aa326408'
* commit 'df9b9567518f2840d79a4a96b447ebe1aa326408':
  lavc: fix decode_frame() third parameter semantics for video decoders

Conflicts:
	libavcodec/cscd.c
	libavcodec/eamad.c
	libavcodec/ffv1dec.c
	libavcodec/gifdec.c
	libavcodec/h264.c
	libavcodec/iff.c
	libavcodec/mjpegdec.c
	libavcodec/pcx.c
	libavcodec/vp56.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 17:20:19 +01:00
Michael Niedermayer
022553e875 Merge commit '387bef95d28019c13c6805cfa4079e59948284e5'
* commit '387bef95d28019c13c6805cfa4079e59948284e5':
  lavc: factorise setting buffer type in avcodec_default_get_buffer().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 17:02:42 +01:00
Michael Niedermayer
83db6cb521 Merge commit 'e57c4706e969afa1f2384481b955ccd9494cddb5'
* commit 'e57c4706e969afa1f2384481b955ccd9494cddb5':
  lavc: don't reuse audio buffers

This commit causes a 0.5% speedloss for mp3 and 2% for raw pcm, that is
"time ffmpeg" style tested thus includes disk IO, demux and parsing

I would not have merged it if it wasnt required for the "new" buffer API
but sadly it is.
Once the new API is in ill reimplement proper buffer reuse, which will
fix this speedloss. In case we choose not to merge the "new" buffer
API then this commit here should be reverted.

Conflicts:
	libavcodec/internal.h
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 16:53:12 +01:00
Michael Niedermayer
d2a3f08daf lavc: move ff_init_buffer_info() down to ff_get_buffer()
and remove redundant code from ff_get_buffer()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 15:58:37 +01:00
Michael Niedermayer
2f980cf39a Merge commit 'ff953fecffd3b9a616a046723fb9d4690be032a6'
* commit 'ff953fecffd3b9a616a046723fb9d4690be032a6':
  lavc: set frame properties in ff_get_buffer().

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 15:58:07 +01:00
Michael Niedermayer
874c5b02c4 Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'
* commit '594d4d5df3c70404168701dd5c90b7e6e5587793':
  lavc: add a wrapper for AVCodecContext.get_buffer().

Conflicts:
	libavcodec/4xm.c
	libavcodec/8svx.c
	libavcodec/bmv.c
	libavcodec/cljr.c
	libavcodec/cscd.c
	libavcodec/dnxhddec.c
	libavcodec/dpcm.c
	libavcodec/dpx.c
	libavcodec/eacmv.c
	libavcodec/eamad.c
	libavcodec/frwu.c
	libavcodec/g723_1.c
	libavcodec/gifdec.c
	libavcodec/idcinvideo.c
	libavcodec/iff.c
	libavcodec/indeo3.c
	libavcodec/internal.h
	libavcodec/interplayvideo.c
	libavcodec/kmvc.c
	libavcodec/mpc7.c
	libavcodec/mpegaudiodec.c
	libavcodec/pcx.c
	libavcodec/pngdec.c
	libavcodec/pnmdec.c
	libavcodec/rl2.c
	libavcodec/snow.c
	libavcodec/targa.c
	libavcodec/tscc.c
	libavcodec/txd.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vb.c
	libavcodec/vmdav.c
	libavcodec/vp56.c
	libavcodec/vqavideo.c
	libavcodec/wavpack.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 15:18:12 +01:00
Michael Niedermayer
99efd59626 Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'
* commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967':
  Remove pointless #undefs of previously forbidden functions.
  fate: Add dependencies for bmp, cdxl, dfa, mp3

Conflicts:
	doc/examples/muxing.c
	libavfilter/filtfmts.c
	libavutil/des.c
	libavutil/eval.c
	libavutil/log.c
	libavutil/parseutils.c
	tests/fate/mp3.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:34:45 +01:00
Michael Niedermayer
09de0ffeab vc1dec: Fix null pointer dereference in vc1_decode_skip_blocks()
This handles the last frame being unavailable like all the other
code in vc1dec.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:01:16 +01:00
Nicolas George
217b10de3f lavc/dvdsubdec: accept palette from options.
On DVDs, the palette is part of the IFO file and therefore
not available when reading from a dumped VOB file.
2012-12-05 09:25:48 +01:00
Michael Niedermayer
599ae9995f ff_emulated_edge_mc: fix handling of w/h being 0
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 03:45:10 +01:00
Michael Niedermayer
8bf16e677f ffv1enc: allow encoding with 1 slice for CIF and smaller in version 3
the default is still 4 slices for any resolution, this just allows the user
to force 1 slice.
This in my quick test improves compression by 1% for a 320x240 sample

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 01:22:43 +01:00
Janne Grunau
c15fea7933 mimic: initialize padding of swap_buf through av_fast_padded_malloc 2012-12-05 00:02:44 +01:00
Janne Grunau
42060c7030 eamad: initialize padding of bitstream_buf through av_fast_padded_malloc() 2012-12-05 00:02:44 +01:00
Anton Khirnov
df9b956751 lavc: fix decode_frame() third parameter semantics for video decoders
It's got_frame, not data size
2012-12-04 21:45:36 +01:00
Anton Khirnov
387bef95d2 lavc: factorise setting buffer type in avcodec_default_get_buffer(). 2012-12-04 21:45:23 +01:00
Anton Khirnov
e57c4706e9 lavc: don't reuse audio buffers
Any performance gain from this is negligible and not worth the extra
code.
2012-12-04 21:43:53 +01:00
Anton Khirnov
ff953fecff lavc: set frame properties in ff_get_buffer().
There is no point in duplicating this code in every get_buffer()
implementation.
2012-12-04 21:42:44 +01:00
Anton Khirnov
594d4d5df3 lavc: add a wrapper for AVCodecContext.get_buffer().
It will be useful in the upcoming transition to refcounted AVFrames.
2012-12-04 21:41:59 +01:00
Anton Khirnov
cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Peter Ross
59fe5a339b iff decoder: DEEP TVDC 32-bit decoder
Signed-off-by: Peter Ross <pross@xvid.org>
2012-12-04 20:53:26 +11:00
Reimar Döffinger
e2fc6a01f6 libspeex: allow custom sample rates again.
This was broken by 3b061c5e10
Fixes trac issue #1974.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-12-03 19:59:04 +01:00
Paul B Mahol
0a8360c4f9 takdec: add .sample_fmts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-03 15:21:19 +00:00
Paul B Mahol
694dc6251e shorten: update .sample_fmts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-03 15:13:35 +00:00
Piotr Bandurski
7e93b0ba4b ra144enc: reject unsupported sample rates 2012-12-03 10:03:27 +00:00
Michael Niedermayer
211372e86d Merge commit '0b300daad2f5cb59a7c06dde5ac701685e6edf16'
* commit '0b300daad2f5cb59a7c06dde5ac701685e6edf16':
  h264: error out on unset current_picture_ptr for h->current_slice > 0
  avprobe: report per stream bit rate if set by the decoder
  aac: avoid a memcpy in sbr_qmf_analysis

Conflicts:
	avprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-03 01:56:47 +01:00
Michael Niedermayer
9c208b404c vp56: Ignore reconfiguration from the alpha plane.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-03 01:37:40 +01:00
Janne Grunau
0b300daad2 h264: error out on unset current_picture_ptr for h->current_slice > 0
Fixes a segfault with fuzzed sample sample_varPAR_s11622_r001-02.avi.

CC: libav-stable@libav.org
2012-12-02 23:24:53 +01:00
Christophe Gisquet
e32bea8eb4 aac: avoid a memcpy in sbr_qmf_analysis
Swapping buffer indices allows saving one memcpy that accounts for 1% of the
runtime, according to oprofile.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-02 21:07:48 +01:00
Michael Niedermayer
936eaa89be h264: check for integer overflow, fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-02 20:44:58 +01:00
Paul B Mahol
49435d3888 gifdec: read pixel aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-02 16:59:11 +00:00
Michael Niedermayer
ff7e2342bb dcadec: fix reading from prior to an array
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-02 04:01:41 +01:00
Michael Niedermayer
77693c541a xxan: more complete ybuf checks, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-02 00:48:07 +01:00
Michael Niedermayer
aae4780362 vmnc: Check for integer overflow
Fixes null pointer dereference and potential out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 22:25:50 +01:00
Michael Niedermayer
3b2cd83a82 dcadec: check lfe field
Fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 22:10:42 +01:00
Michael Niedermayer
7389bb12e6 svq1dec: update w/h only if the header is successfully parsed.
Prevents inconsistency and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 20:19:09 +01:00
Stefano Sabatini
c9ff32215b lavu/opt: allow to set sample and pixel format with av_opt_set_int()
This change requires the user to specify min and max value, and makes
possible to prevent the user to set AV_{SAMPLE,PIX}_FMT_NONE if
forbidden.

Add required ifdeffery in case of mixed libraries, when libavutil is
updated but not the other libraries.

This is a followup of 08d0969c14.
2012-12-01 19:33:30 +01:00
Paul B Mahol
2152b60f39 gifdec: use av_fast_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-01 10:53:22 +00:00