platform/upstream/libav.git
12 years agodct/fft-test: use a replacement getopt() if the system has none present.
Ronald S. Bultje [Wed, 4 Jul 2012 03:14:09 +0000 (20:14 -0700)]
dct/fft-test: use a replacement getopt() if the system has none present.

This allows compiling and running these tests on systems lacking a built-
in version of getopt(), such as MSVC.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoconfigure: Check for the math function rint
Ronald S. Bultje [Tue, 26 Jun 2012 12:05:28 +0000 (15:05 +0300)]
configure: Check for the math function rint

Add a fallback implementation if it doesn't exist.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoTechSmith Screen Codec 2 decoder
Kostya Shishkov [Sun, 8 Jul 2012 17:51:08 +0000 (19:51 +0200)]
TechSmith Screen Codec 2 decoder

12 years agortsp: Add listen mode
Jordi Ortiz [Tue, 10 Jul 2012 17:36:11 +0000 (19:36 +0200)]
rtsp: Add listen mode

This makes the RTSP demuxer act as a server, listening for an
incoming connection.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agortsp: Make rtsp_open_transport_ctx() non-static
Jordi Ortiz [Tue, 10 Jul 2012 17:25:04 +0000 (19:25 +0200)]
rtsp: Make rtsp_open_transport_ctx() non-static

This is required for the upcoming RTSP listen mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agortsp: Move rtsp_read_close
Jordi Ortiz [Wed, 4 Jul 2012 20:13:40 +0000 (22:13 +0200)]
rtsp: Move rtsp_read_close

This avoids having to add forward declarations in the following
RTSP listen mode commit.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agortsp: Parse the mode=receive/record parameter in transport lines
Jordi Ortiz [Tue, 10 Jul 2012 17:21:58 +0000 (19:21 +0200)]
rtsp: Parse the mode=receive/record parameter in transport lines

We need to support the nonstandard mode=receive, for compatibility
with older libavformat clients.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agomss1: fix decoding masked regions in interframes
Kostya Shishkov [Tue, 10 Jul 2012 11:38:56 +0000 (13:38 +0200)]
mss1: fix decoding masked regions in interframes

Spotted by Alberto Delmás

12 years agomxfdec: fix off by one error.
Michael Niedermayer [Mon, 26 Mar 2012 13:05:02 +0000 (15:05 +0200)]
mxfdec: fix off by one error.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: only parse next partition pack if parsing forward
Tomas Härdin [Tue, 20 Mar 2012 10:03:48 +0000 (11:03 +0100)]
mxfdec: only parse next partition pack if parsing forward

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: let pkt->pts = mxf->current_edit_unit if intra-only
Tomas Härdin [Wed, 7 Mar 2012 09:03:16 +0000 (10:03 +0100)]
mxfdec: let pkt->pts = mxf->current_edit_unit if intra-only

We cannot do this in general since we could be reading
a file with B-frames while lacking an index.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: fix frame height vs field height confusion
Joseph Artsimovich [Tue, 7 Feb 2012 10:48:43 +0000 (10:48 +0000)]
mxfdec: fix frame height vs field height confusion

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Reveiwed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: Add intra_only flag to MXFTrack
Tomas Härdin [Wed, 7 Mar 2012 09:52:39 +0000 (10:52 +0100)]
mxfdec: Add intra_only flag to MXFTrack

This allows future assumptions to be made without affecting non-intra files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: fix Avid AirSpeed files being misinterpreted as OP1a
Tomas Härdin [Fri, 2 Mar 2012 10:33:28 +0000 (11:33 +0100)]
mxfdec: fix Avid AirSpeed files being misinterpreted as OP1a

The "ECs != 1 -> OP1a" assumption was wrong. Luckily, the file
that triggered that behavior had two ECs, not zero. Hence
distinguishing between them is simple in this case.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: truncate packets that extend past the next edit unit
Tomas Härdin [Fri, 2 Mar 2012 10:16:10 +0000 (11:16 +0100)]
mxfdec: truncate packets that extend past the next edit unit

