Commit Graph

3212 Commits

Author SHA1 Message Date
Michael Niedermayer
c7251fec39 avutil: move av_get_time_base_q() after include rational.h
Fix compilation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 22:44:14 +02:00
Derek Buitenhuis
dac7e8a94e avutil: Add av_get_time_base_q()
This fixes usage of AV_TIME_BASE_Q in C++ applications, which
cannot use compound literals directly in their code.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-04-22 16:38:33 -04:00
Derek Buitenhuis
502512ea0f avutil: Add av_get_time_base_q()
This fixes usage of AV_TIME_BASE_Q in C++ applications, which
cannot use compound literals directly in their code.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-04-22 16:32:35 -04:00
Michael Niedermayer
47ec0b0b0f avutil/internal: add FF_ALLOC_ARRAY_OR_GOTO & FF_ALLOCZ_ARRAY_OR_GOTO
These are similar to the existing FF_ALLOCZ_OR_GOTO & FF_ALLOC_OR_GOTO

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 02:09:55 +02:00
James Almer
3b06208a57 x86/float_dsp: remove duplicated code from vector_dmul_scalar
Use the xm# and ym# aliases as they remain in sync with m# after a SWAP.
No actual changes to the assembly.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 14:21:51 +02:00
Michael Niedermayer
a8d01a7378 Merge commit '0983d48111f578e17e8c1967d25ce593fce62b63'
* commit '0983d48111f578e17e8c1967d25ce593fce62b63':
  crc: add ANSI CRC16 LE

Conflicts:
	doc/APIchanges
	libavutil/crc.c
	libavutil/crc.h
	libavutil/version.h
	tests/ref/fate/crc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-17 22:38:51 +02:00
Alessandro Ghedini
0983d48111 crc: add ANSI CRC16 LE
This adds the reversed byte-order version of the ANSI CRC16.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-17 20:08:19 +02:00
James Almer
76ed71a72b x86: move horizontal add macros to x86util
Also port relevant AVX2/XOP optimizations from x264 with permission
to relicense to LGPL from the corresponding authors

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-17 14:15:09 +02:00
James Almer
11b36b1ee0 x86/float_dsp: unroll loop in vector_fmac_scalar
~6% faster SSE2 performance. AVX/FMA3 are unaffected.

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 18:36:52 +02:00
James Almer
3b808900af x86/float_dsp: use SWAP in vector_fmac_scalar Win64
The mova is unnecessary

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 15:46:21 +02:00
Michael Niedermayer
4615ff0d61 avutil/frame: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 13:51:48 +02:00
Michael Niedermayer
a31547ce2e avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode()
Fixes Ticket3363

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 15:33:23 +02:00
Michael Niedermayer
4f698be8f6 avutil/log: add av_log_get_flags()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-12 20:25:10 +02:00
Michael Niedermayer
7ac2f7e413 avutil/log: factor "level != AV_LOG_INFO/8" checks out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 16:30:16 +02:00
Michael Niedermayer
0a1cc04e6c Merge commit '8b17243d1742279bcb2368f8d325ea71e66736c8'
* commit '8b17243d1742279bcb2368f8d325ea71e66736c8':
  lavu: Add packed YVYU422 pixel format

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 03:07:47 +02:00
Vittorio Giovara
8b17243d17 lavu: Add packed YVYU422 pixel format 2014-04-07 23:50:34 +02:00
Michael Niedermayer
4c57c6a765 Merge commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14'
* commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14':
  aarch64: add armv8 CPU flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-07 02:15:18 +02:00
