ffmpeg.git
7 years agolavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header()
Stefano Sabatini [Tue, 20 Dec 2011 12:17:03 +0000 (13:17 +0100)]
lavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header()

7 years agoswr: fix assert failure
Michael Niedermayer [Tue, 20 Dec 2011 10:23:46 +0000 (11:23 +0100)]
swr: fix assert failure
Bug found by: Oana Stratulat
GCI-id: 7211207

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoChangelog: split version next and 0.9
Michael Niedermayer [Tue, 20 Dec 2011 09:24:41 +0000 (10:24 +0100)]
Changelog: split version next and 0.9

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix off-by-one error when decoding rigth-to-left targa.
Carl Eugen Hoyos [Tue, 20 Dec 2011 10:03:13 +0000 (11:03 +0100)]
Fix off-by-one error when decoding rigth-to-left targa.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 20 Dec 2011 00:54:41 +0000 (01:54 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: clear trailing bits in partially parsed NAL units
  vc1: Handle WVC1 interlaced stream
  xl: Fix overreads
  mpegts: rename payload_index to payload_size
  segment: introduce segmented chain muxer
  lavu: add AVERROR_BUG error value
  avplay: clear pkt_temp when pkt is freed.
  qcelpdec: K&R formatting cosmetics
  qcelpdec: cosmetics: drop some pointless parentheses
  x86: conditionally compile dnxhd encoder optimizations
  Revert "h264: skip start code search if the size of the nal unit is known"
  swscale: fix formatting and indentation of unscaled conversion routines.
  h264: skip start code search if the size of the nal unit is known
  cljr: fix buf_size sanity check
  cljr: Check if width and height are positive integers

Conflicts:
libavcodec/cljr.c
libavcodec/vc1dec.c
libavformat/Makefile
libavformat/mpegtsenc.c
libavformat/segment.c
libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'cus/stable'
Michael Niedermayer [Mon, 19 Dec 2011 23:14:59 +0000 (00:14 +0100)]
Merge remote-tracking branch 'cus/stable'

* cus/stable:
  ffplay: remove global video state

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: clear trailing bits in partially parsed NAL units
Janne Grunau [Mon, 19 Dec 2011 17:11:44 +0000 (18:11 +0100)]
h264: clear trailing bits in partially parsed NAL units

Trailing bits are likely to be non-zero if the NAL unit is truncated.
Clearing the bits make overreads of the bitstream less likely in this
case. Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which
has a forbidden byte sequence of 0x00 0x00 0x00 in it SPS.

7 years agoffplay: remove global video state
Marton Balint [Sun, 4 Dec 2011 14:32:12 +0000 (15:32 +0100)]
ffplay: remove global video state

Signed-off-by: Marton Balint <cus@passwd.hu>
7 years agovc1: Handle WVC1 interlaced stream
Aneesh Dogra [Mon, 19 Dec 2011 20:08:19 +0000 (01:38 +0530)]
vc1: Handle WVC1 interlaced stream

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agosiff: simplify code by using ffio_limit()
Michael Niedermayer [Mon, 19 Dec 2011 18:23:56 +0000 (19:23 +0100)]
siff: simplify code by using ffio_limit()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoxl: Fix overreads
Aneesh Dogra [Mon, 19 Dec 2011 18:30:30 +0000 (00:00 +0530)]
xl: Fix overreads

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agosoxdec: check av_malloc return.
Michael Niedermayer [Mon, 19 Dec 2011 18:11:49 +0000 (19:11 +0100)]
soxdec: check av_malloc return.
Bug found by: durandal_1707

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: rename payload_index to payload_size
Luca Barbato [Sat, 17 Dec 2011 13:08:11 +0000 (14:08 +0100)]
mpegts: rename payload_index to payload_size

It holds the size of the current payload.

7 years agosegment: introduce segmented chain muxer
Luca Barbato [Sun, 2 Oct 2011 21:05:29 +0000 (23:05 +0200)]
segment: introduce segmented chain muxer

It behaves similarly to image2 muxer

7 years agolavu: add AVERROR_BUG error value
Luca Barbato [Wed, 14 Dec 2011 19:27:11 +0000 (20:27 +0100)]
lavu: add AVERROR_BUG error value

It should be used to mark codepath that can be reached only through
programming error.

7 years agoavplay: clear pkt_temp when pkt is freed.
Michael Niedermayer [Tue, 13 Dec 2011 23:38:23 +0000 (00:38 +0100)]
avplay: clear pkt_temp when pkt is freed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoeamad: pass & check errors
Michael Niedermayer [Mon, 19 Dec 2011 15:30:30 +0000 (16:30 +0100)]
eamad: pass & check errors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoeamad: fix excessive memory allocation.
Michael Niedermayer [Mon, 19 Dec 2011 15:27:52 +0000 (16:27 +0100)]
eamad: fix excessive memory allocation.
Fixes Ticket792
Bug found by Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqcelpdec: K&R formatting cosmetics
Asen Lekov [Sun, 18 Dec 2011 23:32:54 +0000 (01:32 +0200)]
qcelpdec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agoqcelpdec: cosmetics: drop some pointless parentheses
Diego Biurrun [Mon, 19 Dec 2011 13:54:58 +0000 (14:54 +0100)]
qcelpdec: cosmetics: drop some pointless parentheses

7 years agosws: Print an error in case of av_malloc() failure
Michael Niedermayer [Mon, 19 Dec 2011 15:01:37 +0000 (16:01 +0100)]
sws: Print an error in case of av_malloc() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoswscale: Fix several (real world) integer overflows.
Michael Niedermayer [Mon, 19 Dec 2011 14:48:47 +0000 (15:48 +0100)]
swscale: Fix several (real world) integer overflows.
Fixes Ticket795
Bug Found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agox86: conditionally compile dnxhd encoder optimizations
Diego Biurrun [Sun, 18 Dec 2011 12:13:02 +0000 (13:13 +0100)]
x86: conditionally compile dnxhd encoder optimizations

7 years agodsicin demuxer: Fix excessive malloc()
Michael Niedermayer [Mon, 19 Dec 2011 10:47:15 +0000 (11:47 +0100)]
dsicin demuxer: Fix excessive malloc()
use ffio_limit()
Fixes Ticket 790
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: split out ffio_limit()
Michael Niedermayer [Mon, 19 Dec 2011 10:46:34 +0000 (11:46 +0100)]
lavf: split out ffio_limit()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotqi: Fix passing errors from the MB decode. This silences some valgrind warnings.
Michael Niedermayer [Mon, 19 Dec 2011 03:13:37 +0000 (04:13 +0100)]
tqi: Fix passing errors from the MB decode. This silences some valgrind warnings.
Fixes second half of Ticket794
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadpcm: Fix crash
Michael Niedermayer [Mon, 19 Dec 2011 03:09:23 +0000 (04:09 +0100)]
adpcm: Fix crash
Fixes half of Ticket794
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoproresdec: add UPDATE_CACHE, should fix decoding with -Os
Michael Niedermayer [Mon, 19 Dec 2011 02:43:53 +0000 (03:43 +0100)]
proresdec: add UPDATE_CACHE, should fix decoding with -Os

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "h264: skip start code search if the size of the nal unit is known"
Janne Grunau [Mon, 19 Dec 2011 02:00:36 +0000 (03:00 +0100)]
Revert "h264: skip start code search if the size of the nal unit is known"

This reverts commit 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 19 Dec 2011 01:11:50 +0000 (02:11 +0100)]
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>
7 years agoswscale: fix formatting and indentation of unscaled conversion routines.
Nathan Adil Maxson [Sun, 18 Dec 2011 16:11:27 +0000 (08:11 -0800)]
swscale: fix formatting and indentation of unscaled conversion routines.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agorl2demux: Fix FPE
Michael Niedermayer [Sun, 18 Dec 2011 22:54:56 +0000 (23:54 +0100)]
rl2demux: Fix FPE
Fixes Ticket788
Bug found by Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: skip start code search if the size of the nal unit is known
Janne Grunau [Sun, 18 Dec 2011 21:42:36 +0000 (22:42 +0100)]
h264: skip start code search if the size of the nal unit is known

