platform/upstream/libav.git
11 years agoh264_parser: Fix order of operations
Michael Niedermayer [Sun, 20 Oct 2013 12:11:05 +0000 (12:11 +0000)]
h264_parser: Fix order of operations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoavplay: Accept cpuflags option
Luca Barbato [Mon, 14 Oct 2013 03:41:45 +0000 (05:41 +0200)]
avplay: Accept cpuflags option

Quite useful for debugging.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoavio: Use AVERROR_PROTOCOL_NOT_FOUND
Luca Barbato [Sun, 20 Oct 2013 20:01:54 +0000 (22:01 +0200)]
avio: Use AVERROR_PROTOCOL_NOT_FOUND

When the protocol is missing ffurl_alloc() should return
AVERROR_PROTOCOL_NOT_FOUND instead of AVERROR(ENOENT).

Bug-Id: 577
CC: libav-stable@libav.org
11 years agopthread: Avoid spurious wakeups
Ben Jackson [Fri, 18 Oct 2013 14:28:50 +0000 (15:28 +0100)]
pthread: Avoid spurious wakeups

pthread_wait_cond can wake up unexpectedly (Wikipedia: Spurious_wakeup).

The FF_THREAD_SLICE thread mechanism could spontaneously execute
jobs or allow the caller of avctx->execute to return before all
jobs were complete.

Test both cases to ensure the wakeup is real.

Signed-off-by: Ben Jackson <ben@ben.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agofate: vpx: Remove one redundant $(eval) invocation
Diego Biurrun [Wed, 16 Oct 2013 14:42:24 +0000 (16:42 +0200)]
fate: vpx: Remove one redundant $(eval) invocation

11 years agowtv: Seek by sector properly
Luca Barbato [Fri, 18 Oct 2013 11:45:13 +0000 (13:45 +0200)]
wtv: Seek by sector properly

Use an helper function to seek by sector to avoid possible mistakes
due shifting by WTV_SECTOR_BITS a 32bit integer.

Contrary to common intuition, a 32 bit integer left shifted
by a 64 bit integer does not promote the 32 bit integer to
64 bit before shifting.

11 years agofate: Increase the tolerance in the lavr tests
Martin Storsjö [Thu, 17 Oct 2013 08:38:58 +0000 (11:38 +0300)]
fate: Increase the tolerance in the lavr tests

A few fate instances on OS/2, OpenBSD, FreeBSD and IA64 linux currently
still fail a few tests with a maxdiff of 6.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agofate: aac: Add test for AAC-LD
Diego Biurrun [Mon, 14 Oct 2013 21:40:05 +0000 (23:40 +0200)]
fate: aac: Add test for AAC-LD

11 years agomem: Make av_strdup allocate using av_realloc
Martin Storsjö [Fri, 4 Oct 2013 21:19:13 +0000 (00:19 +0300)]
mem: Make av_strdup allocate using av_realloc

This makes sure that pointers from av_strdup are reallocable,
which is used in av_dict_set if the AV_DICT_APPEND flag is set.

Nothing should rely on pointers from av_strdup being aligned.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agompegvideo: Move 8x8 in a separate function
Luca Barbato [Sun, 13 Oct 2013 05:55:14 +0000 (07:55 +0200)]
mpegvideo: Move 8x8 in a separate function

11 years agompegvideo: Move obmc in a separate function
Luca Barbato [Sun, 13 Oct 2013 05:27:11 +0000 (07:27 +0200)]
mpegvideo: Move obmc in a separate function

11 years agoffv1: Assume bitdepth 0 means 8bit
Luca Barbato [Sun, 13 Oct 2013 13:34:47 +0000 (15:34 +0200)]
ffv1: Assume bitdepth 0 means 8bit

CC: libav-stable@libav.org
Reported-by: debian/726189
11 years agompegvideo: K&R formatting cosmetics
Luca Barbato [Sun, 13 Oct 2013 05:13:01 +0000 (07:13 +0200)]
mpegvideo: K&R formatting cosmetics

11 years agolavc: Convert some remaining strides to ptrdiff_t
Ronald S. Bultje [Sun, 13 Oct 2013 00:42:42 +0000 (02:42 +0200)]
lavc: Convert some remaining strides to ptrdiff_t

