ffmpeg.git
13 months agolavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN
Ruiling Song [Sun, 11 Feb 2018 07:43:45 +0000 (15:43 +0800)]
lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN

MFX_LOOKAHEAD_DS_UNKNOWN means auto.
-1 is not a valid value.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
13 months agoqsvenc: AVBR is not supported on non-windows OS
Zhong Li [Tue, 30 Jan 2018 10:07:23 +0000 (18:07 +0800)]
qsvenc: AVBR is not supported on non-windows OS

AVBR is supported from API 1.3 but only available for Windows

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
13 months agohwcontext: Perform usual uninitialisation on derived frames contexts
Mark Thompson [Mon, 26 Jun 2017 19:28:07 +0000 (20:28 +0100)]
hwcontext: Perform usual uninitialisation on derived frames contexts

13 months agohwcontext: Perform usual initialisation on derived device contexts
Mark Thompson [Sun, 8 Oct 2017 14:19:17 +0000 (15:19 +0100)]
hwcontext: Perform usual initialisation on derived device contexts

The initialisation should be common.  For libmfx, it was previously
happening in the derivation function and this moves it out.

13 months agovf_hwupload/hwmap: Support setting a fixed pool size
Mark Thompson [Sat, 5 Aug 2017 21:10:46 +0000 (22:10 +0100)]
vf_hwupload/hwmap: Support setting a fixed pool size

