Commit Graph

4972 Commits

Author SHA1 Message Date
Martin Storsjö
0ca6640991 configure: Don't add -fPIC to asflags when targeting windows
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>
2017-10-12 21:49:13 +03:00
Martin Storsjö
f951837ce5 configure: Don't add -fPIC to cflags for target_os=win32
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>
2017-10-12 21:49:08 +03:00
Diego Biurrun
7ac092d05d build: CryptGenRandom --> wincrypt, it is a better name 2017-10-12 20:04:18 +02:00
Diego Biurrun
93797681c2 build: Rename stdatomic_h variable to stdatomic
It does not represent a header but a complete system capability.
2017-10-12 20:04:17 +02:00
Diego Biurrun
62d5b5a9d3 configure: Extend check_header() to allow checking for multiple headers
Also use that new capability to simplify bktr header checks.
2017-10-12 20:04:17 +02:00
Diego Biurrun
b46900914a build: Merge mach/mach_time.h and mach_absolute_time() checks 2017-10-12 20:04:16 +02:00
Diego Biurrun
4f6401df43 configure: Merge separate parts of GnuTLS test 2017-10-12 20:04:16 +02:00
Diego Biurrun
3613063e87 configure: Simplify nvenc check (and move it to the correct spot) 2017-10-12 20:04:15 +02:00
Diego Biurrun
8594ec3dd5 configure: Drop fallback for deprecated avserver command line options 2017-10-12 20:04:15 +02:00
Diego Biurrun
a688b64fcf configure: Drop feature for randomly disabling/enabling components
This feature was never used for anything.
2017-10-12 20:04:15 +02:00
James Almer
e4ad3e6f64 Merge commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44'
* commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44':
  build: Explicitly set 32-bit/64-bit object formats for nasm/yasm

See d44935cbf4

Merged-by: James Almer <jamrial@gmail.com>
2017-10-12 14:58:34 -03:00
James Almer
6fb580e7d3 configure: fix libxavs check
libxavs may require pthreads and libm at link time, and without
said ldflags available as global extralibs, the check will fail.

Regression since 6dfcbd80ad.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-12 14:20:30 -03:00
James Almer
25bd2f4f36 configure: add missing OpenCL dependency to libavutil
Tested-by: wm4
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-12 12:27:48 -03:00
James Almer
734ed38931 configure: fix dependencies for v4l2_indev
There's no indev named libv4l2.

Fixes ticket #6729

Reviewed-by: bermond
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-11 22:25:02 -03:00
James Almer
6dfcbd80ad Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
* commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
  build: Fine-grained link-time dependency settings

Also included are bug fix commits 5ff3b5cafc,
d9da7151ee and
5e27ef800b.

Merged-by: James Almer <jamrial@gmail.com>
2017-10-11 17:55:25 -03:00
Marton Balint
58143b15ad configure: remove libdl dependency from libndi_newtek
We are not using dynamic loading for libndi.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-11 22:48:39 +02:00
Diego Biurrun
010baac12a configure: Fix stupid typo in gsm.h header name 2017-10-11 18:58:00 +02:00
Marton Balint
f280575a0f configure: fix decklink dependencies
We don't need libdl for win32/mingw.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-10 23:28:38 +02:00
Diego Biurrun
76481f57b5 configure: Remove pointless empty *_COMPONENTS variables 2017-10-10 23:20:21 +02:00
Diego Biurrun
1c047c8f4d configure: Drop stray extralibs for libspeex
These extralibs are set by pkg-config already.
2017-10-10 23:20:20 +02:00
Diego Biurrun
3e59502873 configure: Drop unused attribute checks 2017-10-10 23:20:19 +02:00
Diego Biurrun
421c10ed4f configure: Drop test for fork()
fork() is never used conditionally.
2017-10-10 23:20:18 +02:00
Diego Biurrun
b586903ae1 build: Drop redundant check for soundcard.h
It should be sys/soundcard.h nowadays.
2017-10-10 23:20:17 +02:00
Diego Biurrun
8e97a8c691 build: Remove check for gsm/gsm.h for libgsm
libgsm never installed more than a single header, the headers installed into
the gsm/ subdirectory by some distros are private. Who started this nonsense
is a mystery, but it got cargo-culted around ever since.
2017-10-10 23:20:16 +02:00
Diego Biurrun
29ccc641b1 build: Drop check for sys/mman.h in favor of mmap() check
We already rely on just mmap() in other places.
2017-10-10 23:20:16 +02:00
Diego Biurrun
e7168d4c0c configure: Drop redundant header check for d3d11.h
It is detected as a part of the ID3D11VideoDecoder check.
2017-10-10 23:20:11 +02:00
Diego Biurrun
4064f42889 build: Drop explicit check for dlfcn.h
It is detected as a part of the libdl check.
2017-10-10 23:20:10 +02:00
Diego Biurrun
fca9ca539c configure: Drop unused or internally-used entries from variable lists
The variable lists are for variables whose values end up in output files.
2017-10-10 23:20:05 +02:00
Diego Biurrun
09c98327b9 build: Drop support for Tru64 Unix (OSF/1)
This proprietary Unix flavor dropped from the face of the earth more
than a decade ago. Nothing of value was lost.
2017-10-10 23:17:54 +02:00
Marton Balint
ff6de6b180 Makefile: generate stripped CLI tools directly instead of copying unstripped ones first
Now works with --disable-stripping.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-10 19:45:14 +02:00
James Almer
ab6422e133 configure: rename hevc_ps to hevcparse
Build h2645_parse.o with it, as every hevc_ps dependency also needs it.
This is more in line with h264's h264parse module.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-10 14:03:53 -03:00
James Almer
fde3bb16f9 build: prevent SDL2 from polluting global cflags and extralibs
Remove the SDL_main define from the global cflags but not from the
ffplay cflags, and the -mwindows linker option from extralibs instead
of overriding it with the addition of -mconsole.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-09 21:41:11 -03:00
Carl Eugen Hoyos
c585b4e9f0 configure: Disable -Wbool-operation using check_disable_warning().
Suggested-by: James Almer
2017-10-09 02:21:08 +02:00
Mark Thompson
c154c34c1b Revert "configure: Disable -Wbool-operation."
This reverts commit c2d155e11e.

GCC 6 incorrectly passes the configure test and then logs many warnings
of the form:

