Commit Graph

1794 Commits

Author SHA1 Message Date
Martin Storsjö
e743e7ae6e libavutil: Make avpriv_open a library-internal function on msvcrt
Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.

This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.

On systems not using msvcrt, the function is not duplicated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:33 +03:00
Martin Storsjö
a76d0cdf21 libavutil: Move avpriv_open to a new file, file_open.c
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:33 +03:00
Martin Storsjö
33237123c8 libavutil: Enable the MSVC DLL symbol loading workaround in shared builds as well
This used to only be necessary in static builds (when using the
dynamically linked C runtime), since the _imp prefixed symbols do
exist when linking to the actual DLL. When building testprogs,
however, the current library (e.g. libavutil for some of the testprogs)
is linked statically.

This fixes make fate on DLL builds when using the dynamically
linked C runtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:25 +03:00
Martin Storsjö
dfc6b5c814 file: Move win32 utf8->wchar open wrapper to libavutil
When libavformat was changed to use the new avpriv_open function
in 51eb213d00, this silently bypassed the existing wrapper for
win32. Move the win32 wrapper into libavutil/file.c to make sure
it gets called everywhere (not just in the libavformat case).

This makes sure that non-ascii file names gets opened properly
(where file names internally are stored as utf8, but they get
converted to wchar_t and opened with _wsopen).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 16:41:33 +03:00
Derek Buitenhuis
0f1fb6c019 libavutil: Don't use fcntl if the function does not exist
Not all platforms have the function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 11:07:51 +03:00
Rémi Denis-Courmont
880391ed2d libavutil: use avpriv_open()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-07 21:12:28 +02:00
Rémi Denis-Courmont
869b04e891 libavutil: add avpriv_open() to open files with close-on-exec flag
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-07 21:12:20 +02:00
Rémi Denis-Courmont
a0ad5d0113 vdpau: deprecate old codec-specific pixel formats
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:16:54 +02:00
Diego Biurrun
7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Diego Biurrun
3a7050ffed build: Add _Pragma macro to disable deprecated declaration warnings 2013-08-02 19:19:02 +02:00
Diego Biurrun
b5a138652f Give less generic names to global library option arrays 2013-08-02 19:19:02 +02:00
Vittorio Giovara
3c8bff0740 avframe: have av_frame_get_side_data take const AVFrame*
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-01 09:41:45 +02:00
Martin Storsjö
c7e921a54f avopt: Check whether the object actually has got an AVClass
AVIOContext has got an av_class member that only gets set if
opening the context using avio_open2, but not if allocating a
custom IO context. A caller that wants to read AVOptions from
an AVIOContext (recursively using AV_OPT_SEARCH_CHILDREN) may
not know if the AVIOContext actually has got a class set or not.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-31 21:31:14 +03:00
Diego Biurrun
c2e936de07 tree-test: Refactor and plug memory leaks
With the most annoying memory leak found by Derek Buitenhuis.
2013-07-31 18:14:08 +02:00
Diego Biurrun
a9b04b2c43 tree.h: K&R formatting and typo cosmetics 2013-07-31 18:14:08 +02:00
Diego Biurrun
78b4bfdb84 Replace remaining obsolete PIX_FMT names with AV_PIX_FMT equivalents 2013-07-29 23:46:51 +02:00
Diego Biurrun
d99a2b6d0a avutil/tree: Drop debug messages that clutter the output 2013-07-29 19:20:27 +02:00
Diego Biurrun
10db1a9bca avutil/tree: K&R formatting cosmetics 2013-07-29 19:20:27 +02:00
Diego Biurrun
bf4b0ed1d5 Add missing deprecation attributes 2013-07-27 16:08:49 +02:00
Diego Biurrun
5b097399ba eval: Explicitly ignore return value of strtod() in parse_db()
The return value is not needed.  This fixes the warning:
libavutil/eval.c:353:15: warning: ignoring return value of ‘strtod’
2013-07-27 16:00:41 +02:00
Diego Biurrun
439902e0d6 Employ consistent LIBAV_COMPAT_ multiple inclusion guards in compat/
Also fix a comment and an #endif comment.
2013-07-18 18:12:38 +02:00
Diego Biurrun
3ac7fa81b2 Consistently use "cpu_flags" as variable/parameter name for CPU flags 2013-07-18 00:31:35 +02:00
Martin Storsjö
ef5b70affc configure: Check for support for labels in the inline assembly
Use this for enabling the ppc timer.h implementation only on
assemblers that support labels in the inline assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-11 18:53:02 +03:00
Luca Barbato
73142e7533 fifo: K&R formatting cosmetics 2013-07-06 14:28:06 +02:00
Luca Barbato
0420c810ce log: pass the correct parameters to missing_feature_sample
CC:libav-stable@libav.org
2013-07-04 21:25:11 +02:00
Loren Merritt
c8b920a9b7 lls/x86: use 3-operator vaddpd in ADDPD_MEM
Fixes build with yasm-1.1

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-07-02 10:15:09 +02:00
Loren Merritt
1221bb6239 x86: lpc: fix a segfault in av_evaluate_lls_sse2() 2013-06-30 23:11:19 +00:00
Loren Merritt
b545179fdf x86: lpc: simd av_evaluate_lls
1.5x-1.8x faster on sandybridge

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
502ab21af0 x86: lpc: simd av_update_lls
4x-6x faster on sandybridge

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
41578f70cf lpc: use function pointers, in preparation for asm
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
cc6714bb16 lpc: remove "decay" argument
We never used the rolling-average mode, and this makes av_update_lls 15% faster.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Martin Storsjö
fc962d4e7a mem: Add av_realloc_array and av_reallocp_array
These help avoiding overflows and simplify error handling.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:04:08 +03:00
Diego Biurrun
f0ce1d9909 cpu: Restructure code to avoid pointless ret variable indirection
libavutil/cpu.c:133:9: warning: unused variable ‘ret’ [-Wunused-variable]
2013-06-02 18:05:08 +02:00
Martin Storsjö
be7952b5c3 arm: Only output eabi attributes if building for ELF
This matches the other eabi attribute in the same file. This is
required in order to build for arm/hardfloat with other object
file formats than ELF.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-27 00:55:33 +03:00
Martin Storsjö
597208fde1 cpu: Include common.h for av_popcount64
This fixes build failures on windows since 2a6eaeaa8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-24 13:34:19 +03:00
Anton Khirnov
2a6eaeaa85 Move get_logical_cpus() from lavc/pthread to lavu/cpu.
It will be useful in lavfi, and could conceivably be useful to the user
applications as well.
2013-05-24 09:28:00 +02:00
Anton Khirnov
f36d7831d9 pixdesc: mark gray8 as pseudopal
Many functions treat it as such already.
Fixes Bug 499.

