ffmpeg.git
7 years agommvideo.c: Remove unused variable in mm_decode_pal().
Diego Biurrun [Thu, 19 Apr 2012 12:49:51 +0000 (14:49 +0200)]
mmvideo.c: Remove unused variable in mm_decode_pal().

libavcodec/mmvideo.c:87:9: warning: variable ‘i’ set but not used

7 years agobuild: cosmetics: Add missing end-of-line backslashes to item lists.
Diego Biurrun [Mon, 7 May 2012 10:08:58 +0000 (12:08 +0200)]
build: cosmetics: Add missing end-of-line backslashes to item lists.

7 years agobuild: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line.
Diego Biurrun [Sat, 14 Apr 2012 11:05:08 +0000 (13:05 +0200)]
build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line.

7 years agolibschroedinger: Move a function to avoid a forward declaration.
Diego Biurrun [Sat, 14 Apr 2012 13:40:58 +0000 (15:40 +0200)]
libschroedinger: Move a function to avoid a forward declaration.

7 years agopthread: warn on high thread counts
Sean McGovern [Mon, 19 Mar 2012 05:08:14 +0000 (01:08 -0400)]
pthread: warn on high thread counts

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agovf_yadif: fix missing error handling for avfilter_poll_frame()
Robert Nagy [Sun, 15 Apr 2012 13:46:37 +0000 (15:46 +0200)]
vf_yadif: fix missing error handling for avfilter_poll_frame()

7 years agoavprobe: allow showing only one container/stream property.
Ronald S. Bultje [Thu, 3 May 2012 18:23:01 +0000 (20:23 +0200)]
avprobe: allow showing only one container/stream property.

This is useful for writing unit tests.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavfi: support audio in avfilter_copy_frame_props().
Anton Khirnov [Sat, 5 May 2012 11:11:53 +0000 (13:11 +0200)]
lavfi: support audio in avfilter_copy_frame_props().

7 years agolavfi: avfilter_merge_formats: handle case where inputs are same
Mina Nagy Zaki [Wed, 8 Jun 2011 16:24:25 +0000 (19:24 +0300)]
lavfi: avfilter_merge_formats: handle case where inputs are same

This fixes a double-free crash if lists are the same due to the two
merge_ref() calls at the end of the (useless) merging that happens.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavc: add sample rate and channel layout to AVFrame.
Anton Khirnov [Fri, 4 May 2012 17:12:31 +0000 (19:12 +0200)]
lavc: add sample rate and channel layout to AVFrame.

Rationale is the same as for video width/height etc.

7 years agozerocodec: check if the previous frame is missing
Paul B Mahol [Fri, 4 May 2012 16:32:43 +0000 (12:32 -0400)]
zerocodec: check if the previous frame is missing

ZeroCodec relies on the keyframe flag being set in the container, and
prev is the previously decoded frame. A keyframe flags incorrectly set
will lead to this condition.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agodoc: clarify check for NULL pointer style
Luca Barbato [Fri, 4 May 2012 17:03:42 +0000 (10:03 -0700)]
doc: clarify check for NULL pointer style

Our code should be terse and clear.

7 years agodfa: use more meaningful return codes
Kostya Shishkov [Sun, 6 May 2012 07:46:19 +0000 (09:46 +0200)]
dfa: use more meaningful return codes

7 years agoeatgv: check vector_bits
Michael Niedermayer [Sun, 15 Apr 2012 11:29:50 +0000 (13:29 +0200)]
eatgv: check vector_bits

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agoeatgv: check motion vectors
Kostya Shishkov [Sat, 5 May 2012 12:27:35 +0000 (14:27 +0200)]
eatgv: check motion vectors

7 years agoMark a number of variables only used in av_dlog() calls as av_unused.
Diego Biurrun [Thu, 19 Apr 2012 12:48:16 +0000 (14:48 +0200)]
Mark a number of variables only used in av_dlog() calls as av_unused.

