Commit Graph

3108 Commits

Author SHA1 Message Date
Diego Biurrun
d64341e498 configure: Prefix libc-related variables with "libc_"
Simplifies host/target libc detection splitting.
2013-12-09 11:47:43 +01:00
Anton Khirnov
df7aba52b5 frame: cosmetics, reindent 2013-12-09 08:45:08 +01:00
Anton Khirnov
c342132fa8 frame: copy flags in av_frame_copy_props()
Flags can be considered metadata (at least those that are defined now).
2013-12-09 08:45:01 +01:00
Michael Niedermayer
e8ac905dae avutil/opt: Implement av_opt_set_defaults* in O(N) instead of O(N²) time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 14:09:36 +01:00
Michael Niedermayer
0aedf90e62 avutil/opt: factor set_string_color() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 14:08:20 +01:00
Michael Niedermayer
758d4e4067 avutil/opt: factor set_string_video_rate() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 14:08:19 +01:00
Michael Niedermayer
9648c4fe9c avutil/opt: factor set_string_image_size() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 14:07:52 +01:00
Michael Niedermayer
f52852098d avutil/utils: run ff_check_pixfmt_descriptors() only when ASSERT_LEVEL is > 0
this safes about 0.1ms

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:51:58 +01:00
Michael Niedermayer
a044a183a3 avutil/log: skip IO calls on empty strings
These occur when no context is set for example, thus they are common

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:30:34 +01:00
Michael Niedermayer
d6838309fe avutil/log: skip setting color for default (AV_LOG_INFO) level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:28:57 +01:00
Michael Niedermayer
2c21e2ee4c avutil/log: merge calls that set ansi color and print the string
about 1/3 or so faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:27:45 +01:00
James Almer
56572787ae Add Windows resource file support for shared libraries
Originally written by James Almer <jamrial@gmail.com>

With the following contributions by Timothy Gu <timothygu99@gmail.com>

* Use descriptions of libraries from the pkg-config file generation function
* Use "FFmpeg Project" as CompanyName (suggested by Alexander Strasser)
* Use "FFmpeg" for ProductName as MSDN says "name of the product with which the
  file is distributed" [1].
* Use FFmpeg's version (N-xxxxx-gxxxxxxx) for ProductVersion per MSDN [1].
* Only build the .rc files when --enable-small is not enabled.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 23:42:07 +01:00
Lenny Wang
7b2534b0ea libavutil & opencl: remove opencl default device type
CL_DEVICE_TYPE_DEFAULT makes duplicated device entries for each
platform using av_opencl_get_device_list()

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Reviewed-by: highgod0401 <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-02 12:07:27 +01:00
Timothy Gu
82b2e9cb1d build: rename version.h to libavutil/ffversion.h
Also the libavutil/ffversion.h will be installed.

Rationale:
* Applications might want to know FFmpeg's version besides the individual
  libraries'.
* Avoids file name clash between FFmpeg's ./version.h and lib*/version.h when
  a library source file includes both and is compiled on an out-of-tree build.

Fixes #1769.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-30 21:42:55 +01:00
Michael Niedermayer
808c10e728 avutil/log: check that len is within the buffer before reading it
Fixes out of array read
Fixes: asan_heap-oob_19d6979_6857_mmw_deadzy.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 17:06:42 +01:00
Michael Niedermayer
60b099c371 get_audio_buffer: fix usage where channels are not set but layout is
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 10:52:26 +01:00
Michael Niedermayer
625b29037e Merge commit '1eaac1d6f7bb8e52d82e1a114c88a59a9a8e5025'
* commit '1eaac1d6f7bb8e52d82e1a114c88a59a9a8e5025':
  mpeg12dec: Extract CC user data into frame side data

Conflicts:
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-26 13:00:46 +01:00
John Stebbins
1eaac1d6f7 mpeg12dec: Extract CC user data into frame side data
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-26 08:37:22 +01:00
Michael Niedermayer
ccdfa3e271 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add missing #includes for *INT64_MAX and *INT64_C

Conflicts:
	ffmpeg.c
	ffmpeg_filter.c
	ffplay.c
	libavformat/assdec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-24 05:21:19 +01:00
Diego Biurrun
8f8bc92365 Add missing #includes for *INT64_MAX and *INT64_C 2013-11-23 21:55:52 +01:00
Michael Niedermayer
51268aaed2 avutil/utf8: put under #ifdef TEST
All other test programs are under #ifdef TEST too
with the implementation and test code being generally in the same file

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 17:16:11 +01:00
Stefano Sabatini
68590650f0 lavu/avstring: add av_utf8_decode() function 2013-11-22 16:51:05 +01:00
Stefano Sabatini
e782eea183 lavu/dict.h: extend/clarify docs for av_dict_parse_string() 2013-11-22 15:51:20 +01:00
Stefano Sabatini
320389f88b lavu/dict.h: apply various fixes/extensions to doxy
In particular, document AV_DICT_MATCH_CASE, AV_DICT_IGNORE_SUFFIX, and
extend documentation for av_dict_get().
2013-11-22 15:51:10 +01:00
Michael Niedermayer
b382d09d29 avutil: reintroduce lls1 as the 52 ABI needs it
lls1 taken from ff130d7

This is incompatible with libavcodec version
55.18.100 to 55.43.100 except 55.39.101
This incompatibility is caused by these libavcodec versions depending on
a libavutil 52 which is ABI incompatible with the previous ABI 52

you can avoid this incompatibility by upgrading your libavcodec so it
does no longer depend on the invalid ABI