CC:libav-stable@libav.org
2013-05-22 21:18:08 +02:00
Anton Khirnov
40020e171a doxy: add a section about versioning. 2013-05-17 20:26:18 +02:00
Anton Khirnov
bc8c1cdc7b lavfi doxy: add a page for lavfi. 2013-05-17 20:26:11 +02:00
Diego Biurrun
d46c588f3c Remove commented-out #includes 2013-05-15 23:01:21 +02:00
Anton Khirnov
e6c4ac7b5f pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_* 2013-05-15 07:46:51 +02:00
Kieran Kunhya
ede75ebc9b Clarify output of av_get_bits_per_pixel
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-05-15 07:45:09 +02:00
Martin Storsjö
06122c2533 msvc: Move linker pragma from config.h to libavutil/internal.h
This makes linking succeed for tools that include config.h but
don't link to libavutil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-08 01:28:25 +03:00
Janne Grunau
74652af821 pixdesc: add function to return pixel format with swapped endiannes 2013-05-06 18:51:47 +02:00
Diego Biurrun
1fda184a85 avutil: Add av_cold attributes to init functions missing them 2013-05-04 22:48:05 +02:00
Christophe Gisquet
566b7a20fd x86: float dsp: butterflies_float SSE
97c -> 49c
Some codecs could benefit from more unrolling, but AAC doesn't.
2013-05-03 08:08:02 +02:00
Derek Buitenhuis
af8a47905a avutil: doxy: Small clarification for av_buffer_create()
Explicitly saying it can't hurt.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-04-30 13:33:43 -04:00
Diego Biurrun
f5eecee865 ppc: util_altivec: Surround AltiVec-related code by appropriate ifdefs
This prevents non-AltiVec-enabled compilers from choking.
2013-04-30 12:19:44 +02:00
Anton Khirnov
93e65e9a6c Cosmetics, restore alphabetic order in atomics lists. 2013-04-11 12:31:14 +02:00
Ronald S. Bultje
b93b27edb0 dsputil: Make dsputil selectable
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:04:05 +03:00
Christophe Gisquet
2e81acc687 x86inc: Fix number of operands for cmp* instructions
cmp{p,s}{s,d} instructions do take an imm8 operand.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-09 23:55:30 +02:00
Nicolas Bertrand
8c65264595 pixdesc/pixfmt: Add XYZ colorspace for XYZ 12-bit values
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-04 19:50:59 +02:00
Anton Khirnov
bcc9432898 opt: check the return values of av_get_token for ENOMEM. 2013-04-04 07:51:53 +02:00
Anton Khirnov
f9f6402e9c configure: prettify atomics handling.
Add simpler names and a shorthand for native atomics (as opposed to
pthreads fallback).
2013-04-03 09:22:31 +02:00
Anton Khirnov
cf53704c55 AVOptions: make av_set_options_string() forward options to child objects 2013-03-28 07:55:38 +01:00
Diego Biurrun
b6649ab503 cosmetics: Remove unnecessary extern keywords from function declarations 2013-03-27 14:21:45 +01:00
Hendrik Leppkes
1e8b9738fa avutil/frame: add all remaining frame properties to av_frame_copy_props
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-22 20:05:37 +01:00
Anton Khirnov
2c328a9079 pixdesc: add a function for counting planes in a pixel format. 2013-03-19 11:12:17 +01:00
Anton Khirnov
4d67ff8e8e AVOptions: fix using named constants with child contexts.
The named constant needs to be searched for in the same object on which
the option is set, i.e. target_obj.
2013-03-16 05:35:33 +01:00
Anton Khirnov
9676b9a2cd AVOption: remove an unused function parameter. 2013-03-16 05:35:20 +01:00
Xi Wang
ca6c3f2c53 lzo: fix overflow checking in copy_backptr()
The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:52:31 +01:00
Diego Biurrun
f099d3d1d5 Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
This allows reporting missing features and requesting samples from
all libraries in a standard way; with a simplified API.
2013-03-13 20:42:06 +01:00
Hendrik Leppkes
d6d369bf13 atomic: prefer gcc builtins over win32 atomics, if available.
The mingw win32 atomics appear to be faulty, so they should not be used
if the gcc ones are available.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-11 16:57:25 +02:00
Janne Grunau
fc8406d01e avframe: copy reordered_opaque in copy_props
Fixes video playback in applications still using reordered_opaque.
2013-03-11 13:29:39 +01:00
Anton Khirnov
6327c10702 atomic: fix CAS with armcc.
On the current code, armcc will fail with:
"libavutil/atomic_gcc.h", line 52: Error:  #2771: first argument must be
a pointer to integer or enumeration type
2013-03-09 08:36:40 +01:00
Martin Storsjö
666fe5da47 atomic: Exclude the unsupported implementation headers from checkheaders
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-08 20:34:27 +02:00
Martin Storsjö
e460aa3282 atomic: Check for __sync_val_compare_and_swap instead of __sync_synchronize
Not all gcc configurations have an implementation of all the atomic
operations, and some gcc configurations have some atomic builtins
implemented but not all.

