Commit Graph

1723 Commits

Author SHA1 Message Date
Jason Garrett-Glaser
7115566541 x86inc: various minor backports from x264
Small backports that sneaked into other asm commits in x264.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:27:22 -04:00
Derek Buitenhuis
47f9d7ce54 x86inc: Check for __OUTPUT_FORMAT__ having a value of "x64"
This is also a valid value for WIN64.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:27:08 -04:00
Henrik Gramner
bbe4a6db44 x86inc: Utilize the shadow space on 64-bit Windows
Store XMM6 and XMM7 in the shadow space in functions that
clobbers them. This way we don't have to adjust the stack
pointer as often, reducing the number of instructions as
well as code size.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:35 -04:00
Loren Merritt
3fb78e99a0 x86inc: create xm# and ym#, analagous to m#
For when we want to mix simd sizes within one function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:19 -04:00
Loren Merritt
49ebe3f9fe x86inc: fix some corner cases of SWAP
SWAP with >=3 named (rather than numbered) args
PERMUTE followed by SWAP with 2 named args
used to produce the wrong permutation

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:06 -04:00
Henrik Gramner
63f0d62310 x86inc: Use SSE instead of SSE2 for copying data
Reduces code size because movaps/movups is one byte
shorter than movdqa/movdqu.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:24:33 -04:00
Henrik Gramner
ad76e6e7e1 x86inc: Set ELF hidden visibility for global constants
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:24:13 -04:00
Loren Merritt
25cb0c1a1e x86inc: activate REP_RET automatically
Now RET checks whether it immediately follows a branch, so the
programmer dosen't have to keep track of that condition. REP_RET
is still needed manually when it's a branch target, but that's
much rarer.

The implementation involves lots of spurious labels, but that's OK
because we strip them.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:17:59 -04:00
Luca Barbato
4272bb6ef1 doxy: Document avlog
Provide some information for every function and add a group.
2013-10-05 18:09:45 +02:00
Diego Biurrun
80fefbed62 x86: cpu: Restore some explanatory comments removed in 7160bb7 2013-10-03 23:00:09 +02:00
Diego Biurrun
5ce04c14dd Use correct Doxygen syntax 2013-10-03 17:53:51 +02:00
Anton Khirnov
38e15df148 avframe: note that linesize is not the usable data size 2013-09-28 07:35:50 +02:00
Michael Niedermayer
a454dec19a pixdesc: fix NV20* descriptors
They were inconsistent (overlapping fields and wrong sizes)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 14:02:10 +02:00
Alex Smith
08fa828b3f avutil: Fix compilation with inline asm disabled on mingw
Because of -Werror=implicit-function-declaration the build will fail.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 00:50:32 +03:00
Kieran Kunhya
e208e6d209 lavu: Add interleaved 4:2:2 8/10-bit formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-21 17:36:15 +02:00
Martin Storsjö
67e285ceca mem: Handle av_reallocp(..., 0) properly
Previously this did a double free (and returned an error).

Reported-by: Justin Ruggles
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 21:23:08 +03:00
Alex Smith
33b88f2a4a msvc/icl: Use __declspec(noinline)
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 14:40:06 +03:00
Alex Smith
09f2581dc5 msvc/icl: Use __declspec(deprecated)
Prior to this on msvc/icl there was no handling of deprecated functions
and the deprecated warning was disabled.

After enabling there are a number of warnings relating to the CRT and
the use of the non-secure versions of several functions.  Defining
_CRT_SECURE_NO_WARNINGS silences these warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 14:40:06 +03:00
Luca Barbato
3feb3d6ce4 mem: Introduce av_reallocp 2013-09-16 19:36:37 +02:00
Diego Biurrun
9997a812e7 mem: Document the non-compatibility of av_realloc() and av_malloc() 2013-09-14 17:38:01 +02:00
Diego Biurrun
a0b901a348 Drop pointless directory name prefixes from #includes in the current dir 2013-09-10 12:38:41 +02:00
Diego Biurrun
c3e6e8f06c mem: Do not check unsigned values for negative size 2013-09-05 12:38:43 +02:00
Diego Biurrun
b634b36fce mem: Improve documentation wording and spelling 2013-09-05 12:38:43 +02:00
Luca Barbato
b4ec7a5fee mem: Document the av_realloc family of functions properly
realloc() does not accept pointers from memalign().
2013-09-04 10:56:41 +02:00
Diego Biurrun
79aec43ce8 x86: Add and use more convenience macros to check CPU extension availability 2013-08-29 13:07:37 +02:00
Diego Biurrun
7ffda66fd5 arm: float_dsp: Propagate cpu_flags to vfp initialization function 2013-08-29 11:24:14 +02:00
Diego Biurrun
f61bece684 ppc: Add and use convenience macro to check for AltiVec availability 2013-08-28 23:54:15 +02:00
Diego Biurrun
8410d6e93c avutil: Refactor CPU extension availability macros 2013-08-28 23:54:14 +02:00
Diego Biurrun
b78b10c4b7 avutil: Move internal CPU detection function declarations to private header 2013-08-28 23:54:14 +02:00
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