See: 502ab21af0
See: cc6714bb16
See: 41578f70cf
See: Ticket3136
Tested-by: marillat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 16:44:32 +01:00
Michael Niedermayer
c3814ab654 rename new lls code to lls2 to avoid conflict with the old which has a different ABI
also remove failed attempt at a compatibility layer, the code simply cannot work

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 16:41:08 +01:00
Michael Niedermayer
bbe66ef912 avutil: rename lls to lls2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 16:30:23 +01:00
Michael Niedermayer
7c888ae746 Merge commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4'
* commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4':
  Move av_fast_{m,re}alloc from lavc to lavu.

Conflicts:
	libavcodec/avcodec.h
	libavcodec/utils.c
	libavutil/mem.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 15:04:04 +01:00
Anton Khirnov
cce3e0a49f Move av_fast_{m,re}alloc from lavc to lavu. 2013-11-14 09:42:22 +01:00
Michael Niedermayer
5231eecdaf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Deprecate obsolete XvMC hardware decoding support

Conflicts:
	libavcodec/mpeg12.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo.c
	libavcodec/options_table.h
	libavutil/pixdesc.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 03:26:35 +01:00
Diego Biurrun
19e30a58fc Deprecate obsolete XvMC hardware decoding support
XvMC has long ago been superseded by newer acceleration APIs, such as
VDPAU, and few downstreams still support it. Furthermore XvMC is not
implemented within the hwaccel framework, but requires its own specific
code in the MPEG-1/2 decoder, which is a maintenance burden.
2013-11-13 21:07:45 +01:00
Michael Niedermayer
66872161cb avutil/common: error out with clear message if __STDC_CONSTANT_MACROS is not defined with c++
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-05 22:10:02 +01:00
Lenny Wang
6682554790 avutil/opencl: compile kernels separately
Reviewed-by: Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-05 14:29:55 +01:00
Michael Niedermayer
be41f21a3d Merge commit 'cd8f772d0678a90957f4dfd5ce51af9d22e3f212'
* commit 'cd8f772d0678a90957f4dfd5ce51af9d22e3f212':
  lavc: Add colorimetry values for BT.2020, other non-included ones

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 21:26:34 +01:00
Michael Niedermayer
85cabf1ca9 avutil: add av_fopen_utf8()
fopen() on windows uses UTF-16, we use UTF-8 everywhere, this
function bridges the gap by using avpriv_open()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 15:38:52 +01:00
Michael Niedermayer
08e7644b68 Merge commit '5858a67f135a7395c548482c73cf3d39bcdd3022'
* commit '5858a67f135a7395c548482c73cf3d39bcdd3022':
  attributes: disable flatten on llvm/clang

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-03 12:38:13 +01:00
Vittorio Giovara
5858a67f13 attributes: disable flatten on llvm/clang 2013-11-03 11:51:40 +01:00
Timothy Gu
50f52a5498 avutil/xtea: add Doxy @file and group
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-03 00:59:38 +01:00
Timothy Gu
624672fcce avutil/adler32: add Doxy group
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-03 00:58:31 +01:00
Michael Niedermayer
78265fcfee Merge commit '28096e0a806e57376541e6222d315619906e3c55'
* commit '28096e0a806e57376541e6222d315619906e3c55':
  h264: wait for initial complete frame before outputing frames

Conflicts:
	doc/APIchanges
	libavcodec/h264.c
	libavcodec/mpegvideo.h
	libavutil/frame.h
	libavutil/version.h

See: a64b028aeb (as well as various later commits)
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 12:59:08 +01:00
John Stebbins
28096e0a80 h264: wait for initial complete frame before outputing frames
This can be optionally disabled whith the "output_corrupt" flags
option.  When in "output_corrupt" mode, incomplete frames are
signalled through AVFrame.flags FRAME_FLAG_INCOMPLETE_FRAME.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-31 20:14:14 +01:00
Michael Niedermayer
15b1b08874 avutil/opt: fix flags check on non x86
This should fix several fate failures

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-29 21:07:45 +01:00
Michael Niedermayer
162126bb17 avutil/opt: check flags validity in write_number()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-28 18:03:29 +01:00
Michael Niedermayer
f0e43e60cd Merge commit '0b357a8095e72b092cc5c2aacc2f806db75ecae3'
* commit '0b357a8095e72b092cc5c2aacc2f806db75ecae3':
  AVOptions: do not range check flag options.

Conflicts:
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-28 11:26:48 +01:00
Michael Niedermayer
078dab551d Merge commit '529a9893d769f381b72785c500662be2020da5fe'
* commit '529a9893d769f381b72785c500662be2020da5fe':
  avframe: mark source frame const in _ref and _clone

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-28 10:28:47 +01:00
Anton Khirnov
0b357a8095 AVOptions: do not range check flag options.
It does not make sense in the vast majority of use cases, no currently
defined AV_OPT_TYPE_FLAGS options in Libav set the range to anything
nontrivial, and many of those get it wrong (the "correct" range is
INT_MIN to INT_MAX so that the builtin constant "all" works).
2013-10-27 21:40:33 +01:00
Vittorio Giovara
529a9893d7 avframe: mark source frame const in _ref and _clone
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-27 21:32:37 +01:00
Stefano Sabatini
d61617a523 lavu/parseutils: add av_get_known_color_name() 2013-10-27 09:16:05 +01:00
Michael Niedermayer
f3d0642d35 avutil/utils: check that size_t is unsigned
ANSI/ISO C guarantee this, yet there is evidence that there exist
platforms where its not so.
See: http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_30.html

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 22:08:06 +02:00
Michael Niedermayer
3fcc2684e4 Merge commit 'b284e1ffe343d6697fb950d1ee517bafda8a9844'
* commit 'b284e1ffe343d6697fb950d1ee517bafda8a9844':
  mem: do not check for negative size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 21:49:04 +02:00