11 years agoh264_parser: Fix POC parsing for the case where MMCO_RESET is present.
Yusuke Nakamura [Tue, 24 Sep 2013 09:30:50 +0000 (18:30 +0900)]
h264_parser: Fix POC parsing for the case where MMCO_RESET is present.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agoh264_parser: Fix POC parsing for the case where MMCO_RESET is absent.
Yusuke Nakamura [Mon, 16 Sep 2013 09:34:27 +0000 (18:34 +0900)]
h264_parser: Fix POC parsing for the case where MMCO_RESET is absent.

The prev_ values were not set after parsing POC.
Increase length of the buffer decoded to parse enough safely.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agofate: add vorbiscomment cover art test
James Almer [Fri, 26 Jul 2013 05:56:19 +0000 (02:56 -0300)]
fate: add vorbiscomment cover art test

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agoFATE: use proper comparison mode in the lavr tests
Anton Khirnov [Mon, 14 Oct 2013 19:17:26 +0000 (21:17 +0200)]
FATE: use proper comparison mode in the lavr tests

11 years agotiny_psnr: switch f32 handling to floating point
Anton Khirnov [Mon, 14 Oct 2013 19:10:08 +0000 (21:10 +0200)]
tiny_psnr: switch f32 handling to floating point

Also add support for f64.

11 years agobitstream: Check the result of av_malloc()
Diego Biurrun [Tue, 15 Oct 2013 12:34:55 +0000 (14:34 +0200)]
bitstream: Check the result of av_malloc()

11 years agocavs: more K&R formatting cosmetics
Diego Biurrun [Mon, 14 Oct 2013 17:12:52 +0000 (19:12 +0200)]
cavs: more K&R formatting cosmetics

11 years agompegaudio_tablegen: Don't use llrint
Derek Buitenhuis [Tue, 15 Jan 2013 21:09:01 +0000 (16:09 -0500)]
mpegaudio_tablegen: Don't use llrint

You cannot count on it being present on all systems, and you
cannot include libm.h in a host tool, so just hard code a baseline
implementation.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agocos_tablegen: Don't use lrint
Derek Buitenhuis [Tue, 15 Jan 2013 21:09:00 +0000 (16:09 -0500)]
cos_tablegen: Don't use lrint

You cannot count on it being present on all systems, and you
cannot include libm.h in a host tool, so just hard code a baseline
implementation.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agotablegen: Don't use cbrtf in host tools
Derek Buitenhuis [Tue, 15 Jan 2013 21:08:59 +0000 (16:08 -0500)]
tablegen: Don't use cbrtf in host tools

You cannot count on them being present on all systems, and you
cannot include libm.h in a host tool, so just hard code baseline
implementations.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agotableprint: Fix use of a size_t print with MSVC
Derek Buitenhuis [Tue, 15 Jan 2013 21:08:58 +0000 (16:08 -0500)]
tableprint: Fix use of a size_t print with MSVC

%zu was introduced in C99, so MSVC has its own way to handle it,
namely %Iu.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agohttp: Check the auth string contents and not only the pointer
Michael Niedermayer [Sun, 13 Oct 2013 22:56:32 +0000 (00:56 +0200)]
http: Check the auth string contents and not only the pointer

This makes sure we don't send the Except: 100-continue header
if no authentication credentials have been provided.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agox86: more AVX2 framework
Jason Garrett-Glaser [Wed, 27 Feb 2013 00:26:34 +0000 (16:26 -0800)]
x86: more AVX2 framework

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agox86inc: FMA3/4 Support
Jason Garrett-Glaser [Mon, 12 Nov 2012 18:28:53 +0000 (10:28 -0800)]
x86inc: FMA3/4 Support

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agox86inc: Remove our FMA4 support
Derek Buitenhuis [Wed, 9 Oct 2013 12:54:59 +0000 (08:54 -0400)]
x86inc: Remove our FMA4 support

This is so we can sync to x264's version of FMA4 support.

This partialy reverts commit 79687079a97a039c325ab79d7a95920d800b791f.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agox86inc: Use VEX-encoded instructions in AVX functions
Henrik Gramner [Tue, 11 Dec 2012 15:05:34 +0000 (16:05 +0100)]
x86inc: Use VEX-encoded instructions in AVX functions

Automatically use VEX-encoding in AVX/AVX2/XOP/FMA3/FMA4
functions for all instructions that exists in a VEX-encoded
version.