This fixes rare cases where OPAtom may be treated
as OP1a, causing all essence to be read into RAM.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: set pixel format for cdci picture formats
Philip de Nier [Tue, 28 Feb 2012 14:16:39 +0000 (14:16 +0000)]
mxfdec: set pixel format for cdci picture formats

The properties of the CDCI Descriptor are insufficient to specify
the pixel format for uncompressed picture data. SMPTE 377-1 and
RP224v10 have defined a set of picture coding labels to indicate what
formatting was used.

This patch uses 2 labels to detect UYVY422 or YUYV422 pixel formats.

It defaults to UYVY422 for 8-bit 4:2:2 pictures to support files
that were created before the coding labels were introduced ~2008

The codec pix_fmt default was changed from 0 (PIX_FMT_YUV420P) to
-1 (PIX_FMT_NONE)

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomxfdec: detect uncomp pictures using essence container ul
Philip de Nier [Tue, 28 Feb 2012 14:16:38 +0000 (14:16 +0000)]
mxfdec: detect uncomp pictures using essence container ul

This supports detection of uncompressed picture in files that
didn't include a Picture Coding Label. The lables weren't
available until SMPTE 377-1 and RP224v10

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agomxfdec: set track edit rate num/den in expected order
Philip de Nier [Tue, 28 Feb 2012 14:16:36 +0000 (14:16 +0000)]
mxfdec: set track edit rate num/den in expected order

This matches the order used for the index table edit rate.

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agox86/cpu: implement get/set_eflags using intrinsics
Ronald S. Bultje [Mon, 9 Jul 2012 00:21:28 +0000 (02:21 +0200)]
x86/cpu: implement get/set_eflags using intrinsics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agox86/cpu: implement support for cpuid through intrinsics
Ronald S. Bultje [Mon, 9 Jul 2012 00:21:27 +0000 (02:21 +0200)]
x86/cpu: implement support for cpuid through intrinsics

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agox86/cpu: implement support for xgetbv through intrinsics
Ronald S. Bultje [Mon, 9 Jul 2012 00:21:26 +0000 (02:21 +0200)]
x86/cpu: implement support for xgetbv through intrinsics

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agolavu: use intrinsics for emms on systems lacking inline asm support
Ronald S. Bultje [Mon, 9 Jul 2012 00:21:25 +0000 (02:21 +0200)]
lavu: use intrinsics for emms on systems lacking inline asm support

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agomem: Don't abort on av_malloc(0) in debug mode
Martin Storsjö [Wed, 11 Apr 2012 07:33:43 +0000 (10:33 +0300)]
mem: Don't abort on av_malloc(0) in debug mode

This makes the behaviour consistent between debug and release mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agomss3: use standard zigzag table
Kostya Shishkov [Mon, 9 Jul 2012 16:15:27 +0000 (18:15 +0200)]
mss3: use standard zigzag table

12 years agomss3: split DSP functions that are used in MTS2(MSS4) into separate file
Kostya Shishkov [Mon, 9 Jul 2012 05:55:12 +0000 (07:55 +0200)]
mss3: split DSP functions that are used in MTS2(MSS4) into separate file

12 years agomotion-test: do not use getopt()
Anton Khirnov [Mon, 9 Jul 2012 06:15:34 +0000 (08:15 +0200)]
motion-test: do not use getopt()

It is not available on all systems and using argc/argv directly actually
makes the code simpler.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agotcp: add initial timeout limit for incoming connections
Jordi Ortiz [Wed, 4 Jul 2012 15:48:10 +0000 (17:48 +0200)]
tcp: add initial timeout limit for incoming connections

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoconfigure: Change the rdtsc check to a linker check
Diego Biurrun [Sun, 8 Jul 2012 23:24:37 +0000 (01:24 +0200)]
configure: Change the rdtsc check to a linker check

A compile-only test could succeed with an implicit function declaration.
Also move the check to the x86 section; rdtsc is x86-only.

12 years agoavconv: propagate fatal errors from lavfi.
Anton Khirnov [Tue, 3 Jul 2012 09:44:46 +0000 (11:44 +0200)]
avconv: propagate fatal errors from lavfi.