Vittorio Giovara
b284e1ffe3 mem: do not check for negative size
size_t is guaranteed to be unsigned

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-26 09:05:56 +02:00
Michael Niedermayer
a665704402 Merge commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4'
* commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4':
  libavutil: x86: Add AVX2 capable CPU detection.

Conflicts:
	libavutil/cpu.c
	libavutil/cpu.h
	libavutil/x86/cpu.c

See: 865b70bc5d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 02:36:36 +02:00
Kieran Kunhya
865b70bc5d Add AVX2 capable CPU detection. Patch based on x264's AVX2 detection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 02:34:22 +02:00
Kieran Kunhya
4d6ee07255 libavutil: x86: Add AVX2 capable CPU detection.
Patch based on x264's AVX2 detection

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-25 19:36:55 +01:00
Derek Buitenhuis
8dc1b7bd22 base64-test: Remove posibility of returning restricted exit codes
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-25 11:06:32 +01:00
Derek Buitenhuis
530cd2893e tree-test: Don't return restricted exit codes
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-24 10:59:26 +01:00
Derek Buitenhuis
cbbd0ac764 base64-test: Remove posibility of returning restrcted exit codes
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-24 10:51:52 +01:00
Derek Buitenhuis
5dfdffeb6f tree-test: Don't return restricted exit codes
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-24 10:51:52 +01:00
Michael Niedermayer
05eb0f125c avutil/log: document log callback thread saftey requirements
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 18:15:49 +02:00
Michael Niedermayer
423ae31354 avutil/log: make default av_log callback thread safe
This uses a pthread mutex

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 18:15:49 +02:00
Michael Niedermayer
867e7bb4f1 fix order of operations in comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 14:32:04 +02:00
Diego Biurrun
0d6d4a9e4a avstring-test: Mark pointer passed to av_free() as non-const
libavutil/avstring.c:278:9: warning: passing argument 1 of ‘av_free’ discards ‘const’ qualifier from pointer target type
2013-10-23 13:17:23 +02:00
Carl Eugen Hoyos
87eae03aac Support FF_DISABLE_DEPRECATION_WARNINGS with icc on Linux. 2013-10-21 13:49:30 +02:00
Michael Niedermayer
2d8ccf0adc avutil/opt: initialize ret
Fixes CID1108610
Fixes use of uninitialized variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-20 18:38:48 +02:00
Michael Niedermayer
ad28fe35c5 avutil/file_open: Print debug message if setting close on exec fails
Fixes CID1087079
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-20 18:36:09 +02:00
Michael Niedermayer
d5ec8ba7f2 Do not leave positive values undefined when negative are defined as error
Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-19 16:42:57 +02:00
Stefano Sabatini
8696e51baf lavu/opt: add AV_OPT_TYPE_CHANNEL_LAYOUT and handler functions
The new type is compatible with AV_OPT_TYPE_INT64, but allows to specify
channel layouts using the format accepted by av_get_channel_layout().
2013-10-17 18:09:29 +02:00
Stefano Sabatini
d96e377c39 lavu/channel_layout: change av_get_channel_layout() behavior at the next bump
The new syntax is preferred since it allows backward syntax compatibility
with libswr when switching to the new option handling code with
AV_OPT_TYPE_CHANNEL_LAYOUT.

With the new parser the string:
1234

is interpreted as a channel layout mask, rather than as a number of
channels, and thus it's compatible with the current way to set a channel
layout as an integer (e.g. for the icl and ocl options) making use of
integer option values.

ff_get_channel_layout() with compat=0 will be used in the
AV_OPT_TYPE_CHANNEL handler code.

The user is encouraged to switch to the new forward compatible syntax,
which requires to put a trailing "c" when specifying a layout as a number
of channels.
2013-10-17 18:03:09 +02:00
Stefano Sabatini
b236eb49e1 lavu/opt.h: fix grammar typo in av_opt_get* doxy 2013-10-17 18:03:03 +02:00
Stefano Sabatini
98e7c1eed5 lavu/opt-test: use automatic set and free handlers
In particular, do not set default string value by hand and use
av_opt_free() to free context.
2013-10-17 18:02:54 +02:00
Michael Niedermayer
21b3563dcb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mem: Make av_strdup allocate using av_realloc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-17 08:13:42 +02:00
Michael Niedermayer
3ed65d98c6 avutil/log: fix race between setting and using the log callback
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-17 00:49:55 +02:00
Martin Storsjö
d433e1aefa mem: Make av_strdup allocate using av_realloc
This makes sure that pointers from av_strdup are reallocable,
which is used in av_dict_set if the AV_DICT_APPEND flag is set.

Nothing should rely on pointers from av_strdup being aligned.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-16 18:59:01 +03:00
Michael Niedermayer
f9bef2bec9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: more AVX2 framework

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 16:13:57 +02:00
Michael Niedermayer
e3e0e3d0c9 Merge commit 'c6908d6b4b377a04a5d055ba874bdbcf06c80497'
* commit 'c6908d6b4b377a04a5d055ba874bdbcf06c80497':
  x86inc: FMA3/4 Support

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 16:06:22 +02:00
Michael Niedermayer
9ac124c889 Merge commit '206895708ea2b464755d340e44501daf9a07c310'
* commit '206895708ea2b464755d340e44501daf9a07c310':
  x86inc: Remove our FMA4 support

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 15:54:23 +02:00
Michael Niedermayer
12e4493f9c Merge commit 'c108ba0175d4fc3a3253a8b0f782fbfb96ba5098'
* commit 'c108ba0175d4fc3a3253a8b0f782fbfb96ba5098':
  x86inc: Use VEX-encoded instructions in AVX functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 15:48:34 +02:00