This fixes a number of unused-but-set gcc warnings.

7 years agodvdec: drop const qualifier from variable to eliminate a warning
Diego Biurrun [Mon, 16 Apr 2012 09:38:02 +0000 (11:38 +0200)]
dvdec: drop const qualifier from variable to eliminate a warning

libavcodec/dvdec.c:344:12: warning: assignment discards ‘const’ qualifier from pointer target type

7 years agoavcodec: Improve comment for thread_safe_callbacks to avoid misinterpretation.
Robert Nagy [Sat, 14 Apr 2012 18:31:45 +0000 (20:31 +0200)]
avcodec: Improve comment for thread_safe_callbacks to avoid misinterpretation.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agotests/utils: don't ignore the return value of fwrite()
Sean McGovern [Thu, 26 Apr 2012 18:56:24 +0000 (14:56 -0400)]
tests/utils: don't ignore the return value of fwrite()

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agolavfi/formats: use sizeof(var) instead of sizeof(type).
Anton Khirnov [Fri, 4 May 2012 07:49:28 +0000 (09:49 +0200)]
lavfi/formats: use sizeof(var) instead of sizeof(type).

7 years agolavfi: remove avfilter_default_config_input_link() declaration
Stefano Sabatini [Sat, 6 Aug 2011 10:11:12 +0000 (12:11 +0200)]
lavfi: remove avfilter_default_config_input_link() declaration

The function is not implemented (and possibly useless).

7 years agolavfi: always enable the scale filter and depend on sws.
Anton Khirnov [Sat, 5 May 2012 08:22:55 +0000 (10:22 +0200)]
lavfi: always enable the scale filter and depend on sws.

The scale filter is used for internal colorspace conversions, so it must
always be present.

7 years agovf_split: support user-specifiable number of outputs.
Anton Khirnov [Fri, 27 Apr 2012 05:41:32 +0000 (07:41 +0200)]
vf_split: support user-specifiable number of outputs.

7 years agoavconv: remove stray useless comment.
Anton Khirnov [Sat, 5 May 2012 12:17:19 +0000 (14:17 +0200)]
avconv: remove stray useless comment.

7 years agompegmux: add stuffing to avoid incomplete PCM frames
Janne Grunau [Tue, 13 Mar 2012 17:12:06 +0000 (18:12 +0100)]
mpegmux: add stuffing to avoid incomplete PCM frames

Fixes https://bugzilla.libav.org/show_bug.cgi?id=244

7 years agortsp: avoid const warnings from strtol() call
Mans Rullgard [Wed, 25 Apr 2012 22:37:29 +0000 (23:37 +0100)]
rtsp: avoid const warnings from strtol() call

The strtol() interface makes it difficult to use with
const-qualified pointers.  With this change, although
the const is still lost, the compiler does not warn
about it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoavserver: check return value of ftruncate()
Mans Rullgard [Sat, 21 Apr 2012 16:01:35 +0000 (17:01 +0100)]
avserver: check return value of ftruncate()

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agolagarith: make offset array type unsigned
Kostya Shishkov [Sat, 5 May 2012 11:45:03 +0000 (13:45 +0200)]
lagarith: make offset array type unsigned

This is logical and also fixes checking for the fourth plane offset.

7 years agodfa: add some checks to ensure that decoder won't write past frame end
Kostya Shishkov [Thu, 3 May 2012 18:10:36 +0000 (20:10 +0200)]
dfa: add some checks to ensure that decoder won't write past frame end

7 years agoaacps: NEON optimisations
Mans Rullgard [Tue, 13 Mar 2012 13:20:29 +0000 (13:20 +0000)]
aacps: NEON optimisations

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoaacps: align some arrays
Mans Rullgard [Fri, 27 Jan 2012 01:24:55 +0000 (01:24 +0000)]
aacps: align some arrays