12 years agolavfi: add error handling to filter_samples().
Anton Khirnov [Mon, 2 Jul 2012 18:13:40 +0000 (20:13 +0200)]
lavfi: add error handling to filter_samples().

12 years agofate-run: make avconv() properly deal with multiple inputs.
Anton Khirnov [Tue, 29 May 2012 09:41:55 +0000 (11:41 +0200)]
fate-run: make avconv() properly deal with multiple inputs.

12 years agoasplit: don't leak the input buffer.
Anton Khirnov [Tue, 3 Jul 2012 09:26:45 +0000 (11:26 +0200)]
asplit: don't leak the input buffer.

12 years agoaf_resample: fix request_frame() behavior.
Anton Khirnov [Wed, 4 Jul 2012 14:46:17 +0000 (16:46 +0200)]
af_resample: fix request_frame() behavior.

Make sure that an output frame has really been produced before returning
0.

12 years agoaf_asyncts: fix request_frame() behavior.
Anton Khirnov [Wed, 4 Jul 2012 14:46:17 +0000 (16:46 +0200)]
af_asyncts: fix request_frame() behavior.

Make sure that an output frame has really been produced before returning
0.

12 years agolibx264: support aspect ratio switching
JULIAN GARDNER [Sun, 8 Jul 2012 14:33:47 +0000 (17:33 +0300)]
libx264: support aspect ratio switching

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agomatroskadec: honor error_recognition when encountering unknown elements.
Anton Khirnov [Sat, 7 Jul 2012 15:15:27 +0000 (17:15 +0200)]
matroskadec: honor error_recognition when encountering unknown elements.

12 years agolavr: resampling: add support for s32p, fltp, and dblp internal sample formats
Justin Ruggles [Mon, 28 May 2012 01:44:55 +0000 (21:44 -0400)]
lavr: resampling: add support for s32p, fltp, and dblp internal sample formats

Based partially on implementation by Michael Niedermayer <michaelni@gmx.at> in
libswresample in FFmpeg. See commits:
7f1ae79d38c4edba9dbd31d7bf797e525298ac55
24ab1abfb6d55bf330022df4b10d7aec80b3f116

12 years agolavr: resampling: add filter type and Kaiser window beta to AVOptions
Justin Ruggles [Sat, 26 May 2012 18:50:02 +0000 (14:50 -0400)]
lavr: resampling: add filter type and Kaiser window beta to AVOptions

12 years agolavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format
Justin Ruggles [Fri, 1 Jun 2012 19:19:45 +0000 (15:19 -0400)]
lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format

Also make this the default value.

12 years agolavr: mix: validate internal sample format in ff_audio_mix_init()
Justin Ruggles [Fri, 1 Jun 2012 19:12:03 +0000 (15:12 -0400)]
lavr: mix: validate internal sample format in ff_audio_mix_init()

12 years agocmutils: include shellapi.h on Win32 (for CommandLineToArgvW).
Ronald S. Bultje [Sat, 7 Jul 2012 20:46:26 +0000 (13:46 -0700)]
cmutils: include shellapi.h on Win32 (for CommandLineToArgvW).

This is required for CommandLineToArgvW. Normally, shellapi.h is included
implicitly by windows.h, but if we define WIN32_LEAN_AND_MEAN (or some of
the other earlier headers have included windows.h with that option),
windows.h doesn't include this one.

Thus explicitly include the headers we really need, for clarity and
compatibility.

12 years agox86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME).
Ronald S. Bultje [Sat, 7 Jul 2012 20:30:11 +0000 (13:30 -0700)]
x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME).

12 years agoid3v2: add a mimetype for bmp pictures.
Anton Khirnov [Fri, 6 Jul 2012 20:35:10 +0000 (22:35 +0200)]
id3v2: add a mimetype for bmp pictures.

12 years agoflacdec: be less strict when parsing attached pictures.
Anton Khirnov [Fri, 6 Jul 2012 20:30:17 +0000 (22:30 +0200)]
flacdec: be less strict when parsing attached pictures.