src/libavformat/dump.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-bool-operation’
2017-10-09 00:53:51 +01:00
Mark Thompson
9c7a71145b configure: Add config option for libva2 (VAAPI 1) 2017-10-09 00:11:53 +01:00
James Almer
65c3a32836 configure: disable libxcb dependent features if libxcb is not enabled
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-08 18:46:25 -03:00
Carl Eugen Hoyos
c2d155e11e configure: Disable -Wbool-operation.
Requested-by: Ronald and Derek
2017-10-08 23:08:09 +02:00
Michael Bradshaw
41d6d62702 lavc: add support for OpenJPEG 2.3.0
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2017-10-08 08:13:02 -07:00
James Almer
ede233a278 configure: fix detecting libdl when dlsym requires extra linker flags
Regression since 84b3f53aca.
2017-10-04 18:55:32 -03:00
James Almer
ebfcce16ac configure: Use test_pkg_config() for the SDL check
Removes the extra code to preserve global CFLAGS.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-10-04 19:12:36 +02:00
James Almer
d66fe7ff53 configure: Add test_pkg_config()
This helper is split off check_pkg_config(), setting only the pkg CFLAGS
and extralibs. This is useful for checks that do not require or do not
benefit from setting global CFLAGS.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-10-04 19:12:26 +02:00
Clément Bœsch
8be3fc88d3 build: make h264 VT encoder select the VT encoder dependency
Otherwise, it's never enabled unless the user explicitely enables it.

Regression since 9ef5a2f5f3.

Fixes Ticket #6702.
2017-10-04 11:24:09 +02:00
James Almer
84b3f53aca Merge commit 'd154bdd3d053128c908a994bb26e14bbc17f0e53'
* commit 'd154bdd3d053128c908a994bb26e14bbc17f0e53':
  configure: Simplify dlopen check

Merged-by: James Almer <jamrial@gmail.com>
2017-10-04 01:05:56 -03:00
James Almer
54ce880a46 Partially revert "Merge commit '71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5'"
Revert back to the test as done by commit af7a75cb51,
where it was changed to compile and not just preprocess to fix build failures on
FreeBSD with gcc 4.7

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-01 12:59:37 -03:00
James Almer
e16ea52ed3 configure: fix enabling SDL2 without pkg-config
Regression since d81b34069e.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-28 21:34:38 -03:00
Aman Gupta
3d4f8b9184 avcodec/videotoolbox: add hevc support
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-09-28 16:47:47 -07:00
James Almer
d81b34069e Merge commit '7208e5b5d638d4b9c2784036b4fc5728f32233c7'
* commit '7208e5b5d638d4b9c2784036b4fc5728f32233c7':
  configure: Restructure the way check_pkg_config() operates

Merged-by: James Almer <jamrial@gmail.com>
2017-09-28 18:36:27 -03:00
James Almer
00a61f30a0 Merge commit '54e39b102e29adcc2f59f1eca85be5f86c89454b'
* commit '54e39b102e29adcc2f59f1eca85be5f86c89454b':
  configure: Explicitly spell out first require_pkg_config() parameter

Merged-by: James Almer <jamrial@gmail.com>
2017-09-28 13:46:31 -03:00
James Almer
47d6b02f6c Merge commit 'd00a0d8e84fef1b9124bfaf71cc17df79ca464a6'
* commit 'd00a0d8e84fef1b9124bfaf71cc17df79ca464a6':
  configure: Handle SDL version check through pkg-config

Merged-by: James Almer <jamrial@gmail.com>
2017-09-28 01:04:46 -03:00
James Almer
57db1faf7a Merge commit 'c546147db07d16a76c2fb698d2e8a3057f393475'
* commit 'c546147db07d16a76c2fb698d2e8a3057f393475':
  configure: Correctly recurse in do_check_deps()

See 7659f35638.

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 19:08:19 -03:00
James Almer
7659f35638 Merge commit 'dad7a9c7c0ae8ebc56f2e3a24e6fa4da5c2cd491'
* commit 'dad7a9c7c0ae8ebc56f2e3a24e6fa4da5c2cd491':
  configure: Rework dependency handling for conflicting components

Includes an important fix made by c546147db0
as well.

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 19:00:50 -03:00
Lionel CHAZALLON
f3aefb3e1c lavc: Add support for RockChip Media Process Platform
This adds hardware decoding for H.264 / HEVC / VP8 / VP9 using the MPP
Rockchip API.  It returns frames holding an AVDRMFrameDescriptor struct
in buf[0] that allows drm / dmabuf usage.  Tested on RK3288 (TinkerBoard)
and RK3328.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-09-27 22:43:58 +01:00
James Almer
d1256750e8 Merge commit '9127ac5ebc941d5e54828a91e5072c876be8ec42'
* commit '9127ac5ebc941d5e54828a91e5072c876be8ec42':
  configure: Add name parameter to require_pkg_config() helper function

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 16:45:32 -03:00
James Almer
55cc0bccf3 Revert "Merge commit 'a97563c889fefd81ad6b3758471434d8c2e2e550'"
This reverts commit 1985071e41, reversing
changes made to a901869c19.

We autodetect libxcb, so this is not necessary.
2017-09-27 15:01:58 -03:00
Josh de Kock
56d2154b72
lavd: remove deprecated dv1394 device
Support for this device has been removed in 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: wm4 <nfxjfg@googlemail.com>
2017-09-27 17:04:56 +01:00
James Almer
e00e8639b2 Merge commit '71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5'
* commit '71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5':
  configure: Use cppflags check helper functions where appropriate

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 12:23:50 -03:00
James Almer
407a7547da Merge commit '0ce3761c781f2c2de40a5a8a99563878804f47cc'
* commit '0ce3761c781f2c2de40a5a8a99563878804f47cc':
  configure: Add stdlib.h #include to CPPFLAGS check helper functions

Merged-by: James Almer <jamrial@gmail.com>
2017-09-27 12:14:52 -03:00
James Almer
8f2ab18063 Revert "Merge commit '66988320794a107f2a460eaa71dbd9fab8056842'"
This reverts commit 740e557d6e, reversing
changes made to 932e28b13e.

The commit apparently broke builds with shared libs, and "suggesting"
the use of external libraries that need to be explicitly enable has
dubious usefulness anyway.
2017-09-26 19:09:57 -03:00
James Almer
c83c164f05 Merge commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c'
* commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c':
  configure: Add require_cpp_condition() convenience function

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 18:05:30 -03:00
James Almer
14194090a6 Merge commit 'aba7fdcc8baaed35e804c7882b70a848a0e566c7'
* commit 'aba7fdcc8baaed35e804c7882b70a848a0e566c7':
  configure: Add require_header() convenience function

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 17:29:57 -03:00
James Almer
1985071e41 Merge commit 'a97563c889fefd81ad6b3758471434d8c2e2e550'
* commit 'a97563c889fefd81ad6b3758471434d8c2e2e550':
  configure: Simplify libxcb check

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 17:23:16 -03:00
James Almer
740e557d6e Merge commit '66988320794a107f2a460eaa71dbd9fab8056842'
* commit '66988320794a107f2a460eaa71dbd9fab8056842':
  configure: Add proper weak dependency of drawtext filter on libfontconfig

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 17:08:29 -03:00
James Almer
932e28b13e Merge commit '24d5680bbc01fc124709d522d348572ad4672563'
* commit '24d5680bbc01fc124709d522d348572ad4672563':
  configure: Simplify inline asm check with appropriate helper function

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 17:01:21 -03:00
James Almer
f944576028 Merge commit 'b3825723dceffc64240da7b0e562bd1fd024da26'
* commit 'b3825723dceffc64240da7b0e562bd1fd024da26':
  configure: Merge compiler/libc/os hacks sections

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 16:49:59 -03:00
James Almer
318778de9e Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'
* commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3':
  Mark some arrays that never change as const.

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 16:02:40 -03:00
James Almer
7289c7658a Merge commit 'ab87af41636b081dd3562423999351b5444fa09e'
* commit 'ab87af41636b081dd3562423999351b5444fa09e':
  configure: Add proper weak dependency of avformat on network

