Commit Graph

2115 Commits

Author SHA1 Message Date
Stefano Sabatini b6e36a4244 lavu/parseutils: remove unused gcd variable in av_parse_ratio()
Fix warning.
2012-10-22 10:41:51 +02:00
Michael Niedermayer aa760b1735 Merge commit '2d09b36c0379fcda8f984bc8ad8816c8326fd7bd'
* commit '2d09b36c0379fcda8f984bc8ad8816c8326fd7bd':
  doc/platform: Add info on shared builds with MSVC
  doc/platform: Move a caveat down to the notes section
  ARM: reinstate optimised intmath.h
  ffv1: update to ffv1 version 3

Conflicts:
	doc/platform.texi
	libavcodec/ffv1.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 16:13:55 +02:00
Michael Niedermayer dcbff35199 Merge commit 'd15c21e5fa3961f10026da1a3080a3aa3cf4cec9'
* commit 'd15c21e5fa3961f10026da1a3080a3aa3cf4cec9':
  avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility
  avutil: make some tables visible again
  avutil: remove inline av_log2 from public API
  celp_math: rename ff_log2 to ff_log2_q15

Conflicts:
	libavutil/libavutil.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 13:35:42 +02:00
Mans Rullgard ebe46b8063 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>
2012-10-20 17:26:37 +01:00
Martin Storsjö d15c21e5fa 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>
2012-10-20 14:31:55 +03:00
Reinhard Tartler def8c94699 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>
2012-10-20 14:31:55 +03:00
Mans Rullgard 8c0a3d5fe0 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>
2012-10-20 12:28:45 +01:00
Michael Niedermayer 6912e7a008 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Group math functions into a separate variable
  avutil/mem: K&R formatting cosmetics
  avutil/lzo: K&R formatting cosmetics

Conflicts:
	configure
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 13:18:59 +02:00
Michael Niedermayer 04c6ecb7da Merge commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed'
* commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed':
  fate-vc1: add dependencies
  ARM: fix overreads in neon h264 chroma mc
  rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
  gitignore: ignore files created by msvc
  fate: Add proper dependencies for the tests in video.mak
  configure: Disable Snow decoder and encoder by default
  lzo: Drop obsolete fast_memcpy reference
  build: Drop OBJS declaration for non-existing PCM_DVD encoder
  mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all

Conflicts:
	libavcodec/mpegvideo.c
	libavformat/rtsp.c
	tests/fate/microsoft.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 12:37:52 +02:00
Stefano Sabatini cdea54b4c8 lavu/parseutils: rework rational reduction logic in av_parse_ratio()
Avoid to divide num and den by gcd in case of a parsed expression, since
that is already done in av_d2q(), and force reduction in case of "a:b"
form, allowing to honour the max parameter.

The latter change is consistent with the a/b case, and with the
documentation.
2012-10-20 12:19:53 +02:00
Diego Biurrun 5532cf3178 avutil/mem: K&R formatting cosmetics 2012-10-20 02:34:29 +02:00
Diego Biurrun c08536979b avutil/lzo: K&R formatting cosmetics 2012-10-20 02:34:29 +02:00
Hendrik Leppkes 953a3dcc4e Mark data symbols shared between libraries with av_export
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 01:56:50 +02:00
Diego Biurrun 8fb1e26405 lzo: Drop obsolete fast_memcpy reference 2012-10-19 17:04:41 +02:00
Michael Niedermayer b0554fec04 Merge commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72'
* commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72':
  fate: add a dependency helper macro
  Add support for building shared libraries with MSVC
  avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
  gxf: Add a local copy of the relevant parts of the frame rate table
  configure: Split out msvc as a separate target OS
  aviobuf: Remove a senseless ifdef in avio_seek

Conflicts:
	configure
	libavcodec/dirac.c
	libavcodec/mpeg12data.h
	libavcodec/mpeg12enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 13:29:24 +02:00
Martin Storsjö d66c52c2b3 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>
2012-10-18 14:26:15 +03:00
Michael Niedermayer 5717562c78 Merge commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d'
* commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d':
  rangecoder-test: Return in case of an error
  build: simplify enabling of compat objects

Conflicts:
	configure
	libavutil/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 13:57:10 +02:00