This change makes it easier to extend existing code to use AVX2.

Also add support for AVX emulation of a few instructions that
were missing before.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agoavresample/x86: Switch operand order for mulps
Derek Buitenhuis [Wed, 9 Oct 2013 12:41:36 +0000 (08:41 -0400)]
avresample/x86: Switch operand order for mulps

With the forthcoming VEX instruction emulation, mulps
must have only the third operand point to memory, as
this is what vmulps expects.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agortmp: Allocate the prev_pkt arrays dynamically
Martin Storsjö [Fri, 11 Oct 2013 19:16:04 +0000 (22:16 +0300)]
rtmp: Allocate the prev_pkt arrays dynamically

Normally, all channel ids are between 0 and 10, while they in
uncommon cases can have values up to 64k.

This avoids allocating two arrays for up to 64k entries (at a total
of over 6 MB in size) each when most of them aren't used at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agocavs: Check for negative cbp
Luca Barbato [Sun, 13 Oct 2013 01:30:06 +0000 (03:30 +0200)]
cavs: Check for negative cbp

Sample-Id: 00000647-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agocavs: Return meaningful error values
Luca Barbato [Sun, 13 Oct 2013 01:27:39 +0000 (03:27 +0200)]
cavs: Return meaningful error values

11 years agocavs: K&R formatting cosmetics
Luca Barbato [Sun, 13 Oct 2013 01:08:51 +0000 (03:08 +0200)]
cavs: K&R formatting cosmetics

11 years agohttp: Support auth method detection for POST
Martin Storsjö [Wed, 9 Oct 2013 10:24:40 +0000 (13:24 +0300)]
http: Support auth method detection for POST

Inspired by a patch by Jakob van Bethlehem. But instead of doing
an empty POST first to trigger the WWW-Authenticate header (which
would succeed if no auth actually was required), add an Expect:
100-continue header, which is meant to be used exactly for
cases like this.

The header is added if doing a post, and the user has specified
authentication but we don't know the auth method yet.

