platform/upstream/libav.git
11 years agolavu: remove disabled avoptions cruft
Anton Khirnov [Mon, 22 Oct 2012 12:39:43 +0000 (14:39 +0200)]
lavu: remove disabled avoptions cruft

11 years agolavu: remove disabled FF_API_GET_BITS_PER_SAMPLE_FMT cruft
Anton Khirnov [Mon, 22 Oct 2012 12:36:14 +0000 (14:36 +0200)]
lavu: remove disabled FF_API_GET_BITS_PER_SAMPLE_FMT cruft

11 years agoRevert "avutil: make some tables visible again"
Anton Khirnov [Mon, 22 Oct 2012 07:15:11 +0000 (09:15 +0200)]
Revert "avutil: make some tables visible again"

This reverts commit def8c94699877d015154a03d43e2b8f479cd89a0.

After the major bump this is no longer necessary.

11 years agoRevert "avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility"
Anton Khirnov [Mon, 22 Oct 2012 07:14:43 +0000 (09:14 +0200)]
Revert "avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility"

This reverts commit d15c21e5fa3961f10026da1a3080a3aa3cf4cec9.

After the major bump this is no longer necessary.

11 years agolavu: bump major to 52
Anton Khirnov [Mon, 22 Oct 2012 07:12:03 +0000 (09:12 +0200)]
lavu: bump major to 52

In addition to the recent tables mess, the AVOption defaults behavior
changed, so an old lavc used with a new lavu will get completely messed
up defaults.

11 years agolavu: postpone recent deprecations until the next major bump
Anton Khirnov [Mon, 22 Oct 2012 07:11:41 +0000 (09:11 +0200)]
lavu: postpone recent deprecations until the next major bump

11 years agoAPIchanges: update lavr bump date
Anton Khirnov [Mon, 22 Oct 2012 07:02:28 +0000 (09:02 +0200)]
APIchanges: update lavr bump date

11 years agoavconv: only apply presets when we have an encoder.
Anton Khirnov [Mon, 22 Oct 2012 20:40:22 +0000 (22:40 +0200)]
avconv: only apply presets when we have an encoder.

Fixes a crash when using a preset with stream copy.

CC: libav-stable@libav.org
11 years agoatrac3: replace a calculation with FFALIGN()
Justin Ruggles [Fri, 19 Oct 2012 03:51:37 +0000 (23:51 -0400)]
atrac3: replace a calculation with FFALIGN()

This allocates 4 bytes less than the previous code if avctx->block_align is
a multiple of 4, but the extra 4 bytes is not really needed.

11 years agoatrac3: remove unused ATRAC3Context field, sample_rate
Justin Ruggles [Fri, 19 Oct 2012 03:34:40 +0000 (23:34 -0400)]
atrac3: remove unused ATRAC3Context field, sample_rate

11 years agoatrac3: use sizeof(variable) instead of sizeof(type)
Justin Ruggles [Fri, 19 Oct 2012 03:25:44 +0000 (23:25 -0400)]
atrac3: use sizeof(variable) instead of sizeof(type)

11 years agoatrac3: simplify MDCT window calculation
Justin Ruggles [Fri, 19 Oct 2012 03:11:20 +0000 (23:11 -0400)]
atrac3: simplify MDCT window calculation

11 years agoatrac3: initialize static tables in AVCodec.init_static_data()
Justin Ruggles [Fri, 19 Oct 2012 03:04:03 +0000 (23:04 -0400)]
atrac3: initialize static tables in AVCodec.init_static_data()

11 years agoatrac3: separate window initialization from IMDCT initialization
Justin Ruggles [Fri, 19 Oct 2012 02:56:10 +0000 (22:56 -0400)]
atrac3: separate window initialization from IMDCT initialization

11 years agoatrac3: move the 'frame_factor' field from ATRAC3Context to where it is used
Justin Ruggles [Fri, 19 Oct 2012 02:53:13 +0000 (22:53 -0400)]
atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used