This is required for SIMD optimisations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoaacps: move some loops to function pointers
Mans Rullgard [Fri, 27 Jan 2012 01:22:55 +0000 (01:22 +0000)]
aacps: move some loops to function pointers

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agortpdec_h264: Add missing newlines to av_log calls
Martin Storsjö [Sat, 5 May 2012 17:48:08 +0000 (20:48 +0300)]
rtpdec_h264: Add missing newlines to av_log calls

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Free old extradata before clearing the pointer
Martin Storsjö [Sat, 5 May 2012 13:55:20 +0000 (16:55 +0300)]
rtpdec_h264: Free old extradata before clearing the pointer

This avoids memory leaks if there actually was some extradata
set before.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Reorder code blocks
Martin Storsjö [Fri, 4 May 2012 21:38:05 +0000 (00:38 +0300)]
rtpdec_h264: Reorder code blocks

This removes one level of indentation.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Make start_sequence a static const array
Martin Storsjö [Fri, 4 May 2012 21:33:39 +0000 (00:33 +0300)]
rtpdec_h264: Make start_sequence a static const array

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Cleanup debug packet type counting
Martin Storsjö [Fri, 4 May 2012 21:28:25 +0000 (00:28 +0300)]
rtpdec_h264: Cleanup debug packet type counting

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Cosmetic cleanup
Martin Storsjö [Sat, 5 May 2012 14:42:15 +0000 (16:42 +0200)]
rtpdec_h264: Cosmetic cleanup

Add/fix spacing, split long lines, align assignments where suitable.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Clean up comments
Martin Storsjö [Fri, 4 May 2012 21:05:52 +0000 (00:05 +0300)]
rtpdec_h264: Clean up comments

Split long comments, move long comments at the end of lines to
separate lines above, fix vertical alignment, fix up comment style
(unify trailing dots - comments had a mix of 2, 3 or 4 dots, where
it would be just as good without them at all).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Convert commented out code into setting an unused variable
Martin Storsjö [Fri, 4 May 2012 21:02:15 +0000 (00:02 +0300)]
rtpdec_h264: Convert commented out code into setting an unused variable

It is worth keeping instead of removing, in case reading this
bit becomes necessary at some later point.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agotests: Refactor rotozoom/videogen common code into a separate file.
Diego Biurrun [Mon, 30 Apr 2012 14:44:31 +0000 (16:44 +0200)]
tests: Refactor rotozoom/videogen common code into a separate file.

7 years agotests: Mark some file-internal symbols as static.
Diego Biurrun [Mon, 30 Apr 2012 14:29:26 +0000 (16:29 +0200)]
tests: Mark some file-internal symbols as static.

7 years agobuild: Drop leftover .exp pattern from LIBSUFFIXES list.
Diego Biurrun [Mon, 30 Apr 2012 08:33:49 +0000 (10:33 +0200)]
build: Drop leftover .exp pattern from LIBSUFFIXES list.

7 years agovsrc_buffer: return EAGAIN if no frame is available.
Nicolas George [Tue, 17 Apr 2012 16:31:25 +0000 (18:31 +0200)]
vsrc_buffer: return EAGAIN if no frame is available.

This is not an erroneous condition, do not print a warning.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoWMAL: Shift output samples by the specified number of padding zeroes.
Jakub Stachowski [Thu, 3 May 2012 17:36:48 +0000 (19:36 +0200)]
WMAL: Shift output samples by the specified number of padding zeroes.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agoWMAL: Restore removed code in mclms_predict()
Mashiat Sarker Shakkhar [Thu, 3 May 2012 17:14:47 +0000 (10:14 -0700)]
WMAL: Restore removed code in mclms_predict()

Based on observations made by Jakub Stachowski <qbast@go2.pl>

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agortpdec_h264: Remove a useless ifdef
Martin Storsjö [Fri, 4 May 2012 20:53:10 +0000 (23:53 +0300)]
rtpdec_h264: Remove a useless ifdef