Jason Garrett-Glaser
a3fabc6cb3 x86: more AVX2 framework
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-14 12:41:56 +01:00
Jason Garrett-Glaser
c6908d6b4b x86inc: FMA3/4 Support
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-14 12:41:54 +01:00
Derek Buitenhuis
206895708e x86inc: Remove our FMA4 support
This is so we can sync to x264's version of FMA4 support.

This partialy reverts commit 79687079a9.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-14 12:39:29 +01:00
Henrik Gramner
c108ba0175 x86inc: Use VEX-encoded instructions in AVX functions
Automatically use VEX-encoding in AVX/AVX2/XOP/FMA3/FMA4
functions for all instructions that exists in a VEX-encoded
version.

This change makes it easier to extend existing code to use AVX2.

Also add support for AVX emulation of a few instructions that
were missing before.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-14 12:36:11 +01:00
Michael Niedermayer
31d0d35560 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86inc: Remove .rodata kludges

Conflicts:
	libavutil/x86/x86inc.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-09 14:29:42 +02:00
Henrik Gramner
ad7d7d4f6a x86inc: Remove .rodata kludges
The Mach-O bug was fixed in yasm 0.8.0 and we don't
support versions that old anymore.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-09 07:44:30 -04:00
Michael Niedermayer
19c3890819 Merge commit '3e2fa991db7ef172579422accd61624d52777e5a'
* commit '3e2fa991db7ef172579422accd61624d52777e5a':
  x86inc: remove misaligned cpu flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 12:02:21 +02:00
Michael Niedermayer
31d9aa6b2e Merge commit '71155665414b551ad350622d5abed20e58371fbf'
* commit '71155665414b551ad350622d5abed20e58371fbf':
  x86inc: various minor backports from x264

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 11:57:39 +02:00
Michael Niedermayer
3f965ab95d Merge commit '47f9d7ce5493e119e09d1227d017414feaaf8d97'
* commit '47f9d7ce5493e119e09d1227d017414feaaf8d97':
  x86inc: Check for __OUTPUT_FORMAT__ having a value of "x64"

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 11:37:22 +02:00
Michael Niedermayer
1f17619fe4 Merge commit 'bbe4a6db44f0b55b424a5cc9d3e89cd88e250450'
* commit 'bbe4a6db44f0b55b424a5cc9d3e89cd88e250450':
  x86inc: Utilize the shadow space on 64-bit Windows

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 11:23:00 +02:00
Michael Niedermayer
17d9c7c208 Merge commit '3fb78e99a04d0ed8db834d813d933eb86c37142a'
* commit '3fb78e99a04d0ed8db834d813d933eb86c37142a':
  x86inc: create xm# and ym#, analagous to m#

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 11:15:17 +02:00
Michael Niedermayer
3352fdb292 Merge commit '49ebe3f9fe02174ae7e14548001fd146ed375cc2'
* commit '49ebe3f9fe02174ae7e14548001fd146ed375cc2':
  x86inc: fix some corner cases of SWAP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 11:07:03 +02:00
Michael Niedermayer
006c0fcfea Merge commit '63f0d623100bdb0c6081456127f4b6713e83d3db'
* commit '63f0d623100bdb0c6081456127f4b6713e83d3db':
  x86inc: Use SSE instead of SSE2 for copying data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 11:01:40 +02:00
Michael Niedermayer
faafffaf82 Merge commit 'ad76e6e7e193b98e7335156422d35467816f9ef1'
* commit 'ad76e6e7e193b98e7335156422d35467816f9ef1':
  x86inc: Set ELF hidden visibility for global constants

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 10:52:51 +02:00
Michael Niedermayer
c1488fab3d Merge commit '25cb0c1a1e66edacc1667acf6818f524c0997f10'
* commit '25cb0c1a1e66edacc1667acf6818f524c0997f10':
  x86inc: activate REP_RET automatically

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 10:27:30 +02:00
Henrik Gramner
3e2fa991db x86inc: remove misaligned cpu flag
Prevents a crash if the misaligned exception mask bit is
cleared for some reason.

Misaligned SSE functions are only used on AMD Phenom CPUs
and the benefit is miniscule. They also require modifying
the MXCSR control register and by removing those functions
we can get rid of that complexity altogether.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:27:38 -04:00
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
Niv Sardi
49ba6e56bd lavu/parseutils: add more resolutions
See http://en.wikipedia.org/wiki/Graphics_display_resolution

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-07 11:45:03 +02:00
Michael Niedermayer
90cecd3c9b Merge commit '4272bb6ef1533846a788c259cc498562d0704444'
* commit '4272bb6ef1533846a788c259cc498562d0704444':
  doxy: Document avlog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-06 11:16:15 +02: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
Stefano Sabatini
515e651f56 lavu/opt: fix doxy for av_opt_get* functions about return value
Success code must be >= 0 and not == 0, consistently with the
implementation.
2013-10-04 16:36:27 +02:00
Stefano Sabatini
719b4eef5d lavu/common: add warning to GET_UTF8 doxy
Should prevent wrong uses, or at least decrease their chance.
2013-10-04 16:36:27 +02:00
Michael Niedermayer
1e67800780 Merge commit '80fefbed623491b92fe59ead99225f99c0d0ca08'
* commit '80fefbed623491b92fe59ead99225f99c0d0ca08':
  x86: cpu: Restore some explanatory comments removed in 7160bb7

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 11:28:21 +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
Michael Niedermayer
2ece7d94bc Merge commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f'
* commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f':
  Use correct Doxygen syntax

Conflicts:
	libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 21:29:38 +02:00