Mans Rullgard 84e65c763d build: simplify enabling of compat objects
Add a configure function to pull in a compat object and set up
redirects in one operation.  This avoids duplicating conditions
across configure and makefiles.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:19 +01:00
Michael Niedermayer d6f6a7557c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avutil: Do not make ff_ symbols globally visible.
  avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
  build: tms470: work around glibc math.h problems
  configure: improve tms470 compiler usage with glibc

Conflicts:
	libavcodec/bmpenc.c
	libavcodec/rawdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 15:11:34 +02:00
Michael Niedermayer 82c0055c5e Merge commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520'
* commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520':
  configure: tms470: add mapping for -mfpu=vfpv3-d16 flag
  configure: recognise Minix as OS
  configure: work around bug in ash shell
  eval-test: make table static const
  lavr: handle clipping in the float to s32 conversion
  nut: support pcm codecs not mapped in avi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 14:46:13 +02:00
Michael Niedermayer 2fed05f53a avoid more "0xFF << 24" as it is considered a integer overflow in C99
missed these in my previous search and replace

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:34:16 +02:00
Diego Biurrun 7638f0b2fe avutil: Do not make ff_ symbols globally visible. 2012-10-13 20:01:56 +02:00
Diego Biurrun 52d113ee06 avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
Functions used across libraries should have avpriv_ and not ff_ prefixes.
2012-10-13 19:59:20 +02:00
Michael Niedermayer 183117fed7 libavutil: loose idiotic circular dependancies between version and avutil.h
This fixes the recently appearing PIX_FMT warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 18:47:18 +02:00
Michael Niedermayer 15ef1cfe64 Merge commit 'f5962229bfcb14c2879e69ccdf7f1a4934168609'
* commit 'f5962229bfcb14c2879e69ccdf7f1a4934168609':
  avplay: use audio parameters from the decoded frame instead of AVCodecContext
  dca: allocate a secondary buffer for extra channels when downmixing
  configure: use utilities from /usr/xpg4/bin if it exists
  avstring-test: fix memory leaks

Conflicts:
	ffplay.c
	libavcodec/dcadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 16:39:42 +02:00
Michael Niedermayer d6c342fdc0 Merge commit 'd5c62122a7b26704bf867a1262df358623bf5edf'
* commit 'd5c62122a7b26704bf867a1262df358623bf5edf':
  Move av_reverse table to libavcodec

Conflicts:
	libavcodec/asvenc.c
	libavcodec/vble.c
	libavutil/common.h
	libavutil/mathematics.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 14:35:42 +02:00
Michael Niedermayer d197bd4f5e Merge commit '930c9d4373e0f3cb7c64fcfc129127a309f6d066'
* commit '930c9d4373e0f3cb7c64fcfc129127a309f6d066':
  avutil: Duplicate ff_log2_tab instead of sharing it across libs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 14:24:58 +02:00
Michael Niedermayer 3b0bb321a5 Merge commit 'f6c38c5f4ed6683a6a61db2ed418a68bbe5f5507'
* commit 'f6c38c5f4ed6683a6a61db2ed418a68bbe5f5507':
  avfilter: call x86 init functions under if (ARCH_X86), not if (HAVE_MMX)
  rtspdec: Set the default port for listen mode, if none is specified
  tscc2: Fix an out of array access
  rtmpproto: Fix an out of array write
  rtspdec: Fix use of uninitialized byte
  vp8: reset loopfilter delta values at keyframes.
  avutil: add yuva422p and yuva444p formats

Conflicts:
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 14:14:11 +02:00
Mans Rullgard 74c39bc682 eval-test: make table static const
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 11:39:25 +01:00
Mans Rullgard 0daac647af avstring-test: fix memory leaks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 23:51:12 +01:00
Diego Biurrun d5c62122a7 Move av_reverse table to libavcodec
It is only used in that library.
2012-10-12 20:39:18 +02:00
Diego Biurrun 930c9d4373 avutil: Duplicate ff_log2_tab instead of sharing it across libs
The table is so small that the space gain is not worth the
performance overhead of cross-library access.
2012-10-12 20:39:17 +02:00
Paul B Mahol 77e6b085a3 imgutils: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 15:39:50 +00:00
Michael Niedermayer 27ccc82e1b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavu,lavd: do not use av_pix_fmt_descriptors directly.