11 years agoatrac3: remove unused ATRAC3Context field, bit_rate
Justin Ruggles [Fri, 19 Oct 2012 02:51:41 +0000 (22:51 -0400)]
atrac3: remove unused ATRAC3Context field, bit_rate

11 years agoatrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used
Justin Ruggles [Fri, 19 Oct 2012 02:50:40 +0000 (22:50 -0400)]
atrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used

11 years agoatrac3: remove unused ATRAC3Context field, samples_per_channel
Justin Ruggles [Fri, 19 Oct 2012 02:48:45 +0000 (22:48 -0400)]
atrac3: remove unused ATRAC3Context field, samples_per_channel

11 years agoatrac3: use AVCodecContext.block_align instead of keeping a private copy
Justin Ruggles [Fri, 19 Oct 2012 02:45:48 +0000 (22:45 -0400)]
atrac3: use AVCodecContext.block_align instead of keeping a private copy

11 years agoatrac3: move the 'delay' field from ATRAC3Context to where it is used
Justin Ruggles [Fri, 19 Oct 2012 02:42:21 +0000 (22:42 -0400)]
atrac3: move the 'delay' field from ATRAC3Context to where it is used

11 years agoatrac3: move the 'version' field from ATRAC3Context to where it is used
Justin Ruggles [Thu, 18 Oct 2012 21:14:59 +0000 (17:14 -0400)]
atrac3: move the 'version' field from ATRAC3Context to where it is used

11 years agoatrac3: use AVCodecContext.channels instead of keeping a private copy
Justin Ruggles [Thu, 18 Oct 2012 21:13:22 +0000 (17:13 -0400)]
atrac3: use AVCodecContext.channels instead of keeping a private copy

11 years agoatrac3: simplify some loop indexing
Justin Ruggles [Thu, 18 Oct 2012 21:07:04 +0000 (17:07 -0400)]
atrac3: simplify some loop indexing

11 years agoatrac3: cosmetics: pretty-printing and renaming
Justin Ruggles [Wed, 17 Oct 2012 15:59:40 +0000 (11:59 -0400)]
atrac3: cosmetics: pretty-printing and renaming

also does some minor refactoring.

11 years agopcm: define AVCodec instances only for enabled codecs
Mans Rullgard [Wed, 17 Oct 2012 21:26:55 +0000 (22:26 +0100)]
pcm: define AVCodec instances only for enabled codecs

This defines an AVCodec only if the corresponding CONFIG option is
enabled instead of using the broad CONFIG_ENCODERS/DECODERS.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agolibxvid: remove useless doxy comments.
Anton Khirnov [Mon, 22 Oct 2012 13:20:23 +0000 (15:20 +0200)]
libxvid: remove useless doxy comments.

11 years agolavc: remove stats_out from the options table.
Anton Khirnov [Fri, 19 Oct 2012 18:39:27 +0000 (20:39 +0200)]
lavc: remove stats_out from the options table.

Since it is declared as a string AVOption, the generic freeing code
attempts to free it on codec close. Some codecs might have already freed
it elsewhere (or didn't even allocate it with av_malloc() in the first
place), so this might lead to an invalid free.

There is no point in having this field accessible as an AVOption, so
remove it from the options table.

Fixes Bug 380.

CC: libav-stable@libav.org
11 years agoriff: remove a write-only variable
Anton Khirnov [Wed, 17 Oct 2012 04:39:13 +0000 (06:39 +0200)]
riff: remove a write-only variable

11 years agolavc: extend frame_size doxy.
Anton Khirnov [Wed, 17 Oct 2012 05:17:24 +0000 (07:17 +0200)]
lavc: extend frame_size doxy.

11 years agoalacdec: set bits_per_raw_sample
Justin Ruggles [Sun, 21 Oct 2012 23:18:07 +0000 (19:18 -0400)]
alacdec: set bits_per_raw_sample

11 years agortpdec: Don't pass a non-AVClass pointer as log context
Martin Storsjö [Sat, 20 Oct 2012 20:29:15 +0000 (23:29 +0300)]
rtpdec: Don't pass a non-AVClass pointer as log context