Ronald S. Bultje
c07ac8d467 VP9 MC (ssse3) optimizations.
Decoding time of ped1080p.webm goes from 20.7sec to 11.3sec.
2013-10-02 21:03:15 -04:00
Michael Niedermayer
945c7e399a Merge commit '38e15df1489d86c016515223ee693e7d0326c56a'
* commit '38e15df1489d86c016515223ee693e7d0326c56a':
  avframe: note that linesize is not the usable data size

Conflicts:
	libavutil/frame.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 10:47:43 +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
Michael Niedermayer
361bc70731 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avutil: Fix compilation with inline asm disabled on mingw

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 11:51:38 +02:00
Michael Niedermayer
85f8a3cb50 Merge commit 'e208e6d209728d332343aa5390ae377ac0a6305c'
* commit 'e208e6d209728d332343aa5390ae377ac0a6305c':
  lavu: Add interleaved 4:2:2 8/10-bit formats

Conflicts:
	doc/APIchanges
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	libavutil/version.h

See: 90ca5a9b5f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 11:42:03 +02:00
Michael Niedermayer
8310bccc91 avutil/pixdesc: try to fix NV20* descriptors
They where inconsistent (overlapping fields and wrong sizes)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 11:34:01 +02:00
Kieran Kunhya
90ca5a9b5f Add interleaved 4:2:2 8/10-bit formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 10:49:29 +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
Alex Smith
66c2f200b6 lavu/attributes: Don't define av_restrict
This is always defined in config.h.

Original patch by Derek Buitenhuis.
2013-09-21 15:43:31 +02:00
Michael Niedermayer
0506f3fa38 avutil/cpu: remove duplicate include
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 15:36:33 +02:00
Michael Niedermayer
6c169c2fa4 Merge commit '67e285ceca1cb602a5ab87010b30d904527924fe'
* commit '67e285ceca1cb602a5ab87010b30d904527924fe':
  mem: Handle av_reallocp(..., 0) properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 09:36:58 +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
Michael Niedermayer
8377b2b6bf Merge commit '33b88f2a4ae54d5397c45e39a5326289ebdc7747'
* commit '33b88f2a4ae54d5397c45e39a5326289ebdc7747':
  msvc/icl: Use __declspec(noinline)

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 16:03:00 +02:00
Michael Niedermayer
e1f74ad1f0 Merge commit '09f2581dc5edb3642858d69d9a70b67e249167e9'
* commit '09f2581dc5edb3642858d69d9a70b67e249167e9':
  msvc/icl: Use __declspec(deprecated)

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 15:51:27 +02: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
Michael Niedermayer
1225b67fc9 avutil/frame: suppress "comparison of unsigned expression < 0 is always false" warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 22:46:52 +02:00
Michael Niedermayer
9c8aeacf82 avutil: add av_get_colorspace_name()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 22:14:13 +02:00
Lenny Wang
29664fab0c OpenCL: convert meaningless "device id" output to "device name"
Approved-by: Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 21:21:11 +02:00
Michael Niedermayer
c74c3fb142 Merge commit '3feb3d6ce4be0a09a9f8f13d613bed25b523b6e7'
* commit '3feb3d6ce4be0a09a9f8f13d613bed25b523b6e7':
  mem: Introduce av_reallocp

Conflicts:
	doc/APIchanges
	libavutil/mem.c
	libavutil/mem.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:06:26 +02:00
Luca Barbato
3feb3d6ce4 mem: Introduce av_reallocp 2013-09-16 19:36:37 +02:00
Michael Niedermayer
61b3b58720 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mem: Document the non-compatibility of av_realloc() and av_malloc()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-15 11:57:02 +02:00
Diego Biurrun
9997a812e7 mem: Document the non-compatibility of av_realloc() and av_malloc() 2013-09-14 17:38:01 +02:00
Michael Niedermayer
f3ba91a3f1 avutil/pixdesc: dont try to use av_read_image_line() with bayer formats
It has undefined behavior ATM as its not supported.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-13 20:51:41 +02:00
Michael Niedermayer
a25585bb50 avutil/pixdesc: Prevent minor array overread in ff_check_pixfmt_descriptors()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-13 20:51:04 +02:00
James Almer
bbcaf25d4d lavu/sha512: Fully unroll the transform function loops
crypto_bench SHA-512 results using an AMD Athlon X2 7750+, mingw32-w64 GCC 4.7.3 x86_64

Before:
lavu       SHA-512      size: 1048576  runs:   1024  time:   12.737 +- 0.147

After:
lavu       SHA-512      size: 1048576  runs:   1024  time:   11.670 +- 0.173

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 21:55:59 +02:00
James Almer
7e4fe5162a lavu/sha: Fully unroll the transform function loops
crypto_bench SHA-1 and SHA-256 results using an AMD Athlon X2 7750+, mingw32-w64 GCC 4.7.3 x86_64

Before:
lavu       SHA-1        size: 1048576  runs:   1024  time:    9.012 +- 0.162
lavu       SHA-256      size: 1048576  runs:   1024  time:   19.625 +- 0.173

After:
lavu       SHA-1        size: 1048576  runs:   1024  time:    7.948 +- 0.154
lavu       SHA-256      size: 1048576  runs:   1024  time:   17.841 +- 0.170

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 21:55:59 +02:00
Michael Niedermayer
803445e02c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Drop pointless directory name prefixes from #includes in the current dir

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 12:51: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
James Almer
8702a94e49 lavu/ripemd: Add a size optimized version of the transform functions
When compiling with --enable-small, ripemd.o will weigh a few kilobytes less than
it used to before the previous commit.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-09 11:18:48 +02:00
James Almer
452ac2aaec lavu/ripemd: Fully unroll the transform function loops
crypto_bench RIPEMD-160 results using an AMD Athlon X2 7750+, mingw32-w64 GCC 4.8.1 x86_64