Start code emulation prevention is only required in Annex B bytestream
packed NAL units. For other coding formats the size is already known.
Looking for a start code prefix can result in false positives like in
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4
which has a false positive in the SPS.

7 years agocljr: fix buf_size sanity check
Paul B. Mahol [Sat, 17 Dec 2011 17:58:06 +0000 (17:58 +0000)]
cljr: fix buf_size sanity check

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agocljr: Check if width and height are positive integers
Shitiz Garg [Thu, 15 Dec 2011 22:20:21 +0000 (22:20 +0000)]
cljr: Check if width and height are positive integers

Width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agoAPIchanges: fill in revision for AVFrame.age deprecation
Mans Rullgard [Sun, 18 Dec 2011 22:15:04 +0000 (22:15 +0000)]
APIchanges: fill in revision for AVFrame.age deprecation

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoavcodec: deprecate AVFrame.age
Mans Rullgard [Sun, 18 Dec 2011 20:41:42 +0000 (20:41 +0000)]
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>
7 years agoMerge remote-tracking branch 'tjoppen/proper_mxf_track_linking'
Michael Niedermayer [Sun, 18 Dec 2011 22:10:58 +0000 (23:10 +0100)]
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>
7 years agosiff: Fix excessive memory allocation.
Michael Niedermayer [Sun, 18 Dec 2011 21:43:19 +0000 (22:43 +0100)]
siff: Fix excessive memory allocation.
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomov: detect EOF in mov_read_dref()
Michael Niedermayer [Sun, 18 Dec 2011 20:37:54 +0000 (21:37 +0100)]
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>
7 years agoadx_parser: rewrite.
Michael Niedermayer [Sun, 18 Dec 2011 19:12:16 +0000 (20:12 +0100)]
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>
7 years agoadxdec: Fix division by zero
Michael Niedermayer [Sun, 18 Dec 2011 19:10:51 +0000 (20:10 +0100)]
adxdec: Fix division by zero

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadxdec: Do not require extradata.
Michael Niedermayer [Sun, 18 Dec 2011 19:10:30 +0000 (20:10 +0100)]
adxdec: Do not require extradata.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoadx_parser: Fix infinite loop.
Michael Niedermayer [Sun, 18 Dec 2011 17:57:56 +0000 (18:57 +0100)]
adx_parser: Fix infinite loop.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years ago4xm: remove unneeded check for remaining unused data.
Justin Ruggles [Sun, 18 Dec 2011 18:21:27 +0000 (13:21 -0500)]
4xm: remove unneeded check for remaining unused data.