Only return an error if memory allocation fails or error recognition is
set to explode. Otherwise just print an error message and continue
reading the file.

12 years agoflacdec: don't create an attached picture stream until we have all information.
Anton Khirnov [Fri, 6 Jul 2012 20:21:09 +0000 (22:21 +0200)]
flacdec: don't create an attached picture stream until we have all information.

This way we don't end with an invalid stream if parsing the picture
fails.

12 years agomxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..).
Ronald S. Bultje [Wed, 4 Jul 2012 15:13:43 +0000 (08:13 -0700)]
mxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..).

Also replace x>>av_log2(sizeof(..)) + 1 by x/sizeof(..). The +1 is
probably meant to emulate av_log2_ceil(sizeof(..)) in cases where ".."
is not a power of two.

12 years agox86: h264_intrapred: Don't add the 'd' suffix to the SPLATB_REG macro
Martin Storsjö [Fri, 6 Jul 2012 07:53:43 +0000 (10:53 +0300)]
x86: h264_intrapred: Don't add the 'd' suffix to the SPLATB_REG macro

The SPLATB_REG macro already adds the 'd' suffix internally.

This fixes building on Win64, which has been broken since 878e66902.

This worked for unix, where r2 happened to be rdx in this case, which
with the first suffix rdxd was mapped to eax, and eaxd is defined back
to eax. On win64 however, r2 happened to be R8 in this case, and
R8d mapps to R8D just fine, but there's no mapping for R8Dd to anything.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoconfigure: add functions for testing code fragments
Mans Rullgard [Wed, 4 Jul 2012 22:06:25 +0000 (23:06 +0100)]
configure: add functions for testing code fragments

This simplifies testing arbitrary code fragments within a function
body.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agoaf_amix: avoid spurious EAGAIN.
Anton Khirnov [Thu, 5 Jul 2012 19:51:44 +0000 (21:51 +0200)]
af_amix: avoid spurious EAGAIN.

Input on/off state can change in request_samples(), which can result in
a state where only the first input is active. get_available_samples()
will then return 0, and request_frame() will fail with EAGAIN even
though there is data on the single active input.

Take this into account and check the number of active inputs again after
calling request_samples().

12 years agoaf_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.
Anton Khirnov [Thu, 5 Jul 2012 18:28:10 +0000 (20:28 +0200)]
af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.

0 should only be returned when there was at least one output frame.

12 years agoaf_amix: only consider negative return codes as errors.
Anton Khirnov [Wed, 4 Jul 2012 16:55:14 +0000 (18:55 +0200)]
af_amix: only consider negative return codes as errors.

12 years agoavconv: use only meaningful timestamps in start time check.
Anton Khirnov [Wed, 4 Jul 2012 00:56:38 +0000 (02:56 +0200)]
avconv: use only meaningful timestamps in start time check.

12 years agoavconv: fix the check for -ss as an output option.
Anton Khirnov [Wed, 4 Jul 2012 00:53:25 +0000 (02:53 +0200)]
avconv: fix the check for -ss as an output option.

start time is already substracted from the frame timestamp, so it needs
to be checked against 0, not start time.

12 years agomss3: add forgotten 'static' qualifier for private table
Kostya Shishkov [Fri, 6 Jul 2012 07:22:46 +0000 (09:22 +0200)]
mss3: add forgotten 'static' qualifier for private table

12 years agolavc: options: add planar names for request_sample_fmt
Mans Rullgard [Fri, 29 Jun 2012 14:23:03 +0000 (15:23 +0100)]
lavc: options: add planar names for request_sample_fmt

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoflacdec: add planar output support
Mans Rullgard [Mon, 2 Jul 2012 23:29:30 +0000 (00:29 +0100)]
flacdec: add planar output support

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoflvdec: Treat all nellymoser versions as the same codec
Martin Storsjö [Thu, 5 Jul 2012 06:47:29 +0000 (09:47 +0300)]
flvdec: Treat all nellymoser versions as the same codec