Timothy Gu
486e3649ce xtea: Add Doxy @file and group 2014-04-07 01:31:36 +02:00
Timothy Gu
f73495686d adler32: Fix doxy group definition
Based on a patch by James Almer <jamrial@gmail.com>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-07 01:31:02 +02:00
Janne Grunau
8675bcb0ad aarch64: add armv8 CPU flag 2014-04-06 21:18:49 +02:00
Michael Niedermayer
c1d053621c Merge commit '8542f9c4f17125d483c40c0c5723842f1c982f81'
* commit '8542f9c4f17125d483c40c0c5723842f1c982f81':
  replaygain: correctly parse peak values

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 22:52:12 +02:00
Lukasz Marek
3aac5fcfa9 lavu/opt: validate range before dereference
This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 22:09:57 +02:00
Alessandro Ghedini
8542f9c4f1 replaygain: correctly parse peak values
According to the ReplayGain spec, the peak amplitude may overflow and may result
in peak amplitude values greater than 1.0 with psychoacoustically coded audio,
such as MP3. Fully compliant decoders must allow peak overflows.

Additionally, having peak values in the 0<->UINT32_MAX scale makes it more
difficult for applications to actually use the peak values (e.g. when
implementing clipping prevention) since values have to be rescaled down.

This patch corrects the peak parsing by removing the rescaling of the decoded
values between 0 and UINT32_MAX and the 1.0 upper limit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:40:19 +02:00
James Darnley
16509d3a28 log: allow color highlighting in Cygwin's mintty
Configure will detect the availability of the Windows' console functions and set
HAVE_SETCONSOLETEXTATTRIBUTE.  Meaning av_log will use those functions to
control colours.  When ffmpeg is run in Cygwin's mintty terminal emulator it
will not use colour highlighting in this case.

Mintty responds to the usual escape code colours (it even supports 256 colours).
Windows' cmd.exe does not.  Fortunately it seems that Cygwin's emulation layer
now translates the basic 16 colours into Windows' Console command functions.

That means that we can have av_log use the standard colour commands and let
ffmpeg print colours in both mintty and cmd.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 04:20:14 +02:00
Luca Barbato
9464b69da6 log: Unbreak windows support
Add the missing define.
2014-04-03 23:43:47 +02:00
Michael Niedermayer
609ef89703 avutil/log: remove stray ;
regression since  5a18b215f7