This is unnecessary complication that only prints a message and does not
affect decoding.

7 years agolavf: force threads to 1 in avformat_find_stream_info()
Anton Khirnov [Tue, 6 Dec 2011 06:51:54 +0000 (07:51 +0100)]
lavf: force threads to 1 in avformat_find_stream_info()

Fixes avformat_find_stream_info() on streams with number of frames <
thread count.

7 years agoswscale: fix overflows in vertical scaling at top/bottom edges.
Ronald S. Bultje [Sun, 18 Dec 2011 16:27:43 +0000 (08:27 -0800)]
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.

7 years agolavf: add OpenMG audio muxer.
Michael Karcher [Fri, 21 Oct 2011 21:32:33 +0000 (23:32 +0200)]
lavf: add OpenMG audio muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoomadec: split data that will be used in the muxer to a separate file.
Anton Khirnov [Sat, 17 Dec 2011 14:23:13 +0000 (15:23 +0100)]
omadec: split data that will be used in the muxer to a separate file.

7 years agolavf: rename oma.c -> omadec.c
Anton Khirnov [Sat, 17 Dec 2011 14:00:04 +0000 (15:00 +0100)]
lavf: rename oma.c -> omadec.c

7 years agotmv decoder: set correct pix_fmt
Uoti Urpala [Sun, 18 Dec 2011 14:17:07 +0000 (16:17 +0200)]
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>
7 years agoFix channel order for some less common TrueHD layouts.
Carl Eugen Hoyos [Sun, 18 Dec 2011 14:28:18 +0000 (15:28 +0100)]
Fix channel order for some less common TrueHD layouts.

Reported and tested by TDiTP_

Fixes ticket #779.

