Commit Graph

3108 Commits

Author SHA1 Message Date
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