* commit 'bb41115d56930b9f5d59e79dca254d1201246967':
imgutils: Do not declare avpriv_set_systematic_pal2 in the public header
Conflicts:
libavutil/internal.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'a238b83b13640e3192d7d4aaad2242f13a9a84a1':
aarch64: use MACH-O const data asm directive in const macro
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '07d8fa58121be8fe315bd51ab760547fe209a745':
fate: add informative cpu test
Conflicts:
tests/fate/libavutil.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/cpu-test prints raw and effective cpu flags to STDERR. Detected
cpu flags can be useful for debugging fate errors.
No comparison of the result against a expected result since that would
require fate config specific references.
Up to four instructions less depending on function and instruction set.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '69e7336b8e16ee65226fc20381baf537f4b125e6':
avstring: Expose the simple name match function
Conflicts:
libavutil/avstring.c
libavutil/avstring.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Only 8-bit and 10-bit idct_dc() functions are included (adding others should be trivial).
Benchmarks on an Intel Core i5-4200U:
idct8x8_dc
SSE2 MMXEXT C
cycles 22 26 57
idct16x16_dc
AVX2 SSE2 C
cycles 27 32 249
idct32x32_dc
AVX2 SSE2 C
cycles 62 126 1375
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Mickaël Raulet <mraulet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '6869612f5c7d4d2f20f69a5658328a761deadb1c':
arm: Macroize the test for 'setend' CPU instruction support
Conflicts:
libavcodec/arm/h264dsp_init_arm.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
I benchmarked the result by measuring the number of gperftools samples that
hit anywhere in the AAC decoder (starting from aac_decode_frame()) or
specifically in butterflies_float_c() / ff_butterflies_float_vfp() for the
same sample AAC stream:
Before After
Mean StdDev Mean StdDev Confidence Change
Audio decode 1542.8 43.7 1470.5 41.5 100.0% +4.9%
butterflies_float 130.0 11.9 70.2 12.1 100.0% +85.2%
Signed-off-by: Martin Storsjö <martin@martin.st>
I benchmarked the result by measuring the number of gperftools samples that
hit anywhere in the AAC decoder (starting from aac_decode_frame()) or
specifically in vector_fmul_window_c() / ff_vector_fmul_window_vfp() for the
same sample AAC stream:
Before After
Mean StdDev Mean StdDev Confidence Change
Audio decode 1598.2 47.4 1529.2 25.4 100.0% +4.5%
vector_fmul_window 244.0 22.1 188.9 22.3 100.0% +29.2%
Signed-off-by: Martin Storsjö <martin@martin.st>
I benchmarked the result by measuring the number of gperftools samples that
hit anywhere in the AAC decoder (starting from aac_decode_frame()) or
specifically in butterflies_float_c() / ff_butterflies_float_vfp() for the
same sample AAC stream:
Before After
Mean StdDev Mean StdDev Confidence Change
Audio decode 1542.8 43.7 1470.5 41.5 100.0% +4.9%
butterflies_float 130.0 11.9 70.2 12.1 100.0% +85.2%
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
I benchmarked the result by measuring the number of gperftools samples that
hit anywhere in the AAC decoder (starting from aac_decode_frame()) or
specifically in vector_fmul_window_c() / ff_vector_fmul_window_vfp() for the
same sample AAC stream:
Before After
Mean StdDev Mean StdDev Confidence Change
Audio decode 1598.2 47.4 1529.2 25.4 100.0% +4.5%
vector_fmul_window 244.0 22.1 188.9 22.3 100.0% +29.2%
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
MSVC does not allow passing file pointers between libs
This API can thus not work with MSVC and as it was very recently added
and its it was in no release its removial should not cause any problems
A better API will be implemented, but its not finished yet, this revert is
to avoid potentially blocking the release
Found-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'a7985cfd4c51b7fe2b870fc4ecd109707ee035d6':
audio_fifo: Split into a separate doxygen module
Conflicts:
libavutil/audio_fifo.h
See: 689e02808d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This header is designed as a public header (with APIchanges entry and
everything), but it is forgotten to put into the headers to be installed
list.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Categorize the enum and functions as "audio-related".
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Categorize the enum and funcs to "Audio related".
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Without this patch, "Library Version Macros" module is not visible on
libavutil homepage in `make apidoc`.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '7b0c7c9163fe3dd0081696befde28617119d2590':
arm: Detect 32 bit cpu features on ARMv8 when running on a 64 bit kernel
Merged-by: Michael Niedermayer <michaelni@gmx.at>
When running on a 64 bit kernel, /proc/cpuinfo lists different
optional features than on 32 bit kernels (because some of them
are mandatory in the 64 bit implemenations).
The kernel does list the old features properly if they are queried
via /proc/self/auxv though - however this file is not always readable
(e.g. on most android systems). The getauxval function could also
provide the same info as /proc/self/auxv even if this file isn't
readable, but this function is not always available (and thus would
need to be loaded with dlsym for compatibility with older android
versions).
The android cpufeatures library does this slightly differently,
by assuming that these are available if the "CPU architecture"
line is >= 8, see [1] for details.
It has been suggested to include the old, non-optional features in
/proc/cpuinfo as well, but that suggested patch never was merged.
See [2] for the discussion around this suggestion.
[1] https://android-review.googlesource.com/91380
[2] http://marc.info/?l=linux-arm-kernel&m=139087240101974
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit 'ab72eda15e98197cf148abc08574206cfde0d9b0':
pixfmt: mark the reserved values
Conflicts:
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ccda51b14c0fcae2fad73a24872dce75a7964996':
lzo: Handle integer overflow
Conflicts:
libavutil/lzo.c
This is basically not merging changes due to this being fixed differently
in FFmpeg
See: d6af26c55c
See: cf2b7c01f8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)
Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2':
Add av_image_check_sar() and use it to validate SAR
Conflicts:
libavcodec/dpx.c
libavcodec/dvdec.c
libavcodec/ffv1dec.c
libavcodec/utils.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Those macros take a byte number as shift argument, as this argument
differs between MMX and SSE2 instructions.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It was lost during the port.
Should fix fate on 3dnowext machines.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This avoids issues when the FFMIN parameter evaluation has side effects
Reviewed-by: Clément Bœsch <u@pkh.me>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd5a55981986ac5d1a31aef3a8d16eaff8534a412':
build: check if AS supports the '.func' directive
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Both gnu as and clang treat lines starting with '#' as comments if they
aren't consumed by the C-style preprocessor.
Using '//' does not work with clang since comments are removed before
macro expansion.
Blackfin is a painful platform to work with, no test machines are available
and the range of multimedia applications is dubious. Thus it only represents
a maintenance burden.
* commit '8c02adc62d71dfbb079a04753d8c16152c49de88':
lavu: add all color-related enums to AVFrame
Conflicts:
libavcodec/avcodec.h
libavutil/frame.c
libavutil/frame.h
libavutil/version.h
The version check is changed so they are available with the current ABI
FFmpeg libs should have no problems with added fields, nor should any
application using the libs, and we regularly added fields in the past.
We also moved 2 of these fields to AVFrame already previously without issues.
See: a80e622924
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This fixes building in PIC mode with gas. The examples in the gas
manual showed using a # here even though gas itself actually didn't
support that syntax (and the gas test suite only tests it without
the extra hash sign).
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit 'a53551cba86bb67efcb6105fdc337a36c43132bd':
frame: fix the error path in av_frame_copy_props()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fixes various runtime failures with manually set flags that represent no
existing CPU
Fixes Ticket3653
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '82fc9f4b38244236a6ca7f946662ca653044a04c':
display: Include mathematics.h for fallback definition of NAN
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Add AV_PKT_DATA_DISPLAYMATRIX and AV_FRAME_DATA_DISPLAYMATRIX as stream and
frame side data (respectively) to describe a display transformation matrix
for linear transformation operations on the decoded video.
Add functions to easily extract a rotation angle from a matrix and
conversely to setup a matrix for a given rotation angle.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
These functions are using the POSIX clock_gettime() function with the
CLOCK_MONOTONIC clock id. If these are not present on the targeted
platform, the new functions will fallback on using the original realtime functions
av_gettime() and av_usleep().
Monotonic support can be added on other platforms with their
equivalent native system API eventually if possible.
Whenever time is requested to measure relative time, the monotonic clock,
when available, is superior to the system realtime clock because it is
not affected by discontinuous jumps in the system time
In a future step, offering the flexibility to let the user choose between
rt and monotonic clock for avdevices packets will be investigated.
It is very easy to experience the issues that this patch attempt to address
by rewinding back in the past the system time while ffmpeg is running.
this is breaking the ffmpeg report printing (ffmepg.c:print_report()) and
the the rate emulator functionality (-re) without the patch.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '66e6c8a7b4e3ac926302529606bd3e323c28b20f':
lavu: Add a pixel format for new VDA hwaccel
Conflicts:
doc/APIchanges
libavutil/pixfmt.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Existing av_opt_set_dict doesn't accept flags.
It doesn't allow to pass options to nested structs.
New function alllows that.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* cehoyos/master:
Enable muxing ac-3 in caf.
Use correct msvc type specifiers for ptrdiff_t and size_t.
Fix vf_eq.c and vf_eq2.c compilation with !HAVE_6REGS.
Fix libpostproc compilation with !HAVE_6REGS.
Never write 0 as maximum bitrate for asf files.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'a88e1d1c598e641eecd5d43730211d91c82787c6':
lavu: add CHK_OFFS as AV_CHECK_OFFSET to check struct member offsets
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b0bdc2a7123abd0287de435726ab68e9e475a8d8':
avutil: move av_get_time_base_q() after include rational.h
See: c7251fec39
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This allows calling the function without the need to check if the
dictionary contains any entries
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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>
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>
* commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5':
frame: add a function for removing side data from a frame
Conflicts:
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
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>
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.
* 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>
* 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>
* commit 'c708b5403346255ea5adc776645616cc7c61f078':
timer: use mach_absolute_time as high resolution clock on darwin
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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.
* commit 'a18ef7a76c735bcf78ed4825e33ad7f9f6f77a54':
doc: fix a couple of typos in frame.h
Conflicts:
libavutil/frame.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>