7 years agomlpdec: fix channel order for wide 7.1 truehd layouts
Hendrik Leppkes [Sun, 18 Dec 2011 14:25:25 +0000 (15:25 +0100)]
mlpdec: fix channel order for wide 7.1 truehd layouts

7 years agoCosmetics: Fix indentation after last commit.
Carl Eugen Hoyos [Sun, 18 Dec 2011 13:22:13 +0000 (14:22 +0100)]
Cosmetics: Fix indentation after last commit.

7 years agoFix possible endless loop when decoding amr.
Carl Eugen Hoyos [Sun, 18 Dec 2011 13:20:14 +0000 (14:20 +0100)]
Fix possible endless loop when decoding amr.

Fixes bug 151.

Reviewed-by: Vitor Sessak
7 years agoAssume architecture arm for machine hardware name iPad*.
Carl Eugen Hoyos [Sun, 18 Dec 2011 12:48:44 +0000 (13:48 +0100)]
Assume architecture arm for machine hardware name iPad*.

uname -m returns for example "iPad2,1".

7 years agosbgdec: change -1 into AVERROR(EINVAL).
Nicolas George [Sun, 18 Dec 2011 08:33:09 +0000 (09:33 +0100)]
sbgdec: change -1 into AVERROR(EINVAL).

This is not as accurate as ELOOP, but there is an explicit error message
just before anyway.