The log context is assumed to start with an AVClass pointer.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortsp: Update a comment to the current filename scheme
Martin Storsjö [Sat, 20 Oct 2012 20:04:14 +0000 (23:04 +0300)]
rtsp: Update a comment to the current filename scheme

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoavcodec: handle AVERROR_EXPERIMENTAL
Nathan Caldwell [Fri, 19 Oct 2012 04:58:25 +0000 (22:58 -0600)]
avcodec: handle AVERROR_EXPERIMENTAL

Error out on init if a codec with CODEC_CAP_EXPERIMENTAL is requested
and strict_std_compliance is not FF_COMPLIANCE_EXPERIMENTAL.

Move the check from avconv to avcodec_open2() and return
AVERROR_EXPERIMENTAL accordingly.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoavutil: Add AVERROR_EXPERIMENTAL
Nathan Caldwell [Fri, 19 Oct 2012 04:59:04 +0000 (22:59 -0600)]
avutil: Add AVERROR_EXPERIMENTAL

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoavcodec: prefer decoders without CODEC_CAP_EXPERIMENTAL
Nathan Caldwell [Thu, 18 Oct 2012 20:47:38 +0000 (14:47 -0600)]
avcodec: prefer decoders without CODEC_CAP_EXPERIMENTAL

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agofate: adpcm: cosmetics: Sort test entries
Diego Biurrun [Fri, 19 Oct 2012 21:32:12 +0000 (23:32 +0200)]
fate: adpcm: cosmetics: Sort test entries

This also places tests of related formats together.

11 years agofate: adpcm: Add dependencies
Diego Biurrun [Fri, 19 Oct 2012 23:13:56 +0000 (01:13 +0200)]
fate: adpcm: Add dependencies

11 years agosvq3: cosmetics: Drop useless parentheses
Diego Biurrun [Fri, 19 Oct 2012 16:26:54 +0000 (18:26 +0200)]
svq3: cosmetics: Drop useless parentheses

11 years agosvq3: K&R formatting cosmetics
Diego Biurrun [Fri, 19 Oct 2012 16:03:10 +0000 (18:03 +0200)]
svq3: K&R formatting cosmetics

11 years agofate: Introduce ENCMUX macro for tests that require encoders and a muxer
Diego Biurrun [Sat, 20 Oct 2012 13:40:15 +0000 (15:40 +0200)]
fate: Introduce ENCMUX macro for tests that require encoders and a muxer

11 years agoffv1: Add missing #includes to header file
Diego Biurrun [Sat, 20 Oct 2012 19:09:25 +0000 (21:09 +0200)]
ffv1: Add missing #includes to header file

11 years agodoc/platform: Add info on shared builds with MSVC
Derek Buitenhuis [Fri, 19 Oct 2012 19:12:07 +0000 (15:12 -0400)]
doc/platform: Add info on shared builds with MSVC

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agodoc/platform: Move a caveat down to the notes section
Derek Buitenhuis [Fri, 19 Oct 2012 18:19:26 +0000 (14:19 -0400)]
doc/platform: Move a caveat down to the notes section

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agoARM: reinstate optimised intmath.h
Mans Rullgard [Sat, 20 Oct 2012 14:29:32 +0000 (15:29 +0100)]
ARM: reinstate optimised intmath.h

Use of the ARM optimised intmath.h was accidentally dropped in 9734b8b.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoffv1: update to ffv1 version 3
Luca Barbato [Fri, 19 Oct 2012 10:14:22 +0000 (12:14 +0200)]
ffv1: update to ffv1 version 3

Based on code from Carl Eugen Hoyos, Michael Niedermayer and Paul B Mahol.

11 years agoffv1: propagate errors
Luca Barbato [Fri, 19 Oct 2012 08:33:43 +0000 (10:33 +0200)]
ffv1: propagate errors

11 years agoffv1: split decoder and encoder
Luca Barbato [Fri, 19 Oct 2012 08:19:36 +0000 (10:19 +0200)]
ffv1: split decoder and encoder

