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>