Reported-by: J_Darnley
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:59:39 +02:00
Michael Niedermayer
49e040e868 avutil/log: fix negative log levels
These where broken by 7763118cae

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:44:04 +02:00
Michael Niedermayer
1f8a6bef78 avutil/log: add code to test av_log()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:38:30 +02:00
Michael Niedermayer
5a18b215f7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  log: Do not assume the TERM variable is always set

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:18:26 +02:00
Michael Niedermayer
d9ac00ca7a Merge commit '42ba1c51d9e843135772a3b9e5cf036a37b28bdb'
* commit '42ba1c51d9e843135772a3b9e5cf036a37b28bdb':
  log: Document AV_LOG_C usage

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 21:07:32 +02:00
Michael Niedermayer
002feaf6e2 Merge commit '28b9ac4e48f3405a82e8e87ead336188215cf1e6'
* commit '28b9ac4e48f3405a82e8e87ead336188215cf1e6':
  log: Remove undefined behaviour

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 20:53:30 +02:00
Michael Niedermayer
c16e006181 Merge commit '7763118cae4eb468b032dbd29af15a011c2c233b'
* commit '7763118cae4eb468b032dbd29af15a011c2c233b':
  log: Support for 256color terminals

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 20:44:14 +02:00
Luca Barbato
061e340c05 log: Factorize check_color_terminal() out 2014-04-03 20:04:34 +02:00
Lukasz Marek
8c27292373 lavu/opt: dont crash on freeing NULL AVOptionRanges
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 19:05:19 +02:00
Luca Barbato
4ede1862dc log: Do not assume the TERM variable is always set 2014-04-03 18:43:25 +02:00
Luca Barbato
42ba1c51d9 log: Document AV_LOG_C usage
And move outside the wrong doxygen group.
2014-04-03 18:43:24 +02:00
Luca Barbato
28b9ac4e48 log: Remove undefined behaviour 2014-04-03 18:43:24 +02:00
Michael Niedermayer
09656707cc Merge commit 'lukaszmluki/master^'
* commit 'lukaszmluki/master^':
  lavu/opt: extend AVOptionRange by extra values

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 17:03:44 +02:00
Luca Barbato
7763118cae log: Support for 256color terminals
And provide extended coloring capabilities for debugging.
The default colors do not change in 256 more to keep
supporting people using Black on White, White on Black and
Solarized terminals.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-04-03 15:54:49 +02:00
Lukasz Marek
eaed4da96a lavu/opt: extend AVOptionRange by extra values
AVOptionRange is not flexible enough to store AV_OPT_TYPE_IMAGE_SIZE
ranges. Current implementation can only store pixel count.
This patch aims to keep backward compatibility and extend
AVOptionRange with possibility to store width/height ranges.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-04-03 13:28:13 +02:00
Roman Fietze
e12a73246d dict: const pointers to dictionary where possible
This avoids temporaries or ugly casting in the calling code where
const dictionaries are used. Esp. helpful when writing C++ wrappers
for an AVDictionary having const member functions and CTORs with const
references.

Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 13:13:25 +02:00
Janne Grunau
80035db88c lavu: add missing formats to av_pix_fmt_swap_endianness 2014-04-02 00:27:22 +02:00
Michael Niedermayer
d506deaeaa avutil/fixed_dsp: remove redundant cast
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01 17:57:30 +02:00
Nedeljko Babic
284cfc7180 libavutil: Add fixed_dsp
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01 17:36:33 +02:00
Michael Niedermayer
d9a3501c33 avutil/opt: dont crash on av_opt_set_dict() with NULL
This allows calling the function without the need to check if the
dictionary contains any entries

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-30 15:00:03 +02:00
Lukasz Marek
cd50a44beb lavu/mem: add av_dynarray_add_nofree function
av_dynarray_add_nofree function have similar functionality
as existing av_dynarray_add, but it doesn't deallocate memory
on fails.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-29 09:48:48 +01:00
Michael Niedermayer
54e2e9fbc1 avutil/frame: undeprecate AVFrame.motion_val API
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-26 18:22:49 +01:00
James Almer
2d9821a208 x86/cpu: check for OS support before enabling AVX2
AV_CPU_FLAG_AVX is enabled at this point only if there's OS support.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-25 17:56:43 +01:00
Michael Niedermayer
3e1f24131a Merge commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5'
* commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5':
  frame: add a function for removing side data from a frame

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 14:51:44 +01:00
Michael Niedermayer
83e8978798 Merge commit '5a7e35dd2351c30bab45177b9482cb8833a0ca78'
* commit '5a7e35dd2351c30bab45177b9482cb8833a0ca78':
  Add replaygain side data type and code for parsing replaygain tags.

Conflicts:
	libavcodec/avcodec.h
	libavcodec/version.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 14:03:55 +01:00
Anton Khirnov
d161ae0a37 frame: add a function for removing side data from a frame 2014-03-24 06:07:51 +01:00
Anton Khirnov
5a7e35dd23 Add replaygain side data type and code for parsing replaygain tags. 2014-03-24 06:07:51 +01:00
Michael Niedermayer
82c742377a avutil/dynarray: remove debug av_log() from AV_DYNARRAY_ADD
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 21:47:38 +01:00
Michael Niedermayer
9ba1190297 avutil/mem: avoid using intptr_t to access void* in av_dynarray_add()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 21:14:57 +01:00
Nicolas George
b0dcf76530 lavu/mem: reimplement the dynarray functions with the macro.
Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 20:53:36 +01:00
Nicolas George
7b9a310d0e lavu: add AV_DYNARRAY_ADD() macro.
Signed-off-by: Nicolas George <george@nsup.org>
Reviewed-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 20:53:31 +01:00
Michael Niedermayer
cd1d4b51e3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float_dsp: Replace arch optimization ifdefs by if cascade

Conflicts:
	libavutil/float_dsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 18:52:21 +01:00