assert is a no-op if DEBUG isn't defined.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Remove outdated/useless/incorrect comments
Martin Storsjö [Fri, 4 May 2012 20:46:18 +0000 (23:46 +0300)]
rtpdec_h264: Remove outdated/useless/incorrect comments

RTCP is handled elsewhere, not in the depacketizer for an
individual format.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Remove useless memory corruption checks
Martin Storsjö [Fri, 4 May 2012 20:49:45 +0000 (23:49 +0300)]
rtpdec_h264: Remove useless memory corruption checks

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Return proper error codes
Martin Storsjö [Fri, 4 May 2012 21:29:15 +0000 (00:29 +0300)]
rtpdec_h264: Return proper error codes

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Check the available data length before reading
Martin Storsjö [Fri, 4 May 2012 19:45:11 +0000 (22:45 +0300)]
rtpdec_h264: Check the available data length before reading

This makes sure the length is checked for STAP-A type packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortpdec_h264: Add input size checks
Ivan Kovtunov [Fri, 4 May 2012 19:31:46 +0000 (22:31 +0300)]
rtpdec_h264: Add input size checks

This fixes crashes if given too short data packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agopng: check bit depth for PAL8/Y400A pixel formats.
Ronald S. Bultje [Wed, 2 May 2012 17:58:55 +0000 (10:58 -0700)]
png: check bit depth for PAL8/Y400A pixel formats.

Wrong bit depth can lead to invalid rowsize values, which crashes the
decoder further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoea: check chunk_size for validity.
Ronald S. Bultje [Fri, 4 May 2012 23:06:26 +0000 (16:06 -0700)]
ea: check chunk_size for validity.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agocelp filters: Do not read earlier than the start of the 'out' vector.
Alex Converse [Fri, 4 May 2012 17:27:03 +0000 (10:27 -0700)]
celp filters: Do not read earlier than the start of the 'out' vector.

CC: libav-stable@libav.org
7 years agoconfigure: add POWER[5-7] support
Sean McGovern [Fri, 27 Apr 2012 13:47:58 +0000 (14:47 +0100)]
configure: add POWER[5-7] support

Also merge POWER3 and POWER4 configuration together with the additions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoarm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6
Mans Rullgard [Thu, 3 May 2012 18:14:16 +0000 (19:14 +0100)]
arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6

Commit adebad0 "arm: intreadwrite: fix inline asm constraints for gcc
4.6 and later" caused some older gcc versions to miscompile code.
This reverts to the old version of the code for these compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agovqavideo: return error if image size is not a multiple of block size
Mans Rullgard [Mon, 23 Apr 2012 12:16:33 +0000 (13:16 +0100)]
vqavideo: return error if image size is not a multiple of block size

The decoder assumes in various places that the image size
is a multiple of the block size, and there is no obvious
way to support odd sizes.  Bailing out early if the header
specifies a bad size avoids various errors later on.

Fixes CVE-2012-0947.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agocosmetics: indentation
Justin Ruggles [Thu, 26 Apr 2012 15:07:41 +0000 (11:07 -0400)]
cosmetics: indentation

7 years agoavformat: only fill-in interpolated timestamps if duration is non-zero
Justin Ruggles [Thu, 26 Apr 2012 15:02:02 +0000 (11:02 -0400)]
avformat: only fill-in interpolated timestamps if duration is non-zero

This avoids returning duplicate timestamps for multiple packets when the
demuxer does not provide all timestamps and packet duration is not known.

7 years agoavformat: remove a workaround for broken timestamps
Justin Ruggles [Thu, 26 Apr 2012 14:59:05 +0000 (10:59 -0400)]
avformat: remove a workaround for broken timestamps

This modifies pts in situations other than what was intended, leading to
invalid timestamps.

Reverts commit 90bb394dccacd10607153833a0aeba0d970dc8db