These filters do not directly know whether the API they are using will
support dynamic frame pools, so this is somewhat tricky.  If the user
sets extra_hw_frames, we assume that they are aware of the problem and
set a fixed size based on that.  If not, most cases use dynamic sizing
just like they did previously.  The hardware-reverse-mapping case for
hwmap previously had a large fixed size (64) here, primarily as a hack
for QSV use - this is removed and extra_hw_frames will need to be set
for QSV to work since it requires fixed-size pools (as the other cases
do, and which didn't work before).

13 months agovf_scale_qsv: Support increasing hardware frame pool size
Mark Thompson [Mon, 27 Mar 2017 20:10:23 +0000 (21:10 +0100)]
vf_scale_qsv: Support increasing hardware frame pool size

The deinterlacer does not change, because it does not allocate any new
frames (for output it uses the same pool as the input).

13 months agovf_*_vaapi: Support increasing hardware frame pool size
Mark Thompson [Mon, 27 Mar 2017 20:10:10 +0000 (21:10 +0100)]
vf_*_vaapi: Support increasing hardware frame pool size

Defaults to 10 frames to preserve compatibility, but can allocate
fewer if extra_hw_frames is set explicitly.

13 months agolavfi: Add support for increasing hardware frame pool sizes
Mark Thompson [Mon, 27 Mar 2017 20:10:53 +0000 (21:10 +0100)]
lavfi: Add support for increasing hardware frame pool sizes

AVFilterContext.extra_hw_frames functions identically to the field of
the same name in AVCodecContext.

13 months agolavc: Add per-thread surfaces in get_hw_frame_parameters()
Mark Thompson [Mon, 29 Jan 2018 22:55:11 +0000 (22:55 +0000)]
lavc: Add per-thread surfaces in get_hw_frame_parameters()

This number is definitely required when frame threading is enabled, so
add it here rather than forcing all users to handle it themselves.

DXVA2 contained this addition in specific code as well (therefore being
added twice in the internal case) - just remove it from there.

13 months agolavc: Add support for increasing hardware frame pool sizes
Mark Thompson [Mon, 29 Jan 2018 22:18:00 +0000 (22:18 +0000)]
lavc: Add support for increasing hardware frame pool sizes

AVCodecContext.extra_hw_frames is added to the size of hardware frame
pools created by libavcodec for APIs which require fixed-size pools.
This allows the user to keep references to a greater number of frames
after decode, which may be necessary for some use-cases.

It is also added to the initial_pool_size value returned by
avcodec_get_hw_frames_parameters() if a fixed-size pool is required.

13 months agoconfigure: Factorize check_64_bit()
Diego Biurrun [Fri, 20 Oct 2017 02:42:13 +0000 (04:42 +0200)]
configure: Factorize check_64_bit()

13 months agoconfigure: Simplify restrict keyword handling
Diego Biurrun [Fri, 10 Nov 2017 14:40:30 +0000 (15:40 +0100)]
configure: Simplify restrict keyword handling

Skip a variable indirection and only redefine restrict if necessary.

13 months agoDrop some unnecessary config.h #includes
Diego Biurrun [Fri, 3 Nov 2017 16:20:49 +0000 (17:20 +0100)]
Drop some unnecessary config.h #includes

13 months agoconfigure: Group code that sets the license string with licensing checks
Diego Biurrun [Mon, 5 Feb 2018 12:53:49 +0000 (13:53 +0100)]
configure: Group code that sets the license string with licensing checks

This also moves the setting of the licensing string out of a block that
is skipped when quiet operation is requested.

13 months agohwcontext: Fix memory leak on derived frame allocation failure
Mark Thompson [Fri, 26 Jan 2018 23:12:18 +0000 (23:12 +0000)]
hwcontext: Fix memory leak on derived frame allocation failure

13 months agohwcontext: Fix documentation for av_hwdevice_ctx_alloc()
Jun Zhao [Sun, 19 Mar 2017 07:44:46 +0000 (15:44 +0800)]
hwcontext: Fix documentation for av_hwdevice_ctx_alloc()

From ffmpeg commit 9365dfcbf665b83b2e60c5ec5e2abf1f0a49e2c3.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
13 months agoavpacket: Initialize the allocated padding area in side data
Martin Storsjö [Thu, 1 Feb 2018 12:56:49 +0000 (14:56 +0200)]
avpacket: Initialize the allocated padding area in side data

This makes sure that consumers of the side data actually can
rely on the padding as intended, without having the callers of
av_packet_new_side_data to explicitly zero initialize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
13 months agovc1: skip motion compensation when data for last picture is invalid
Sean McGovern [Sun, 28 Jan 2018 02:19:30 +0000 (21:19 -0500)]
vc1: skip motion compensation when data for last picture is invalid

Bug-Id: 1101
Cc: libav-stable@libav.org
13 months agoqsvdec: Relax the surface vs coded dimension check
Zhong Li [Thu, 25 Jan 2018 10:19:12 +0000 (18:19 +0800)]
qsvdec: Relax the surface vs coded dimension check

Fix a common vp8 decoding failure.

Many vp8 clips cannot decode if hw_frames_ctx is enabled, reporting
"Error during QSV decoding.: incompatible video parameters (-14)".

It is due to mfx.FrameInfo.Width/Height not matching coded_w/coded_h.

See: avconv -hwaccel qsv -init_hw_device qsv -c:v vp8_qsv -i vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf
-vf "hwdownload,format=nv12" -pix_fmt yuv420p -f md5 -

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 months agoqsv: Skip the packet if decoding failure
Ruiling, Song [Wed, 24 Jan 2018 02:14:51 +0000 (10:14 +0800)]
qsv: Skip the packet if decoding failure

MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 months agortmp: Plug leak if sending bytes read report fails.
Josh Allmann [Wed, 24 Jan 2018 00:47:12 +0000 (16:47 -0800)]
rtmp: Plug leak if sending bytes read report fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agointreadwrite: Use __unaligned in MSVC for ARM64 as well
Martin Storsjö [Tue, 16 Jan 2018 13:40:24 +0000 (15:40 +0200)]
intreadwrite: Use __unaligned in MSVC for ARM64 as well

This attribute is supported for this architecture in MSVC as well
(but produces errors if used for 32 bit x86).

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agoqsv: better to use alignment by 16 and HEVC 10b requires alignment by 32
Maxym Dmytrychenko [Mon, 8 Jan 2018 14:10:23 +0000 (15:10 +0100)]
qsv: better to use alignment by 16 and HEVC 10b requires alignment by 32

14 months agoAdd support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK
Michael Wootton [Wed, 3 Jan 2018 17:55:53 +0000 (12:55 -0500)]
Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK

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>
14 months agocmdutils: update copyright year to 2018
Sean McGovern [Mon, 1 Jan 2018 07:51:51 +0000 (02:51 -0500)]
cmdutils: update copyright year to 2018

14 months agoexamples/qsvdec: do not set the deprecated field refcounted_frames
Zhong Li [Thu, 28 Dec 2017 09:38:33 +0000 (17:38 +0800)]
examples/qsvdec: do not set the deprecated field refcounted_frames

It is used by the deprecated API avcodec_decode_video2 and ignored by the
new decode APIs (avcodec_send_packet/avcodec_receive_frame).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 months agolavu/qsv: add log message for libmfx version
Zhong Li [Thu, 28 Dec 2017 09:38:32 +0000 (17:38 +0800)]
lavu/qsv: add log message for libmfx version

It is benefit to diagnose issues related to different libmfx version.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 months agox264: Support version 153
Luca Barbato [Tue, 26 Dec 2017 11:32:42 +0000 (12:32 +0100)]
x264: Support version 153

It has native simultaneus 8 and 10 bit support.

14 months agommaldec: Fix compilation after 2fcb0090
Martin Storsjö [Wed, 20 Dec 2017 07:45:14 +0000 (09:45 +0200)]
mmaldec: Fix compilation after 2fcb0090

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agoavconv: Use codec hardware config to configure hwaccels
Mark Thompson [Wed, 25 Oct 2017 23:18:47 +0000 (00:18 +0100)]
avconv: Use codec hardware config to configure hwaccels

Removes specific support for all hwaccels supported by the generic code
(CUVID, DXVA2, D3D11VA, VAAPI and VDPAU).

14 months agolavc: Mark all AVHWAccel structures as const
Mark Thompson [Sat, 4 Nov 2017 18:53:26 +0000 (18:53 +0000)]
lavc: Mark all AVHWAccel structures as const

14 months agolavc: Delete all fake hwaccels
Mark Thompson [Wed, 25 Oct 2017 23:18:46 +0000 (00:18 +0100)]
lavc: Delete all fake hwaccels

They are now unused.

14 months agolavc: Remove register mechanism for hwaccels
Mark Thompson [Wed, 25 Oct 2017 23:18:45 +0000 (00:18 +0100)]
lavc: Remove register mechanism for hwaccels

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.

14 months agolavc: Deprecate av_hwaccel_next() and av_register_hwaccel()
Mark Thompson [Wed, 25 Oct 2017 23:18:44 +0000 (00:18 +0100)]
lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()

14 months agolavc: Use hardware config information in ff_get_format()
Mark Thompson [Wed, 25 Oct 2017 23:18:43 +0000 (00:18 +0100)]
lavc: Use hardware config information in ff_get_format()

This removes the dependency that hardware pixel formats previously had on
AVHWAccel instances, meaning only those which actually do something need
exist after this patch.

Also updates avcodec_default_get_format() to be able to choose hardware
formats if either a matching device has been supplied or no additional
external configuration is required, and avcodec_get_hw_frames_parameters()
to use the hardware config rather than searching the old hwaccel list.

14 months agowebp: Fix alpha initialisation
Mark Thompson [Wed, 25 Oct 2017 23:18:42 +0000 (00:18 +0100)]
webp: Fix alpha initialisation

ff_get_format() in the next patch will reject formats which aren't in the
offered list, so the hack in 7cb9296db872c4221453e5411f242ebcfca62664 is
no longer valid.  Change the hack by adding a new field in the VP8 decoder
context to indicate that it's actually WebP and don't call ff_get_format()
at all in that case.

14 months agolavc: Add hardware config metadata for decoders supporting hardware output
Mark Thompson [Wed, 25 Oct 2017 23:18:40 +0000 (00:18 +0100)]
lavc: Add hardware config metadata for decoders supporting hardware output

This includes a pointer to the associated hwaccel for decoders using
hwaccels - these will be used later to implement the hwaccel setup
without needing a global list.

Also added is a new file listing all hwaccels as external declarations -
this will be used later to generate the hwaccel list at configure time.

14 months agolavc: Add codec metadata to indicate hardware support
Mark Thompson [Wed, 25 Oct 2017 23:18:39 +0000 (00:18 +0100)]
lavc: Add codec metadata to indicate hardware support

15 months agoavcodec: add metadata to identify wrappers and hardware decoders
wm4 [Tue, 12 Dec 2017 10:03:43 +0000 (11:03 +0100)]
avcodec: add metadata to identify wrappers and hardware decoders

Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name fields.

Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
implementations in case the hardware is not capable.

Based on a patch by Philip Langdale <philipl@overt.org>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agoqsv: Support explicit lookahead downscaling
Luca Barbato [Tue, 12 Dec 2017 14:27:52 +0000 (14:27 +0000)]
qsv: Support explicit lookahead downscaling

15 months agoqsv/vp8dec: fixes memory leak issue
Li, Zhong [Thu, 7 Dec 2017 07:26:38 +0000 (15:26 +0800)]
qsv/vp8dec: fixes memory leak issue

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
15 months agolavc/qsvenc: add error messeage if ICQ unsupported.
Li, Zhong [Thu, 7 Dec 2017 06:44:27 +0000 (14:44 +0800)]
lavc/qsvenc: add error messeage if ICQ unsupported.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
15 months agolavc/qsvenc: ICQ/VCM/QVBR are not avilable on Linux
Li, Zhong [Thu, 7 Dec 2017 06:44:26 +0000 (14:44 +0800)]
lavc/qsvenc: ICQ/VCM/QVBR are not avilable on Linux

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
15 months agolavc/qsvenc: set HRD buffer size
Li, Zhong [Fri, 1 Dec 2017 08:48:45 +0000 (16:48 +0800)]
lavc/qsvenc: set HRD buffer size

Hypothetical Reference Decoding (HRD) model assumes that data flows
into a buffer of the fixed size BufferSizeInKB with a constant bitrate.
Smaller BufferSizeInKB means smaller frame size variations,
but more difficult to maintain HRD.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
15 months agocheckasm: Use LOCAL_ALIGNED for aligned variables on the stack
Martin Storsjö [Mon, 11 Dec 2017 20:25:16 +0000 (22:25 +0200)]
checkasm: Use LOCAL_ALIGNED for aligned variables on the stack

This fixes fate-checkasm-hevc_mc on ARMCC 5.0 after adding
NEON HEVC MC assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agohevc: Add hevc_get_pixel_4/8/12/16/24/32/48/64
Alexandra Hájková [Sun, 3 Dec 2017 08:15:23 +0000 (09:15 +0100)]
hevc: Add hevc_get_pixel_4/8/12/16/24/32/48/64

Checkasm timings:
block size bitdepth  C       NEON
4           8 bit:    146.7   48.7
           10 bit:    146.7   52.7
8           8 bit:    430.3   84.4
           10 bit:    430.4  119.5
12          8 bit:    812.8  141.0
           10 bit:    812.8  195.0
16          8 bit:   1499.1  268.0
           10 bit:   1498.9  368.4
24          8 bit:   4394.2  574.8
           10 bit:   3696.3  804.8
32          8 bit:   5108.6  568.9
           10 bit:   4249.6  918.8
48          8 bit:  16819.6 2304.9
           10 bit:  13882.0 3178.5
64          8 bit:  13490.8 1799.5
           10 bit:  11018.5 2519.4

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agovaapi_h265: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:53 +0000 (21:31 +0000)]
vaapi_h265: Add named options for setting profile and level