Diego Biurrun
46caba4a65 float_dsp: Replace arch optimization ifdefs by if cascade
Arch-specific optimizations are handled this way everywhere else.
2014-03-22 14:11:22 +01:00
Michael Niedermayer
3d04b1aab1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float-dsp-test: do not use C99's predefined  __func__

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-20 12:53:41 +01:00
Janne Grunau
6a74ebc34d float-dsp-test: do not use C99's predefined __func__
It is not supported by all compilers on FATE. Fixes "some test were
skipped" errors.
2014-03-20 11:16:06 +01:00
Michael Niedermayer
f502234f93 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float_dsp: Use LOCAL_ALIGNED for instead of DECLARE_ALIGNED within functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-19 21:20:14 +01:00
Martin Storsjö
ae23809184 float_dsp: Use LOCAL_ALIGNED for instead of DECLARE_ALIGNED within functions
This fixes fate-float_dsp-test on RVCT 4.0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-19 20:02:34 +02:00
Michael Niedermayer
ce9d3daa8a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aarch64: float_dsp NEON assembler

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-19 02:52:08 +01:00
Matt Oliver
8236747511 Automatically change MANGLE() into named inline asm operands when direct symbol reference in inline asm are not supported.
This is part of the patch-set for intel C inline asm on windows support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-18 23:39:30 +01:00
Janne Grunau
dbd12523a4 aarch64: float_dsp NEON assembler
Ported from arm NEON and added vector_dmul_scalar.

Functions between 1.5 and 5 times faster than the C implementations
using Apple's clang-503.0.19 on A7.
2014-03-18 22:56:07 +01:00
Michael Niedermayer
7ab315ec69 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float_dsp: add test program and use it as fate test

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-18 20:04:28 +01:00
Janne Grunau
f0f687446e float_dsp: add test program and use it as fate test 2014-03-18 13:08:00 +01:00
Michael Niedermayer
6b1ca1709f Merge commit '1481d24c3a0abf81e1d7a514547bd5305232be30'
* commit '1481d24c3a0abf81e1d7a514547bd5305232be30':
  RGBA64 pixel formats

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

See: 9569a3c9f4
See: 92afb43162, as well as others
Note: the enum values added in libav are incompatible/different to what ffmpeg used since 3 years
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 14:41:13 +01:00
Jean First
1481d24c3a RGBA64 pixel formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-03-16 23:05:47 +01:00
Michael Niedermayer
3141b04c7f Merge commit 'da785231ea0b82b5c2526babbb2871c935b21a87'
* commit 'da785231ea0b82b5c2526babbb2871c935b21a87':
  bfin: Refactor duplicated assembly-related macros

Conflicts:
	libavcodec/bfin/hpel_pixels_bfin.S

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-14 01:56:25 +01:00
Michael Niedermayer
91a61c4c15 Merge commit 'e99af2a3b1660b4f328335149980064692097cad'
* commit 'e99af2a3b1660b4f328335149980064692097cad':
  bfin: Refactor duplicated l1_text/l1_data_B macros

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-14 01:49:44 +01:00
Michael Niedermayer
1c788eaca9 Merge commit '831a1180785a786272cdcefb71566a770bfb879e'
* commit '831a1180785a786272cdcefb71566a770bfb879e':
  Update dsputil- and SIMD-related comments to match reality more closely

Conflicts:
	libavcodec/x86/hpeldsp.asm
	libavutil/arm/float_dsp_init_arm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-13 23:59:56 +01:00