Thus check for the most essential function, whose presence should
indicate that all others are present as well, since it can be used
to implement all the other ones.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-08 14:55:08 +02:00
Martin Storsjö
2240e92f05 atomic: Add include guards to the implementation headers
This makes them pass standalone compilation tests. Previously,
they included atomic.h which included themselves again, leading to
double definitions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-08 12:00:06 +02:00
Anton Khirnov
0651e892e1 Replace remaining includes of audioconvert.h with channel_layout.h 2013-03-08 07:42:13 +01:00
Anton Khirnov
1296b1f6c0 AVFrame: deprecate all now unused fields 2013-03-08 07:41:21 +01:00
Anton Khirnov
77b2cd7b41 AVFrame: add side data. 2013-03-08 07:37:01 +01:00
Anton Khirnov
7ecc2d403c Move AVFrame from lavc to lavu.
Add AVBuffer-based reference counting API to it.
2013-03-08 07:36:15 +01:00
Anton Khirnov
ad0c9f2d5d lavc: move AVFrame.hwaccel_picture_private to Picture.
This field is private and should not be present in a public struct. It
is only used in DXVA with mpegvideo-based decoders currently.
2013-03-08 07:36:01 +01:00
Anton Khirnov
1cec0624d0 AVBuffer: add a new API for buffer pools 2013-03-08 07:33:28 +01:00
Anton Khirnov
8e401dbe90 lavu: add a new API for reference-counted data buffers. 2013-03-08 07:33:03 +01:00
Ronald S. Bultje
65f1d45dcc lavu: add support for atomic operations.
These could be used for reference counting, or for keeping track of
decoding progress in references in multithreaded decoders.