7 years agosbgdec: Replace ELOOP by -1 to fix compilation on win32.
Michael Niedermayer [Sun, 18 Dec 2011 02:53:50 +0000 (03:53 +0100)]
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>
7 years agompeg12: disable checked reader.
Michael Niedermayer [Sun, 18 Dec 2011 02:24:09 +0000 (03:24 +0100)]
mpeg12: disable checked reader.
overreads in mpeg12 are not possible

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg4: disable checked bitstream reader, overreads are not possible.
Michael Niedermayer [Sun, 18 Dec 2011 02:20:41 +0000 (03:20 +0100)]
mpeg4: disable checked bitstream reader, overreads are not possible.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh263: disable slow checked reader, overreads are not possible in
Michael Niedermayer [Sun, 18 Dec 2011 02:19:40 +0000 (03:19 +0100)]
h263: disable slow checked reader, overreads are not possible in
ffmpegs h263 decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: disable checking reader, overreads are not possible
Michael Niedermayer [Sun, 18 Dec 2011 02:17:44 +0000 (03:17 +0100)]
h264: disable checking reader, overreads are not possible
in ffmpegs h264 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 18 Dec 2011 01:23:57 +0000 (02:23 +0100)]
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>
7 years agoget_bits: drop the a32 reader.
Michael Niedermayer [Sun, 18 Dec 2011 00:46:36 +0000 (01:46 +0100)]
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: a1e98f198e9db4e5ddfc2f777014179d3d7bc4d2 by Mans Rullgard.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agov210dec: Fix warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]
Michael Niedermayer [Sun, 18 Dec 2011 00:06:07 +0000 (01:06 +0100)]
v210dec: Fix warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agov210enc: Fix warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]
Michael Niedermayer [Sat, 17 Dec 2011 23:55:21 +0000 (00:55 +0100)]
v210enc: Fix  warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotta: Fix several warning: initialization from incompatible pointer type [enabled...
Michael Niedermayer [Sat, 17 Dec 2011 23:39:48 +0000 (00:39 +0100)]
tta: Fix several warning: initialization from incompatible pointer type [enabled by default]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosunrast: Fix warning: comparison of unsigned expression < 0 is always false [-Wtype...
Michael Niedermayer [Sat, 17 Dec 2011 23:34:01 +0000 (00:34 +0100)]
sunrast: Fix warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolagarith: rgb24 support
Michael Niedermayer [Sat, 17 Dec 2011 23:09:26 +0000 (00:09 +0100)]
lagarith: rgb24 support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavd/lavfi: fix incomplete comment
Stefano Sabatini [Sun, 18 Dec 2011 00:04:02 +0000 (01:04 +0100)]
lavd/lavfi: fix incomplete comment

7 years agolavd/lavfi: fix typo in error message
Stefano Sabatini [Sun, 18 Dec 2011 00:03:40 +0000 (01:03 +0100)]
lavd/lavfi: fix typo in error message

7 years agobuild: link test programs with static libraries
Mans Rullgard [Sat, 17 Dec 2011 15:05:24 +0000 (15:05 +0000)]
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>
7 years agodct-test: remove unused variable cropTbl
Mans Rullgard [Sat, 17 Dec 2011 21:35:50 +0000 (21:35 +0000)]
dct-test: remove unused variable cropTbl

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoswscale: fix overflow in gray16 vertical scaling.
Ronald S. Bultje [Sat, 17 Dec 2011 19:56:40 +0000 (19:56 +0000)]
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>
7 years agomsvideo1enc: Check that dimensions are a multiple of 4.
Michael Niedermayer [Sat, 17 Dec 2011 22:08:46 +0000 (23:08 +0100)]
msvideo1enc: Check that dimensions are a multiple of 4.
Fixes Ticket784
Found by: ami_stuff

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosbgdec: replace EOVERFLOW with ENOMEM.
Nicolas George [Sat, 17 Dec 2011 21:43:34 +0000 (22:43 +0100)]
sbgdec: replace EOVERFLOW with ENOMEM.

This should fix track issue #781, regarding compilation with
i686-w64-mingw32-gcc.

7 years agoget_bits: remove LAST_SKIP_CACHE macro
Mans Rullgard [Sat, 17 Dec 2011 19:40:16 +0000 (19:40 +0000)]
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>
7 years agomotion_est: avoid generating motion vectors that point between widthxheight and mb_wi...
Michael Niedermayer [Sat, 17 Dec 2011 18:55:47 +0000 (19:55 +0100)]
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>
7 years agoswscale: fix integer overflows in RGB pixel writing.
Mans Rullgard [Sat, 17 Dec 2011 18:45:46 +0000 (18:45 +0000)]
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>
7 years agoswscale: add endian conversion for RGB555 and RGB444 pixel formats
Janne Grunau [Fri, 16 Dec 2011 22:04:30 +0000 (23:04 +0100)]
swscale: add endian conversion for RGB555 and RGB444 pixel formats

Add a macro to shorten the if condition.

7 years agoswscale: fix overflows in output of RGB48 pixels.
Ronald S. Bultje [Fri, 16 Dec 2011 00:03:54 +0000 (00:03 +0000)]
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>
7 years agoget_bits: remove strange/obsolete comments
Mans Rullgard [Sat, 17 Dec 2011 01:07:32 +0000 (01:07 +0000)]
get_bits: remove strange/obsolete comments

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoget_bits: whitespace (mostly) cosmetics
Mans Rullgard [Sat, 17 Dec 2011 01:05:35 +0000 (01:05 +0000)]
get_bits: whitespace (mostly) cosmetics

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoswscale: add rgb565 endianess conversion
Janne Grunau [Fri, 16 Dec 2011 18:38:53 +0000 (19:38 +0100)]
swscale: add rgb565 endianess conversion

7 years agoget_bits: remove unnecessary #includes
Mans Rullgard [Sat, 17 Dec 2011 00:30:59 +0000 (00:30 +0000)]
get_bits: remove unnecessary #includes

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agomp3dec: hack: fix decoding with safe bitstream reader
Mans Rullgard [Sat, 17 Dec 2011 16:19:24 +0000 (16:19 +0000)]
mp3dec: hack: fix decoding with safe bitstream reader

The buffer splicing relies on the bitstream reader over-reading
the end of the buffer as declared in init_get_bits(), although
more data is actually present.  Manually moving the bitstream
boundary after init_get_bits() allows this to work as expected.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agodoc: fix "reference to nonexistent node `Regression Tests'" warning.
Clément Bœsch [Sat, 17 Dec 2011 15:49:25 +0000 (16:49 +0100)]
doc: fix "reference to nonexistent node `Regression Tests'" warning.

7 years agofate: fix eatqi test
Mans Rullgard [Sat, 17 Dec 2011 15:48:19 +0000 (15:48 +0000)]
fate: fix eatqi test

The sample has an incomplete last frame.  Decoding it is pointless.
The garbage produced was changed by the bitstream reader now
protecting against over-reads.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agodoc: fix "Unknown command `fate'" warning.
Clément Bœsch [Sat, 17 Dec 2011 15:46:56 +0000 (16:46 +0100)]
doc: fix "Unknown command `fate'" warning.

7 years agoadpcm: Check for channels to be a non-zero integer
Shitiz Garg [Sat, 17 Dec 2011 14:05:59 +0000 (19:35 +0530)]
adpcm: Check for channels to be a non-zero integer

channels would be 0 sometimes and would cause floating point exception
Fixes bugzilla #124

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoswscale: fix overflows in RGB rounding constants.
Ronald S. Bultje [Fri, 16 Dec 2011 00:03:57 +0000 (00:03 +0000)]
swscale: fix overflows in RGB rounding constants.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoget_bits: introduce safe bitreading to prevent overreads.
Ronald S. Bultje [Fri, 16 Dec 2011 21:42:04 +0000 (21:42 +0000)]
get_bits: introduce safe bitreading to prevent overreads.

When turned on, H264/CAVLC gets ~15% (CVPCMNL1_SVA_C.264) slower for
ultra-high-bitrate files, or ~2.5% (CVFI1_SVA_C.264) for lower-bitrate
files. Other codecs are affected to a lesser extent because they are
less optimized; e.g., VC-1 slows down by less than 1% (all on x86).
The patch generated 3 extra instructions (cmp, cmovae and mov) per
call to get_bits().

The performance penalty on ARM is within the error margin for most
files, up to 4% in extreme cases such as CVPCMNL1_SVA_C.264.

Based on work (for GCI) by Aneesh Dogra <lionaneesh@gmail.com>, and
inspired by patch in Chromium by Chris Evans <cevans@chromium.org>.

7 years agolavc: Check codec_ids against insertion/removial typos
Michael Niedermayer [Sat, 17 Dec 2011 05:09:13 +0000 (06:09 +0100)]
lavc: Check codec_ids against insertion/removial typos

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavutil: check sampleformats enum, pict type enum and media type enum against insert...
Michael Niedermayer [Sat, 17 Dec 2011 04:45:34 +0000 (05:45 +0100)]
avutil: check sampleformats enum, pict type enum and media type enum against insert/remove mistakes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopixfmts: Selfcheck against insertions / deletions in the enum.
Michael Niedermayer [Sat, 17 Dec 2011 04:41:42 +0000 (05:41 +0100)]
pixfmts: Selfcheck against insertions / deletions in the enum.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoaacdec: Fix null pointer crash
Michael Niedermayer [Sat, 17 Dec 2011 04:02:11 +0000 (05:02 +0100)]
aacdec: Fix null pointer crash
Fixes bug170
Bug found by: Gautam Gupta

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: fix init of topleft ref/mv.
Michael Niedermayer [Sat, 17 Dec 2011 03:42:04 +0000 (04:42 +0100)]
h264: fix init of topleft ref/mv.
Fixes Ticket778

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavienc: Fix rawvideo 32bit
Michael Niedermayer [Sat, 17 Dec 2011 02:25:46 +0000 (03:25 +0100)]
avienc: Fix rawvideo 32bit
Bug found by: Rik Maes <rik.maes54@gmail.com>
Change based on suggestion by Rik Maes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoatrac3: Fix crash in tonal component decoding.
Michael Niedermayer [Sat, 17 Dec 2011 02:18:58 +0000 (03:18 +0100)]
atrac3: Fix crash in tonal component decoding.
Fixes Ticket780
Bug Found by: cosminamironesei

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 17 Dec 2011 00:36:59 +0000 (01:36 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  get_bits: remove A32 variant
  avconv: support stream specifiers in -metadata and -map_metadata
  wavpack: Fix 32-bit clipping
  wavpack: Clip samples after shifting
  h264: don't drop B-frames after next keyframe on POC reset.
  get_bits: remove useless pointer casts
  configure: refactor lists of tests and components into variables
  rv40: NEON optimised weak loop filter
  mpegts: replace some magic numbers with the existing define
  swscale: add unscaled packed 16 bit per component endianess conversion

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>