Also fixes the default, which previously contained a nonsense value.

15 months agovaapi_h264: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:11 +0000 (21:31 +0000)]
vaapi_h264: Add named options for setting profile and level

15 months agovaapi: Make the decode profile matching more explicit
Mark Thompson [Thu, 9 Nov 2017 01:04:44 +0000 (01:04 +0000)]
vaapi: Make the decode profile matching more explicit

Also fixes a bug where it could attempt to decode with an unsupported
codec if allow-profile-mismatch was set.

15 months agovaapi_h264: Fix VUI max_dec_frame_buffering
Jun Zhao [Tue, 24 Oct 2017 05:25:21 +0000 (13:25 +0800)]
vaapi_h264: Fix VUI max_dec_frame_buffering

This should refer to the existing SPS structure, not the VAAPI sequence
parameter buffer (which is not yet initialised).

From ffmpeg commit f31478ba1472afe5c1eed60f219ae331816425a2.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
15 months agovaapi_h265: Enable VBR mode
Jun Zhao [Fri, 25 Aug 2017 07:56:51 +0000 (15:56 +0800)]
vaapi_h265: Enable VBR mode

To match vaapi_h264.

From ffmpeg commit 385cafb07ac1e46433931ea9749a134efd7350be.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
15 months agocbs_mpeg2: Fix marker_bit type
Mark Thompson [Thu, 9 Nov 2017 01:04:25 +0000 (01:04 +0000)]
cbs_mpeg2: Fix marker_bit type