Michael Niedermayer
8b02dfd37c avutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-13 17:32:15 +01:00
Diego Biurrun
da785231ea bfin: Refactor duplicated assembly-related macros 2014-03-13 08:15:52 -07:00
Diego Biurrun
e99af2a3b1 bfin: Refactor duplicated l1_text/l1_data_B macros 2014-03-13 08:15:52 -07:00
Diego Biurrun
831a118078 Update dsputil- and SIMD-related comments to match reality more closely 2014-03-13 05:50:29 -07:00
James Almer
7d7487e85c x86/float_dsp: add ff_vector_{fmul_add, fmac_scalar}_fma3
~7% faster than AVX

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-13 04:34:05 +01:00
Michael Niedermayer
8dfd0e62f5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float_dsp: fix errors in documentation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-09 15:37:35 +01:00
Michael Niedermayer
4159f702a7 avutil/timer: Fix units for x86 after c708b54033
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-09 15:22:02 +01:00
Michael Niedermayer
c2923100f5 Merge commit 'c708b5403346255ea5adc776645616cc7c61f078'
* commit 'c708b5403346255ea5adc776645616cc7c61f078':
  timer: use mach_absolute_time as high resolution clock on darwin

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-09 14:30:24 +01:00
Janne Grunau
74cc901905 float_dsp: fix errors in documentation 2014-03-09 00:45:35 +01:00
Janne Grunau
c708b54033 timer: use mach_absolute_time as high resolution clock on darwin
Not guaranteed to be in nanosecond resolution. On iOS 7 the duration
of one tick is 125/3 ns which is still more than an order of magnitude
better then microseconds.

Replace decicycles with the neutral UNITS. Decicycles is strange but
tenths of a nanosecond and unspecific "deci"-ticks for mach_absolute_time
is just silly.
2014-03-09 00:45:34 +01:00
Michael Niedermayer
774d0c9dba Merge commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7'
* commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7':
  dict: K&R formatting cosmetics

Conflicts:
	libavutil/dict.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-07 12:44:09 +01:00
Patrice Clement
93d216d37a dict: K&R formatting cosmetics 2014-03-07 01:19:22 +01:00
Lukasz Marek
bba7b6fc41 Revert "lavu/buffer: add release function"
This reverts commit 3144440004.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 03:23:40 +01:00
Michael Niedermayer
a74bab7079 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  arm: hpeldsp: prevent overreads in armv6 asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 21:35:30 +01:00
Janne Grunau
cbddee1cca arm: hpeldsp: prevent overreads in armv6 asm
Based on a patch by Russel King <rmk+libav@arm.linux.org.uk>

Bug-Id: 646
CC: libav-stable@libav.org
2014-03-05 14:30:57 +01:00
Michael Niedermayer
4a59994e03 Merge commit 'a18ef7a76c735bcf78ed4825e33ad7f9f6f77a54'
* commit 'a18ef7a76c735bcf78ed4825e33ad7f9f6f77a54':
  doc: fix a couple of typos in frame.h

Conflicts:
	libavutil/frame.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-04 21:55:16 +01:00
Vittorio Giovara
a18ef7a76c doc: fix a couple of typos in frame.h 2014-03-04 16:12:11 +01:00
Lukasz Marek
19b3a25048 lavu/log: add device categories
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-03 23:34:31 +01:00
Michael Niedermayer
52d928daf9 avutil/opt: allow max=min=0 for pixel formats
This is neccessary for maintaining ABI compatibility with FFmpeg 2.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-01 00:31:38 +01:00
Lukasz Marek
3144440004 lavu/buffer: add release function
new function allows to unref buffer and obtain its data.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-25 01:38:52 +01:00
Michael Niedermayer
74bb1ca82c avutil/frame_copy_audio: also check that channels match
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24 10:12:33 +01:00
Michael Niedermayer
fff5262301 Merge commit '1155fd02ae7bac215acab316e847c6bb25f74fc3'
* commit '1155fd02ae7bac215acab316e847c6bb25f74fc3':
  frame: add a convenience function for copying AVFrame data

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24 09:38:32 +01:00
James Almer
3f3d748cab x86: Move XOP emulation to x86util
We need the emulation to support the cases where the first
argument is the same as the fourth. To achieve this a fifth
argument working as a temporary may be needed.
Emulation that doesn't obey the original instruction semantics
can't be in x86inc.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24 08:30:19 +01:00
Anton Khirnov
1155fd02ae frame: add a convenience function for copying AVFrame data 2014-02-24 07:25:07 +01:00
Michael Niedermayer
bd8d73ea8b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: add detection for Bit Manipulation Instruction sets