This avoids creating new AVStreams for them when switching between
different variants of them, since we can handle changes between
different sample rates of nellymoser within the same stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoqdm2: remove broken and disabled dump_context() debug function
Diego Biurrun [Thu, 5 Jul 2012 11:20:57 +0000 (13:20 +0200)]
qdm2: remove broken and disabled dump_context() debug function

12 years agox86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros
Diego Biurrun [Wed, 4 Jul 2012 13:32:16 +0000 (15:32 +0200)]
x86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros

12 years agox86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros
Loren Merritt [Wed, 4 Jul 2012 11:07:49 +0000 (11:07 +0000)]
x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agox86inc: modify ALIGN to not generate long nops on i586
Loren Merritt [Tue, 3 Jul 2012 17:51:43 +0000 (17:51 +0000)]
x86inc: modify ALIGN to not generate long nops on i586

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agox86: h264_intrapred: port to cpuflag macros
Diego Biurrun [Tue, 3 Jul 2012 23:07:42 +0000 (01:07 +0200)]
x86: h264_intrapred: port to cpuflag macros

12 years agoavplay: update input filter pointer when the filtergraph is reset.
Anton Khirnov [Wed, 4 Jul 2012 09:35:18 +0000 (11:35 +0200)]
avplay: update input filter pointer when the filtergraph is reset.

Fixes an invalid read on size change.

12 years agoavconv: fix parsing of -force_key_frames option.
Reimar Döffinger [Mon, 30 Apr 2012 20:48:42 +0000 (22:48 +0200)]
avconv: fix parsing of -force_key_frames option.

Currently it always exits with an error when more than
one position is specified.

CC: libav-stable@libav.org
12 years agoh264: use templates to avoid excessive inlining
Mans Rullgard [Tue, 3 Jul 2012 22:16:11 +0000 (23:16 +0100)]
h264: use templates to avoid excessive inlining

Instead of inlining everything into ff_h264_hl_decode_mb(), use
explicit templating to create versions of the called functions
with constant parameters filled in.  This greatly speeds up
compilation of h264.c and reduces the code size without any
measurable impact on performance.

Compilation time for h264.c on an i7 goes from 30s to 5.5s.
Code size is reduced by 430kB.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoxtea: Make the count parameter match the documentation
Samuel Pitoiset [Thu, 5 Jul 2012 09:19:13 +0000 (11:19 +0200)]
xtea: Make the count parameter match the documentation

Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoblowfish: Make the count parameter match the documentation
Samuel Pitoiset [Thu, 5 Jul 2012 09:33:54 +0000 (11:33 +0200)]
blowfish: Make the count parameter match the documentation

Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agompegvideo: Don't use ff_mspel_motion() for vc1
Michael Niedermayer [Sun, 20 Nov 2011 16:19:25 +0000 (17:19 +0100)]
mpegvideo: Don't use ff_mspel_motion() for vc1

Using ff_mspel_motion assumes that s (a MpegEncContext
poiinter) really is a Wmv2Context.

This fixes crashes in error resilience on vc1/wmv3 videos.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoxtea: invert branch and loop precedence
Luca Barbato [Thu, 5 Jul 2012 07:52:04 +0000 (09:52 +0200)]
xtea: invert branch and loop precedence

Should slightly improve performance depending on the compiler used.

12 years agoblowfish: invert branch and loop precedence
Luca Barbato [Thu, 5 Jul 2012 07:50:59 +0000 (09:50 +0200)]
blowfish: invert branch and loop precedence

Should slightly improve performance depending on the compiler used.

12 years agoflvdec: optionally trust the metadata
Luca Barbato [Wed, 4 Jul 2012 11:33:41 +0000 (13:33 +0200)]
flvdec: optionally trust the metadata

In certain conditions video or audio frames might appear way later in the
stream.

12 years agoavconv: Set audio filter time base to the sample rate
Martin Storsjö [Sat, 30 Jun 2012 08:26:11 +0000 (11:26 +0300)]
avconv: Set audio filter time base to the sample rate