15 months agocbs: Add padding to slice data allocations
Mark Thompson [Thu, 9 Nov 2017 01:04:20 +0000 (01:04 +0000)]
cbs: Add padding to slice data allocations

These may be read by the bitstream reader, so they should include the
necessary padding for overreads.

15 months agortsp: only break on parse_rtsp_message on error
Tristan Matthews [Wed, 29 Nov 2017 19:16:02 +0000 (14:16 -0500)]
rtsp: only break on parse_rtsp_message on error

Fix suggested by Luca Barbato.

This was causing spurious EOFs when using -rtsp_transport udp, as
reported in https://bugzilla.libav.org/show_bug.cgi?id=1103

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agostereo3d: Support view type for frame sequence type
Vittorio Giovara [Mon, 25 Sep 2017 13:09:21 +0000 (15:09 +0200)]
stereo3d: Support view type for frame sequence type

Implement detection in h264 and hevc and insertion in framepack filter.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
15 months agoprores: Always assume limited range
Vittorio Giovara [Wed, 27 Sep 2017 21:28:55 +0000 (17:28 -0400)]
prores: Always assume limited range

As defined by the specification.

15 months agoqsvenc: cavlc option is only available for h264
Li, Zhong [Mon, 27 Nov 2017 16:19:57 +0000 (11:19 -0500)]
qsvenc: cavlc option is only available for h264

