Commit Graph

3390 Commits

Author SHA1 Message Date
James Almer
faa9d29829 lavu/atomic: add support for the new memory model aware gcc built-ins
__sync built-ins are considered legacy and will be deprecated.
These new memory model aware built-ins have been available since GCC 4.7.0

Use them by default when available except for __atomic_compare_exchange_n(),
which is slower, and is instead implemented as a fallback for when and if gcc
removes the legacy __sync built-ins.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-29 14:09:58 -03:00
Matthew Oliver
2060f4cbba avutil/intmath: enable builtin intrinsics for icl and msvc.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 17:20:55 +01:00
Michael Niedermayer
4a39d4c65a Merge commit '82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de'
* commit '82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de':
  Use gmtime_r instead of gmtime and localtime_r instead of localtime

Conflicts:
	libavformat/mov.c
	libavformat/mxfenc.c
	libavformat/wtvdec.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 02:38:26 +01:00
Michael Niedermayer
edb069e556 Merge commit '3f8f1c6ff24ee858eb5b0bf47ef6d4605299a87e'
* commit '3f8f1c6ff24ee858eb5b0bf47ef6d4605299a87e':
  lavu: Provide fallbacks for gmtime_r and localtime_r

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 02:26:45 +01:00
Martin Storsjö
82ee7d0dda Use gmtime_r instead of gmtime and localtime_r instead of localtime
gmtime isn't thread safe in general. In msvcrt (which lacks gmtime_r),
the buffer used by gmtime is thread specific though.

One call to localtime is left in avconv_opt.c, where thread safety
shouldn't matter (instead of making avconv depend on the libavutil
internal header).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-26 00:14:54 +03:00
Martin Storsjö
3f8f1c6ff2 lavu: Provide fallbacks for gmtime_r and localtime_r
This allows writing most code as if they always are is available.

These are ok to use from other libraries even though it's not a
public header, since they only provide an inline declaration, and
doesn't add an actual dependency on lavu internals. (This can be
considered more a build system compatibility fallback than a
libavutil feature.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-26 00:14:54 +03:00
Michael Niedermayer
e96ca404ea Merge commit '1bd0bdcdc236099d5c0d179696951f35f5310fa5'
* commit '1bd0bdcdc236099d5c0d179696951f35f5310fa5':
  lavu: Add av_gettime_relative

Conflicts:
	libavutil/time.c
	libavutil/time.h
	libavutil/version.h

See: 0eec06ed87
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-24 11:06:56 +02:00
Martin Storsjö
1bd0bdcdc2 lavu: Add av_gettime_relative
Since av_gettime() is used in a number of places where actual
real time clock is required, the monotonic clock introduced in
ebef9f5a5 would have consequences that are hard to handle. Instead
split it into a separate function that can be used in the cases
where only relative time is desired.

On platform where no monotonic clock is available, the difference
between the two av_gettime functions is not clear, and one could
mistakenly use the relative clock where an absolute one is
required. Therefore add an offset, to make it evident that the
time returned from av_gettime_relative never is actual current
real time, even though it is based on av_gettime.

Based on a patch by Olivier Langlois.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-24 09:53:41 +03:00
Michael Niedermayer
2de9c5ed98 avutil/avstring: fix hardcoded separator in av_match_list()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-23 12:22:21 +02:00
Michael Niedermayer
3c0b98dced avutil/avstring: Reimplement av_match_list()
av_match_list() is only used for whitelists, fix it so it works with
multi-named formats like "mov,mp4,m4a,3gp,3g2,mj2"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-23 04:35:24 +02:00
Michael Niedermayer
b5583fc3e0 avutil/cast5: Fix off by one error
Fixes fate-cast5 on alpha

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-20 05:41:26 +02:00
Andrey Utkin
65639e6bef avutil/error: Introduce new error codes for 4XX and 5XX replies from remote servers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-19 22:32:14 +02:00
Giorgio Vazzana
b48c95b6c9 libavutil: Add missing av_free() to cast5 selftest
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-18 16:57:54 +02:00
Supraja Meedinti
0eabbe2101 libavutil: Add CAST128 symmetric block cipher
Only ECB mode is supported at the moment

Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-18 01:33:45 +02:00
Ruoyu
c44d8d9552 avutil/lzo: fix resource leak
Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-11 12:15:26 +02:00
Michael Niedermayer
171d971dbf avutil/softfloat: Fix undefined shift in av_add_sf()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 19:36:12 +02:00
James Almer
5402d1bce5 float_dsp-test: allow forcing cpuflags
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-10 13:51:51 -03:00
Michael Niedermayer
9665a0fdf6 avutil/error: Add AVERROR_INPUT_CHANGED & AVERROR_OUTPUT_CHANGED to error_entries[]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 02:02:11 +02:00
Michael Niedermayer
99afec08f8 avutil/softfloat: add some asserts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-09 17:02:59 +02:00
Michael Niedermayer
44198a728d avutil/softfloat: Fix dependence on signed overflow in av_normalize1_sf()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-09 16:52:56 +02:00
Michael Niedermayer
f3b54ee989 avutil/Makefile: add softfloat to TESTPROGS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-09 16:02:14 +02:00
Michael Niedermayer
bb44f7d5d7 Merge commit '5a419b2dd1881889d436f55741fd3ff3f9f436c4'
* commit '5a419b2dd1881889d436f55741fd3ff3f9f436c4':
  pixdesc: return color properties names