Not all common HTTP servers support the Expect: 100-continue header,
though, so we only try to use it when it really is needed. The user
can request it to be added for other POST requests as well via
an option - which would allow the caller to know immediately that
the POST has failed (e.g. if no auth was provided but the server
required it, or if the target URL simply doesn't exist).

This is only done for write mode posts (e.g. posts without pre-set
post_data) - for posts with pre-set data, we can just redo the post
if it failed due to 401.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agohttp: Add an option for forcing basic authentication
Martin Storsjö [Wed, 9 Oct 2013 09:14:02 +0000 (12:14 +0300)]
http: Add an option for forcing basic authentication

The default is to autodetect the auth method. This does require one
extra request (and also closing and reopening the http connection).
For some cases such as HTTP POST, the autodetection is not handled
properly (yet).

No option is added for digest, since this method requires getting
nonce parameters from the server first and can't be used straight
away like Basic.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agopthread: Fix deadlock during thread initialization
Derek Buitenhuis [Thu, 10 Oct 2013 15:05:40 +0000 (11:05 -0400)]
pthread: Fix deadlock during thread initialization

Sometimes, if pthread_create() failed, then pthread_cond_wait() could
accidentally be called in the worker threads after the uninit function
had already called pthread_cond_broadcast(), leading to a deadlock.

Don't call pthread_cond_wait() if c->done is set.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agoindeo4: Check the inherited quant_mat
Luca Barbato [Fri, 11 Oct 2013 09:34:03 +0000 (11:34 +0200)]
indeo4: Check the inherited quant_mat

Invalidate it if not supported.

Sample-Id: 00000262-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agoindeo4: Check the block size if reusing the band configuration
Luca Barbato [Fri, 11 Oct 2013 08:51:53 +0000 (10:51 +0200)]
indeo4: Check the block size if reusing the band configuration

Sample-Id: 00000287-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agooggparsevorbis: fail on memory allocation error
Vittorio Giovara [Sat, 12 Oct 2013 13:37:56 +0000 (15:37 +0200)]
oggparsevorbis: fail on memory allocation error

11 years agooggvorbisdec: add support for embedded cover art
James Almer [Tue, 9 Jul 2013 05:39:10 +0000 (02:39 -0300)]
oggvorbisdec: add support for embedded cover art

Signed-off-by: James Almer <jamrial@gmail.com>
11 years agoflac: move picture parsing code in a separate file
James Almer [Tue, 9 Jul 2013 05:39:09 +0000 (02:39 -0300)]
flac: move picture parsing code in a separate file

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agooggdec: add support for Opus in Ogg demuxing
Nicolas George [Sun, 24 Jun 2012 09:38:18 +0000 (11:38 +0200)]
oggdec: add support for Opus in Ogg demuxing

11 years agooggparsevorbis: check allocations
Vittorio Giovara [Sat, 5 Oct 2013 19:35:31 +0000 (21:35 +0200)]
oggparsevorbis: check allocations

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agooggparsevorbis: support official chapter extension
James Almer [Sat, 5 Oct 2013 19:33:41 +0000 (21:33 +0200)]
oggparsevorbis: support official chapter extension

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agolavc doxy: extend/clarify avcodec_decode_audio4() doxy
Anton Khirnov [Tue, 8 Oct 2013 06:53:50 +0000 (08:53 +0200)]
lavc doxy: extend/clarify avcodec_decode_audio4() doxy

Elaborate on flushing the decoder.

11 years agolavc doxy: remove false statements about alignment requirements.
Anton Khirnov [Tue, 8 Oct 2013 06:28:03 +0000 (08:28 +0200)]
lavc doxy: remove false statements about alignment requirements.

The packet data does not need to be aligned.

11 years agoFATE: add lavr resampling tests
Anton Khirnov [Mon, 30 Sep 2013 10:15:02 +0000 (12:15 +0200)]
FATE: add lavr resampling tests

11 years agoFATE: add lavr mixing tests
Anton Khirnov [Mon, 30 Sep 2013 10:15:02 +0000 (12:15 +0200)]
FATE: add lavr mixing tests

11 years agoaudio_mix: fix channel order in mix_1_to_2_fltp_flt_c
Anton Khirnov [Wed, 2 Oct 2013 14:40:02 +0000 (16:40 +0200)]
audio_mix: fix channel order in mix_1_to_2_fltp_flt_c

CC:libav-stable@libav.org

11 years agoriff: Add a mapping for VP6A
Martin Storsjö [Wed, 14 Aug 2013 09:38:56 +0000 (12:38 +0300)]
riff: Add a mapping for VP6A

This allows demuxing VP6A from F4V files.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoprores: Reject negative run and level values
Luca Barbato [Thu, 10 Oct 2013 19:02:10 +0000 (21:02 +0200)]
prores: Reject negative run and level values

Sample-Id: 00000611-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agomxf: Add jpeg2000 codec to intra only codecs
Matthieu Bouron [Tue, 1 Oct 2013 11:05:26 +0000 (13:05 +0200)]
mxf: Add jpeg2000 codec to intra only codecs

Conform with SMPTE RP 224 and SMPTE s422.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoshorten: Fix out-of-array read
Tim Walker [Wed, 9 Oct 2013 09:47:04 +0000 (11:47 +0200)]
shorten: Fix out-of-array read

pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoatrac3: Better name for IMDCT window initialization
Maxim Poliakovski [Thu, 10 Oct 2013 08:07:24 +0000 (10:07 +0200)]
atrac3: Better name for IMDCT window initialization

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agoatrac3: Remove unused gain compensation tables
Maxim Poliakovski [Thu, 10 Oct 2013 07:59:03 +0000 (09:59 +0200)]
atrac3: Remove unused gain compensation tables

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agoprores: Error out only on surely incomplete ac_coeffs
Luca Barbato [Thu, 10 Oct 2013 08:26:31 +0000 (10:26 +0200)]
prores: Error out only on surely incomplete ac_coeffs

11 years agoprores: Add a codepath for decoding errors
Luca Barbato [Thu, 10 Oct 2013 06:40:39 +0000 (08:40 +0200)]
prores: Add a codepath for decoding errors

11 years agoflvenc: Write proper cropping for VP6 even if there's no extradata
Martin Storsjö [Thu, 15 Aug 2013 08:07:30 +0000 (11:07 +0300)]
flvenc: Write proper cropping for VP6 even if there's no extradata

This keeps cropping when remuxing from F4V to FLV.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoflvenc: Support muxing VP6A as well
Martin Storsjö [Thu, 15 Aug 2013 08:04:07 +0000 (11:04 +0300)]
flvenc: Support muxing VP6A as well

Handle it in the same way as VP6F, except for the codec tag.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoflvenc: Don't pretend to support muxing "plain" VP6
Martin Storsjö [Thu, 15 Aug 2013 08:01:55 +0000 (11:01 +0300)]
flvenc: Don't pretend to support muxing "plain" VP6

The plain VP6 format is vertically flipped compared to VP6F/VP6A.
Support for the plain VP6 format was added in 09d8c0ae831 (which
also introduced support for muxing VP6F properly in general).

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agovp6: Support cropping to AVCodecContext.width/height
Martin Storsjö [Wed, 14 Aug 2013 09:39:29 +0000 (12:39 +0300)]
vp6: Support cropping to AVCodecContext.width/height

In these cases, there is no extradata but only the properly set
width/height values by the demuxer.

This makes sure VP6 in F4V files is cropped properly.

This is similar to what is done for H264 for letting the container
width/height override what's in the bitstream, since 30f515091.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoavi: directly resync on DV in AVI read failure
Luca Barbato [Tue, 6 Aug 2013 01:52:48 +0000 (03:52 +0200)]
avi: directly resync on DV in AVI read failure

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agoavi: DV in AVI must be considered single stream
Luca Barbato [Tue, 6 Aug 2013 01:38:12 +0000 (03:38 +0200)]
avi: DV in AVI must be considered single stream

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agoavi: properly fail if the dv demuxer is missing
Luca Barbato [Mon, 5 Aug 2013 23:39:07 +0000 (01:39 +0200)]
avi: properly fail if the dv demuxer is missing

CC: libav-stable@libav.org
11 years agojpeg2000: Check block length
Luca Barbato [Wed, 9 Oct 2013 04:17:12 +0000 (06:17 +0200)]
jpeg2000: Check block length

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agovmnc: Use meaningful return values
Luca Barbato [Wed, 9 Oct 2013 03:58:59 +0000 (05:58 +0200)]
vmnc: Use meaningful return values

11 years agovmnc: Check the cursor dimensions
Luca Barbato [Wed, 9 Oct 2013 03:51:20 +0000 (05:51 +0200)]
vmnc: Check the cursor dimensions

And manage the reallocation failure path.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agovmnc: Port to bytestream2
Luca Barbato [Wed, 9 Oct 2013 03:13:59 +0000 (05:13 +0200)]
vmnc: Port to bytestream2

Fix some buffer overreads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agovmnc: K&R formatting cosmetics
Luca Barbato [Wed, 9 Oct 2013 10:58:42 +0000 (12:58 +0200)]
vmnc: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agox86inc: Remove .rodata kludges
Henrik Gramner [Wed, 11 Sep 2013 15:49:25 +0000 (17:49 +0200)]
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>
11 years agobuild: Require yasm 0.8.0 or higher
Derek Buitenhuis [Mon, 7 Oct 2013 11:18:54 +0000 (07:18 -0400)]
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>
11 years agoshorten: Extend fixed_coeffs to properly support pred_order 0
Luca Barbato [Wed, 4 Sep 2013 17:26:36 +0000 (19:26 +0200)]
shorten: Extend fixed_coeffs to properly support pred_order 0

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years agox86: h264_idct: Update comments to match 8/10-bit depth optimization split
Diego Biurrun [Sun, 6 Oct 2013 16:15:14 +0000 (18:15 +0200)]
x86: h264_idct: Update comments to match 8/10-bit depth optimization split

11 years agox86inc: remove misaligned cpu flag
Henrik Gramner [Wed, 11 Sep 2013 15:49:29 +0000 (17:49 +0200)]
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>
11 years agox86inc: various minor backports from x264
Jason Garrett-Glaser [Wed, 11 Sep 2013 15:49:28 +0000 (17:49 +0200)]
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>
11 years agox86inc: Check for __OUTPUT_FORMAT__ having a value of "x64"
Derek Buitenhuis [Wed, 11 Sep 2013 15:49:27 +0000 (17:49 +0200)]
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>
11 years agox86inc: Utilize the shadow space on 64-bit Windows
Henrik Gramner [Wed, 11 Sep 2013 15:49:26 +0000 (17:49 +0200)]
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>
11 years agox86inc: create xm# and ym#, analagous to m#
Loren Merritt [Wed, 11 Sep 2013 15:49:24 +0000 (17:49 +0200)]
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>
11 years agox86inc: fix some corner cases of SWAP
Loren Merritt [Wed, 11 Sep 2013 15:49:23 +0000 (17:49 +0200)]
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>
11 years agox86inc: Use SSE instead of SSE2 for copying data
Henrik Gramner [Wed, 11 Sep 2013 15:49:22 +0000 (17:49 +0200)]
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>
11 years agox86inc: Set ELF hidden visibility for global constants
Henrik Gramner [Wed, 11 Sep 2013 15:49:21 +0000 (17:49 +0200)]
x86inc: Set ELF hidden visibility for global constants

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agobuild: Strip spurious labels
Loren Merritt [Thu, 12 Sep 2013 18:06:23 +0000 (18:06 +0000)]
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>
11 years agox86inc: activate REP_RET automatically
Loren Merritt [Wed, 11 Sep 2013 15:49:20 +0000 (17:49 +0200)]
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>
11 years agox86: fdct: Employ more specific ifdefs
Diego Biurrun [Mon, 16 Sep 2013 11:58:26 +0000 (13:58 +0200)]
x86: fdct: Employ more specific ifdefs

This avoids building mmxext and sse2 code when disabled by configure.

11 years agobmv: Remove unused variable
Diego Biurrun [Sun, 6 Oct 2013 10:52:12 +0000 (12:52 +0200)]
bmv: Remove unused variable

11 years agooggparsevorbis: return meaningful errors
Vittorio Giovara [Sat, 5 Oct 2013 20:10:01 +0000 (22:10 +0200)]
oggparsevorbis: return meaningful errors

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agox86: dsputil: Separate ff_add_hfyu_median_prediction_cmov from dsputil_mmx
Diego Biurrun [Sat, 5 Oct 2013 16:38:06 +0000 (18:38 +0200)]
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.

11 years agoswscale: provide a default scaler if none is set
Vittorio Giovara [Tue, 1 Oct 2013 17:11:00 +0000 (19:11 +0200)]
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>
11 years agox86: fdct: Initialize optimized fdct implementations in the standard way
Diego Biurrun [Mon, 30 Sep 2013 13:25:47 +0000 (15:25 +0200)]
x86: fdct: Initialize optimized fdct implementations in the standard way

11 years agox86: xviddct: Employ more specific ifdefs
Diego Biurrun [Mon, 16 Sep 2013 11:47:35 +0000 (13:47 +0200)]
x86: xviddct: Employ more specific ifdefs

This avoids building mmxext and sse2 code when disabled by configure.

11 years agodoxy: Document avlog
Luca Barbato [Wed, 18 Sep 2013 13:27:52 +0000 (15:27 +0200)]
doxy: Document avlog

Provide some information for every function and add a group.

11 years agoismindex: Change the duration field to int64_t
Martin Storsjö [Fri, 4 Oct 2013 07:14:49 +0000 (10:14 +0300)]
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>
11 years agoismindex: Calculate the file duration among the included tracks
Martin Storsjö [Fri, 4 Oct 2013 07:12:07 +0000 (10:12 +0300)]
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>
11 years agoismindex: Use the individual stream duration instead of the global one
Martin Storsjö [Wed, 2 Oct 2013 22:52:37 +0000 (01:52 +0300)]
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>
11 years agomov: Don't allocate arrays with av_malloc that will be realloced
Martin Storsjö [Fri, 4 Oct 2013 06:52:02 +0000 (09:52 +0300)]
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>
11 years agox86: fdct: Only build fdct code if encoders have been enabled
Diego Biurrun [Mon, 16 Sep 2013 11:55:07 +0000 (13:55 +0200)]
x86: fdct: Only build fdct code if encoders have been enabled

fdct is only initialized if encoders are enabled.

11 years agortmpproto: Validate the embedded flv packet size before copying
Martin Storsjö [Thu, 3 Oct 2013 11:49:50 +0000 (13:49 +0200)]
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>
11 years agortmpproto: Readjust the end of the flv buffer if handle_metadata exited early
Martin Storsjö [Thu, 3 Oct 2013 11:44:38 +0000 (13:44 +0200)]
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>