7 years agompeg12: fixed parsing in some mpeg2 streams
Hendrik Leppkes [Sun, 29 Apr 2012 16:33:40 +0000 (16:33 +0000)]
mpeg12: fixed parsing in some mpeg2 streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agoAdd SMPTE240M transfer characteristics flag.
Hendrik Leppkes [Sun, 29 Apr 2012 16:33:34 +0000 (16:33 +0000)]
Add SMPTE240M transfer characteristics flag.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agompegts: Some additional HDMV types and reg descriptors for mpegts
Joakim Plate [Sun, 29 Apr 2012 16:33:32 +0000 (16:33 +0000)]
mpegts: Some additional HDMV types and reg descriptors for mpegts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agomotionpixels: Clip YUV values after applying a gradient.
Alex Converse [Wed, 2 May 2012 19:08:03 +0000 (12:08 -0700)]
motionpixels: Clip YUV values after applying a gradient.

Prevents illegal reads on truncated and malformed input.

CC: libav-stable@libav.org
7 years agojpeg: handle progressive in second field of interlaced.
Ronald S. Bultje [Wed, 14 Mar 2012 00:18:41 +0000 (17:18 -0700)]
jpeg: handle progressive in second field of interlaced.

Progressive data is allocated later in decode_sof(), not allocating
that data leads to NULL dereferences.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoituh263dec: Implement enough of Annex O (scalability) to fix a FPE.
Michael Niedermayer [Thu, 29 Mar 2012 23:54:28 +0000 (16:54 -0700)]
ituh263dec: Implement enough of Annex O (scalability) to fix a FPE.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoh263: more strictly forbid frame size changes with frame-mt.
Ronald S. Bultje [Thu, 29 Mar 2012 19:24:10 +0000 (12:24 -0700)]
h263: more strictly forbid frame size changes with frame-mt.

Prevents crashes because the old check was incomplete.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoh264: additional protection against unsupported size/bitdepth changes.
Ronald S. Bultje [Thu, 29 Mar 2012 23:37:09 +0000 (16:37 -0700)]
h264: additional protection against unsupported size/bitdepth changes.

Fixes crashes in codepaths not covered by original checks.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agotta: prevents overflows for 32bit integers in header.
Ronald S. Bultje [Thu, 29 Mar 2012 19:44:55 +0000 (12:44 -0700)]
tta: prevents overflows for 32bit integers in header.

This prevents sample_rate/data_length from going negative, which
caused various crashes and undefined behaviour further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoconfigure: remove malloc_aligned.
Ronald S. Bultje [Sun, 29 Apr 2012 17:40:37 +0000 (10:40 -0700)]
configure: remove malloc_aligned.

It was to signal that allocations are 16-byte aligned, but AVX requires
32-byte alignment, thus the check is no longer useful (and causes
crashes).

7 years agovp8: update frame size changes on thread context switches.
Ronald S. Bultje [Tue, 1 May 2012 16:59:04 +0000 (09:59 -0700)]
vp8: update frame size changes on thread context switches.

This properly synchronizes frame size changes between threads if
subsequent threads abort decoding before frame size is initialized, i.e.
it prevents the thread after that from ping-ponging back to the original
value.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agosnowdsp: explicitily state instruction size.
Ronald S. Bultje [Wed, 2 May 2012 16:55:46 +0000 (09:55 -0700)]
snowdsp: explicitily state instruction size.

Fixes a compile error with clang at -O0.

7 years agowmall: fix reconstructing audio with uncoded channels
Kostya Shishkov [Tue, 1 May 2012 14:09:51 +0000 (16:09 +0200)]
wmall: fix reconstructing audio with uncoded channels

7 years agoWMAL cosmetics: fix indentation
Mashiat Sarker Shakkhar [Wed, 2 May 2012 15:43:36 +0000 (08:43 -0700)]
WMAL cosmetics: fix indentation

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agogitignore: add Win32 library suffixes
Joakim Plate [Sun, 29 Apr 2012 16:33:28 +0000 (16:33 +0000)]
gitignore: add Win32 library suffixes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agoarm: intreadwrite: disable inline asm for gcc 4.7 and later
Mans Rullgard [Wed, 2 May 2012 14:09:54 +0000 (15:09 +0100)]
arm: intreadwrite: disable inline asm for gcc 4.7 and later