Moving option definition to h264 implementation and fixing command line defaults
in order to properly respect cavlc input value

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
15 months agoqsv/hevcdec: Load hw plugin by default on non-windows os
Li, Zhong [Fri, 10 Nov 2017 08:03:42 +0000 (03:03 -0500)]
qsv/hevcdec: Load hw plugin by default on non-windows os

Software plugin is not available on Linux, Only works on Windows.
Similar changes have been applied to qsv hevc encoder by
b05128f3c953bd66483e697d60a2e7e45ee9cfa0.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
15 months agolibavcodec: Don't use dllexport, only dllimport when building DLLs
Martin Storsjö [Thu, 14 Sep 2017 05:33:05 +0000 (08:33 +0300)]
libavcodec: Don't use dllexport, only dllimport when building DLLs

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>
16 months agomakedef: Pass EXTERN_PREFIX from configure to makedef
Martin Storsjö [Thu, 16 Nov 2017 07:32:15 +0000 (09:32 +0200)]
makedef: Pass EXTERN_PREFIX from configure to makedef

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>
16 months agoconfigure: Coalesce some arch configuration and PIC handling
Diego Biurrun [Fri, 6 Oct 2017 21:06:45 +0000 (23:06 +0200)]
configure: Coalesce some arch configuration and PIC handling

16 months agoconfigure: Miscellaneous minor changes
Diego Biurrun [Sun, 24 Sep 2017 16:46:47 +0000 (18:46 +0200)]
configure: Miscellaneous minor changes

- Move a variable closer to where it is used
- Add an explanatory comment
- Simplify a crosscompile check
- Minor SHFLAGS simplification
- Coalesce some threads tests

16 months agoMakefile: fix distclean target
James Almer [Mon, 13 Nov 2017 20:34:15 +0000 (17:34 -0300)]
Makefile: fix distclean target

