- 18 Oct, 2012 1 commit
-
-
Martin Storsjö authored
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>
-
- 15 Oct, 2012 1 commit
-
-
Mans Rullgard authored
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>
-
- 13 Oct, 2012 3 commits
-
-
Diego Biurrun authored
-
Diego Biurrun authored
Functions used across libraries should have avpriv_ and not ff_ prefixes.
-
Mans Rullgard authored
Signed-off-by: Mans Rullgard <mans@mansr.com>
-
- 12 Oct, 2012 6 commits
-
-
Mans Rullgard authored
Signed-off-by: Mans Rullgard <mans@mansr.com>
-
Diego Biurrun authored
It is only used in that library.
-
Diego Biurrun authored
The table is so small that the space gain is not worth the performance overhead of cross-library access.
-
Luca Barbato authored
-
Anton Khirnov authored
-
Anton Khirnov authored
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.
-
- 11 Oct, 2012 6 commits
-
-
Martin Storsjö authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
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>
-
Mans Rullgard authored
- 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>
-
Mans Rullgard authored
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>
-
Diego Biurrun authored
-
Martin Storsjö authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
- 10 Oct, 2012 3 commits
-
-
Janne Grunau authored
Fixes stupid mistake in 25227c3a.
-
Janne Grunau authored
-
Mans Rullgard authored
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>
-
- 08 Oct, 2012 4 commits
-
-
Janne Grunau authored
-
Anton Khirnov authored
-
Anton Khirnov authored
-
Anton Khirnov authored
-
- 06 Oct, 2012 3 commits
-
-
Mans Rullgard authored
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>
-
Diego Biurrun authored
Anonymous structs cannot be forward declared and have no benefit.
-
Diego Biurrun authored
This guarantees stable output for comparing test results.
-
- 04 Oct, 2012 6 commits
-
-
Diego Biurrun authored
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.
-
Diego Biurrun authored
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.
-
Diego Biurrun authored
This allows detecting CPU features with builds that have neither gcc inline assembly nor the right compiler intrinsics enabled.
-
Diego Biurrun authored
-
Diego Biurrun authored
-
Anton Khirnov authored
Right now the buffer is zeroed, which does not represent silence for U8(P).
-
- 03 Oct, 2012 7 commits
-
-
Michael Niedermayer authored
Based on test code by: Giorgio Vazzana <mywing81@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
-
Michael Niedermayer authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
Based on a patch by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Mans Rullgard authored
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>
-
Martin Storsjö authored
Test inplace ECB, normal CBC and inplace CBC encryption/decryption. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-