Conflicts:
	libavutil/imgutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 17:21:01 +02:00
Michael Niedermayer a33ed6bc74 Merge commit 'b7f1010c8fce09096057528f7cd29589ea1ae7df'
* commit 'b7f1010c8fce09096057528f7cd29589ea1ae7df':
  tools: do not use av_pix_fmt_descriptors directly.
  pixdesc: add functions for accessing pixel format descriptors.
  build: add support for Tru64 (OSF/1)
  md5: Allocate a normal private context for the opaque md5 context pointer

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffprobe.c
	libavformat/md5enc.c
	libavutil/version.h
	tools/graph2dot.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 15:34:49 +02:00
Luca Barbato 6d5600e855 avutil: add yuva422p and yuva444p formats 2012-10-12 15:09:51 +02:00
Michael Niedermayer f391e405df Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* commit 'e002e3291e6dc7953f843abf56fc14f08f238b21':
  Use the new aes/md5/sha/tree allocation functions
  avutil: Add functions for allocating opaque contexts for algorithms
  svq3: fix pointer type warning
  svq3: replace unsafe pointer casting with intreadwrite macros
  parseutils-test: various cleanups

Conflicts:
	doc/APIchanges
	libavcodec/svq3.c
	libavutil/parseutils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:52:34 +02:00
Michael Niedermayer d6135a886d Merge commit '15ba7f6525c0f56f0c8e3e3e0c0c5129de054f41'
* commit '15ba7f6525c0f56f0c8e3e3e0c0c5129de054f41':
  parseutils: fix const removal warning
  prepare 9_beta1 release

Conflicts:
	Changelog
	RELEASE
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:38:04 +02:00
Michael Niedermayer e335658370 Merge commit '9734b8ba56d05e970c353dfd5baafa43fdb08024'
* commit '9734b8ba56d05e970c353dfd5baafa43fdb08024':
  Move avutil tables only used in libavcodec to libavcodec.

Conflicts:
	libavcodec/mathtables.c
	libavutil/intmath.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:26:46 +02:00
Michael Niedermayer 43cce41267 Merge commit '0a75d1da23b8659ec49391469bb592da12760077'
* commit '0a75d1da23b8659ec49391469bb592da12760077':
  options_table: refs option is not snow-only
  random_seed: Support using CryptGenRandom on windows
  doc: update the faq entry about custom I/O

Conflicts:
	doc/faq.texi
	libavcodec/options_table.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:15:33 +02:00
Anton Khirnov 22c8cbc0da lavu,lavd: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Anton Khirnov d2fcb356ca pixdesc: add functions for accessing pixel format descriptors.
Make av_pix_fmt_descriptors table static on next major bump.

Making the table public is dangerous, since the caller has no way to
know how large it actually is. It also prevents adding new fields to
AVPixFmtDescriptor without a major bump.
2012-10-12 12:45:25 +02:00
Martin Storsjö e002e3291e Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:28 +03:00
Martin Storsjö 9a92aea27b avutil: Add functions for allocating opaque contexts for algorithms
The current API where the plain size is exposed is not of much
use - in most cases it is allocated dynamically anyway.

If allocated e.g. on the stack via an uint8_t array, there's no
guarantee that the struct's members are aligned properly (unless
the array is overallocated and the opaque pointer within it
manually aligned to some unspecified alignment).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:27 +03:00
Mans Rullgard 15ba7f6525 parseutils: fix const removal warning
The const qualifier is still removed although it happens inside
the strtol() function so no warning is generated.

Fixes:
libavutil/parseutils.c:110:11: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-11 18:00:27 +01:00
Mans Rullgard 68e360a83c parseutils-test: various cleanups
- make tables static const
- remove useless use of compound literal
- break long lines
- fix a comma/semicolon typo

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-11 18:00:27 +01:00
Diego Biurrun 9734b8ba56 Move avutil tables only used in libavcodec to libavcodec. 2012-10-11 18:29:36 +02:00
Michael Niedermayer 26474d1098 random_seed: fix digest size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 18:28:21 +02:00
Michael Niedermayer 7fe5548531 random_seed: fix out of array read
Fixes CID733787
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 18:28:21 +02:00
Martin Storsjö 1093383d6c random_seed: Support using CryptGenRandom on windows
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 18:49:34 +03:00