If the output frame size is smaller than the input sample rate,
and the input stream time base corresponds exactly to the input
frame size (getting input packet timestamps like 0, 1, 2, 3, 4 etc),
the output timestamps from the filter will be like
0, 1, 2, 3, 4, 4, 5 ..., leadning to non-monotone timestamps later.

A concrete example is input mp3 data having frame sizes of 1152
samples, transcoded to aac with 1024 sample frames.

By setting the audio filter time base to the sample rate, we will
get sensible timestamps for all output packets, regardless of
the ratio between the input and output frame sizes.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agovp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too
Martin Storsjö [Wed, 4 Jul 2012 19:25:53 +0000 (22:25 +0300)]
vp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too

This was missed in the the previous commit in 70a1c800.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agolavfi: reclassify showfiltfmts as a TESTPROG
Mans Rullgard [Wed, 4 Jul 2012 15:51:10 +0000 (16:51 +0100)]
lavfi: reclassify showfiltfmts as a TESTPROG

This tool uses lavfi internal symbols not accessible in shared
libraries.  TESTPROGS are linked statically to allow them use of
library internals not normally exported.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agograph2dot: fix printf format specifier
Diego Biurrun [Wed, 4 Jul 2012 14:55:13 +0000 (16:55 +0200)]
graph2dot: fix printf format specifier

tools/graph2dot.c:85: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int’

12 years agoswscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
Martin Storsjö [Wed, 4 Jul 2012 04:11:23 +0000 (21:11 -0700)]
swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agovp8: loopfilter >=sse2 functions need aligned stack on x86-32.
Martin Storsjö [Wed, 4 Jul 2012 04:11:36 +0000 (21:11 -0700)]
vp8: loopfilter >=sse2 functions need aligned stack on x86-32.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoamr: remove shift out of the AMR_BIT() macro.
Ronald S. Bultje [Wed, 4 Jul 2012 03:36:44 +0000 (20:36 -0700)]
amr: remove shift out of the AMR_BIT() macro.

MSVC doesn't like the offsetof(..) >> 1 construct, it interprets it as
a non-literal, thus causing use of this in static tables to fail
compilation.

12 years agodsputilenc: group yasm and inline asm function pointer assignment.
Ronald S. Bultje [Wed, 4 Jul 2012 04:00:05 +0000 (21:00 -0700)]
dsputilenc: group yasm and inline asm function pointer assignment.

12 years agomov: use forward declaration of a function instead of a table.
Ronald S. Bultje [Wed, 4 Jul 2012 03:49:49 +0000 (20:49 -0700)]
mov: use forward declaration of a function instead of a table.

MSVC gives a compile error on the tentative definition of
mov_default_parse_table[].

12 years agoClarify Doxygen comment for FF_API_* #defines.
Diego Biurrun [Tue, 3 Jul 2012 20:42:42 +0000 (22:42 +0200)]
Clarify Doxygen comment for FF_API_* #defines.

12 years agoconfigure: simplify get_version()
Diego Biurrun [Mon, 2 Jul 2012 21:04:09 +0000 (23:04 +0200)]
configure: simplify get_version()

All libs have version headers now, which allows hardcoding the path.

12 years agoCreate version.h headers for libraries that lack them
Diego Biurrun [Sun, 1 Jul 2012 09:51:30 +0000 (11:51 +0200)]
Create version.h headers for libraries that lack them

12 years agogitignore: Use full path instead of relative path to specify patterns
Diego Biurrun [Mon, 2 Jul 2012 20:49:42 +0000 (22:49 +0200)]
gitignore: Use full path instead of relative path to specify patterns

This avoids confusion from patterns meant to only match at the top
level matching files in subdirectories.