Support is provided by gcc/msvc/suncc intrinsics, with a fallback using
pthread mutexes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-08 07:32:36 +01:00
Martin Storsjö
4be368b504 avstring: Fix isxdigit to not accept non-hex characters
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 16:46:46 +02:00
Reimar Döffinger
efa7f42020 Use the avstring.h locale-independent character type functions
Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:36 +02:00
Reimar Döffinger
12c5c1d3e3 avstring: Add locale independent versions of some ctype.h functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:26 +02:00
Diego Biurrun
0b31129389 lls: Do not return from void functions 2013-03-01 01:44:35 +01:00
Diego Biurrun
4da950c0ae lls: #ifndef --> #if in FF_API_ version guard 2013-03-01 01:44:35 +01:00
Luca Barbato
399663be9d lls: mark max_order as unsigned short
The value is within 0 and 32.

Remove an `array subscript is below array bounds` warning.
2013-02-28 17:39:24 +01:00
Luca Barbato
9d4da474f5 lls: move to the private namespace
The functions are private.
2013-02-28 17:39:24 +01:00
Luca Barbato
7ac6d2423e lls: K&R formatting cosmetics 2013-02-28 17:39:24 +01:00
Anton Khirnov
f935aca44c av_memcpy_backptr: avoid an infinite loop for back = 0
CC:libav-stable@libav.org
2013-02-23 09:16:15 +01:00
Diego Biurrun
c9ad5f59aa intreadwrite: tomi: Add missing attributes.h #include for av_always_inline 2013-02-20 00:45:30 +01:00
Ronald S. Bultje
0c0828ecc5 x86: Use simple nop codes for <= sse (rather than <= mmx)
The "CentaurHauls family 6 model 9 stepping 8" family of CPUs
(flags: fpu vme de pse tsc msr cx8 sep mtrr pge mov pat mmx fxsr sse
up rng rng_en ace ace_en) SIGILLs on long nop codes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:19 +02:00
Diego Biurrun
4db96649ca avutil: Ensure that emms_c is always defined, even on non-x86 2013-02-14 19:29:04 +01:00
Diego Biurrun
ab441e20ff avutil: Move emms code to x86-specific header 2013-02-14 17:37:34 +01:00
Luca Barbato
fd1abf4269 lavu: avoid clashing definition of E
E is usually defined as a shorthand for AV_OPT_FLAG_ENCODING_PARAM.
Rename the single expansion E(x) now used in libavutil to E1.
2013-02-12 11:47:43 +01:00
Diego Biurrun
62a43d30cc crc: Move static data table from header to .c file
Having static data tables in header files is a potential source of trouble.
2013-02-11 16:48:44 +01:00
Martin Storsjö
ab8f1a6989 arm: Fall back to runtime cpu feature detection via /proc/cpuinfo
On recent android versions, /proc/self/auxw is unreadable
(unless the process is running running under the shell uid or
in debuggable mode, which makes it hard to notice). See
http://b.android.com/43055 and
https://android-review.googlesource.com/51271 for more information
about the issue.