Starting with version 4.7, gcc properly supports unaligned
memory accesses on ARM.  Not using the inline asm with these
compilers results in better code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoarm: intreadwrite: fix inline asm constraints for gcc 4.6 and later
Mans Rullgard [Wed, 2 May 2012 11:46:22 +0000 (12:46 +0100)]
arm: intreadwrite: fix inline asm constraints for gcc 4.6 and later

With a dereferenced type-cast pointer as memory operand, gcc 4.6
and later will sometimes copy the data to a temporary location,
the address of which is used as the operand value, if it thinks
the target address might be misaligned.  Using a pointer to a
packed struct type instead does the right thing.

The 16-bit case is special since the ldrh instruction addressing
modes are limited compared to ldr.  The "Uq" constraint produces a
memory reference suitable for an ldrsb instruction, which supports
the same addressing modes as ldrh.  However, the restrictions appear
to apply only when the operand addresses a single byte.  The memory
reference must thus be split into two operands each targeting one
byte.  Finally, the "Uq" constraint is only available in ARM mode.
The Thumb-2 ldrh instruction supports most addressing modes so the
normal "m" constraint can be used there.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoindeo3: fix motion vector validation
Hendrik Leppkes [Sun, 29 Apr 2012 16:33:41 +0000 (16:33 +0000)]
indeo3: fix motion vector validation

The index of the motion vector has to be checked before being
multiplied by 2 for the array index.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agopcm_bluray: set bits_per_raw_sample for > 16-bit
Hendrik Leppkes [Sun, 29 Apr 2012 17:21:55 +0000 (17:21 +0000)]
pcm_bluray: set bits_per_raw_sample for > 16-bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years agotwinvq: fix out of bounds array access
Mans Rullgard [Tue, 1 May 2012 17:27:19 +0000 (18:27 +0100)]
twinvq: fix out of bounds array access

ModeTab.fmode has only 3 elements, so indexing it with ftype
in the initialier for 'size' is invalid when ftype == FT_PPC.

This fixes crashes with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agolavr: use 8.8 instead of 10.6 as the 16-bit fixed-point mixing coeff type
Justin Ruggles [Thu, 26 Apr 2012 20:02:37 +0000 (16:02 -0400)]
lavr: use 8.8 instead of 10.6 as the 16-bit fixed-point mixing coeff type

7 years agoavplay: use libavresample for sample format conversion and channel mixing
Justin Ruggles [Wed, 25 Apr 2012 20:46:22 +0000 (16:46 -0400)]
avplay: use libavresample for sample format conversion and channel mixing

SDL only supports s16 sample format and a limited number of channel layouts.
Some versions of SDL on some systems support 4-channel and 6-channel output,
but it's safer overall to downmix any layout with more than 2 channels to
stereo.

7 years agoFix compilation with YASM/NASM without AVX support.
Reimar Döffinger [Sat, 28 Apr 2012 10:51:06 +0000 (12:51 +0200)]
Fix compilation with YASM/NASM without AVX support.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoWMAL: do not output last frame again if nothing was decoded in current packet
Jakub Stachowski [Sat, 28 Apr 2012 18:24:19 +0000 (11:24 -0700)]
WMAL: do not output last frame again if nothing was decoded in current packet

Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agoWMAL: do not start decoding if frame does not end in current packet
Mashiat Sarker Shakkhar [Mon, 30 Apr 2012 15:56:35 +0000 (08:56 -0700)]
WMAL: do not start decoding if frame does not end in current packet

This fixes decoding of frames which span more than two packets. Tested with
recit24.wma.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agoadpcm-thp: fix invalid array indexing
Mans Rullgard [Sun, 29 Apr 2012 00:17:37 +0000 (01:17 +0100)]
adpcm-thp: fix invalid array indexing