It must imply clean. Regression since 7ebe7e8e7a76c0ce302f4f583ef0d14220031214.

Signed-off-by: James Almer <jamrial@gmail.com>
16 months agoconfigure: fix writing library dependencies to config.sh
James Almer [Mon, 13 Nov 2017 01:56:45 +0000 (22:56 -0300)]
configure: fix writing library dependencies to config.sh

Signed-off-by: James Almer <jamrial@gmail.com>
16 months agovaapi_h264: Add missing return value check
Mark Thompson [Thu, 9 Nov 2017 01:04:39 +0000 (01:04 +0000)]
vaapi_h264: Add missing return value check

16 months agoh264_metadata: Fix clearing SEI payload in error case
Mark Thompson [Thu, 9 Nov 2017 01:04:34 +0000 (01:04 +0000)]
h264_metadata: Fix clearing SEI payload in error case

16 months agocbs_h2645: Fix memory leak on when reading SEI fails
Mark Thompson [Thu, 9 Nov 2017 01:04:30 +0000 (01:04 +0000)]
cbs_h2645: Fix memory leak on when reading SEI fails

16 months agocbs: Add a missing return value check
Mark Thompson [Thu, 9 Nov 2017 01:04:11 +0000 (01:04 +0000)]
cbs: Add a missing return value check

16 months agovaapi_h264: Do not use deprecated header type
Mark Thompson [Sun, 1 Oct 2017 21:55:24 +0000 (22:55 +0100)]
vaapi_h264: Do not use deprecated header type

SEI headers should be inserted as generic raw data (the old specific
type has been deprecated in libva2).

16 months agovaapi_h264: Add workaround for bad SEI in old Intel drivers
Mark Thompson [Tue, 24 Oct 2017 23:15:55 +0000 (00:15 +0100)]
vaapi_h264: Add workaround for bad SEI in old Intel drivers

With pre-2.0 Intel drivers in CBR mode, if an explicit SEI message with
the old (now deprecated) type is not included, the driver generates and
inserts some timing SEI which is almost certainly invlaid.  Before
7a4fac5e91789b73e07bd4ad20493cfde028df76 we always inserted our own SEI
so this would not be visible, but since then it has been possible to
disable that.  We would also like to avoid using the deprecated type,
and using the new type, while working in old drivers, does not suppress
the spurious message like the old type does.

Therefore, suppress the bad SEI insertion by providing a zero-length
buffer with the old type, which the driver can insert harmlessly.

16 months agovp9_superframe_bsf: cache packets by creating new references instead of moving pointers
James Almer [Sun, 5 Nov 2017 16:35:40 +0000 (13:35 -0300)]
vp9_superframe_bsf: cache packets by creating new references instead of moving pointers

Fixes invalid reads after free.

Signed-off-by: James Almer <jamrial@gmail.com>
16 months agosmacker: limit recursion depth of smacker_decode_bigtree
Andreas Cadhalpun [Sat, 19 Nov 2016 13:21:11 +0000 (14:21 +0100)]
smacker: limit recursion depth of smacker_decode_bigtree

This fixes segmentation faults due to stack-overflow caused by too deep
recursion.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
16 months agosmacker: add sanity check for length in smacker_decode_tree()
Michael Niedermayer [Thu, 21 Jun 2012 14:01:52 +0000 (16:01 +0200)]
smacker: add sanity check for length in smacker_decode_tree()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Bug-Id: 1098
Cc: libav-stable@libav.org
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
16 months agobuild: Add missing config.sh dependency for pkg-config files
Diego Biurrun [Mon, 6 Nov 2017 16:57:25 +0000 (17:57 +0100)]
build: Add missing config.sh dependency for pkg-config files

Also only update config.sh when it changed to avoid spurious rebuilds.

16 months agobuild: Remove pkg-config files on clean instead of on distclean
Diego Biurrun [Mon, 6 Nov 2017 16:49:55 +0000 (17:49 +0100)]
build: Remove pkg-config files on clean instead of on distclean

The files are no longer generated by configure, so they should not
be removed by the distclean target any longer.

