Commit Graph

38530 Commits

Author SHA1 Message Date
Luca Barbato ceec6e792e avi: directly resync on DV in AVI read failure
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 07:28:17 +02:00
Luca Barbato 756547ce7f avi: DV in AVI must be considered single stream
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 07:28:03 +02:00
Luca Barbato 1cac9accbd avi: properly fail if the dv demuxer is missing
CC: libav-stable@libav.org
2013-10-10 07:27:50 +02:00
Luca Barbato 1018a92219 jpeg2000: Check block length
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:19 +02:00
Luca Barbato 071e29af4d vmnc: Use meaningful return values 2013-10-09 22:25:01 +02:00
Luca Barbato 5e992a4682 vmnc: Check the cursor dimensions
And manage the reallocation failure path.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:01 +02:00
Luca Barbato 61cd19b8bc vmnc: Port to bytestream2
Fix some buffer overreads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:01 +02:00
Luca Barbato a66aa0daf2 vmnc: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-09 22:25:01 +02:00
Henrik Gramner ad7d7d4f6a x86inc: Remove .rodata kludges
The Mach-O bug was fixed in yasm 0.8.0 and we don't
support versions that old anymore.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-09 07:44:30 -04:00
Derek Buitenhuis 9e3946aada build: Require yasm 0.8.0 or higher
This is in preparation for removing a .rodata kludge
which was only required for older YASM versions.

The movbe instruction was introduced in 0.8.0, which already
had AVX, which was introduced in 0.7.0, and NASM introduced
movbe in 2.0.3, which is the same version which introduced
AVX support.

Also, make the failure message more accurate.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-09 07:44:19 -04:00
Luca Barbato b2148faca9 shorten: Extend fixed_coeffs to properly support pred_order 0
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 03:34:10 +02:00
Diego Biurrun 6405ca7d4a x86: h264_idct: Update comments to match 8/10-bit depth optimization split 2013-10-07 21:46:46 +02:00
Henrik Gramner 3e2fa991db x86inc: remove misaligned cpu flag
Prevents a crash if the misaligned exception mask bit is
cleared for some reason.

Misaligned SSE functions are only used on AMD Phenom CPUs
and the benefit is miniscule. They also require modifying
the MXCSR control register and by removing those functions
we can get rid of that complexity altogether.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:27:38 -04:00
Jason Garrett-Glaser 7115566541 x86inc: various minor backports from x264
Small backports that sneaked into other asm commits in x264.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:27:22 -04:00
Derek Buitenhuis 47f9d7ce54 x86inc: Check for __OUTPUT_FORMAT__ having a value of "x64"
This is also a valid value for WIN64.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:27:08 -04:00
Henrik Gramner bbe4a6db44 x86inc: Utilize the shadow space on 64-bit Windows
Store XMM6 and XMM7 in the shadow space in functions that
clobbers them. This way we don't have to adjust the stack
pointer as often, reducing the number of instructions as
well as code size.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:35 -04:00
Loren Merritt 3fb78e99a0 x86inc: create xm# and ym#, analagous to m#
For when we want to mix simd sizes within one function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:19 -04:00
Loren Merritt 49ebe3f9fe x86inc: fix some corner cases of SWAP
SWAP with >=3 named (rather than numbered) args
PERMUTE followed by SWAP with 2 named args
used to produce the wrong permutation

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:06 -04:00
Henrik Gramner 63f0d62310 x86inc: Use SSE instead of SSE2 for copying data
Reduces code size because movaps/movups is one byte
shorter than movdqa/movdqu.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:24:33 -04:00
Henrik Gramner ad76e6e7e1 x86inc: Set ELF hidden visibility for global constants
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:24:13 -04:00
Loren Merritt e52567c295 build: Strip spurious labels
The implementation of 25cb0c1a involves lots of spurious labels.

The effect of keeping those labels around is making debugging harder.
Those labels are meaningless, and complicate the disassembly. Also,
gdb can't tell the difference between them and function entry points.

This new strip command is irrelevant to any usage of Libav that would
have used the old fully stripped version, because the old one was for
non-debug use.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:20:15 -04:00
Loren Merritt 25cb0c1a1e x86inc: activate REP_RET automatically
Now RET checks whether it immediately follows a branch, so the
programmer dosen't have to keep track of that condition. REP_RET
is still needed manually when it's a branch target, but that's
much rarer.

The implementation involves lots of spurious labels, but that's OK
because we strip them.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:17:59 -04:00
Diego Biurrun ce1e8045e0 x86: fdct: Employ more specific ifdefs
This avoids building mmxext and sse2 code when disabled by configure.
2013-10-06 22:02:25 +02:00
Diego Biurrun 9adbc3f3a1 bmv: Remove unused variable 2013-10-06 19:36:53 +02:00
Vittorio Giovara 90e15e340d oggparsevorbis: return meaningful errors
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-05 23:16:48 +02:00
Diego Biurrun 2ddb35b911 x86: dsputil: Separate ff_add_hfyu_median_prediction_cmov from dsputil_mmx
The function does not depend on MMX and compilation without MMX enabled
fails if the function is compiled conditional on MMX availability.
2013-10-05 19:21:15 +02:00
Vittorio Giovara 6b3ff6f91a swscale: provide a default scaler if none is set
Lanczos for general case, sinc for upscaling, Gaussian for
downscaling. According to current literature these scalers
should be the best quality-wise algorithms for each case.