Merged-by: James Almer <jamrial@gmail.com>
2017-09-26 15:03:21 -03:00
Jorge Ramirez-Ortiz
1ef7752d64 libavcodec: v4l2: add support for v4l2 mem2mem codecs
This patchset enhances Alexis Ballier's original patch and validates
    it using Qualcomm's Venus hardware (driver recently landed upstream
    [1]).

    This has been tested on Qualcomm's DragonBoard 410c and 820c
    Configure/make scripts have been validated on Ubuntu 10.04 and
    16.04.

    Tested decoders:
           - h264
           - h263
           - mpeg4
           - vp8
           - vp9
           - hevc

    Tested encoders:
           - h264
           - h263
           - mpeg4

    Tested transcoding (concurrent encoding/decoding)

    Some of the changes introduced:
        - v4l2: code cleanup and abstractions added
        - v4l2: follow the new encode/decode api.
        - v4l2: fix display size for NV12 output pool.
        - v4l2: handle EOS (EPIPE and draining)
        - v4l2: vp8 and mpeg4 decoding and encoding.
        - v4l2: hevc and vp9 support.
        - v4l2: generate EOF on dequeue errors.
        - v4l2: h264_mp4toannexb filtering.
        - v4l2: fixed make install and fate issues.
        - v4l2: codecs enabled/disabled depending on pixfmt defined
        - v4l2: pass timebase/framerate to the context
        - v4l2: runtime decoder reconfiguration.
        - v4l2: add more frame information
        - v4l2: free hardware resources on last reference being released
        - v4l2: encoding: disable b-frames for upstreaming (patch required)

    [1] https://lwn.net/Articles/697956/

    System Level view:
        v42l_m2m_enc/dec --> v4l2_m2m --> v4l2_context --> v4l2_buffers

    Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
    Reviewed-by: Alexis Ballier <aballier@gentoo.org>
    Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-09-23 08:47:52 +02:00
Yogender Gupta
21e077fcb3 avfilter/thumbnail_cuda: add cuda thumbnail filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-22 11:54:35 +02:00
Huang, Zhengxu
a5a6ac1a12 libavfilter/overlay_qsv: Add QSV overlay vpp filter
The filter supports two inputs and (implicitly) scaling the second input
during composition, unlike the software overlay.

The code has been separated into common interface and qsv overlay
implementation. The common part mainly creates the qsv session and
manages the surface which is nearly the same for all qsv filters.
So the qsvvpp.c/qsvvpp.h API can be used by other QSV vpp filters
to reduce code redundancy.

Usage:
 -hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv
 -i in.h264 -filter_complex
 "overlay_qsv=eof_action=repeat:x=(W-w)/2:y=(H-h)/2"  -b 2M -maxrate 3M
 -c:v h264_qsv -y out.h264

Two inputs should have different sizes otherwise one will be completely
covered or you need to scale the second input as follows:
  -hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv
  -i in.h264 -filter_complex
  "overlay_qsv=w=720:h=576:x=(W-w)/2:y=(H-h)/2" -b 2M -maxrate 3M -c:v
  h264_qsv -y out.h264

  Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
  Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
  Signed-off-by: Andrew Zhang <huazh407@gmail.com>
  Change-Id: I5c381febb0af6e2f9622c54ba00490ab99d48297
  Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2017-09-17 19:59:06 +02:00
Huang, Zhengxu
8d3666c425 libavfilter/vf_vpp: Add common filters of the qsv vpp
Add common filters of the qsv vpp features including scale,denosie,
deinterlace,frc,crop and procAmp.

Performance will be significantly reduced in the test if using cascade
mode just like qsv framerate + qsv scale + qsv deinterlace + qsv denoise in
separated way no matter in system or video memmory cases.
And the code is so redundant because so much the same just as session and
surface's creation and management.
So we add a common qsv filter.

Usage:
-hwaccel qsv -c:v h264_qsv -r 25 -i in -vf
vpp_qsv=w=iw/2:h=400:deinterlace=1:framerate=60:detail=50:denoise=50
-b 2M -maxrate 3M -c:v h264_qsv -y out.h264

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com>
Change-Id: I130392ce722138c209ab658c5f03f0009b6e8024
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2017-09-17 19:57:13 +02:00
Clément Bœsch
1a08285f05 build: fix coreimage filters dependency to AppKit framework
AppKit is not present on iOS.
2017-09-15 15:01:32 +02:00
Mark Thompson
52194f0bcb lavd: Add KMS screen grabber 2017-09-13 22:31:05 +01:00
Mark Thompson
9cb23cd9fe lavu: Add DRM hwcontext 2017-09-13 22:03:27 +01:00
James Almer
4d390344ec configure: check if NAN can be used as a constant initializer
Some targets, like NetBSD and DJGPP, don't seem to support it.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-13 15:38:10 -03:00
Mark Thompson
10eb496d9a vaapi_mpeg2: Convert to use coded bitstream infrastructure 2017-09-12 22:12:00 +01:00
Steven Liu
96d70694ae avformat/dashdec: add dash demuxer base version
ffmpeg need a dash demuxer for demux the dash formats base on
https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/000001_add_dash_demux.patch

TODO:
1. support multi bitrate dash.

v2 fixed:
1. from autodetect to disabled
2. from camelCase code style to ffmpeg code style
3. from RepType to AVMediaType
4. fix variable typo
5. change time value from uint32_t to uint64_t
6. removed be used once API
7. change 'time(NULL)`, except it is not 2038-safe.' to av_gettime and av_timegm
8. merge complex free operation to free_fragment
9. use API from snprintf to av_asprintf

v3 fixed:
1. fix typo from --enabled-xml2 to --enable-xml2

v4 fixed:
1. from --enable-xml2 to --enable-libxml2
2. move system includes to top
3. remove nouse includes
4. rename enum name
5. add a trailing comma for the last entry enum
6. fix comment typo
7. add const to DASHContext class front
8. check sscanf if return arguments and give warning message when error
9. check validity before free seg->url and seg
10. check if the val is null, before use atoll

v5 fixed:
1. fix typo from mainifest to manifest

v6 fixed:
1. from realloc to av_realloc
2. from free to av_free

v7 fixed:
1. remove the -lxml2 from configure when require_pkg_config

v8 fixed:
1. fix replace filename template by av_asprintf secure problem

v9 modified:
1. make manifest parser clearly