This makes sure e.g. neon optimizations are enabled at runtime in
android apps even when built in release mode, if configured to
use the runtime detection.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-11 17:15:15 +02:00
Diego Biurrun
218aefce44 dsputil: Move LOCAL_ALIGNED macros to libavutil 2013-02-08 23:13:37 +01:00
Justin Ruggles
38c1466ca4 dict: add av_dict_parse_string()
Can be used to set multiple key/value pairs from a string.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 17:20:03 +01:00
Vladimir Pantelic
b85a5e87af lavu: Add av_strnstr()
This is a length limited version of strstr()

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 10:47:51 +01:00
Luca Barbato
4333df6355 avstring: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-24 20:49:54 +01:00
Martin Storsjö
2e4130037c float_dsp: Include config.h for redefining restrict
This makes sure that the restrict keyword is mapped to whatever
keyword the compiler prefers/supports. This fixes building on MSVC
(and possibly on GCC 2.x as well).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 11:17:32 +02:00
Ronald S. Bultje
d56668bd80 floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
This makes the aac decoder and all voice codecs independent of dsputil.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje
5959bfaca3 floatdsp: move butterflies_float from dsputil to avfloatdsp.
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje
42d3246948 floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje
55aa03b9f8 floatdsp: move vector_fmul_add from dsputil to avfloatdsp. 2013-01-22 11:55:42 -08:00
Martin Storsjö
f4facd2ce7 x86: Add a Yasm-based emms() replacement
This provides a fallback when building with Yasm enabled, but neither
inline assembly, nor the _mm_empty intrinsic are available or enabled.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-18 22:02:13 +01:00
Diego Biurrun
d633d12b2c x86inc: Add cvisible macro for C functions with public prefix
This allows defining externally visible library symbols.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-18 22:02:03 +01:00
Diego Biurrun
ef5d41a553 x86inc: Rename "program_name" to "private_prefix"
The new name is more descriptive and will allow defining a separate
public prefix for externally visible library symbols.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-18 20:29:53 +01:00
Martin Storsjö
973b4d44f1 float_dsp: Add #ifdef HAVE_INLINE_ASM around vector_fmul_window
This fixes builds on 64bit MSVC.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-17 19:07:35 +02:00
Justin Ruggles
e034cc6c60 lavc: Move vector_fmul_window to AVFloatDSPContext
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-16 10:45:45 +01:00
Martin Storsjö
3130fa51a5 lavu: Add a fate test for the HMAC API
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:07 +02:00
Diego Biurrun
dae1d507af x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags 2013-01-15 17:29:43 +01:00
Diego Biurrun
320e1d0df3 x86: ABSB2: port to cpuflags 2013-01-15 11:18:51 +01:00
Diego Biurrun
094a7405e5 x86: ABSB: port to cpuflags 2013-01-15 11:18:51 +01:00
Martin Storsjö
8ee288d258 lavu: Add an API for calculating HMAC (RFC 2104)
This supports HMAC-MD5 and HMAC-SHA1 for now, other hashes are
simple to add.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:54:19 +02:00
Diego Biurrun
51969a652c x86: ABS2: port to cpuflags 2013-01-14 21:56:55 +01:00
Diego Biurrun
f89466ad6f Add version bump and APIchanges entry for Add AV_PIX_FMT_VDPAU.
Also fix a lavu version typo in APIchanges.
2013-01-12 12:28:12 +01:00
Rémi Denis-Courmont
169fb94f0f pixfmt: add picture format for VDPAU
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-12 12:00:49 +01:00
Diego Biurrun
5b4dfbffc2 x86: ABS1: port to cpuflags 2013-01-06 13:57:01 +01:00
Diego Biurrun
bcb8d9eb8f Drop unnecessary 'l' length modifier when printfing double values.
%f denotes a double argument and 'l' does nothing in this case
according to the C spec.
2012-12-31 11:20:45 +01:00
Luca Barbato
d8fd06c37d avstring: add av_basename and av_dirname
Thread safe version of the common basename and dirname.
2012-12-29 17:26:22 +01:00
Justin Ruggles
d02202e08a opt: avoid segfault in av_opt_next() if the class does not have an option list
CC: libav-stable@libav.org
2012-12-22 15:43:27 -05:00
Ronald S. Bultje
a34d9ad969 lavc: merge latest x86inc.asm fixes with x264
Unbreak NASM support.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-19 07:27:33 +01:00
Diego Biurrun
523c7bd23c misc typo, style and wording fixes 2012-12-18 13:36:51 +01:00
Janne Grunau
0995ad8db4 x86inc: fully concatenate tokens to fix macro expansion for nasm
Fixes build errors with nasm introduced in 6f40e9f070 for stack
memory alignment. Noticed by BugMaster.
2012-12-13 23:57:09 +01:00
Ronald S. Bultje
140367aff9 x86inc: fix stack alignment on win64
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 21:30:49 +02:00
Ronald S. Bultje
6f40e9f070 x86inc: support stack mem allocation and re-alignment in PROLOGUE
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-12 05:23:46 +01:00
Justin Ruggles
1c012e6bfb x86: float_dsp: fix loading of the len parameter on x86-32 2012-12-07 21:19:29 -05:00
Mans Rullgard
b57c1da81e arm: detect cpu features at runtime on Linux
This allows compiling optimised functions for features not enabled
in the core build and selecting these at runtime if the system has
the necessary support.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard
b326755989 arm: rename ARMVFP config symbol to VFP
This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard
a7831d509f arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation
These macros reflect the actual capabilities required here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Justin Ruggles
ecc8b02194 x86: float_dsp: fix compilation of ff_vector_dmul_scalar_avx() on x86-32
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-12-06 14:11:15 +01:00
Paul B Mahol
b519298a15 pixdesc: fix yuva 10bit bit depth
It was wrongly set as the yuva 16bit one.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-05 17:52:55 +01:00
Justin Ruggles
b30a363331 x86: af_volume: add SSE2/SSSE3/AVX-optimized s32 volume scaling 2012-12-05 11:23:37 -05:00
Justin Ruggles
9d5c62ba5b lavu/opt: do not filter out the initial sign character except for flags
This allows parsing of special-case negative numbers like decibels.
2012-12-05 11:23:36 -05:00
Justin Ruggles
5312268b34 eval: treat dB as decibels instead of decibytes 2012-12-05 11:23:36 -05:00
Justin Ruggles
ac7eb4cb20 float_dsp: add vector_dmul_scalar() to multiply a vector of doubles
Include x86-optimized versions for SSE2 and AVX.
2012-12-05 11:23:36 -05:00
Anton Khirnov
cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Martin Storsjö
7e6a11bcf7 avutil: Use a configure check to enable windows console functions
Not all versions or API subsets of windows have these functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-30 16:56:57 +02:00
Martin Storsjö
b70abd5b61 avutil: Include io.h with a separate condition from windows console functions
Not all versions of windows have the console color functions,
while io.h might be needed for isatty (which can be found in
unistd.h or io.h).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-30 16:56:54 +02:00
Martin Storsjö
15816c8e8b avutil: Include io.h with a separate condition from MapViewOfFile
The existence of MapViewOfFile isn't linked to the existence of
io.h.