Conflicts:
	libavutil/pixdesc.c
	libavutil/pixdesc.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-08 22:53:48 +02:00
Michael Niedermayer
7eb959bf0b Merge commit '04ccd584a70fad4ebb29ca340d704970ff313cbc'
* commit '04ccd584a70fad4ebb29ca340d704970ff313cbc':
  pixfmt: mark further reserved values

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-08 22:37:59 +02:00
Michael Niedermayer
1b6172dcf6 Merge commit 'c732c62cee43f651775af5547cff99d418248542'
* commit 'c732c62cee43f651775af5547cff99d418248542':
  doc: expand description for some color properties

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-08 22:28:45 +02:00
Vittorio Giovara
5a419b2dd1 pixdesc: return color properties names 2014-10-08 18:17:49 +01:00
Vittorio Giovara
04ccd584a7 pixfmt: mark further reserved values 2014-10-08 18:17:49 +01:00
Vittorio Giovara
c732c62cee doc: expand description for some color properties 2014-10-08 18:17:49 +01:00
James Almer
e524a9b1ff avutil: remove obsolete FF_API_INTFLOAT cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:03 -03:00
James Almer
3e57520982 avutil: remove obsolete FF_API_SAMPLES_UTILS_RETURN_ZERO cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:09:56 -03:00
James Almer
71718de814 avutil: remove obsolete FF_API_FIND_OPT cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:09:53 -03:00
James Almer
1abb77285c avutil: remove obsolete FF_API_GET_BITS_PER_SAMPLE_FMT cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:09:49 -03:00
wm4
cdd6f059a6 avcodec, avutil: allow more control about how samples are skipped
Add CODEC_FLAG2_SKIP_MANUAL (exposed as "skip_manual"), which makes
the decoder export sample skip information via side data, instead
of applying it automatically. The format of the side data is the
same as AV_PKT_DATA_SKIP_SAMPLES, but since AVPacket and AVFrame
side data constants overlap, AV_FRAME_DATA_SKIP_SAMPLES needs to
be introduced.

This is useful for applications which want to do the timestamp
calculations manually, or which actually want to retrieve the
padding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 20:21:00 +02:00
Michael Niedermayer
0d92b0d5f4 avutil/avstring: Factor av_match_list() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 18:51:05 +02:00
Michael Niedermayer
579a0fdc21 avutil/lls: Make unchanged function arguments const
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 19:32:07 +02:00
Michael Niedermayer
b28f470df0 avutil/pca: Make argument of ff_pca_add() const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 16:17:18 +02:00
lvqcl
e58fc44649 avutil/x86/cpu: fix cpuid sub-leaf selection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 13:21:31 +02:00
Luca Barbato
d995f0a155 log: Unbreak no-tty support on 256color terminals 2014-09-26 20:56:16 +02:00
Philip DeCamp
857fc0a71f libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address
Signed-off-by: Philip DeCamp <decamp@mit.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-24 22:57:40 +02:00
Nicolas George
eb7a6d0813 lavu/bprint: add const to av_bprint_is_complete() argument. 2014-09-21 19:42:21 +02:00
James Almer
95a064f530 avutil: remove obsolete FF_API_OLD_OPENCL cruft
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-15 15:50:17 -03:00
James Almer
af7d260626 avutil: remove obsolete FF_API_LLS1 cruft
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-15 15:50:10 -03:00
Michael Niedermayer
8407cbbfc9 Fix "passing argument 1 of av_free discards const qualifier from pointer target type"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-13 22:32:20 +02:00
Rong Yan
8e8db16a2c avutil/ppc/float_dsp_altivec: ppc: Fix bug in ff_vector_fmul_add_altivec() affecting little endian environments on POWER8
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-11 18:36:34 +02:00
Henrik Gramner
f629705b02 x86inc: Make INIT_CPUFLAGS support an arbitrary number of cpuflags
Previously there was a limit of two cpuflags.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-09 02:00:25 -07:00
Loren Merritt
ec217218c2 x86inc: Free up variable name "n" in global namespace
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-09 02:00:19 -07:00
Henrik Gramner
176a0fca3f x86inc: Make ym# behave the same way as xm#
This makes more sense for future implementations of templates with zmm registers.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-09 01:45:14 -07:00
Gabriel Dume
1ec335513f time: Add missing zero
Leftover of 56d7df91e010a177a80cfc8dbe394305

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-08 21:46:12 +02:00
Henrik Gramner
428aa14a48 x86inc: Make INIT_CPUFLAGS support an arbitrary number of cpuflags
Previously there was a limit of two cpuflags.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-05 14:06:03 +02:00
Henrik Gramner
720c21d11f x86inc: Make ym# behave the same way as xm#
This makes more sense for future implementations of templates with zmm registers.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-05 01:55:28 +02:00
Loren Merritt
a4dbabc8b3 x86inc: free up variable name "n" in global namespace
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-05 01:41:50 +02:00