v10 fixed:
1. fix function API name code style
2. remove redundant strreplace call
3. remove redundant memory operation and check return value from get_content_url()
4. add space between ) and {
5. remove no need to log the value for print

v11 fixed:
1. from atoll to strtoll
Suggested-by: Michael Niedermayer <michael@niedermayer.cc>

v12 fixed:
1. remove strreplace and instead by av_strreplace
Suggested-by: Nicolas George <george@nsup.org>

v13 fixed:
1. fix bug: cannot play:
http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd
Reported-by: Andy Furniss <adf.lists@gmail.com>

v14 fixed:
1. fix bug: TLS connection was non-properly terminated
2. fix bug: No trailing CRLF found in HTTP header
Reported-by: Andy Furniss <adf.lists@gmail.com>

v15 fixed:
1. play youtube link: ffmpeg -i $(youtube-dl -J "https://www.youtube.com/watch?v=XmL19DOP_Ls" | jq -r ".requested_formats[0].manifest_url")
2. code refine for timeline living stream
Reported-by: Ricardo Constantino <wiiaboo@gmail.com>

v16 fixed:
1. remove the snprintf and instead by get_segment_filename make safety
2. remove unnecessary loops
3. updated xmlStrcmp and xmlFree to av_* functions
4. merge code repeat into one function
5. add memory alloc faild check
6. update update_init_section and open_url
7. output safety error message when filename template not safe
Suggested-by : wm4 <nfxjfg@googlemail.com>

v17 fixed:
1. add memory alloc faild check
2. fix resource space error at free_representation

v18 fixed:
1. add condition of template format

v19 fixed:
1. fix typo of the option describe

v20 fixed:
1. add the c->base_url alloc check
2. make the DASHTmplId same to dashenc

v21 fixed:
1. remove get_repl_pattern_and_format and get_segment_filename
2. process use dashcomm APIs

v22 fixed:
1. modify the include "dashcomm.h" to include "dash.h"
2. use internal API from dash_fill_tmpl_params to ff_dash_fill_tmpl_params

Signed-off-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: samsamsam <samsamsam@o2.pl>
2017-09-09 08:32:03 +08:00
Clément Bœsch
260ea7a7b3 build: cleanup videotoolbox
- there is no need for kCVImageBufferColorPrimaries_ITU_R_2020 checks,
  it's done at runtime
- VideoToolbox presence is now checked with check_apple_framework()
- link to CoreServices is only done when videotoolbox is enabled
2017-09-08 18:55:19 +02:00
Clément Bœsch
1cf23e3fdd build: cleanup audiotoolbox handling
*_at codecs only need the AudioToolbox framework, which is now checked
like the other Apple frameworks.
2017-09-08 18:55:19 +02:00
Clément Bœsch
496d0178b0 build: add --disable-coreimage autodetect switch 2017-09-08 18:55:19 +02:00
Clément Bœsch
97d8013582 build: add --disable-avfoundation autodetect switch 2017-09-08 18:55:19 +02:00
Clément Bœsch
b6dce64a8e build: add check_apple_framework()
This will be used in the following commits.
2017-09-08 18:55:19 +02:00
Clément Bœsch
f8519529cf lavfi/coreimage: reduce dependency scope from QuartzCore to CoreImage
What is required by the filter is CoreImage, there is no QuartzCore
usage. QuartzCore/CoreImage.h is simply an include to
CoreImage/CoreImage.h.
2017-09-08 18:55:19 +02:00
Clément Bœsch
b476e7720c build: fix objcc header check
$headers is a variable set in the context of other functions (we don't
use the "local" keyword in our scripts, so those variables are global).

Currently, when checking for AVFoundation/AVFoundation.h, the actual
enabled header is math.h.

Similarly, when testing for QuartzCore/CoreImage.h, the actual enabled
header is CoreGraphics/CoreGraphics.h.

This is completely broken and may be the reason why these checks are
made in random places.
2017-09-08 18:55:19 +02:00
Clément Bœsch
e0d56f097f checkasm: use perf API on Linux ARM*
On ARM platforms, accessing the PMU registers requires special user
access permissions. Since there is no other way to get accurate timers,
the current implementation of timers in FFmpeg rely on these registers.
Unfortunately, enabling user access to these registers on Linux is not
trivial, and generally involve compiling a random and unreliable github
kernel module, or patching somehow your kernel.

Such module is very unlikely to reach the upstream anytime soon. Quoting
Robin Murphin from ARM:

> Say you do give userspace direct access to the PMU; now run two or more
> programs at once that believe they can use the counters for their own
> "minimal-overhead" profiling. Have fun interpreting those results...
>
> And that's not even getting into the implications of scheduling across
> different CPUs, CPUidle, etc. where the PMU state is completely beyond
> userspace's control. In general, the plan to provide userspace with
> something which might happen to just about work in a few corner cases,
> but is meaningless, misleading or downright broken in all others, is to
> never do so.

As a result, the alternative is to use the Performance Monitoring Linux
API which makes use of these registers internally (assuming the PMU of
your ARM board is supported in the kernel, which is definitely not a
given...).

While the Linux API is obviously cross platform, it does have a
significant overhead which needs to be taken into account. As a result,
that mode is only weakly enabled on ARM platforms exclusively.

Note on the non flexibility of the implementation: the timers (native
FFmpeg vs Linux API) are selected at compilation time to prevent the
need of function calls, which would result in a negative impact on the
cycle counters.
2017-09-08 18:51:05 +02:00
Clément Bœsch
516ac7bcc7 build: consistent spacing between lists (cosmetics) 2017-09-05 12:45:25 +02:00
Clément Bœsch
ca7dc3ee90 lavd: drop QTKit indev
QTKit has been deprecated in favor of AVFoundation for years, and we
have an avfoundation input device.

See https://developer.apple.com/documentation/qtkit
2017-09-04 17:19:58 +02:00
Clément Bœsch
b4b1285fa1 lavd: drop disabled v4l code
This code is disabled since 2012. V4L1 was dropped from the kernel more
than 10 years ago.
2017-09-03 09:55:30 +02:00
Clément Bœsch
69e6877de8 build: drop unused sndio_h and asoundlib_h 2017-09-02 16:14:15 +02:00
Clément Bœsch
e090e750ba build: make sndio part of the autodetected libraries
sndio is already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-sndio is
specified.
2017-09-02 16:14:15 +02:00
Clément Bœsch
b7fbb3516a build: make jack part of the autodetected libraries
jack is already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-jack is
specified.
2017-09-02 16:14:15 +02:00
Clément Bœsch
b447629093 build: make alsa part of the autodetected libraries
alsa libs are already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-alsa is
specified.
2017-09-02 16:14:15 +02:00
Clément Bœsch
fe9c85e4e2 build: make sure a disabled autodetect still pick the libc's iconv 2017-09-02 16:14:15 +02:00
Clément Bœsch
e3c1219c7c build: add --disable-autodetect switch 2017-09-02 16:14:15 +02:00
Clément Bœsch
9ef5a2f5f3 build: simplify weak-enabling of autodetected libraries 2017-09-02 16:14:15 +02:00
Clément Bœsch
7e98c3cbb3 build: remove vda_framework from enable_weak
vda_framework is already pulled by the weakly enabled vda and
videotoolbox.
2017-09-02 16:14:15 +02:00
Clément Bœsch
353c2e384c build: replace use of HAVE_SDL2 with existing CONFIG_SDL2
There is no need for duplication.
2017-09-02 16:14:15 +02:00
Clément Bœsch
b802971d6d build: treat sdl2 like other autodetected libraries 2017-09-02 16:14:15 +02:00
Clément Bœsch
778fa6350e build: isolate sdl-to-sdl2 aliasing
This simplifies incoming SDL related changes by removing potential
mismatching states of sdl and sdl2 variables. Since a component can have
all kind of states (such as unset, enabled, disabled or requested),
keeping these variables in sync manually in random places is not robust.
2017-09-02 16:14:15 +02:00
Clément Bœsch
72655616d9 build: treat securetransport and schannel like other autodetected libraries 2017-09-02 16:14:15 +02:00
Clément Bœsch
1c08ff08ad build: treat libxcb like other autodetected libraries 2017-09-02 16:14:15 +02:00
Clément Bœsch
c9075d2c65 build: treat iconv like other autodetected libraries 2017-09-02 16:14:15 +02:00
Clément Bœsch
55fdfc88b8 build: treat crystalhd like other hwaccels 2017-09-02 16:14:15 +02:00
Clément Bœsch
e70e2a7abd build: group z libs with other autodetected libraries 2017-09-02 16:14:15 +02:00
Martin Storsjö
accb06120c configure: Use dllexport/dllimport for data symbols across DLLs with mingw
This avoids having to use pseudo relocations.

The version script used for exporting functions is skipped as soon
as the set of object files contains symbols marked with dllexport,
therefore we need to use makedef to produce the full list of symbols
to be exported.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-31 14:22:22 +03:00
Martin Storsjö
e41daa6246 Remove support for building for mingw32ce (Windows CE)
The toolchain for this target is unmaintained since many years.

While it has been continuously build tested on fate, it hasn't
actually been tested at runtime since many, many years (and back
then, only a few codecs in libavcodec were tested).

So far, keeping support for it has been mostly effortless, but
the compiler does seem to have issues with dllimported data symbols,
ending up as internal compiler errors in some cases. Instead of
jumping through further hoops to work around that, just remove the
target.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-31 14:21:08 +03:00
Ashish Singh
1dc33c1237 configure: require pkg-config for libvmaf
This patch makes the libvmaf filter use pkg-config to detect
and link to libvmaf.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-08-30 09:19:16 -04:00
Timo Rothenpieler
1ac03c8dc0 configure: add support for libnpp* from cuda sdk 9
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-08-30 11:03:18 +02:00
Maksym Veremeyenko
2634927fe3 lavd: implement NewTek NDI input/output device support
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-27 18:07:50 +02:00
Martin Vignali
435dd2ee4e configure: add avx2 enabled log
Signed-off-by: James Almer <jamrial@gmail.com>
2017-08-26 20:00:30 -03:00
Martin Storsjö
29ba1e6076 configure: Include d3d11va_extralibs in libavutil
This fixes shared WinRT/UWP builds with d3d11va enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-25 09:22:42 +03:00
Mark Thompson
b78c30d7ec lavc: Add mpeg2_metadata bitstream filter 2017-08-20 15:14:33 +01:00
Mark Thompson
2bc9ba8d3c lavc: Add coded bitstream read/write support for MPEG-2
Also enable MPEG-2 support in the trace_headers filter.
2017-08-20 13:59:17 +01:00
Mark Thompson
ac12486714 vaapi_h265: Convert to use coded bitstream infrastructure
Also improves the metadata and generally makes the configuration
a bit cleaner.
2017-08-13 17:55:02 +01:00
Mark Thompson
7a4fac5e91 vaapi_h264: Convert to use coded bitstream infrastructure 2017-08-13 17:55:02 +01:00
Mark Thompson
b31a9eae02 lavc: Add hevc_metadata bitstream filter
This is able to modify some header metadata found in the VPS/SPS/VUI,
and can also add/remove AUDs.
2017-08-13 17:55:02 +01:00
Mark Thompson
e6874bc3af lavc: Add h264_redundant_pps bitstream filter
This applies a specific fixup to some Bluray 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.
2017-08-13 17:54:59 +01:00
Mark Thompson
9e93001b61 lavc: Add h264_metadata bitstream filter
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.
2017-08-13 17:48:49 +01:00
Mark Thompson
f11d8a5e8b lavc: Add trace_headers bitstream filter
Supports all streams that the coded bitstream infrastructure does
(currently H.264 and H.265).
2017-08-12 22:17:20 +01:00
Mark Thompson
867381b8b5 lavc: Add coded bitstream read/write support for H.265 2017-08-12 22:17:20 +01:00
Mark Thompson
acf06f4544 lavc: Add coded bitstream read/write support for H.264 2017-08-12 22:17:20 +01:00
Mark Thompson
18f1706f33 lavc: Add coded bitstream read/write API 2017-08-12 22:17:20 +01:00
Martin Storsjö
9042402ec7 d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
If using the winstore compat library, a fallback LoadLibrary
function does exist, that only calls LoadPackagedLibrary though
(which doesn't work for dynamically loading d3d11 DLLs).

Therefore explicitly check the targeted API family instead.

Make this check a reusable HAVE_* component which other parts
of the libraries can check when necessary as well.

Signed-off-by: Martin Storsjö <martin@martin.st>

Merged from Libav commit 4d330da006.
2017-08-10 11:58:25 +02:00
Jun Zhao
1e0c75ea16 examples/hw_decode: Add a HWAccel decoding example.
Works with VAAPI, VDPAU, DXVA2 and D3D11VA.

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-07-30 00:15:05 +01:00
Anton Khirnov
b90fdb2c71 hevcdec: add a CUVID hwaccel 2017-07-28 14:12:56 +02:00
Anton Khirnov
b9129ec466 h264dec: add a CUVID hwaccel
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
2017-07-26 23:24:34 +02:00
Huang, Zhengxu
2fd6e7d077 libavcodec/mjpeg_qsv: Add QSV MJPEG encoder
usage:
-hwaccel qsv -c:v h264_qsv -i in -c:v mjpeg_qsv -global_quality 80 -f
mjpeg out

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2017-07-25 13:27:43 +02:00
foo86
930fe4b1f7 avcodec: add Dolby E decoder 2017-07-19 12:27:32 +02:00
Matt Oliver
d8f1982639 configure: Fix libvmaf name
Fixes:
    fatal error: libvmaf.h: No such file or directory.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-16 16:12:25 +01:00
Ashish Singh
615479d51c avfilter: add LIBVMAF filter
This one changes the previous vmaf patch to libvmaf to keep it separate from the
native implementation of vmaf inside ffmpeg later.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-07-16 08:21:32 -04:00
Ricardo Constantino
0bf857a13f configure: use pkg-config for libgme, if available
The pkg-config file is relatively new (2013), so some distros might
not have it yet. And the -lstdc++ being required for the static lib
is only present since the last release in December 2016.
2017-07-13 14:06:07 +02:00
Ricardo Constantino
3b3501f75c configure: require pkg-config for libvorbis
libvorbis comes with pkg-config files since at least v1.0.1, way back in 2003.

We need the two checks for vorbis and vorbisenc because we use functions from
both and Xiph considers them separate libraries.

The check is inverted (vorbis first then vorbisenc) because add_extralibs()
prepends to EXTRALIBS instead of appending. For both shared and static linking
the order didn't seem to matter anyway, testing with MinGW.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-06 15:39:10 -04:00
Martin Storsjö
1912973a2d d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
If using the winstore compat library, a fallback LoadLibrary
function does exist, that only calls LoadPackagedLibrary though
(which doesn't work for dynamically loading d3d11 DLLs).

Therefore explicitly check the targeted API family instead.

Make this check a reusable HAVE_* component which other parts
of the libraries can check when necessary as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-07-05 13:55:11 +03:00
wm4
289d387330 hwcontext_d3d11va: add option to enable debug mode
Basically copied from VLC (LGPL):

http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/win32/direct3d11.c;h=e9fcb83dcabfe778f26e63d19f218caf06a7c3ae;hb=HEAD#l1482
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/codec/avcodec/d3d11va.c;h=85e7d25caebc059a9770da2ef4bb8fe90816d76d;hb=HEAD#l599

Merges Libav commit cfc9e7c94e.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-06-27 18:05:02 +02:00
Martin Storsjö
3125a4a8a8 d3d11va: Link directly to dxgi.dll and d3d11.dll functions if LoadLibrary is unavailable
When targeting the UWP API subset, the LoadLibrary function is not
available (and the fallback, LoadPackagedLibrary, can't be used to
load system DLLs). In these cases, link directly to the functions
in the DLLs instead of trying to load them dynamically at runtime.

Merges Libav commit fd1ffa1f10.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-27 18:05:02 +02:00
wm4
70143a3954 dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new
hwaccel API being generic enough).

The new decoder setup code in dxva2.c is significantly based on work by
Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.

Merges Libav commit f9e7a2f95a.
Also adds untested VP9 support.
The check for DXVA2 COBJs is removed. Just update your MinGW to
something newer than a 5 year old release.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-06-27 18:05:02 +02:00
wm4
cfc9e7c94e hwcontext_d3d11va: add option to enable debug mode
Basically copied from VLC (LGPL):

http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/win32/direct3d11.c;h=e9fcb83dcabfe778f26e63d19f218caf06a7c3ae;hb=HEAD#l1482
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/codec/avcodec/d3d11va.c;h=85e7d25caebc059a9770da2ef4bb8fe90816d76d;hb=HEAD#l599

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-06-27 00:23:12 +02:00
Diego Biurrun
0e83e95c60 configure: Reset X86ASM_DEP(FLAGS) when probing for the assembler program
These variables might be set from a previous probe run, but one or the
other program that is probed for may not grok the flags, resulting in
errors during assembling when the values of those variables are passed
to the assembler.
2017-06-24 21:30:42 +02:00
Mark Thompson
bde0460406 vaapi_encode: Add VP9 support
(cherry picked from commit 0fd91e4bfc)
2017-06-24 17:41:55 +01:00
Reino17
078322f33c Add support for LibOpenJPEG v2.2/git
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2017-06-23 20:29:23 -07:00
James Almer
f66086adac configure: fix assignment of assembler specific flags
If the first assembler to be probed is an old nasm build, X86ASM_DEPFLAGS
will be set and remain so after yasm is ultimately used as fallback.
This results in yasm being called with said nasm specific flags and failing
during actual object assembly but not with configure sanity checks.

Regression since 5cae5a1def

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-23 17:55:14 -03:00
Janne Grunau
857e26b655 build: Add an option for passing linker flags to the shared library build
Also employ this mechanism to pass $libdir to the runtime library search
path if rpath is enabled. This fixes underlinking of some test binaries
on some systems.
2017-06-22 13:54:34 +02:00
Diego Biurrun
5cae5a1def configure: Move x86 assembler sanity check into assembler probe function
This allows for more graceful fallback from NASM to Yasm if the available
NASM version is too old.

(Cherry-picked from libav commit adfd7892e3)
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:31 -03:00
Diego Biurrun
4f9297ac3b build: Prefer NASM assembler over YASM
NASM is more actively maintained and permits generating dependency information
as a sideeffect of assembling, thus cutting build times in half.

(Cherry-picked from libav commit 57b753b445)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:30 -03:00
James Almer
3cc73d3d6d build: fix commandline selection of nasm
"nasm --version" works on nasm since around version 2.11 and as
such configure assumed it was yasm.

Based on libav commit f54037da8a by
Diego Biurrun.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:30 -03:00
Diego Biurrun
d44935cbf4 build: Explicitly set 32-bit/64-bit object formats for nasm/yasm
Consistently use object format names with "32" suffix and set object format
to "win64" on Windows x86_64, which fixes assembling with nasm.

(Cherry-picked from libav commit 808ef43597)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:30 -03:00
Diego Biurrun
0cc0c5b6db build: Allow generating dependencies as a side-effect of assembling
(Cherry-picked from libav commit 3c0efbd033)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:29 -03:00
Diego Biurrun
fd502f4f5f build: Generalize yasm/nasm-related variable names
None of them are specific to the YASM assembler.

(Cherry-picked from libav commit 39e208f4d4)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:29 -03:00
Martin Storsjö
333a34da3a configure: Automatically add -isysroot for darwin if --sysroot is specified
Check the existing flags in the cc/cflags/cppflags/ldflags for
occurrances of -isysroot; if none is found but --sysroot was specified,
set -isysroot to the same value as --sysroot.

This simplifies configuring cross-builds for iOS, if the global
environment variable SDKROOT isn't set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-21 22:32:52 +03:00
Luca Barbato
19bf50406e configure: Move up the avbuild directory creation
The early check for inconsistent in-source vs out-of-source build
cannot generate a config.log otherwise.

(Cherry-picked from libav commit 0ee78020cd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-20 20:40:52 -03:00
Diego Biurrun
155f071bad build: Add missing idctdsp dependency for clearvideo
(cherry picked from commit 2f792cb670)
2017-06-20 11:56:36 +02:00
Martin Storsjö
fd1ffa1f10 d3d11va: Link directly to dxgi.dll and d3d11.dll functions if LoadLibrary is unavailable
When targeting the UWP API subset, the LoadLibrary function is not
available (and the fallback, LoadPackagedLibrary, can't be used to
load system DLLs). In these cases, link directly to the functions
in the DLLs instead of trying to load them dynamically at runtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-18 23:45:03 +03:00
Diego Biurrun
7b1f9873be build: Adjust dependencies for faan(i)dct components 2017-06-17 19:12:27 +02:00
Diego Biurrun
635897ac78 configure: Factorize qsv dependencies 2017-06-17 19:12:27 +02:00
Diego Biurrun
c599c43fa1 configure: Add missing arch dependencies for arch extensions 2017-06-17 19:12:27 +02:00
Diego Biurrun
d9da7151ee configure: Fix handling of _select dependencies
The handling of _select dependencies had two issues:

1) extralibs from _select dependencies of a component were not added to
   the list of extralibs for that component.
2) extralibs from dependencies were only added to the extralibs of a
   component if the component was enabled. This led to incorrect results
   if that component was enabled by another component later in the dependency
   resolution process. Instead, always generate the full list of component
   extralibs for use later in the dependency resolution process.

Also remove a leftover unused variable.
2017-06-17 19:12:27 +02:00
Diego Biurrun
9d12dd6fa8 configure: Add x86 dependency for mmx_internal
This ensures that mmx_internal is only ever enabled on x86.
2017-06-17 19:12:26 +02:00
Diego Biurrun
2f792cb670 build: Add missing idctdsp dependency for clearvideo 2017-06-17 19:12:26 +02:00
Rostislav Pehlivanov
18f09524f7 configure: use -x instead of -wN ..@ to strip assembly files
Reduces the amount of debugging information of external asm from
uselessly verbose to informative enough.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Reviewed-by: James Darnley <james.darnley@gmail.com>
2017-06-16 15:25:31 +01:00
Diego Biurrun
e2edf1529c configure: Simplify AltiVec/VSX check with a helper function 2017-06-13 12:34:35 +02:00
Diego Biurrun
d76479c502 ppc: Drop support for Apple GCC
Apple GCC has not been a thing anymore on PowerPC since many years.
2017-06-13 12:34:35 +02:00
Paul B Mahol
2336c76b22 avfilter/af_sofalizer: switch to libmysofa
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-08 22:02:26 +02:00
wm4
f9e7a2f95a dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new
hwaccel API being generic enough).