11 years agoavutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility
Martin Storsjö [Sat, 20 Oct 2012 10:32:01 +0000 (13:32 +0300)]
avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility

Earlier versions of for instance of libavcodec expect this symbol to be
present in libavutil. This commit can be reverted after the next major
bump.

New shared builds of avcodec will link to the internal copy of the
table within that library, so those builds won't rely on this table
being present in avutil any longer either.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoavutil: make some tables visible again
Reinhard Tartler [Fri, 19 Oct 2012 21:34:02 +0000 (23:34 +0200)]
avutil: make some tables visible again

These tables are used for instance by older versions of libavcodec and
need to remain visible until the next SONAME bump.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoavutil: remove inline av_log2 from public API
Mans Rullgard [Thu, 18 Oct 2012 17:15:38 +0000 (18:15 +0100)]
avutil: remove inline av_log2 from public API

This removes inline av_log2 and av_log2_16bit from the public API,
instead exporting them as regular functions.  In-tree code still
gets the inline and otherwise optimised variants.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agocelp_math: rename ff_log2 to ff_log2_q15
Mans Rullgard [Thu, 18 Oct 2012 16:59:13 +0000 (17:59 +0100)]
celp_math: rename ff_log2 to ff_log2_q15

This name is more descriptive as the function returns a fixed-point
value with 15 fraction bits.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoconfigure: Group math functions into a separate variable
Diego Biurrun [Fri, 19 Oct 2012 16:58:39 +0000 (18:58 +0200)]
configure: Group math functions into a separate variable

This avoids some duplication when listing and testing for the functions.

11 years agoavutil/mem: K&R formatting cosmetics
Diego Biurrun [Thu, 18 Oct 2012 17:16:37 +0000 (19:16 +0200)]
avutil/mem: K&R formatting cosmetics

11 years agoavutil/lzo: K&R formatting cosmetics
Diego Biurrun [Thu, 18 Oct 2012 17:15:43 +0000 (19:15 +0200)]
avutil/lzo: K&R formatting cosmetics

11 years agofate-vc1: add dependencies
Mans Rullgard [Thu, 18 Oct 2012 02:18:39 +0000 (03:18 +0100)]
fate-vc1: add dependencies

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoARM: fix overreads in neon h264 chroma mc
Mans Rullgard [Fri, 19 Oct 2012 12:39:11 +0000 (13:39 +0100)]
ARM: fix overreads in neon h264 chroma mc

The loops were reading ahead one line, which could end up outside the
buffer for reference blocks at the edge of the picture.  Removing
this readahead has no measurable performance impact.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agortsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
Martin Storsjö [Wed, 17 Oct 2012 13:46:29 +0000 (16:46 +0300)]
rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agogitignore: ignore files created by msvc
Hendrik Leppkes [Fri, 19 Oct 2012 20:07:10 +0000 (22:07 +0200)]
gitignore: ignore files created by msvc

exp files are created in every build and contain export information
of the libraries. Both pdb and ilk are created during debug builds,
and contain linking and debug information used by MSVC.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agofate: Add proper dependencies for the tests in video.mak
Martin Storsjö [Thu, 18 Oct 2012 22:40:47 +0000 (01:40 +0300)]
fate: Add proper dependencies for the tests in video.mak

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoconfigure: Disable Snow decoder and encoder by default
Diego Biurrun [Mon, 15 Oct 2012 21:56:38 +0000 (23:56 +0200)]
configure: Disable Snow decoder and encoder by default

Snow has serious unfixed bugs and no real-world use.

11 years agolzo: Drop obsolete fast_memcpy reference
Diego Biurrun [Thu, 18 Oct 2012 14:53:42 +0000 (16:53 +0200)]
lzo: Drop obsolete fast_memcpy reference

11 years agobuild: Drop OBJS declaration for non-existing PCM_DVD encoder
Diego Biurrun [Fri, 19 Oct 2012 14:16:06 +0000 (16:16 +0200)]
build: Drop OBJS declaration for non-existing PCM_DVD encoder