Conflicts:
	libavutil/x86/cpu.c

See: 0bc3de19ff
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-23 22:52:58 +01:00
Michael Niedermayer
d9574069c1 Merge commit '1b932eb1508f550fac9e911923a0383efda53aa3'
* commit '1b932eb1508f550fac9e911923a0383efda53aa3':
  x86: add detection for FMA3 instruction set

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

See: a2af8eddab
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-23 22:43:08 +01:00
James Almer
d59fcdaff3 x86: add detection for Bit Manipulation Instruction sets
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
2014-02-23 15:29:36 +01:00
James Almer
1b932eb150 x86: add detection for FMA3 instruction set
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
2014-02-23 15:29:36 +01:00
James Almer
10b0161d78 x86: add missing XOP checks and macros
Signed-off-by: James Almer <jamrial@gmail.com>
2014-02-23 15:29:36 +01:00
Peter Ross
a3a4d07d6a avutil/pixdesc: set bayer pixfmt descriptor flags
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-23 02:24:03 +01:00
James Almer
0bc3de19ff x86: add detection for Bit Manipulation Instruction sets
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-22 17:26:00 +01:00
James Almer
a2af8eddab x86: add detection for FMA3 instruction set
Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-22 17:25:52 +01:00
Michael Niedermayer
490215cbd7 Merge commit '9c029f67ca82147ddfa83a1546ee1e109e11fbd4'
* commit '9c029f67ca82147ddfa83a1546ee1e109e11fbd4':
  aarch64: use EXTERN_ASM consistently for exported symbols

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-20 23:13:13 +01:00
Janne Grunau
9c029f67ca aarch64: use EXTERN_ASM consistently for exported symbols
Based on e3fec3f095 for arm.
2014-02-20 15:24:35 +01:00
Christophe Gisquet
996697e266 x86: float dsp: unroll SSE versions
vector_fmul and vector_fmac_scalar are guaranteed that they can process in
batch of 16 elements, but their SSE versions only does 8 at a time.

Therefore, unroll them a bit.
299 to 261c for 256 elements in vector_fmac_scalar on Arrandale/Win64.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-20 14:18:05 +01:00
Michael Niedermayer
6a24d77929 Merge commit 'c3ecd968f0e78da6e77f0c06c2f785b266d83cf1'
* commit 'c3ecd968f0e78da6e77f0c06c2f785b266d83cf1':
  AVOptions: add flags for read/read-only options

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-20 02:01:13 +01:00
Michael Niedermayer
f4c8d00223 Merge commit '6bb8720f00e2e6209665f819fb351fd42b82d5d0'
* commit '6bb8720f00e2e6209665f819fb351fd42b82d5d0':
  AVOptions: deprecate unused AV_OPT_FLAG_METADATA

Conflicts:
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-20 01:50:26 +01:00
Michael Niedermayer
0a30ad3473 Merge commit '874c751cc5b99cd68932e21c2c3a0d21134207e0'
* commit '874c751cc5b99cd68932e21c2c3a0d21134207e0':
  threads: Check w32threads dependencies at the configure stage

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-19 21:53:58 +01:00
Anton Khirnov
c3ecd968f0 AVOptions: add flags for read/read-only options 2014-02-19 21:52:17 +01:00
Anton Khirnov
6bb8720f00 AVOptions: deprecate unused AV_OPT_FLAG_METADATA
It was never used since it was added and the things it was intended for
are now exported differently.
2014-02-19 21:52:17 +01:00
Diego Biurrun
874c751cc5 threads: Check w32threads dependencies at the configure stage
Also add warning comment about threading implementations without matching
atomics implementation to the atomics fallback implementation.
2014-02-19 15:12:37 +01:00
Michael Niedermayer
53d11f7b2d Merge commit '543156d7518f5e5d731123da066d86278f9fa492'
* commit '543156d7518f5e5d731123da066d86278f9fa492':
  arm: Mark the stack as non-executable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-19 14:07:26 +01:00