16 months agobuild: Add uninstall-pkgconfig target to match install-lib*-pkgconfig
Diego Biurrun [Mon, 6 Nov 2017 16:44:33 +0000 (17:44 +0100)]
build: Add uninstall-pkgconfig target to match install-lib*-pkgconfig

16 months agomatroskadec: allow RealAudio/Cook/Sipro streams of flavor 0
Sean McGovern [Thu, 2 Nov 2017 00:45:20 +0000 (20:45 -0400)]
matroskadec: allow RealAudio/Cook/Sipro streams of flavor 0

Regression since 569d18aa9dc989c37bb4d4b968026fe5afa6fff9.

Bug-Id: 1055
Cc: libav-stable@libav.org
16 months agoconfigure: Use right variable and right value for AIX ar flags
Diego Biurrun [Sat, 4 Nov 2017 17:50:30 +0000 (18:50 +0100)]
configure: Use right variable and right value for AIX ar flags

16 months agoavconv.c: fix calculation of input file duration in seek_to_start()
Peter Große [Mon, 30 Oct 2017 11:25:26 +0000 (12:25 +0100)]
avconv.c: fix calculation of input file duration in seek_to_start()

Fixes looping files without audio or when using stream_copy, where
ist->nb_samples is not set since no decoding is done.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
16 months agomatroskadec: don't warn about unknown spherical medata when none is present
James Almer [Thu, 2 Nov 2017 23:42:05 +0000 (20:42 -0300)]
matroskadec: don't warn about unknown spherical medata when none is present