The new decoder setup code in dxva2.c is significantly based on work by
Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-06-08 21:20:18 +02:00
Aman Gupta
a32a6b4201 lavc: add mpeg2 mediacodec decoder
Android TV and FireOS hardware supports mpeg2 hardware decoding via
MediaCodec.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-06-08 19:16:09 +02:00
Diego Biurrun
ed434be106 configure: Bail out if both GnuTLS and OpenSSL are enabled
Both libraries provide similar functionality and cannot be used together.
When both are enabled one is used and the other ignored arbitrarily. Error
out instead and have the user choose which library to use.
2017-06-06 14:47:42 +02:00
Diego Biurrun
adfd7892e3 configure: Move x86 assembler sanity check into assembler probe function
This allows for more graceful fallback from NASM to Yasm if the available
NASM version is too old.
2017-06-03 19:34:08 +02:00
Diego Biurrun
5e27ef800b build: Add missing zlib dependencies for several protocols 2017-06-03 19:34:08 +02:00
Shivraj Patil
6f35c21659 Disable MSA optimization for big endian arch
The current upstreamed code has been written and tested for Little Endian systems.
We do have plans to add the Big Endian support in near future, but till that time, need to disable all to avoid its usage and failures.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-03 00:09:58 +02:00
Diego Biurrun
61cec5adaa tls: Hide backend implementation details from users
TLS is currently implemented over either OpenSSL or GnuTLS, with more
backends likely to appear in the future. Currently, those backend libraries
are part of the protocol names used during e.g. the configure stage of a
build. Hide those details behind a generically-named declaration for the
TLS protocol to avoid leaking those details into the configuration stage.
2017-06-02 10:41:52 +02:00
Martin Storsjö
4d444d04c1 configure: Default to _WIN32_WINNT=0x0502 (XP) as minimum, for legacy mingw
This makes the getaddrinfo functions visible, which aren't normally
by default on legacy mingw.