Martin Storsjö
543156d751 arm: Mark the stack as non-executable
If linking in an object file without this attribute set, the
linker will assume that an executable stack might be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-02-19 09:57:19 +02:00
Michael Niedermayer
8f853159f6 avutil/opt: preserve fractions in set_string_number()
This avoids going over a double precission float, which may loose precission

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-18 21:49:56 +01:00
Michael Niedermayer
a2bc6c116d Merge commit 'c98f3169bfb578c1a4e407b44524f0bfa3b4dc0c'
* commit 'c98f3169bfb578c1a4e407b44524f0bfa3b4dc0c':
  lavu: add AV_FRAME_DATA_DOWNMIX_INFO side data type.

Conflicts:
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-16 02:05:29 +01:00
Tim Walker
c98f3169bf lavu: add AV_FRAME_DATA_DOWNMIX_INFO side data type. 2014-02-15 22:24:53 +01:00
Christophe Gisquet
133b34207c x86: float dsp: unroll SSE versions
vector_fmul and vector_fmac_scalar are guaranteed that they can process in
batch of 16 elements, but their SSE versions only does 8 at a time.

Therefore, unroll them a bit.
299 to 261c for 256 elements in vector_fmac_scalar on Arrandale/Win64.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-15 18:54:21 +01:00
James Almer
23a8c63452 x86inc: Extend FMA_INSTR functionality
Support the cases where the first and last operand of
the XOP instruction are the same.

Also add vpmacsdql emulation.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-13 22:14:24 +01:00
Michael Niedermayer
74744790a3 Merge commit '25a1ba814ad80056247fd357ec4c6911324a3f66'
* commit '25a1ba814ad80056247fd357ec4c6911324a3f66':
  log: Have function parameter names match between .c and .h file

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-12 14:41:24 +01:00
Diego Biurrun
25a1ba814a log: Have function parameter names match between .c and .h file
This fixes two related Doxygen warnings.
2014-02-12 12:08:02 +01:00
James Almer
6c12b1de06 x86: add missing XOP checks and macros
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-11 03:46:52 +01:00
Michael Niedermayer
a7574a36af Merge commit 'e3fec3f095ab5ea08ee662942d98526aaf5e3635'
* commit 'e3fec3f095ab5ea08ee662942d98526aaf5e3635':
  arm: Add EXTERN_ASM to the .func and .type declarations for exported symbols

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:49:28 +01:00
Martin Storsjö
e3fec3f095 arm: Add EXTERN_ASM to the .func and .type declarations for exported symbols
This makes the generated assembly more internally consistent,
avoiding declaring two labels for the same function (for cases
where EXTERN_ASM is empty) and not declaring a separate unprefixed
label in other cases.

This also makes sure the .func and .type delcarations have the same
prefix. They have previously not been used on the platforms
that have prefixed symbols on arm (iOS), but gas-preprocessor
has recently started using the .func declarations for adding
.thumb_func declarations for such functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-02-07 15:14:06 +02:00
James Almer
a4e4948ffe x86/cpu: add missing avx2 AVOption in av_parse_cpu_flags()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-06 22:45:57 +01:00
Michael Niedermayer
a3be0c334e Merge commit 'a1e1f35203bbcbea0efb51d93e96769c826b8c64'
* commit 'a1e1f35203bbcbea0efb51d93e96769c826b8c64':
  lavu: add missing log.h include in timer.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 23:48:41 +01:00
Janne Grunau
a1e1f35203 lavu: add missing log.h include in timer.h 2014-02-05 21:00:51 +01:00
Michael Niedermayer
6e380cc28f Merge commit '9ecb858775483a76c137e8e1ad45a95e318bca61'
* commit '9ecb858775483a76c137e8e1ad45a95e318bca61':
  doxy: Format @code blocks so they render properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 03:27:13 +01:00