11 years agompeg4videodec: Disable frame multithreading for GMC, its not implemented at all
Michael Niedermayer [Fri, 12 Oct 2012 20:38:54 +0000 (22:38 +0200)]
mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agofate: Add proper dependencies in qt.mak
Martin Storsjö [Thu, 18 Oct 2012 22:49:15 +0000 (01:49 +0300)]
fate: Add proper dependencies in qt.mak

The output of make fate-list is identical to before.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agofate: Add proper dependencies in lossless-video.mak
Martin Storsjö [Thu, 18 Oct 2012 21:35:32 +0000 (00:35 +0300)]
fate: Add proper dependencies in lossless-video.mak

The output of make fate-list is identical to before.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoindeo3: do not try to output more lines than we can fit
Kostya Shishkov [Thu, 18 Oct 2012 09:45:42 +0000 (11:45 +0200)]
indeo3: do not try to output more lines than we can fit

Internally chroma planes have multiple of four height while allocated image
planes might be smaller if CODEC_FLAG_EMU_EDGE is set. Thus we should not
output more lines of chroma than frame can accept.

Also the decoder can be safely switched to direct rendering now.

11 years agobmv: get a new frame on every decode_frame(), so we can use direct rendering
Kostya Shishkov [Thu, 18 Oct 2012 09:08:01 +0000 (11:08 +0200)]
bmv: get a new frame on every decode_frame(), so we can use direct rendering

11 years agoconfigure: fix libcdio check
Mans Rullgard [Thu, 18 Oct 2012 21:38:12 +0000 (22:38 +0100)]
configure: fix libcdio check

The compiler/linker flags passed to check_lib2 should not be quoted.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agortsp: Allow setting the reordering buffer size via an AVOption
Martin Storsjö [Wed, 17 Oct 2012 12:46:30 +0000 (15:46 +0300)]
rtsp: Allow setting the reordering buffer size via an AVOption

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortsp: Vertically align a constant definition
Martin Storsjö [Wed, 17 Oct 2012 12:24:46 +0000 (15:24 +0300)]
rtsp: Vertically align a constant definition

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortp: Update the check for distinguishing between RTP and RTCP
Martin Storsjö [Tue, 16 Oct 2012 22:45:39 +0000 (01:45 +0300)]
rtp: Update the check for distinguishing between RTP and RTCP

Also add enums for more RTCP packet types, according to the IANA
list of registered types.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoaac: fix build with hardcoded tables
Mans Rullgard [Thu, 18 Oct 2012 14:32:11 +0000 (15:32 +0100)]
aac: fix build with hardcoded tables

aac_tablegen.h includes aac.h for the POW_SF2_ZERO definition, but
this also pulls in a raft of other headers, some of which are not
safe to use in code built with the host compiler.

Moving POW_SF2_ZERO to aac_tablegen_decl.h, where the declaration
of the array it relates to already resides, fixes the problems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: dependencies for screen codec tests
Diego Biurrun [Thu, 18 Oct 2012 15:48:14 +0000 (17:48 +0200)]
fate: dependencies for screen codec tests

11 years agoriff: Move functions around to be covered by appropriate #ifdefs
Diego Biurrun [Wed, 17 Oct 2012 19:32:13 +0000 (21:32 +0200)]
riff: Move functions around to be covered by appropriate #ifdefs

This fixes compilation with --disable-muxers.

11 years agoavformat: Fix references to the removed function av_write_header in comments
Martin Storsjö [Wed, 17 Oct 2012 19:45:23 +0000 (22:45 +0300)]
avformat: Fix references to the removed function av_write_header in comments

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agochangelog: Mention the MSVC DLL support
Martin Storsjö [Thu, 18 Oct 2012 12:06:49 +0000 (15:06 +0300)]
changelog: Mention the MSVC DLL support