Before:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:   12.342 +- 0.199

After:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:   10.143 +- 0.192

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-09 11:18:43 +02:00
Kirill Gavrilov
0f48acf29b lavu: provide msvc implementation of attribute_deprecated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 22:15:33 +02:00
Paul B Mahol
6508bd4aa3 pixfmt: add native GBRAP16 format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-06 16:59:32 +00:00
Michael Niedermayer
5866c107a9 Merge commit 'c3e6e8f06c42499bd020fd0b37f9542150e6067b'
* commit 'c3e6e8f06c42499bd020fd0b37f9542150e6067b':
  mem: Do not check unsigned values for negative size

Conflicts:
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 12:21:16 +02:00
Michael Niedermayer
92424a45d0 Merge commit 'b634b36fcebfe16b837b6c4044f5d5cb99a75040'
* commit 'b634b36fcebfe16b837b6c4044f5d5cb99a75040':
  mem: Improve documentation wording and spelling

Conflicts:
	libavutil/mem.c
	libavutil/mem.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 12:05:02 +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
Nicolas George
d5b58f678d tools: add benchmark for crypto functions.
The benchmark tests the speed of the following algorithms:
MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160, AES-128.

It can optionally be built to perform the same benchmark on
other crypto libraries, for comparison purposes.
The supported libraries are:
- crypto:   OpenSSL's libcrypto;
- gcrypt:   GnuTLS's libgcrypt;
- tomcrypt: LibTomCrypt
To enable them, use this syntax:
make VERSUS=crypto+gcrypt+tomcrypt tools/crypto_bench
They do not need to have been enabled in configure.
2013-09-04 16:36:11 +02:00
Michael Niedermayer
1c10e89c51 Merge commit 'b4ec7a5fee644ad9882e10c097817b65447b8e55'
* commit 'b4ec7a5fee644ad9882e10c097817b65447b8e55':
  mem: Document the av_realloc family of functions properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 13:57:01 +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
Michael Niedermayer
cc84f30402 avutil/fifo: assert that theres enough data in the fifo on drain calls.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 03:11:35 +02:00
Michael Niedermayer
4aeb996f71 pixfmt: add native bayer 16bit formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-01 17:32:16 +02:00
Peter Ross
9116995efb libavutil: add AV_PIX_FMT_BAYER pixel formats
The pixel format descriptors are set to more or less arbitrary
values as bayer formats do not fit in the descriptors structure.
These values are currently not used for bayer formats and thus
do not matter.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-01 17:32:16 +02:00
Lukasz Marek
0b46d6f3ef lavu/bprint: add append buffer function
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Reveiwed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-30 22:36:38 +02:00
Thilo Borgmann
d814a839ac Reinstate proper FFmpeg license for all files. 2013-08-30 15:47:38 +00:00
Michael Niedermayer
f0a3562382 Merge commit '79aec43ce813a3e270743ca64fa3f31fa43df80b'
* commit '79aec43ce813a3e270743ca64fa3f31fa43df80b':
  x86: Add and use more convenience macros to check CPU extension availability

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-30 11:57:35 +02:00
Michael Niedermayer
946f080b54 Merge commit '7ffda66fd5c81af4725bff7c2c4f207ba2aa0613'
* commit '7ffda66fd5c81af4725bff7c2c4f207ba2aa0613':
  arm: float_dsp: Propagate cpu_flags to vfp initialization function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 16:05:04 +02:00
Michael Niedermayer
29daad5b98 Merge commit 'f61bece684d9685b07895508e6c1c733b5564ccf'
* commit 'f61bece684d9685b07895508e6c1c733b5564ccf':
  ppc: Add and use convenience macro to check for AltiVec availability

Conflicts:
	libavcodec/ppc/dsputil_ppc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:24:07 +02:00
Michael Niedermayer
2a60666d1d Merge commit '8410d6e93c2e074881f1c7b7e4cdefd2e497d52e'
* commit '8410d6e93c2e074881f1c7b7e4cdefd2e497d52e':
  avutil: Refactor CPU extension availability macros

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:15:10 +02:00
Michael Niedermayer
c83d794936 Merge commit 'b78b10c4b78b696927f2801cf2d9f193b4eff28b'
* commit 'b78b10c4b78b696927f2801cf2d9f193b4eff28b':
  avutil: Move internal CPU detection function declarations to private header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:05:15 +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
Alfred E. Heggestad
16c3ed5837 libavutil: cast truncated values to uint32_t
programs using ffmpeg that are compiled with -Wshorten-64-to-32
gives a warning when using header files common.h and rational.h