We already force __MSVCRT_VERSION__ to an XP version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-01 13:29:51 +03:00
Timo Rothenpieler
2d978d1c72 configure: libnpp does not need to link libcuda 2017-06-01 11:36:13 +02:00
Martin Storsjö
47c43ce36f configure: Fix the msvcrt version check for mingw32
This was actually broken when committed in 46e3936fb04; the
test never succeeded, and thus, _aligned_malloc wasn't actually
used on legacy mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 427f7a1f9e)
2017-05-31 12:57:22 +02:00
Martin Storsjö
427f7a1f9e configure: Fix the msvcrt version check for mingw32
This was actually broken when committed in 46e3936fb04; the
test never succeeded, and thus, _aligned_malloc wasn't actually
used on legacy mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-31 13:30:24 +03:00
Rostislav Pehlivanov
220b24c7c9 lavc: remove libschroedinger encoding and decoding wrappers
The library has stopped being developed and Debian has removed it
from its repositories citing security issues.
The native Dirac decoder supports everything the library has and basic
encoding support is still provided via the native vc2 (Dirac Pro, intra
only version of Dirac) encoder. Hence, there's no reason to still support
linking to the library and potentially leading users into security issues.
2017-05-29 20:15:58 +01:00
Rostislav Pehlivanov
a3deeaade3 lavf: remove the libnut library wrapper
libnut is outdated and not developed anymore, all nut developments
happens in this repo, so users are getting mislead
2017-05-29 20:15:58 +01:00
Luca Barbato
6a7e928555 configure: Do not check for the __builtin_vec_vsx_ld
Clang support for Altivec/VSX uses a different approach.
2017-05-29 13:40:47 +02:00
James Almer
8794cfbbc5 configure: fix --tempprefix option
It was broken in 091c986055
2017-05-20 21:29:58 -03:00
Clément Bœsch
a8ad127a63 Merge commit 'ba6a49e60bdd61b6d02c2b26daa01942c35f39cc'
* commit 'ba6a49e60bdd61b6d02c2b26daa01942c35f39cc':
  configure: Clean up temporary files on interrupt

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-20 16:50:28 +02:00
Clément Bœsch
091c986055 Merge commit '78489822074096e3ae0f3c3b70accace955086f6'
* commit '78489822074096e3ae0f3c3b70accace955086f6':
  configure: Place all temporary files in one separate directory

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-20 16:47:20 +02:00
Clément Bœsch
068d91885f Merge commit '2bbb5abd877104fa9bc342c521bb49bc1aad50ce'
* commit '2bbb5abd877104fa9bc342c521bb49bc1aad50ce':
  build: Map -Wall compiler flag to -W3 for MSVC and -Wextra to -W4

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-20 16:31:37 +02:00
Clément Bœsch
d1da0fc4b9 Merge commit '6151e9128ce2a84a443c82b78f5b5cb364ba2ab4'
* commit '6151e9128ce2a84a443c82b78f5b5cb364ba2ab4':
  build: Detect blocks C language extension and add it as VDA dependency

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-20 16:28:43 +02:00
Clément Bœsch
55b56a8d6a Merge commit 'f96d07f4ec4193fb5293d7ac8f1324aac3c3ea07'
* commit 'f96d07f4ec4193fb5293d7ac8f1324aac3c3ea07':
  configure: Add quotes around a variable which might be empty

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-19 12:01:43 +02:00
Clément Bœsch
2fbeb42df3 Merge commit '9bf262f4c6e14f43f291cdb745ed372884ee2a7f'
* commit '9bf262f4c6e14f43f291cdb745ed372884ee2a7f':
  configure: Use proper compiler-specific speed flags for hostcc

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-19 11:59:35 +02:00
Clément Bœsch
f78f3df7e0 Merge commit 'bf38959a30ecba4e4ee95d4f2a80ba7ece4f34be'
* commit 'bf38959a30ecba4e4ee95d4f2a80ba7ece4f34be':
  configure: Move optflags checks to a more sensible place

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-19 11:54:30 +02:00
Clément Bœsch
42ed79a229 Merge commit '7ff018c1cb43a5fe5ee2049d325cdd785852067a'
* commit '7ff018c1cb43a5fe5ee2049d325cdd785852067a':
  OS/2: Try to commit memory above 1GB

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-19 11:21:41 +02:00
James Almer
3e295e633c build: remove --enable-raise-major configure option
It's not used by anything, has dubious usefulness, the reasons for which
it was introduced are no longer valid, and only serves to add complexity
to the build system.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-17 22:52:59 -03:00
Rostislav Pehlivanov
5fd4cffe32 lavc: add a librsvg rasterization library wrapper
Enables rendering of SVG images. This is possible since SVG images
still contain and specify the dimensions in pixels to which they've
been drawn to and thus enable browsers to display them without any
external data. Users can still override and generate images with
arbitrary resolutions.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-05-16 11:40:44 +01:00
Aman Gupta
376247a102 configure: jni no longer requires -ldl
This dependency was removed in 33d69a9008.
2017-05-16 12:25:13 +02:00
Timo Rothenpieler
f1ab71b046 build: add support for building .cu files via nvcc
Original work by Yogender Gupta <ygupta@nvidia.com>
2017-05-15 11:46:50 +02:00
Timo Rothenpieler
6a3740572d configure: add cuda-sdk for things requiring full CUDA sdk 2017-05-15 11:46:50 +02:00
Martin Storsjö
d7320ca3ed arm: Avoid using .dn register aliases
clang now (in the upcoming 5.0 version) is capable of building our
arm assembly without relying on gas-preprocessor, although clang/LLVM
doesn't support .dn register aliases.