12 years agompegvideo: remove VLAs
Ronald S. Bultje [Sun, 24 Jun 2012 18:19:24 +0000 (21:19 +0300)]
mpegvideo: remove VLAs

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoAdd XTEA encryption support in libavutil
Samuel Pitoiset [Tue, 3 Jul 2012 13:53:16 +0000 (15:53 +0200)]
Add XTEA encryption support in libavutil

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoAdd Blowfish encryption support in libavutil
Samuel Pitoiset [Tue, 3 Jul 2012 13:45:27 +0000 (15:45 +0200)]
Add Blowfish encryption support in libavutil

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoeval: Add the isinf() function and tests for it
Martin Storsjö [Sun, 1 Jul 2012 13:11:23 +0000 (16:11 +0300)]
eval: Add the isinf() function and tests for it

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoflacdec: move lpc filter to flacdsp
Mans Rullgard [Mon, 2 Jul 2012 12:51:04 +0000 (13:51 +0100)]
flacdec: move lpc filter to flacdsp

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoflacdec: split off channel decorrelation as flacdsp
Mans Rullgard [Sun, 17 Jun 2012 14:10:40 +0000 (15:10 +0100)]
flacdec: split off channel decorrelation as flacdsp

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoavplay: Add an option for not limiting the input buffer size
Martin Storsjö [Tue, 3 Jul 2012 19:57:19 +0000 (22:57 +0300)]
avplay: Add an option for not limiting the input buffer size

For reading from normal files on disk, the queue limits for
demuxed data work fine, but for reading data from realtime
streams, they mean we're not reading from the input stream
at all once the queue limit has been reached. For TCP streams,
this means that writing to the socket from the peer side blocks
(potentially leading to the peer dropping data), and for UDP
streams it means that our kernel might drop data.

For some protocols/servers, the server initially sends a
large burst with data to fill client side buffers, but once
filled, we should keep reading to avoid dropping data.

For all realtime streams, it IMO makes sense to just buffer
as much as we get (rather in buffers in avplay.c than in
OS level buffers). With this option set, the input thread
should always be blocking waiting for more input data,
never sleeping waiting for the decoder to consume data.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoFATE: add a test for WMA cover art.
Anton Khirnov [Fri, 22 Jun 2012 17:02:06 +0000 (19:02 +0200)]
FATE: add a test for WMA cover art.

12 years agoFATE: add a test for apetag cover art
Anton Khirnov [Fri, 22 Jun 2012 11:16:18 +0000 (13:16 +0200)]
FATE: add a test for apetag cover art

12 years agoFATE: add a test for itunes cover art.
Anton Khirnov [Fri, 22 Jun 2012 05:24:45 +0000 (07:24 +0200)]
FATE: add a test for itunes cover art.

12 years agoflacdec: factor out code setting avctx->sample_fmt
Mans Rullgard [Mon, 2 Jul 2012 23:28:32 +0000 (00:28 +0100)]
flacdec: factor out code setting avctx->sample_fmt

12 years agoflac: make FLAC_CHMODE_* constants consecutive
Mans Rullgard [Sun, 17 Jun 2012 10:45:10 +0000 (11:45 +0100)]
flac: make FLAC_CHMODE_* constants consecutive

12 years agoflacdec: allocate sample buffers with av_malloc
Mans Rullgard [Mon, 2 Jul 2012 22:16:30 +0000 (23:16 +0100)]
flacdec: allocate sample buffers with av_malloc

The buffers are only allocated once, although it can happen from
any of a few different places, so there is no need to use realloc.
Using av_malloc() ensures they are aligned suitably for SIMD
optimisations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoflacdec: remove curr_bps from FLACContext
Mans Rullgard [Mon, 2 Jul 2012 00:43:12 +0000 (01:43 +0100)]
flacdec: remove curr_bps from FLACContext

This value does not need to be persistent across calls.

12 years agofate: add flac encode/decode tests with various options
Mans Rullgard [Mon, 2 Jul 2012 15:07:42 +0000 (16:07 +0100)]
fate: add flac encode/decode tests with various options

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoflacenc: add option for forcing stereo decorrelation mode
Mans Rullgard [Mon, 2 Jul 2012 13:52:05 +0000 (14:52 +0100)]
flacenc: add option for forcing stereo decorrelation mode

This is mainly useful for testing.

Signed-off-by: Mans Rullgard <mans@mansr.com>