track->video.projection.type is set to 0 (a Matroska specific "No spherical
metadata present" value, with no related AVSphericalMapping) by default on
files without the element.

This removes bogus warnings on every single matroska file without Spherical
metadata.

Signed-off-by: James Almer <jamrial@gmail.com>
16 months agolibspeexenc: Use speex_lib_get_mode instead of the speex_foo_mode data symbols
Martin Storsjö [Fri, 3 Nov 2017 09:36:49 +0000 (11:36 +0200)]
libspeexenc: Use speex_lib_get_mode instead of the speex_foo_mode data symbols

This avoids issues linking to a DLL version of libspeex, since the
libspeex headers lack proper dllimport declarations for the data
symbols.

This isn't an issue when building with mingw with GNU binutils, since
GNU ld can fix up that kind of data import automatically.

libspeexdec.c already uses speex_lib_get_mode as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
16 months agoRevert "configure: Detect AIX ar command instead of hardcoding it in the OS section"
Diego Biurrun [Fri, 6 Oct 2017 19:38:43 +0000 (21:38 +0200)]
Revert "configure: Detect AIX ar command instead of hardcoding it in the OS section"

This reverts commit 4822ee3ca620a92cd2b0a9a03ea9e34288192c79.
AIX is a fringe oddity. Do not clutter the main codepath with AIX workarounds.

16 months agoconfigure: Simplify MIPS instruction set handling
Diego Biurrun [Fri, 20 Oct 2017 01:57:55 +0000 (03:57 +0200)]
configure: Simplify MIPS instruction set handling

16 months agoconfigure: Miscellaneous minor changes to config file handling
Diego Biurrun [Sat, 23 Sep 2017 14:42:11 +0000 (16:42 +0200)]
configure: Miscellaneous minor changes to config file handling

- 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.

16 months agoconfigure: Remove unused apply() helper function
Diego Biurrun [Fri, 20 Oct 2017 22:22:38 +0000 (00:22 +0200)]
configure: Remove unused apply() helper function

16 months agoconfigure: Miscellaneous small changes to helper functions
Diego Biurrun [Fri, 20 Oct 2017 18:58:12 +0000 (20:58 +0200)]
configure: Miscellaneous small changes to helper functions

- 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()

16 months agoconfigure: Stop using dlltool to create an import library
Martin Storsjö [Mon, 30 Oct 2017 09:39:53 +0000 (11:39 +0200)]
configure: Stop using dlltool to create an import library

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>
16 months agodashenc: copy stream frame rate to output stream
Peter Große [Thu, 26 Oct 2017 16:02:05 +0000 (18:02 +0200)]
dashenc: copy stream frame rate to output stream

Leads to setting of DefaultDuration in Matroska muxer based on frame rate instead of timebase.
Fixes playback in Chrome.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
16 months agodashenc: fix bitrate estimation with correct scaling
Anton Schubert [Thu, 26 Oct 2017 16:02:04 +0000 (18:02 +0200)]
dashenc: fix bitrate estimation with correct scaling

Signed-off-by: Anton Schubert <ischluff@mailbox.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
16 months agodoc: Provide better examples for hls and segment muxing
Luca Barbato [Fri, 13 Oct 2017 10:24:51 +0000 (12:24 +0200)]
doc: Provide better examples for hls and segment muxing

Some encoders do not output further IDRs if not requested to.

16 months agoconfigure: Drop support for legacy PGI compiler
Diego Biurrun [Fri, 6 Oct 2017 00:24:25 +0000 (02:24 +0200)]
configure: Drop support for legacy PGI compiler

16 months agobuild: Drop support for legacy TI ARM compiler
Diego Biurrun [Sun, 24 Sep 2017 12:24:02 +0000 (14:24 +0200)]
build: Drop support for legacy TI ARM compiler

16 months agohwcontext_vaapi: Set message callbacks on internally-created devices
Mark Thompson [Sun, 1 Oct 2017 21:51:31 +0000 (22:51 +0100)]
hwcontext_vaapi: Set message callbacks on internally-created devices

The message callbacks are library-safe in libva2, so we can now use
them.

16 months agovaapi: Always free parameter buffers after vaEndPicture() with libva2
Mark Thompson [Sun, 1 Oct 2017 21:51:20 +0000 (22:51 +0100)]
vaapi: Always free parameter buffers after vaEndPicture() with libva2

This is an ABI change in libva2: previously the Intel driver had this
behaviour and it was implemented as a driver quirk, but now it is part
of the specification so all drivers must do it.

16 months agovaapi: Remove H.264 baseline profile
Mark Thompson [Sun, 1 Oct 2017 21:51:13 +0000 (22:51 +0100)]
vaapi: Remove H.264 baseline profile

This has been deprecated in libva2 because hardware does not and will not
support it.  Therefore never consider it for decode, and for encode assume
the user meant constrained baseline profile instead.

16 months agoconfigure: Add config option for libva2 (VAAPI 1)
Mark Thompson [Sun, 1 Oct 2017 21:51:07 +0000 (22:51 +0100)]
configure: Add config option for libva2 (VAAPI 1)

16 months agovaapi: Disable deprecation warnings around use of struct vaapi_context
Mark Thompson [Sun, 1 Oct 2017 21:50:59 +0000 (22:50 +0100)]
vaapi: Disable deprecation warnings around use of struct vaapi_context

16 months agoarm: Remove a redundant check in fmtconvert_init_arm.c
Martin Storsjö [Mon, 23 Oct 2017 07:44:53 +0000 (10:44 +0300)]
arm: Remove a redundant check in fmtconvert_init_arm.c

This was missed in e2710e790c0, where have_vfp && !have_vfpv3 were
converted into have_vfp_vm.

Signed-off-by: Martin Storsjö <martin@martin.st>
16 months agoarm: Check for have_vfp_vm instead of !have_vfpv3 for float_dsp_vfp
Martin Storsjö [Mon, 23 Oct 2017 07:44:07 +0000 (10:44 +0300)]
arm: Check for have_vfp_vm instead of !have_vfpv3 for float_dsp_vfp

This was missed in e2710e790c0 since those functions weren't exercised
by checkasm.

Signed-off-by: Martin Storsjö <martin@martin.st>
16 months agolavc: fix hw_device_ctx operation
wm4 [Mon, 23 Oct 2017 22:28:03 +0000 (00:28 +0200)]
lavc: fix hw_device_ctx operation

Commit b46a77f19d accidentally broke this (requested change that was
added to the patch later and which was not fully tested).

Signed-off-by: Mark Thompson <sw@jkqxz.net>