The VC1 MC assembly was only built and used if the chosen assembler
supported the .dn directives though. This was supported as long as
gas-preprocessor was used.

This means that VC1 decoding got a speed regression on clang 5.0,
unless the user manually chose using gas-preprocessor again.

By avoiding using the .dn register aliases, we can build the VC1 MC
assembly with the latest clang version.

Support for the .dn/.qn directives in clang/LLVM isn't actively planned,
see https://bugs.llvm.org/show_bug.cgi?id=18199.

This partially reverts 896a5bff64.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-15 09:52:18 +03:00
Paul B Mahol
49bbfb9d13 avfilter: add arbitrary audio FIR filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-05-09 20:47:52 +02:00
Aaron Levinson
164e277326 configure: Added require alternative for libmfx to support alternate installation options
Purpose: Added require alternative for libmfx in the case that pkg-config
cannot find libmfx.  On Linux, most people likely get libmfx via
https://github.com/lu-zero/mfx_dispatch , but on Windows, the most
well-known way to get libmfx is via the Intel Media SDK, which
provides a static build of libmfx.lib and also provides the source
code for building libmfx yourself.  If built this way, there are no
pkg-config files to be found.

Comments:

-- configure: Altered enabled libmfx step to use use_pkg_config()
   instead of require_pkg_config(), and, if use_pkg_config() fails, it
   falls back to require().  Also added explanatory comment.  Note
   that the reason that require() is passed -llibmfx as the last
   argument, instead of -lmfx, is the file name for the library
   produced from the Intel Media SDK starts with "libmfx".
   Apparently, the filename for the library produced via
   https://github.com/lu-zero/mfx_dispatch starts with "mfx".

Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-09 03:24:58 +02:00
Aaron Levinson
7f7ee86d5a avdevice/decklink: fix MSVC build issues
Purpose: Made minor changes to get the decklink avdevice code to build
using Visual C++.

