summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* lzo: Drop obsolete fast_memcpy referenceDiego Biurrun2012-10-19
|
* Add support for building shared libraries with MSVCMartin Storsjö2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* build: simplify enabling of compat objectsMans Rullgard2012-10-15
| | | | | | | | 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>
* avutil: Do not make ff_ symbols globally visible.Diego Biurrun2012-10-13
|
* avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()Diego Biurrun2012-10-13
| | | | Functions used across libraries should have avpriv_ and not ff_ prefixes.
* eval-test: make table static constMans Rullgard2012-10-13
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* avstring-test: fix memory leaksMans Rullgard2012-10-12
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Move av_reverse table to libavcodecDiego Biurrun2012-10-12
| | | | It is only used in that library.
* avutil: Duplicate ff_log2_tab instead of sharing it across libsDiego Biurrun2012-10-12
| | | | | The table is so small that the space gain is not worth the performance overhead of cross-library access.
* avutil: add yuva422p and yuva444p formatsLuca Barbato2012-10-12
|
* lavu,lavd: do not use av_pix_fmt_descriptors directly.Anton Khirnov2012-10-12
|
* pixdesc: add functions for accessing pixel format descriptors.Anton Khirnov2012-10-12
| | | | | | | | 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.
* Use the new aes/md5/sha/tree allocation functionsMartin Storsjö2012-10-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil: Add functions for allocating opaque contexts for algorithmsMartin Storsjö2012-10-11
| | | | | | | | | | | | 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>
* parseutils-test: various cleanupsMans Rullgard2012-10-11
| | | | | | | | | - 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>
* parseutils: fix const removal warningMans Rullgard2012-10-11
| | | | | | | | | | 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>
* Move avutil tables only used in libavcodec to libavcodec.Diego Biurrun2012-10-11
|
* random_seed: Support using CryptGenRandom on windowsMartin Storsjö2012-10-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* averror: make error values proper negative valuesJanne Grunau2012-10-11
| | | | Fixes stupid mistake in 25227c3a78fefd74bc6ea34032cd49ec8c8d9d85.
* averror: explicitly define AVERROR_* valuesJanne Grunau2012-10-10
|
* parseutils-test: do not print numerical error codesMans Rullgard2012-10-10
| | | | | | | The error codes differ between systems so printing the value makes the fate test fail on some systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avutil: skip old_pix_fmts.h since it is just a listJanne Grunau2012-10-08
|
* lavu: fix typo in MakefileAnton Khirnov2012-10-08
|
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* pixfmt: add AV_ prefixes to PIX_FMT_*Anton Khirnov2012-10-08
|
* parseutils: fix parsing of invalid alpha valuesMans Rullgard2012-10-06
| | | | | | | | | | An alpha specifier outside the valid range results in a conversion from double to long with undefined result. Range-checking the double and only converting it after it passes avoids this. Fixes fate-parseutils errors on some systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Give all anonymously typedeffed structs in headers a nameDiego Biurrun2012-10-06
| | | | Anonymous structs cannot be forward declared and have no benefit.
* parseutils-test: Drop random colors from parsing testDiego Biurrun2012-10-06
| | | | This guarantees stable output for comparing test results.
* x86: get_cpu_flags: add necessary ifdefs around function bodyDiego Biurrun2012-10-04
| | | | | | | ff_get_cpu_flags_x86() requires cpuid(), which is conditionally defined elsewhere in the file. Surrounding the function body with ifdefs allows building even when cpuid is not defined. An empty cpuflags mask is returned in this case.
* x86: Drop CPU detection intrinsicsDiego Biurrun2012-10-04
| | | | | | Now that there is CPU detection in YASM, there will always be one of inline or external assembly enabled, which obviates the need to fall back on CPU detection through compiler intrinsics.
* x86: Add YASM implementations of cpuid and xgetbv from x264Diego Biurrun2012-10-04
| | | | | This allows detecting CPU features with builds that have neither gcc inline assembly nor the right compiler intrinsics enabled.
* x86: cpu: Break out test for cpuid capabilities into separate functionDiego Biurrun2012-10-04
|
* x86: ff_get_cpu_flags_x86(): Avoid a pointless variable indirectionDiego Biurrun2012-10-04
|
* samplefmt: make av_samples_alloc() initialize the data to silence.Anton Khirnov2012-10-04
| | | | Right now the buffer is zeroed, which does not represent silence for U8(P).
* xtea: Test inplace decryptionMichael Niedermayer2012-10-03
| | | | | | Based on test code by: Giorgio Vazzana <mywing81@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* xtea: Fix CBC decryption when src==dstMichael Niedermayer2012-10-03
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* xtea: Factorize testing into a separate functionMartin Storsjö2012-10-03
| | | | | | Based on a patch by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
* Allow use of strncpy()Mans Rullgard2012-10-03
| | | | | | | | There are cases where strncpy() does exactly what is required. A blanket ban forces more convoluted solutions to be used in those cases and has been a cause of bugs. Signed-off-by: Mans Rullgard <mans@mansr.com>
* blowfish: Add more testsMartin Storsjö2012-10-03
| | | | | | Test inplace ECB, normal CBC and inplace CBC encryption/decryption. Signed-off-by: Martin Storsjö <martin@martin.st>
* blowfish: Fix CBC decryption with dst==srcMartin Storsjö2012-10-03
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* blowfish: Factorize testing into a separate functionMartin Storsjö2012-10-03
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* ARM: use numeric ID for Tag_ABI_align_preservedMans Rullgard2012-10-03
| | | | | | Some old assemblers still in use do not support named tags. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM: bswap: drop armcc version of av_bswap16()Mans Rullgard2012-10-02
| | | | | | | This function causes several versions of armcc to miscompile code, and the performance impact is small. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM: set Tag_ABI_align_preserved in all asm filesMans Rullgard2012-10-02
| | | | | | | | All our ARM asm preserves alignment so setting this attribute in a common location is simpler. This removes numerous warnings when linking with armcc. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM: fix Thumb PIC on AppleMans Rullgard2012-10-02
| | | | | | | LDR with register offset and PC as base register is not available in the Thumb instruction set so the addition must be done separately. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avformat: Remove non-compiling and/or silly commented-out printf/av_log ↵Diego Biurrun2012-10-01
| | | | statements
* ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC codeMans Rullgard2012-09-21
| | | | | | | The Apple assembler refuses to assemble the 3-operand form in Thumb2 even though it is valid syntax. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM: align PIC offset pools to 4 bytesMans Rullgard2012-09-21
| | | | | | | | | When building Thumb2 code, the end of a function, where the PIC offsets are placed, need not be aligned. Although the values are only accessed with instructions allowing unaligned addresses, keeping them aligned is preferable. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM: swap source operands in some add instructionsMans Rullgard2012-09-20
| | | | | | This allows using a 16-bit opcode when generating Thumb2 code. Signed-off-by: Mans Rullgard <mans@mansr.com>
* flacdsp: arm optimised lpc filterMans Rullgard2012-09-15
|