Not all versions of windows have MapViewOfFile (in particular,
Windows Phone 8 and the "metro" windows 8 API subset don't),
while they still have io.h (and need it for open/read/close).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-29 18:19:57 +02:00
Diego Biurrun
490df522c7 x86: cpu: Drop unused HAVE_RWEFLAGS condition
The test for rweflags was dropped in a previous commit.
2012-11-28 00:28:09 +01:00
Justin Ruggles
947f933687 x86: float_dsp: add SSE version of vector_fmul_scalar() 2012-11-26 11:30:19 -05:00
Justin Ruggles
284ea790d8 dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil 2012-11-26 11:29:06 -05:00
Mans Rullgard
dd3b73f390 base64: fix signed overflow in shift
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-26 13:34:58 +00:00
Janne Grunau
e96d90eed6 remove #defines to prevent use of discouraged external functions
Preventing the use of discouraged or 'insecure' external functions
through defines in an internal header is not a good solution. The
header is not guaranteed to be included universally which makes
overlooking bad use of said functions during review more likely.

There are cases were those functions either are the most straight
forward solution or even have to be used. Using malloc or free is
required if the allocation or release is done by other libraries.
2012-11-25 23:02:04 +01:00
Mans Rullgard
4a606c830a av_memcpy_backptr: optimise some special cases
- Add special cases for offsets of 2, 3, or 4 bytes.  This means the
  offset is always >4 in the generic case, allowing 32-bit copies to
  be used there.
- Don't use memcpy() for sizes less than 16 bytes.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:04:17 +00:00
Luca Barbato
cbe5a60c9d pixdesc: add PIX_FMT_ALPHA flag 2012-11-20 12:45:58 +01:00
Diego Biurrun
87af05c575 x86: SPLATD: port to cpuflags 2012-11-18 18:34:05 +01:00
Janne Grunau
8f5587c3d0 cpu.h: define AV_CPU_FLAG_MMX2 for libavutil major 52 2012-11-16 15:04:48 +01:00
Diego Biurrun
8ff0f7763d crc: av_crc() parameter names should match between .c, .h and doxygen 2012-11-16 10:38:23 +01:00
Mans Rullgard
7ba0c1b390 avutil: change GET_UTF8 to not use av_log2()
This removes an inter-library dependency on ff_log2_tab causing
linking errors in some configurations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-14 13:50:42 +00:00
Diego Biurrun
26301caaa1 x86: mmx2 ---> mmxext in asm constructs 2012-11-14 00:58:51 +01:00
Luca Barbato
c1a02e884a pixdesc: add av_pix_fmt_get_chroma_sub_sample
Deprecate avcodec_get_chroma_sub_sample.
2012-11-13 16:14:55 +01:00