Also retroactively add a changelog entry to the 9beta1 list
for general MSVC support, which was present there already.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agofate: add dependencies for misc microsoft codecs
Mans Rullgard [Thu, 18 Oct 2012 02:19:41 +0000 (03:19 +0100)]
fate: add dependencies for misc microsoft codecs

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate-twinvq: add dependencies
Mans Rullgard [Thu, 18 Oct 2012 02:16:35 +0000 (03:16 +0100)]
fate-twinvq: add dependencies

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate-mpc: add dependencies
Mans Rullgard [Thu, 18 Oct 2012 02:16:04 +0000 (03:16 +0100)]
fate-mpc: add dependencies

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate-indeo: add dependencies
Mans Rullgard [Thu, 18 Oct 2012 02:15:26 +0000 (03:15 +0100)]
fate-indeo: add dependencies

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate-als: add dependencies
Mans Rullgard [Thu, 18 Oct 2012 02:15:12 +0000 (03:15 +0100)]
fate-als: add dependencies

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: dependencies for demux tests
Mans Rullgard [Thu, 18 Oct 2012 01:25:58 +0000 (02:25 +0100)]
fate: dependencies for demux tests

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: add a dependency helper macro
Mans Rullgard [Thu, 18 Oct 2012 02:12:54 +0000 (03:12 +0100)]
fate: add a dependency helper macro

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoAdd support for building shared libraries with MSVC
Martin Storsjö [Thu, 18 Oct 2012 08:53:19 +0000 (11:53 +0300)]
Add support for building shared libraries with MSVC

This requires the makedef perl script by Derek, from the
c89-to-c99 repo. That scripts produces a .def file, listing
the symbols to be exported, based on the gcc version scripts
and the built object files.

To properly load non-function symbols from DLL files, the
data symbol declarations need to have the attribute
__declspec(dllimport) when building the calling code. (On mingw,
the linker can fix this up automatically, which is why it has not
been an issue so far. If this attribute is omitted, linking
actually succeeds, but reads from the table will not produce the
desired results at runtime.)

