1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

35960 Commits

Author SHA1 Message Date
Michael Niedermayer
608708009f adpcm: Fix crash
Fixes half of Ticket794
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-19 04:09:23 +01:00
Michael Niedermayer
29179239f5 proresdec: add UPDATE_CACHE, should fix decoding with -Os
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-19 03:43:53 +01:00
Michael Niedermayer
7c29313b38 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in revision for AVFrame.age deprecation
  avcodec: deprecate AVFrame.age
  4xm: remove unneeded check for remaining unused data.
  lavf: force threads to 1 in avformat_find_stream_info()
  swscale: fix overflows in vertical scaling at top/bottom edges.
  lavf: add OpenMG audio muxer.
  omadec: split data that will be used in the muxer to a separate file.
  lavf: rename oma.c -> omadec.c
  tmv decoder: set correct pix_fmt

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/mpegvideo.c
	libavcodec/version.h
	libavformat/oma.c
	libavformat/version.h
	libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-19 02:34:18 +01:00
Michael Niedermayer
f371396dfb rl2demux: Fix FPE
Fixes Ticket788
Bug found by Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 23:54:56 +01:00
Mans Rullgard
2a216ca2ef APIchanges: fill in revision for AVFrame.age deprecation
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-18 22:15:04 +00:00
Mans Rullgard
8400b126ac avcodec: deprecate AVFrame.age
This was intended as an optimisation for skipped blocks in MPEG2
P-frames and never used elsewhere.  Removing this "optimisation"
speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9).

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-18 22:14:33 +00:00
Michael Niedermayer
a9ef21bbe2 Merge remote-tracking branch 'tjoppen/proper_mxf_track_linking'
* tjoppen/proper_mxf_track_linking:
  mxfdec: Don't parse slices or DeltaEntryArrays
  mxfdec: Remove dead/useless code
  mxfdec: Hybrid demuxing/seeking solution
  mxfdec: Add mxf_edit_unit_absolute_offset()
  mxfdec: Replace zero IndexDurations with st->duration
  mxfdec: Add "fake" index to MXFIndexTable to assist seeking
  mxfdec: Add MXFIndexTables
  mxfdec: Move mxf_read_packet*() near the bottom of the file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 23:11:05 +01:00
Michael Niedermayer
1c73391d7d siff: Fix excessive memory allocation.
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 22:46:29 +01:00
Michael Niedermayer
af3f2a87da mov: detect EOF in mov_read_dref()
This fixes a (near) infinite loop and Ticket783
Bug found by: cosminamironesei

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 21:47:03 +01:00
Michael Niedermayer
7859740c6a adx_parser: rewrite.
The previous code ended in multiple different infinite
loops. See stl_ten_1_big.sfd as example with and without zzuf

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 20:51:40 +01:00
Michael Niedermayer
6b6b84ae16 adxdec: Fix division by zero
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 20:49:34 +01:00
Michael Niedermayer
bdd62a615a adxdec: Do not require extradata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 20:49:34 +01:00
Michael Niedermayer
3bf1d787b5 adx_parser: Fix infinite loop.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 20:49:34 +01:00
Justin Ruggles
bc78ceec2b 4xm: remove unneeded check for remaining unused data.
This is unnecessary complication that only prints a message and does not
affect decoding.
2011-12-18 13:43:45 -05:00
Anton Khirnov
93fc5a9ff6 lavf: force threads to 1 in avformat_find_stream_info()
Fixes avformat_find_stream_info() on streams with number of frames <
thread count.
2011-12-18 17:36:56 +01:00
Ronald S. Bultje
d49352c7cc swscale: fix overflows in vertical scaling at top/bottom edges.
This fixes integer multiplication overflows in RGB48 output
(vertical) scaling as detected by IOC. What happens is that for
certain types of filters (lanczos, spline, bicubic), the
intermediate sum of coefficients in the middle of a filter can
be larger than the fixed-point equivalent of 1.0, even if the
final sum is 1.0. This is fine and we support that.