Indexing outside array limits is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoppc: add const where needed in scalarproduct_int16_altivec()
Mans Rullgard [Fri, 27 Apr 2012 09:43:08 +0000 (10:43 +0100)]
ppc: add const where needed in scalarproduct_int16_altivec()

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoppc: remove shift parameter from scalarproduct_int16_altivec()
Mans Rullgard [Fri, 27 Apr 2012 09:39:58 +0000 (10:39 +0100)]
ppc: remove shift parameter from scalarproduct_int16_altivec()

The shift parameter was removed from this interface in 7e1ce6a.
This updates the Altivec implementation to match.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoppc: dsputil: do unaligned block accesses correctly
Mans Rullgard [Fri, 27 Apr 2012 01:46:14 +0000 (02:46 +0100)]
ppc: dsputil: do unaligned block accesses correctly

To load unaligned vector data in the usual way, explicit vec_ld()
should be used rather than dereferencing a pointer to a vector type.
When the VSX extension is enabled, gcc may compile vector pointer
dereferences using the VSX lxvw4x instruction instead of the lvx
instruction typically used with Altivec/VMX.  As the behaviour of
these instructions with unaligned addresses differs, it is important
that only lvx is used here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agodvenc: do not call dsputil functions with stride not a multiple of 16
Mans Rullgard [Fri, 27 Apr 2012 01:25:42 +0000 (02:25 +0100)]
dvenc: do not call dsputil functions with stride not a multiple of 16

Allowing dsputil functions to assume the stride is a multiple of 16
even for smaller block sizes can simplify their implementation.
This appears to be the only place this guarantee is not met.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoAPIchanges: fill in some dates and commit hashes
Justin Ruggles [Thu, 26 Apr 2012 20:43:01 +0000 (16:43 -0400)]
APIchanges: fill in some dates and commit hashes

7 years agomkv: mark corrupted packets and return them
Luca Barbato [Mon, 30 Apr 2012 00:55:51 +0000 (17:55 -0700)]
mkv: mark corrupted packets and return them

Do return error if memory allocation or I/O fails.

7 years agomkv: forward EMBL block data error
Luca Barbato [Mon, 30 Apr 2012 00:39:31 +0000 (17:39 -0700)]
mkv: forward EMBL block data error

Do not return 0 on error.

7 years agoavcodec: introduce YCoCg colorspace
Hendrik Leppkes [Sun, 29 Apr 2012 20:35:51 +0000 (13:35 -0700)]
avcodec: introduce YCoCg colorspace

Non perceptual color model that aims to have an increase effectiveness
in compression like the normal YCbCr while having near-lossless/lossless
mapping to RGB.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agoavcodec: cosmetic cleanup on header
Luca Barbato [Sun, 29 Apr 2012 20:28:41 +0000 (13:28 -0700)]
avcodec: cosmetic cleanup on header

Apply coding style to the structs.

7 years agoaac sbr: align struct member by 32 byte.
Ronald S. Bultje [Sun, 29 Apr 2012 16:41:23 +0000 (16:41 +0000)]
aac sbr: align struct member by 32 byte.

Required because it's used in a call to imdct_half(), which is an AVX
function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years ago4xm: fix invalid array indexing
Mans Rullgard [Sat, 28 Apr 2012 12:05:18 +0000 (13:05 +0100)]
4xm: fix invalid array indexing

Indexing outside arrays is invalid and breaks with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agorv34dsp: factorize a multiplication in the noround inverse transform
Christophe GISQUET [Tue, 17 Apr 2012 18:44:43 +0000 (18:44 +0000)]
rv34dsp: factorize a multiplication in the noround inverse transform

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agorv40: perform bitwise checks in loop filter
Christophe Gisquet [Tue, 17 Apr 2012 18:44:51 +0000 (18:44 +0000)]
rv40: perform bitwise checks in loop filter

Down from 95 kcycles to 93 (including all called functions).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>