cast 64-bit truncated values to (uint32_t) to avoid the warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 14:25:34 +02:00
Michael Niedermayer
3500f53c93 libavutil/opt.h: Fix duplicate words
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 19:40:29 +02:00
Michael Niedermayer
5086b26809 libavutil/file_open.c: Fix duplicate words
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 19:40:29 +02:00
Kirill Gavrilov
53f309c617 pixfmt: extend description for planar YUV 9/10 bits formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 18:10:14 +02:00
Thilo Borgmann
f18ccb529f Fix wrong use of "an" in some comments. 2013-08-12 03:27:26 +02:00
Michael Niedermayer
5717689c75 avutil/avstring: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 16:50:58 +02:00
Michael Niedermayer
2215947438 avutil/parseutils:make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 16:50:24 +02:00
Michael Niedermayer
64a3dbadee avutil/ripemd:make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 16:49:57 +02:00
Michael Niedermayer
0e98a13322 avutil/xtea: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 16:49:36 +02:00
Michael Niedermayer
90b40b45d4 avutil/sha:make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 16:49:21 +02:00
Michael Niedermayer
475df42eb6 avutil/sha512: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 16:49:03 +02:00
Thilo Borgmann
4dcb2f7478 lavu: fix grammar in doxy for av_frame_ref.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 00:40:48 +02:00
Derek Buitenhuis
d9c1fb8376 bprint: Include va_copy compat
Fixes build with MSVC and ICL.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-08-10 15:53:32 -04:00
Michael Niedermayer
5fc5170c55 avutil/opt: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 18:44:40 +02:00
Michael Niedermayer
18b1381c5f avutil/opt: fix av_log type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 18:44:40 +02:00
Michael Niedermayer
148310ca16 avutil/log: Use bprint for part
This should fix the issue with strings longer than 1024

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 18:17:30 +02:00
Michael Niedermayer
112c970ca6 avutil/bprint: add av_vbprintf()
Reviewed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 17:01:42 +02:00
Michael Niedermayer
b37ff488b8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavutil: Make avpriv_open a library-internal function on msvcrt

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:51:03 +02:00
Michael Niedermayer
ef13a005c4 Merge commit 'a76d0cdf21c3d9e464623cc0ad1c005abf952afa'
* commit 'a76d0cdf21c3d9e464623cc0ad1c005abf952afa':
  libavutil: Move avpriv_open to a new file, file_open.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:37:20 +02:00
Michael Niedermayer
09f1afc784 Merge commit '33237123c83bf4f8345e6ac889ad2e7dbd303d0e'
* commit '33237123c83bf4f8345e6ac889ad2e7dbd303d0e':
  libavutil: Enable the MSVC DLL symbol loading workaround in shared builds as well

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:24:33 +02:00
Reimar Döffinger
d4db7c334b Integrate accessors.h header into internal.h
I have no idea why I added a separate header,
I think there is no good reason for it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-10 07:56:42 +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
Michael Niedermayer
c94f9e8542 avutil/mem: Fix flipped condition
Fixes return code and later null pointer dereference

Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-09 13:47:10 +02:00
Michael Niedermayer
0dc17da308 Merge commit 'dfc6b5c81491abf7effb97b23af17ccf7adcd132'
* commit 'dfc6b5c81491abf7effb97b23af17ccf7adcd132':
  file: Move win32 utf8->wchar open wrapper to libavutil

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-09 07:16:38 +02:00
Reimar Döffinger
a48979d715 Reduce MAKE_ACCESSORS code duplication via a new header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-08 20:32:40 +02: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
Michael Niedermayer
579a137897 Merge commit '880391ed2d2faf796ca3a16f63cec69767546a21'
* commit '880391ed2d2faf796ca3a16f63cec69767546a21':
  libavutil: use avpriv_open()

Conflicts:
	libavutil/random_seed.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 11:18:17 +02:00
Derek Buitenhuis
87e8cbf709 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:10:33 +02:00
Michael Niedermayer
5f38317e59 Merge commit '869b04e89154cd92d2bcfdabcecbe3217864c099'
* commit '869b04e89154cd92d2bcfdabcecbe3217864c099':
  libavutil: add avpriv_open() to open files with close-on-exec flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 11:07:51 +02: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
Michael Niedermayer
0b5d1b88e0 avutil/opt: fix types passed to the format string "%s"
Fixes gcc warnings
Fixes CID1061056
Fixes CID1061057

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 02:48:44 +02: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
Michael Niedermayer
b11b7ceb89 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  ffmpeg: remove obsolete workaround in trim insertion.
  lavu/log: do not skip overwritten lines.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 19:16:12 +02:00
Michael Niedermayer
60ae776d04 av_frame_copy_props: fix unintended self assignment
Fixes CID1061052

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 17:27:07 +02:00
Nicolas George
39bb26f91b lavu/log: do not skip overwritten lines.
If the line ends with \r, it will not flood the tty, and
the "Last message repeated" line would overwrite it.
Fix bug introduced by c25d1ba.
2013-08-07 16:01:45 +02:00
Michael Niedermayer
a68b6ec7f5 avutil/hmac: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 20:30:55 +02:00
Michael Niedermayer
4ee0984341 Merge commit 'a0ad5d011318f951ecd4c9ffe1829518c9533909'
* commit 'a0ad5d011318f951ecd4c9ffe1829518c9533909':
  vdpau: deprecate old codec-specific pixel formats

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 13:45:21 +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
Michael Niedermayer
20be5e0a0e Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
  Disable deprecation warnings for cases where a replacement is available

Conflicts:
	libavcodec/avpacket.c
	libavcodec/pthread.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Michael Niedermayer
85fc1a18ca Merge commit '3a7050ffed5ce061b114a11e4de4b77aba8efa0b'
* commit '3a7050ffed5ce061b114a11e4de4b77aba8efa0b':
  build: Add _Pragma macro to disable deprecated declaration warnings

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 09:27:37 +02:00
Michael Niedermayer
a8e963835a Merge commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e'
* commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e':
  Give less generic names to global library option arrays

Conflicts:
	libavcodec/options_table.h
	libavfilter/avfilter.c
	libavformat/options_table.h
	libswscale/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 09:16:36 +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
Michael Niedermayer
9408d990c4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avframe: have av_frame_get_side_data take const AVFrame*

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 13:59:50 +02:00
Michael Niedermayer
cca229e75a Merge commit 'c7e921a54ffe7feb9f695c82f0a0764ab8d0f62b'
* commit 'c7e921a54ffe7feb9f695c82f0a0764ab8d0f62b':
  avopt: Check whether the object actually has got an AVClass