MSVC seems to manage to link DLLs (and run properly) even if
this attribute is present while building the library itself
(which normally isn't recommended) - other object files in the
same library manage to link to the symbol (with a small warning
at link time, like "warning LNK4049: locally defined symbol
_avpriv_mpa_bitrate_tab imported" - it doesn't seem to be possible
to squelch this warning), and the definition of the tables
themselves produce a warning that can be squelched ("warning C4273:
'avpriv_mpa_bitrate_tab' : inconsistent dll linkage, see previous
definition of 'avpriv_mpa_bitrate_tab').

In this setup, mingw isn't able to link object files that refer to
data symbols with __declspec(dllimport) without those symbols
actually being linked via a DLL (linking avcodec.dll ends up with
errors like "undefined reference to `__imp__avpriv_mpa_freq_tab'").
The dllimport declspec isn't needed at all in mingw, so we simply
choose not to declare it for other compilers than MSVC that requires
it. (If ICL support later requires it, the condition can be extended
later to include both of them.)

This also implies that code that is built to link to a certain
library as a DLL can't link to the same library as a static library.
Therefore, we only allow building either static or shared but not
both at the same time. (That is, static libraries as such can be,
and actually are, built - this is used for linking the test tools to
internal symbols in the libraries - but e.g. libavformat built to
link to libavcodec as a DLL cannot link statically to libavcodec.)

Also, linking to DLLs is slightly different from linking to shared
libraries on other platforms. DLLs use a thing called import
libraries, which is basically a stub library allowing the linker
to know which symbols exist in the DLL and what name the DLL will
have at runtime.

In mingw/gcc, the import library is usually named libfoo.dll.a,
which goes next to a static library named libfoo.a. This allows
gcc to pick the dynamic one, if available, from the normal -lfoo
switches, just as it does for libfoo.a vs libfoo.so on Unix. On
MSVC however, you need to literally specify the name of the import
library instead of the static library.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoavcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
Martin Storsjö [Thu, 18 Oct 2012 07:30:03 +0000 (10:30 +0300)]
avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab

This table doesn't need to be shared with libavformat any longer.
Add mpeg12 to the name to make it less ambiguous, while renaming it.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agogxf: Add a local copy of the relevant parts of the frame rate table
Martin Storsjö [Thu, 18 Oct 2012 07:23:12 +0000 (10:23 +0300)]
gxf: Add a local copy of the relevant parts of the frame rate table

This avoids having to share this table across the library
boundaries.

This shared table used to be problematic, if always declaring
all exported data symbols with the dllimport attribute (even
while building that same library), since it needs to be a
link-time constant when it is used in AVCodec declarations
(in mpeg12enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoconfigure: Split out msvc as a separate target OS
Martin Storsjö [Sat, 13 Oct 2012 12:57:56 +0000 (15:57 +0300)]
configure: Split out msvc as a separate target OS

The name mingw32 as target OS is both misleading, and very little
of the target OS specific settings actually match.

Since the target OS default is set based on uname, the default
(which on MSYS is set to mingw) is overridden by --toolchain=msvc.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoaviobuf: Remove a senseless ifdef in avio_seek
Martin Storsjö [Wed, 17 Oct 2012 20:00:54 +0000 (23:00 +0300)]
aviobuf: Remove a senseless ifdef in avio_seek

This seemed to assume that one never used writing avio unless
muxers or networking was enabled.

This ifdef is a remnant since 8fa641f8.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agomips64: mark hi/lo registers clobbered in MAC64/MLS64 macros
Mans Rullgard [Wed, 17 Oct 2012 18:45:54 +0000 (19:45 +0100)]
mips64: mark hi/lo registers clobbered in MAC64/MLS64 macros

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: list lavfi tests in a makefile
Mans Rullgard [Tue, 16 Oct 2012 13:35:05 +0000 (14:35 +0100)]
fate: list lavfi tests in a makefile

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: dependencies for seek tests
Mans Rullgard [Tue, 16 Oct 2012 13:20:57 +0000 (14:20 +0100)]
fate: dependencies for seek tests

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: handle lavf test dependencies entirely in make
Mans Rullgard [Tue, 16 Oct 2012 13:06:41 +0000 (14:06 +0100)]
fate: handle lavf test dependencies entirely in make

This makes the lavf tests depend on all codecs and formats they use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: dependencies for acodec tests
Mans Rullgard [Tue, 16 Oct 2012 02:14:59 +0000 (03:14 +0100)]
fate: dependencies for acodec tests

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: dependencies for vsynth tests
Mans Rullgard [Tue, 16 Oct 2012 13:37:16 +0000 (14:37 +0100)]
fate: dependencies for vsynth tests

This makes the vsynth tests run only if the required codecs and
formats are enabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agofate: add macros useful for conditionally enabling things
Mans Rullgard [Tue, 16 Oct 2012 13:38:44 +0000 (14:38 +0100)]
fate: add macros useful for conditionally enabling things

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agolibmp3lame: resize the output buffer if needed
Justin Ruggles [Tue, 16 Oct 2012 18:07:04 +0000 (14:07 -0400)]
libmp3lame: resize the output buffer if needed

The LAME API documentation for the required buffer size refers to the size for
a single encode call. However, we store multiple frames in the same output
buffer but only read 1 frame at a time out of it. As a result, the buffer size
given in lame_encode_buffer() is actually smaller than what it should be.
Since we do not know how many frames it will end up buffering, it is best to
just reallocate if needed.

11 years agoconfigure: Add support for Tilera processors
Derek Buitenhuis [Tue, 16 Oct 2012 18:21:06 +0000 (18:21 +0000)]
configure: Add support for Tilera processors

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agowavdec: check size before reading the data, not after.
Anton Khirnov [Tue, 16 Oct 2012 08:37:29 +0000 (10:37 +0200)]
wavdec: check size before reading the data, not after.

11 years agowav: do not fail on empty INFO tags
Anton Khirnov [Tue, 16 Oct 2012 08:33:52 +0000 (10:33 +0200)]
wav: do not fail on empty INFO tags

Fixes Bug 379

CC: libav-stable@libav.org
11 years agolavf: split wav muxer and demuxer into separate files.
Anton Khirnov [Tue, 16 Oct 2012 08:23:29 +0000 (10:23 +0200)]
lavf: split wav muxer and demuxer into separate files.