However, at frame edges, initFilter() will merge the coefficients
for the off-screen pixels into the top or bottom pixel, such as
to emulate edge extension. This means that suddenly, a single
coefficient can be larger than the fixed-point equivalent of
1.0, which the vertical scaling routines do not support.

Therefore, remove the merging of coefficients for edges for
the vertical scaling filter, and instead add edge detection
to the scaler itself so that it copies the pointers (not data)
for the edges (i.e. it uses line[0] for line[-1] as well), so
that a single coefficient is never larger than the fixed-point
equivalent of 1.0.
2011-12-18 08:27:43 -08:00
Michael Karcher
f40e7eb573 lavf: add OpenMG audio muxer.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-18 16:23:16 +01:00
Anton Khirnov
ee20b332c8 omadec: split data that will be used in the muxer to a separate file. 2011-12-18 16:17:39 +01:00
Anton Khirnov
08f7af0c37 lavf: rename oma.c -> omadec.c 2011-12-18 16:17:39 +01:00
Uoti Urpala
488a5b3fdd tmv decoder: set correct pix_fmt
Previously the decoder only worked if the user had set avctx->pix_fmt
manually. For some reason the libavformat tmv demuxer sets this, so
the problem was not visible in avplay etc.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-18 06:58:03 -08:00
Carl Eugen Hoyos
1af0ace3a4 Fix channel order for some less common TrueHD layouts.
Reported and tested by TDiTP_

Fixes ticket #779.
2011-12-18 15:28:18 +01:00
Hendrik Leppkes
b9d8af0327 mlpdec: fix channel order for wide 7.1 truehd layouts 2011-12-18 15:25:25 +01:00
Carl Eugen Hoyos
9a972b5111 Cosmetics: Fix indentation after last commit. 2011-12-18 14:22:13 +01:00
Carl Eugen Hoyos
290e7eb77b Fix possible endless loop when decoding amr.
Fixes bug 151.

Reviewed-by: Vitor Sessak
2011-12-18 14:20:14 +01:00
Carl Eugen Hoyos
b6b0067511 Assume architecture arm for machine hardware name iPad*.
uname -m returns for example "iPad2,1".
2011-12-18 13:48:44 +01:00
Nicolas George
6d7b50117a sbgdec: change -1 into AVERROR(EINVAL).
This is not as accurate as ELOOP, but there is an explicit error message
just before anyway.
2011-12-18 09:33:09 +01:00
Michael Niedermayer
4734fb0ece sbgdec: Replace ELOOP by -1 to fix compilation on win32.
This should be replaced by a more appropriate error code of course but
we should not leave compilation broken until that is decided.

Found-by: jb
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:57:11 +01:00
Michael Niedermayer
549749c68e mpeg12: disable checked reader.
overreads in mpeg12 are not possible

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:35:46 +01:00
Michael Niedermayer
06192e42fd mpeg4: disable checked bitstream reader, overreads are not possible.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:23:28 +01:00
Michael Niedermayer
8e7776036b h263: disable slow checked reader, overreads are not possible in
ffmpegs h263 decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:19:40 +01:00
Michael Niedermayer
38331d2036 h264: disable checking reader, overreads are not possible
in ffmpegs h264 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:17:44 +01:00
Michael Niedermayer
1bdc212a39 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: link test programs with static libraries
  dct-test: remove unused variable cropTbl
  swscale: fix overflow in gray16 vertical scaling.
  get_bits: remove LAST_SKIP_CACHE macro
  swscale: fix integer overflows in RGB pixel writing.
  swscale: add endian conversion for RGB555 and RGB444 pixel formats
  swscale: fix overflows in output of RGB48 pixels.
  get_bits: remove strange/obsolete comments
  get_bits: whitespace (mostly) cosmetics
  swscale: add rgb565 endianess conversion
  get_bits: remove unnecessary #includes
  mp3dec: hack: fix decoding with safe bitstream reader
  fate: fix eatqi test
  adpcm: Check for channels to be a non-zero integer
  swscale: fix overflows in RGB rounding constants.
  get_bits: introduce safe bitreading to prevent overreads.

