Commit Graph

3408 Commits

Author SHA1 Message Date
Lukasz Marek
bee5844ddd lavu/opt: introduce av_opt_serialize()
Function allows to create string containing object's serialized options.
Such string may be passed back to av_set_options_string() in order to restore options.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:13:38 +01:00
Lukasz Marek
eec693328a lavu/opt: introduce av_opt_is_set_to_default()
New function allows to check if option is set to its default value

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:13:38 +01:00
Lukasz Marek
173d51c982 lavu/opt: fix av_opt_get function
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-12 23:34:05 +01:00
Lukasz Marek
5dc0f607e7 lavu/opt: fix memleak in test
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-12 23:32:31 +01:00
Michael Niedermayer
1e16492b98 Merge commit 'c6074a30ba3b5fb4319ee6ee599656d58548cdc8'
* commit 'c6074a30ba3b5fb4319ee6ee599656d58548cdc8':
  opt: Fix the documentation mentioning av_set_string3

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 23:54:52 +01:00
Lukasz Marek
b54effba4f lavu/opt: update tests
In general this commit prepares opt tests to be added to fate.

The commit set some non-zero defaults for test options.
It allows to check if defaults are really set.

Added printing of default values.

Added more cases for testing av_set_options_string

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-11 21:52:26 +01:00
Lukasz Marek
4efc79649b lavu/opt: add support for binary defaults
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-11 21:52:26 +01:00
Lukasz Marek
bb60142f56 lavu/opt: check for NULL before parsing
set_string_binary crashes when called with val==NULL

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-11 21:52:26 +01:00
Luca Barbato
c6074a30ba opt: Fix the documentation mentioning av_set_string3
It is av_opt_set now.
2014-11-11 11:49:55 +01:00
Lukasz Marek
4e179436b6 lavu/opt: copy dict in av_opt_copy
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-09 17:56:08 +01:00
Lukasz Marek
457204ee15 lavu/opt: document av_opt_copy function 2014-11-09 17:56:08 +01:00
Carl Eugen Hoyos
4436a8f44d Remove fminf() emulation.
The emulation is unused and causes compilation trouble on systems
where fminf() is defined in <math.h> but missing from libm.
This should fix compilation on Debian powerpcspe.
2014-11-08 11:31:11 +01:00
Michael Niedermayer
ed736890d6 Merge commit '4981baf9b803f3c4866b2e97fdadb008c62dc7ad'
* commit '4981baf9b803f3c4866b2e97fdadb008c62dc7ad':
  avstring: Mark some character handling functions av_const

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-07 22:33:09 +01:00
Michael Niedermayer
ddac3053cd avutil/ppc/util_altivec: add () to VEC_LD macro arguments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-07 15:13:47 +01:00
Michael Niedermayer
1a1a98f644 avutil/ppc/util_altivec: make src pointers const, fix warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-07 14:42:17 +01:00
Henrik Gramner
4981baf9b8 avstring: Mark some character handling functions av_const
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-07 11:57:16 +02:00
Rong Yan
6a6c16cbcc libavutil/ppc/util_altivec.h : fix unaligned_load() vec_unaligned_load() add macros VEC_LD() VEC_MERGEH() VEC_MERGEL() VEC_ST() for POWER LE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-07 10:51:35 +01:00
Michael Niedermayer
a604de4fd8 avutil/time_internal: do not attempt to override *time_r() macros
Fixes build on somewhat odd setups with mingw
Fixes Ticket4075

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-05 18:44:15 +01:00
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