Michael Niedermayer
d80b9ea11d Merge commit '0e830094ad0dc251613a0aa3234d9c5c397e02e6'
* commit '0e830094ad0dc251613a0aa3234d9c5c397e02e6':
  samplefmt: avoid integer overflow in av_samples_get_buffer_size()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 01:30:24 +01:00
Luca Barbato
9ecb858775 doxy: Format @code blocks so they render properly
@code command reports verbatim everything between it and @endcode.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-02-04 22:09:47 +01:00
Justin Ruggles
0e830094ad samplefmt: avoid integer overflow in av_samples_get_buffer_size()
CC:libav-stable@libav.org
2014-02-04 12:32:47 -05:00
Matt Oliver
3e309c5d18 Fix compilation with msvc/icl due to missing header and define.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 19:48:41 +01:00
Loren Merritt
b7d0d10a1d x86inc: Speed up assembling with Yasm
Work around Yasm's inefficiency with handling large numbers of variables
in the global scope.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-01-26 18:40:08 +01:00
Michael Niedermayer
3e6088f732 avutil/internal.h: add timer.h back
Without this a developer would have to add a include every time he
wants to benchmark some code, this is a moderate inconvenience.

This reverts the specific hunk from fb0c9d41d6

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:23:26 +01:00
Michael Niedermayer
965fa6b0d9 Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec'
* commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec':
  avutil: remove timer.h include from internal.h

Conflicts:
	libavcodec/ffv1dec.c
	libavutil/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 01:54:55 +01:00
Janne Grunau
fb0c9d41d6 avutil: remove timer.h include from internal.h
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
João Bernardo
290326711b avutil/opt: Better print representation of number limits
Signed-off-by: João Bernardo Oliveira <jbvsmo@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 21:14:02 +01:00
Nicolas George
3532dd52c5 lavu/rational: add syntactic sugar.
Add a function to create a rational
and macros for common values.
2014-01-19 17:12:22 +01:00
Loren Merritt
4d55fe7204 x86inc: speed up compilation with yasm
Work around yasm's inefficiency with handling large numbers of variables
in the global scope.
2014-01-18 01:19:16 +01:00
Michael Niedermayer
045d80076a Merge commit '045654f422e74be8ed09a0819d39051d67633a09'
* commit '045654f422e74be8ed09a0819d39051d67633a09':
  doxy: Document better the available AVFrame flags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 15:05:24 +01:00
Michael Niedermayer
68ebf70f66 Merge commit 'ff23c4e4935e96e62d8ff2212a1955a43add88e1'
* commit 'ff23c4e4935e96e62d8ff2212a1955a43add88e1':
  doxy: Add AVFrame to the structured modules

Conflicts:
	libavutil/frame.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 14:55:08 +01:00
Luca Barbato
045654f422 doxy: Document better the available AVFrame flags 2014-01-17 10:00:18 +01:00
Luca Barbato
ff23c4e493 doxy: Add AVFrame to the structured modules 2014-01-17 10:00:18 +01:00
Michael Niedermayer
949adce125 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aarch64: port neon clobber test from arm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-15 15:49:22 +01:00
Michael Niedermayer
d5560f1fec Merge commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217'
* commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217':
  aarch64: add cpuflags support for NEON and VFP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-15 14:42:49 +01:00
Janne Grunau
fe96769bed aarch64: port neon clobber test from arm 2014-01-15 12:31:07 +01:00
Janne Grunau
b7b17ed66e aarch64: add cpuflags support for NEON and VFP
NEON and VFP are currently mandatory for all ARMv8 profiles. Both are
handled as extensions as far as cpuflags are concerned. This is
consistent with handling x86_64 which always has SSE2, but still
handles it as an extension.
2014-01-15 12:05:09 +01:00
Michael Niedermayer
53e6977c07 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aarch64: bswap inline assembly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-15 05:23:03 +01:00
Janne Grunau
d0cd2a8c46 aarch64: bswap inline assembly
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-14 22:19:38 +01:00