Notes: Made changes to configure per Hendrik Leppkes's review of first
and second versions of patch.  Also made slight alterations per Marton
Balint's reviews.

Comments:

-- configure: Added if enabled decklink section and setting
   decklink_indev_extralibs and decklink_outdev_extralibs here for
   both mingw and Windows.  Also eliminated the setting of these
   variables in the mingw section earlier in the file.

-- libavdevice/decklink_common.cpp: Switched the order of the include
   of libavformat/internal.h to workaround build issues with Visual
   C++.  See comment in file for more details.

-- libavdevice/decklink_dec.cpp:
a) Rearranged the include of libavformat/internal.h (for reasons as
   described above).
b) Made slight alteration to an argument for call to av_rescale_q() to
   workaround a compiler error with Visual C++.  This appears to only
   be an issue when building C++ files with Visual C++.  See comment
   in code for more details.

-- libavdevice/decklink_enc.cpp: Rearranged the include of
   libavformat/internal.h (for reasons as described above).

Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-05-08 22:43:35 +02:00
James Almer
74fee9760f configure: add missing lpc dependency to mlp and truehd encoders 2017-05-08 11:24:48 -03:00
Martin Storsjö
59cee42d7d arm: Check for the .arch directive in configure
When targeting windows, the .arch directive isn't available.

So far, when building for windows, we've always used gas-preprocessor,
both when using msvc's armasm and when using clang. Lately, clang/llvm
has implemented the last missing piece (altmacro support) for building
our assembly without gas-preprocessor. This means that we now build
for arm/windows with clang without any extra compatibility layer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-05-08 14:21:08 +03:00
James Almer
4a51aa7dda configure: add missing avcodec dependencies to filters 2017-05-06 23:52:38 -03:00
Clément Bœsch
f5218b27c4 Merge commit '35d1f726eb9fdd376ab900587fb02122b72f2b9a'
* commit '35d1f726eb9fdd376ab900587fb02122b72f2b9a':
  fate: Add --ignore-tests configure option for omitting specific FATE tests

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-05-05 09:27:18 +02:00
James Almer
6fdd35a312 Merge commit '92db5083077a8b0f8e1050507671b456fd155125'
* commit '92db5083077a8b0f8e1050507671b456fd155125':
  build: Generate pkg-config files from Make and not from configure
  build: Store library version numbers in .version files

Includes cherry-picked commits 8a34f36593 and
ee164727dd to fix issues.

Changes were also made to retain support for raise_major and build_suffix.

Reviewed-by: ubitux
Merged-by: James Almer <jamrial@gmail.com>
2017-05-04 19:59:30 -03:00
Michael Niedermayer
92f4a4bf29 configure: Do not add omit-frame-pointer for ossfuzz
ossfuzz works better without it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-04 14:31:20 +02:00
James Almer
c53bf8c9b8 configure: fix libopus detection
Prevents compilation failures on libopus < 1.0.3
Regression since 37941878.
2017-05-04 00:26:13 -03:00