Inspired from a patch by wm4 <nfxjfg@googlemail.com>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-10-05 18:38:55 +02:00
Diego Biurrun 258414d077 x86: fdct: Initialize optimized fdct implementations in the standard way 2013-10-05 18:20:52 +02:00
Diego Biurrun 0b8b2ae5e9 x86: xviddct: Employ more specific ifdefs
This avoids building mmxext and sse2 code when disabled by configure.
2013-10-05 18:14:58 +02:00
Luca Barbato 4272bb6ef1 doxy: Document avlog
Provide some information for every function and add a group.
2013-10-05 18:09:45 +02:00
Martin Storsjö a4435f9235 ismindex: Change the duration field to int64_t
This reduces the risk for overflow in pathlogical cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-05 00:01:28 +03:00
Martin Storsjö 583a287f6f ismindex: Calculate the file duration among the included tracks
If the input file contains other tracks (non video/audio) that
aren't included in ismindex, the global file duration as returned
by libavformat might not be equal to the maximum of the duration
of the actual included tracks.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-05 00:01:18 +03:00
Martin Storsjö d347a7b248 ismindex: Use the individual stream duration instead of the global one
The stream duration is used for calculating the duration of the
last fragment easily without manually parsing anything else than
the mfra/tfra atoms. When the global file duration was used
previously, the duration of the last fragment could end up wrong
if the streams weren't equally long.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-05 00:01:08 +03:00
Martin Storsjö b698542ad8 mov: Don't allocate arrays with av_malloc that will be realloced
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-05 00:00:43 +03:00
Diego Biurrun 6cc133ec58 x86: fdct: Only build fdct code if encoders have been enabled
fdct is only initialized if encoders are enabled.
2013-10-04 10:50:44 +02:00
Martin Storsjö cd818b3a57 rtmpproto: Validate the embedded flv packet size before copying
This wasn't an issue prior to 58404738, when the whole RTMP packet
was copied at once and the length of the individual embedded flv
packets only were validated by the flv demuxer.

Prior to this patch, this could lead to reads and writes out of bound.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:10 +03:00
Martin Storsjö 8921e32f73 rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early
If the embedded flv packets were incomplete and we aborted the
copying loop early, make sure the flv buffer is trimmed to
only contain full packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:08 +03:00
Martin Storsjö 24fee95321 rtmpproto: Move the flv header/trailer addition to append_flv_data
update_offset is also called from handle_metadata, where the
packet header sizes is already included in the size.

Previously this lead to flv_data/flv_size including 15 uninitialized
bytes at the end after each call to handle_metadata, making the
flv demuxer lose sync with the stream.

Also remove leftover copying in handle_metadata. This is a leftover
from the refactoring in 5840473. (Previously this final mempcy was
the one that copied all the packets at once, while this is done
within the loop right now.) After making sure flv_size is set to
the right size, this write was out of bounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:07 +03:00
Martin Storsjö 72540e514c rtmpproto: Clear the flv allocation size on reallocp failures
This was overlooked in d872fb0f7 since I assumed all the realloc
issues in the rtmp code was fixed already.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:06 +03:00
Martin Storsjö 4d6d70292e rtmpproto: Pass the 'live' parameter in the right unit
The current magic numbers passed are values in seconds, while the
parameter itself should be passed over the wire in milliseconds.

This makes (some/all?) live streams from Red5 work correctly, that
previously returned StreamNotFound even with "-rtmp_live live". After
this commit, the default 'any' also works on these streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:05 +03:00
Martin Storsjö a6b361325f rtmpproto: Print the error code string if there's no description
On (certain streams/setups at least on) Red5, the description string
actually is present, but empty. Therefore, first try loading the
description, but if not found or empty, load the code string instead.
The code string is quite understandable in most cases anyway (like
"NetStream.Play.StreamNotFound").

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:04 +03:00
Diego Biurrun b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Vittorio Giovara 49fe9c05f9 oggparsevorbis: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 23:26:09 +02:00
Diego Biurrun 47b6cfc2a0 avformat/output-example: Declare link dependency on libswscale in the Makefile 2013-10-03 23:23:04 +02:00
Diego Biurrun 80fefbed62 x86: cpu: Restore some explanatory comments removed in 7160bb7 2013-10-03 23:00:09 +02:00
Maxim Poliakovski 6a5bfd4d49 atrac: Add missing av_cold
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 23:00:09 +02:00
Maxim Poliakovski 79cbac8cd4 atrac3: Generalize gain compensation code
Move it to the ATRAC common code, to reuse in the upcoming ATRAC3+ decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 18:20:01 +02:00
Diego Biurrun 5ce04c14dd Use correct Doxygen syntax 2013-10-03 17:53:51 +02:00
Maxim Poliakovski 4be292dac7 atrac: Move doxygen comments to the header
Also update copyright info and file description.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 17:53:51 +02:00
Diego Biurrun be0b4c70ec atrac3: Replace a silly counter variable name with plain 'j' 2013-10-03 17:53:51 +02:00