Conflicts:
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 12:30:30 +02:00
Michael Niedermayer
b326438139 avutil/tree: fix memleaks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:29:12 +02:00
Michael Niedermayer
161054f37b Merge commit 'c2e936de07d054bf476e60445b453bf6b4836820'
* commit 'c2e936de07d054bf476e60445b453bf6b4836820':
  tree-test: Refactor and plug memory leaks

Conflicts:
	libavutil/tree.c

Most of this commit is not merged due to bugs in it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:29:03 +02:00
Michael Niedermayer
bc47d126bf Merge commit 'a9b04b2c43f95cc17c2291f83c27a3119471d986'
* commit 'a9b04b2c43f95cc17c2291f83c27a3119471d986':
  tree.h: K&R formatting and typo cosmetics

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 10:41:06 +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
Michael Niedermayer
231e33f050 avutil/pixfmt: dont refer to deprecated PIX_FMT in the documentation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 12:32:05 +02:00
Michael Niedermayer
1f5755d869 Merge commit 'd99a2b6d0a4d0b2f5ba6a1f1637d6cb88c5c9184'
* commit 'd99a2b6d0a4d0b2f5ba6a1f1637d6cb88c5c9184':
  avutil/tree: Drop debug messages that clutter the output

Conflicts:
	libavutil/tree.c

Merge for metadata only, a better solution has been commited that allows the
debug output to be turned on and off

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 11:06:03 +02:00
Michael Niedermayer
db75537e25 avutil/tree: allow adjusting the log level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 11:04:48 +02:00
Michael Niedermayer
647836608c avutil/tree: change debug output to AV_LOG_DEBUG level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 11:04:39 +02:00
Michael Niedermayer
93b3a5edff Merge commit '10db1a9bca46b0f760a1263d47142b2f57e195d7'
* commit '10db1a9bca46b0f760a1263d47142b2f57e195d7':
  avutil/tree: K&R formatting cosmetics

Conflicts:
	libavutil/tree.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 10:42:40 +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
Michael Niedermayer
b0edd59994 Merge commit 'bf4b0ed1d5d323050a87c9f0ad1dd40860eb3da2'
* commit 'bf4b0ed1d5d323050a87c9f0ad1dd40860eb3da2':
  Add missing deprecation attributes

Conflicts:
	libavfilter/avfilter.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:44:34 +02:00
Michael Niedermayer
8ff23f0e3c Merge commit '5b097399baa2e38cc513939cfab3a9b6fdbc33df'
* commit '5b097399baa2e38cc513939cfab3a9b6fdbc33df':
  eval: Explicitly ignore return value of strtod() in parse_db()

Conflicts:
	libavutil/eval.c

See: 3cd9849d9c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:37:46 +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
Paul B Mahol
fd84b6fd33 lavu/opt: show default values for AV_OPT_TYPE_PIXEL_FMT and AV_OPT_TYPE_SAMPLE_FMT too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-25 20:41:39 +00:00
Nicolas George
c25d1ba556 lavu/log: print prefix after \r.
Should fix trac ticket #2797 because of the progress line.
2013-07-20 11:06:19 +02:00
Michael Niedermayer
56123fc721 avutil/softfloat: remove unneeded include assert.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-19 18:56:33 +02:00
Michael Niedermayer
c88503e3f6 Merge commit '439902e0d68a0f0d800c21b5e6b598d5fa0c51da'
* commit '439902e0d68a0f0d800c21b5e6b598d5fa0c51da':
  Employ consistent LIBAV_COMPAT_ multiple inclusion guards in compat/

Conflicts:
	compat/aix/math.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-19 10:56:10 +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
Michael Niedermayer
9d01bf7d66 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Consistently use "cpu_flags" as variable/parameter name for CPU flags

Conflicts:
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/h264dsp_init.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/motion_est.c
	libavcodec/x86/mpegvideo.c
	libavcodec/x86/proresdsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 09:53:47 +02:00
Diego Biurrun
3ac7fa81b2 Consistently use "cpu_flags" as variable/parameter name for CPU flags 2013-07-18 00:31:35 +02:00
Michael Niedermayer
a80e622924 avcodec/avutil: Add AVColorSpace and AVColorRange to AVFrames
This also moves AVColorSpace and AVColorRange from avcodec to avutil

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 01:15:31 +02:00
Michael Niedermayer
0a06e6e49b av_frame_get_buffer: Do not fail when the channel layout is unknown
Fixes handling of cases with unknown layouts but known channel counts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-13 21:09:20 +02:00
Michael Niedermayer
c6953589f9 Merge commit 'ef5b70affc6376bfeadd1ff649b79bad9a124fa8'
* commit 'ef5b70affc6376bfeadd1ff649b79bad9a124fa8':
  configure: Check for support for labels in the inline assembly

The timer code is not placed under ifdef as ours does not use labels

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 12:07:14 +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
Paul B Mahol
410192e369 add crc24 tables
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 12:07:53 +00:00
Michael Niedermayer
7bd417c22a Merge commit '6516632967da5e6bd7d6136e8678f826669ed26e'
* commit '6516632967da5e6bd7d6136e8678f826669ed26e':
  tests: Only run noproxy test if networking is enabled
  fifo: K&R formatting cosmetics

Conflicts:
	libavformat/Makefile
	libavutil/fifo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:26:28 +02:00
Luca Barbato
73142e7533 fifo: K&R formatting cosmetics 2013-07-06 14:28:06 +02:00
Michael Niedermayer
8fdec02fd1 Merge commit '0420c810ceb430003f9f2793c5cfa1fe84657f3d'
* commit '0420c810ceb430003f9f2793c5cfa1fe84657f3d':
  log: pass the correct parameters to missing_feature_sample

Conflicts:
	libavutil/log.c

See: 572e38a513

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 12:43:57 +02:00