Currently the Windows CC_IDENT is ended with '\r\n'. "head -n1" will not
remove the '\r' and this is causing building error in Chromium.
This CL adds "tr -d '\r'" to remove '\r' in the CC_IDENT string. Since in
most cases '\r' only appears at the end of a string/line, this should
work in most cases.
See example:
printf "hello\r\nworld\r\n" | head -n1 | hd
00000000 68 65 6c 6c 6f 0d 0a |hello..|
printf "hello\r\nworld\r\n" | head -n1 | tr -d '\r' | hd
00000000 68 65 6c 6c 6f 0a |hello.|
Also note a similar previous change at:
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2013-October/069950.html
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Most code between them is common, so put them in a new file for
miscellaneous VAAPI filters.
Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Add ProcAmp(color balance) vaapi video filter, use the option
like -vf "procamp_vaapi=b=10:h=120:c=2.8:s=3.7" to set
brightness/hue/contrast/saturation.
Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
check_func_headers() defines a main() function, which clashes with a
redefinition done by said SDL header. Check for SDL_PollEvent using
SDL_events.h only instead, where the redefinition doesn't happen.
Fixes a regression since d03c39b46b.
Tested-by: RiCON
Signed-off-by: James Almer <jamrial@gmail.com>
SDL2 uses SDLCALL to specify a calling convention. On OS/2, it's defined
to `_System' which is similar to `_cdecl' but does not prepend '_'.
After all, without a header, a function is used without `_System'. And
linker will try to `_func' but fail because the function is `func' not
`_func'.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This patch is taking care of https://trac.ffmpeg.org/ticket/6834.
It seems that one of the control operations that was available to get
the free decoders input slots was removed.
There is another control operation to retrieve the used slots. Given
that the input slot count is hardcoded to 4 in mpp at this point,
replacing the old control operation by the other one.
This was tested on Rockchip ROCK64.
Signed-off-by: wm4 <nfxjfg@googlemail.com>
At least version 0.6.2 is needed since commit
df3222d4bb.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Requires AMF headers for at least version 1.4.4.1.
Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Deprecate the entire library. Merged years ago to provide compatibility
with Libav, it remained unmaintained by the FFmpeg project and duplicated
functionality provided by libswresample.
In order to improve consistency and reduce attack surface, as well as to ease
burden on maintainers, it has been deprecated. Users of this library are asked
to migrate to libswresample, which, as well as providing more functionality,
is faster and has higher accuracy.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This removes the XP compatibility code, and switches entirely to SWR
locks, which are available starting at Windows Vista.
This removes CRITICAL_SECTION use, which allows us to add
PTHREAD_MUTEX_INITIALIZER, which will be useful later.
Windows XP is hereby not a supported build target anymore. It was
decided in a project vote that this is OK.
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
At least on Android the vp9 decoder/encoder needs $libm_extralibs
to successfully link, it was missing in the check_lib calls for vp9
Signed-off-by: Felix Matouschek <felix@matouschek.org>
Signed-off-by: James Almer <jamrial@gmail.com>
This check is not needed for any supported version of libtls
and causes issues with static builds (libtls links to -lssl -lcrypto).
Signed-off-by: sfan5 <sfan5@live.de>
Signed-off-by: James Almer <jamrial@gmail.com>
This was not accounted for during merge and is required due to
the refactor in commit 93ccba96df.
Signed-off-by: sfan5 <sfan5@live.de>
Signed-off-by: James Almer <jamrial@gmail.com>
Requires AMF headers for at least version 1.4.4.1.
Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Supports only raw NV12 input.
Example use:
./vaapi_encode 1920 1080 test.yuv test.h264
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
Both are autodetected, and their dependency on cuda is checked
elsewhere.
Fixes ticket #6849.
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: James Almer <jamrial@gmail.com>
This was added in early 2013 and abandoned several months later; as far as
I can tell, there are no external users. Future OpenCL use will be via
hwcontext, which requires neither special OpenCL-only API nor global state
in libavutil.
All internal users are also deleted - this is just the unsharp filter
(replaced by unsharp_opencl, which is more flexible) and the deshake filter
(no replacement).
Intended to replace existing opencl mode of the unsharp filter.
Supports many more pixel formats and works without immediate upload
and download of frame data. The options are compatible with the
existing filter.
Using cl_arm_import_memory. Unfortunately, despite this not being a
standard extension, the function clImportMemoryARM() is not accessible
via clGetExtensionFunctionAddressForPlatform(). This means that it has
to be linked directly to the ARM OpenCL binary, so making a portable
binary is not possible as it is with all other mapping extensions.
this will simplify libvpxenc/dec.c and ensure more stable versions of
the codecs are present.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
This was predictably nightmarish, given how ridiculous mpeg4 is.
I had to stare at the cuvid parser output for a long time to work
out what each field was supposed to be, and even then, I still don't
fully understand some of them. Particularly:
vop_coded: If I'm reading the decoder correctly, this flag will always
be 1 as the decoder will not pass the hwaccel any frame
where it is not 1.
divx_flags: There's obviously no documentation on what the possible
flags are. I simply observed that this is '0' for a
normal bitstream and '5' for packed b-frames.
gmc_enabled: I had a number of guesses as to what this mapped to.
I picked the condition I did based on when the cuvid
parser was setting flag.
Also note that as with the vdpau hwaccel, the decoder needs to
consume the entire frame and not the slice.
* commit '3152058bf1dca318898550efacf0286f4836cae6':
libavcodec: Don't use dllexport, only dllimport when building DLLs
Merged-by: James Almer <jamrial@gmail.com>
select should not be used with external libraries. It's mean to soft
enable internal modules/features.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
The only purpose of dllexport (which is set while building the library
that exports the symbols) is to have the linker automatically
export such symbols into a DLL without using a def file - it doesn't
affect the generated code.
For both MSVC and mingw builds, this isn't essential since we override
what symbols to export via an autogenerated def file instead.
Update a comment in configure to refer to the right concept.
With lld, this avoids warnings about duplicate export directives,
when some symbols are requested to be exported both via dllexport
attributes and via the autogenerated def file.
This also reduces the number of lines of code marginally.
Signed-off-by: Martin Storsjö <martin@martin.st>
This is mostly straight-forward. The weird part is that it should
just work for mpeg1, but I see corruption in my test cases, so I'm
going to try and fix that separately.
By putting the call in a subshell, the problem of it spilling
cleanup-decision from a previous library to other libraries is avoided.
For example, it could have already cleaned up cuda_extralibs in a
previous library that depended on cuda. Then when it gets to avutil, it
will never pick up the dependency of avutil to cuda, which depends on
libdl, which in turn results in a missing -ldl extralib, resulting in
link failures in certain configurations.
* commit 'd070b9b703a542429a13db9623109ae20474c775':
configure: Coalesce some arch configuration and PIC handling
Merged-by: James Almer <jamrial@gmail.com>
This avoids having to use either "dumpbin -headers" to find out
the current architecture, or pass $ARCH from configure to deduce it.
When configuring with --disable-asm, ARCH is equal to "c", which doesn't
give any indication of what symbol prefix is to be used.
Signed-off-by: Martin Storsjö <martin@martin.st>
- Move a variable closer to where it is used
- Add an explanatory comment
- Simplify a crosscompile check
- Minor SHFLAGS simplification
- Coalesce some threads tests
This works as expected on iOS, except for the ca_file feature which
is disabled because SecItemImport is not available.
Signed-off-by: Aman Gupta <aman@tmm1.net>
* commit '8e0febe28effe7f427e45190eab37110126161ea':
configure: Use right variable and right value for AIX ar flags
Merged-by: James Almer <jamrial@gmail.com>
* commit '2cf3c0ab0d84b5cdb379059f8570809a13a306b9':
Revert "configure: Detect AIX ar command instead of hardcoding it in the OS section"
Merged-by: James Almer <jamrial@gmail.com>
* commit '192fe52e42f64a493c47cad1461b20fe1149dbea':
configure: Miscellaneous minor changes to config file handling
Merged-by: James Almer <jamrial@gmail.com>
* commit '61a17423d3711cb34a18b44e1ec2510c2f70a56c':
configure: Miscellaneous small changes to helper functions
Merged-by: James Almer <jamrial@gmail.com>
* commit '67c72f08a4707c18a67a4734660e3a23cc9488b6':
configure: Stop using dlltool to create an import library
Merged-by: James Almer <jamrial@gmail.com>
* commit '68649bfed30a35dc3e45ea240541b2774b2f282b':
configure: Group system feature variables and system libraries together
Merged-by: James Almer <jamrial@gmail.com>
* commit '62be1caf161c1241a9e148f347850cfe092588dc':
configure: Bail out early if neither static nor shared libs are built
Merged-by: James Almer <jamrial@gmail.com>
* commit 'c6496de33456f20144b994ac38f308f2de333608':
configure: Move enabling libc_type into probe_libc() function
Merged-by: James Almer <jamrial@gmail.com>
* commit '41df62fd674bd0c67f7b6952381d235a393245d6':
configure: Set the default assembler to armasm64 for MSVC for arm64
Merged-by: James Almer <jamrial@gmail.com>
* commit '40d5df67d2c4e1f0dd1e902435567eb5edad6a9a':
configure: Add a comment about why we don't try to enable pic on arm on target_os=win32
Merged-by: James Almer <jamrial@gmail.com>
* commit '0ca66409911e9fba940424be8bdfa54e056b0a4b':
configure: Don't add -fPIC to asflags when targeting windows
Merged-by: James Almer <jamrial@gmail.com>
* commit 'f951837ce58e8588b175fb53a76fd453a81528ec':
configure: Don't add -fPIC to cflags for target_os=win32
Merged-by: James Almer <jamrial@gmail.com>
* commit '7ac092d05de487d088bc96ab4a7bd6207fbfa98c':
build: CryptGenRandom --> wincrypt, it is a better name
Merged-by: James Almer <jamrial@gmail.com>
* commit '421c10ed4fb0475a2cb055dd130ba12a6adb9f70':
configure: Drop test for fork()
We keep the check as it's needed by the http_multiclient example.
Merged-by: James Almer <jamrial@gmail.com>
* commit '8e97a8c69162afce47abea96c8c0914f3550e212':
build: Remove check for gsm/gsm.h for libgsm
Also includes fix from 010baac12a
Merged-by: James Almer <jamrial@gmail.com>
* commit '29ccc641b17afad058a5c24071ea827865a8b3a9':
build: Drop check for sys/mman.h in favor of mmap() check
Merged-by: James Almer <jamrial@gmail.com>
* commit 'fca9ca539c8c6e4fe0072486c7e0479a08a15e7c':
configure: Drop unused or internally-used entries from variable lists
Merged-by: James Almer <jamrial@gmail.com>
* commit 'accb06120c13a4ead442464d96f2fa318fa07a4e':
configure: Use dllexport/dllimport for data symbols across DLLs with mingw
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b90fdb2c7199cc8b0e8d994fafba1fb4dc181d88':
hevcdec: add a CUVID hwaccel
Adapted for ffmpeg by Timo Rothenpieler.
Merged-by: James Almer <jamrial@gmail.com>
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
Merges Libav commit b9129ec466.
Due to the name clash with our cuvid decoder, rename it to nvdec.
This commit also changes the Libav code to dynamic loading of the
cuda/cuvid libraries.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* commit '0e83e95c60892747f2f1bd8382f915f2397f99a5':
configure: Reset X86ASM_DEP(FLAGS) when probing for the assembler program
See f66086adac
Merged-by: James Almer <jamrial@gmail.com>
* commit '857e26b655a769e5a56bada1a0d9adb44cc176b7':
build: Add an option for passing linker flags to the shared library build
See e34a3468f2.
--extra-ldlibflags is left in place for compatibility reasons.
Merged-by: James Almer <jamrial@gmail.com>
* commit '333a34da3a6d13155de480e7d16ec5fec7f4cd6c':
configure: Automatically add -isysroot for darwin if --sysroot is specified
Merged-by: James Almer <jamrial@gmail.com>
- Move generating config.fate to a more sensible place.
- Move printing warnings to a more appropriate place.
- Improve "generated by" comment in libavutil/avconfig.h.
- Drop pointless informative output about generating config files.
- Write a standard comment header to config.asm as well.
- Reuse sanitize_var_name() where appropriate
- Add some quotes to enabled()/disabled() to ease readability
- Fix logged names of some helper functions
- Filter LDFLAGS also in test_ldflags()
* commit 'e2edf1529cb35eaf043e3f8e5cba498ed06e2563':
configure: Simplify AltiVec/VSX check with a helper function
Merged-by: James Almer <jamrial@gmail.com>
* commit '61cec5adaacb358783c18aa07362f15824c1b274':
tls: Hide backend implementation details from users
Also includes ed434be106
Changes were made to support schannel and securetransport.
Merged-by: James Almer <jamrial@gmail.com>
* commit '4d444d04c1e19cd02ac836d411433906a9f32613':
configure: Default to _WIN32_WINNT=0x0502 (XP) as minimum, for legacy mingw
See 69f7aad571
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b5f19f7478492307e4b4763aeac3180faf50e17f':
aac: Split function to parse ADTS header data into public and private part
Merged-by: James Almer <jamrial@gmail.com>
There shouldn't be any functional difference between the import
library created by dlltool and the one produced by the linker itself.
Keep installing it with both names though, for compatibility with users
that expect both to exist.
The dlltool step was added in ec10a9ab4; prior to that, a MSVC
compatible import library was generated using lib.exe. After that
commit, there was no functional difference between the two import
libraries (and since MSVC 2012, link.exe works just fine with the
GNU binutils generated one).
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit 'b62ed6873821c8fce8f7e2c2927ae54f86afeb22':
configure: Better names for functions that sanitize input
Merged-by: James Almer <jamrial@gmail.com>
* commit '10f4511f14a4e830c0ed471df4cd1cc2a18a481a':
libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(
Also added LOCAL_ALIGNED_4 as it's used in vp8 decoder, and
simplified the configure defines.
Merged-by: James Almer <jamrial@gmail.com>
This applies a specific fixup to some Blu-ray streams which contain
redundant PPSs modifying irrelevant parameters of the stream which
confuse other transformations which require correct extradata.
A new single global PPS is created, and all of the redundant PPSs
within the stream are removed.
(cherry picked from commit e6874bc3af)
This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.
(cherry picked from commit 9e93001b61)
(cherry picked from commit c42b62d1f9)
* commit '81bffae368f331b6cd386a814f225a58e3f32f40':
configure: Check for -no_weak_imports in ldflags on macOS
Merged-by: James Almer <jamrial@gmail.com>
Should prevent some options from being added to cflags when they
don't exist and the compiler only warns about it.
Reviewd-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
The library has several dependencies that vary between systems.
Their pkg-config properly lists them all.
Signed-off-by: James Almer <jamrial@gmail.com>
Two of them are missing it in their pkg-config file, so adding it
here is a workaround until said pkg-config files are fixed.
Debugged with the help of Reino Wijnsma.
Signed-off-by: James Almer <jamrial@gmail.com>
Support for this device has been removed in the Linux kernel since v2.6.37.
dv1394 has been superseded by libiec61883 which is functionally equivalent.
Signed-off-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
The libavformat API is not suitable for exporting output devices as muxers.
Some practical problems are e.g. lack of timing/synchronization mechanisms
or interaction with output-specific features.
On X86 windows, asflags weren't actually ever used for anything,
since assembling used x86asflags instead, and that flags list
had -DPIC already.
This fixes building shared libraries with clang for arm/aarch64
windows. (This wasn't an issue when in msvc mode before, since
we don't try to enable pic at all there, since the msvc armasm
assembler fails on our pic constructs there.)
Signed-off-by: Martin Storsjö <martin@martin.st>
We skipped adding it to cflags for mingw/cygwin configurations
where the compiler either complains loudly or even errors out;
do the same for target_os=win32, for the case when building with
clang in msvc mode.
This wasn't needed for the actual msvc before, since msvc uses
msvc_common_flags to filter out this flag from cflags.
When building with clang in msvc mode, no such filter is used.
This fixes building shared libraries with clang in msvc mode.
Signed-off-by: Martin Storsjö <martin@martin.st>