Conflicts:
	libswscale/swscale.c
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:04:44 +01:00
Michael Niedermayer
1a2484fc4e get_bits: drop the a32 reader.
that way qatar maintains the code for me and i dont need to resolve conflicts.
If someone wants the a32 reader back, only thing you need to do is maintain
it, i would be happy to have it back, iam just not volunteering to maintain
it due to lack of time.

Based on: a1e98f198e by Mans Rullgard.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 02:09:17 +01:00
Michael Niedermayer
53509d20ca v210dec: Fix warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 01:20:18 +01:00
Michael Niedermayer
c9dc66375b v210enc: Fix warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 01:20:18 +01:00
Michael Niedermayer
bd35dfeaa0 tta: Fix several warning: initialization from incompatible pointer type [enabled by default]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 01:20:18 +01:00
Michael Niedermayer
8beeec8821 sunrast: Fix warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 01:20:18 +01:00
Michael Niedermayer
0db7b30700 lagarith: rgb24 support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 01:20:18 +01:00
Stefano Sabatini
21dfd1591e lavd/lavfi: fix incomplete comment 2011-12-18 01:04:02 +01:00
Stefano Sabatini
86b7db616d lavd/lavfi: fix typo in error message 2011-12-18 01:03:40 +01:00
Mans Rullgard
0ea5b44275 build: link test programs with static libraries
Many of the test programs directly access internal symbols not
exported from the shared libraries.  This allows tests to run
when configured with shared libraries.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-17 23:21:08 +00:00
Mans Rullgard
e064d46e61 dct-test: remove unused variable cropTbl
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-17 23:12:31 +00:00
Ronald S. Bultje
72dafea0fc swscale: fix overflow in gray16 vertical scaling.
This fixes the same overflow as in the RGB48/16-bit YUV scaling;
some filters can overflow both negatively and positively (e.g.
spline/lanczos), so we bias a signed integer so it's "half signed"
and "half unsigned", and can cover overflows in both directions
while maintaining full 31-bit depth.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-17 22:41:53 +00:00
Michael Niedermayer
e09ffa4524 msvideo1enc: Check that dimensions are a multiple of 4.
Fixes Ticket784
Found by: ami_stuff

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 23:25:59 +01:00
Nicolas George
9cb6a39c46 sbgdec: replace EOVERFLOW with ENOMEM.
This should fix track issue #781, regarding compilation with
i686-w64-mingw32-gcc.
2011-12-17 22:43:34 +01:00
Mans Rullgard
86a10281c7 get_bits: remove LAST_SKIP_CACHE macro
This macro is empty since the removal of the A32 bitstream reader.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-17 20:04:28 +00:00
Michael Niedermayer
56bf2c2a19 motion_est: avoid generating motion vectors that point between widthxheight and mb_widthxmb_height.
No difference in PSNR or bitrate in the printed precission with the matrix lobby scene at 322x242

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-17 20:25:13 +01:00
Mans Rullgard
77d88b872d swscale: fix integer overflows in RGB pixel writing.
We're shifting individual components (8-bit, unsigned) left by 24,
so making them unsigned should give the same results without the
overflow.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-17 18:59:24 +00:00
Janne Grunau
b4dc68803b swscale: add endian conversion for RGB555 and RGB444 pixel formats
Add a macro to shorten the if condition.
2011-12-17 19:52:19 +01:00
Ronald S. Bultje
be1bafc303 swscale: fix overflows in output of RGB48 pixels.
For certain types of filters where the intermediate sum of coefficients
can go above the fixed-point equivalent of 1.0 in the middle of a filter,
the sum of a 31-bit calculation can overflow in both directions and can
thus not be represented in a 32-bit signed or unsigned integer. To work
around this, we subtract 0x40000000 from a signed integer base, so that
we're halfway signed/unsigned, which makes it fit even if it overflows.
After the filter finishes, we add the scaled bias back after a shift.

We use the same trick for 16-bit bpc YUV output routines.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-17 18:36:20 +00:00