ffmpeg.git
22 months agohwcontext_vaapi: Remove use of vaExportSurfaceHandle() n3.4
Mark Thompson [Sun, 15 Oct 2017 11:45:15 +0000 (12:45 +0100)]
hwcontext_vaapi: Remove use of vaExportSurfaceHandle()

It is not present in libva 2.0.

22 months agoUpdate versions for 3.4 release
Michael Niedermayer [Sun, 15 Oct 2017 00:30:15 +0000 (02:30 +0200)]
Update versions for 3.4 release

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/snowdec: Check mv_scale
Michael Niedermayer [Fri, 13 Oct 2017 01:06:54 +0000 (03:06 +0200)]
avcodec/snowdec: Check mv_scale

Fixes: runtime error: signed integer overflow: 2 * -1094995530 cannot be represented in type 'int'
Fixes: 3512/clusterfuzz-testcase-minimized-4812747210489856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 393d6fc7395611a38792e3c271b2be42ac45e672)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/pafvideo: Check for bitstream end in decode_0()
Michael Niedermayer [Fri, 13 Oct 2017 01:06:53 +0000 (03:06 +0200)]
avcodec/pafvideo: Check for bitstream end in decode_0()

Fixes: Timeout
Fixes: 3529/clusterfuzz-testcase-5057068371279872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9c85329cd02e9284892bf263ce6133b2fc479792)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.
Sasi Inguva [Tue, 10 Oct 2017 17:36:58 +0000 (10:36 -0700)]
ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.

This is required for FLV files, for which duration_pts comes out to be zero.

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2b006ccf8318d84101ed83b75df4c9682a963217)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoFix visual glitch with XvMC, caused by wrong idct permutation.
Ivan Kalvachev [Sun, 8 Oct 2017 22:25:00 +0000 (01:25 +0300)]
Fix visual glitch with XvMC, caused by wrong idct permutation.

In the past XvMC forced simple_idct since
it was using FF_IDCT_PERM_NONE.
However now we have SIMD variants of simple_idct that
are using FF_IDCT_PERM_TRANSPOSE and if they are selected
XvMC would get coefficients in the wrong order.

The patch creates new FF_IDCT_NONE that
is used only for this kind of hardware decoding
and that fallbacks to the old C only simple idct.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9054439bad3307dafd9fbadc57e66c276baf22e2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoconfigure: force erroring out in check_disable_warning() if an option doesn't exists
James Almer [Fri, 13 Oct 2017 15:34:34 +0000 (12:34 -0300)]
configure: force erroring out in check_disable_warning() if an option doesn't exists

Should prevent some options from being added to cflags when they
don't exist and the compiler only warns about it.

Reviewd-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit ad56e8057d8af0201ed0cb65acc12e5889d4afcc)

22 months agoFix crash if av_vdpau_bind_context() is not used.
Ivan Kalvachev [Sun, 8 Oct 2017 23:40:26 +0000 (02:40 +0300)]
Fix crash if av_vdpau_bind_context() is not used.

The public functions av_alloc_vdpaucontext() and
av_vdpau_alloc_context() are allocating AVVDPAUContext
structure that is supposed to be placed in avctx->hwaccel_context.

However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
as struct VDPAUHWContext, that is bigger and does contain
AVVDPAUContext as first member.

The usage includes write to the new variables in the bigger stuct,
without checking for block size.

Fix by always allocating the bigger structure.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
(cherry picked from commit 3a6ded7cfcb33e06ade98c5791eae06453f65668)

22 months agoconfigure: remove libdl dependency from libndi_newtek
Marton Balint [Tue, 10 Oct 2017 21:30:29 +0000 (23:30 +0200)]
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>
(cherry picked from commit 58143b15adda6391ec07f3eb19e80ed91d801edd)

22 months agoadd release notes based on release 3.3
Michael Niedermayer [Wed, 12 Apr 2017 00:26:45 +0000 (02:26 +0200)]
add release notes based on release 3.3

Name suggestion was from Helmut K. C. Tessarek

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 07e7ebf52de9257fef1398c1dc5edb847b78ab21)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/rkmppdec: check wether typo
Michael Niedermayer [Wed, 11 Oct 2017 00:15:21 +0000 (02:15 +0200)]
avcodec/rkmppdec: check wether typo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/opusenc_psy: Fix mixed declaration and statement
Michael Niedermayer [Wed, 11 Oct 2017 00:13:16 +0000 (02:13 +0200)]
avcodec/opusenc_psy: Fix mixed declaration and statement

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agodoc/APIchanges: Add 3.4 cut point
Michael Niedermayer [Tue, 10 Oct 2017 23:23:03 +0000 (01:23 +0200)]
doc/APIchanges: Add 3.4 cut point

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoBump minor versions for branching 3.4
Michael Niedermayer [Tue, 10 Oct 2017 23:21:12 +0000 (01:21 +0200)]
Bump minor versions for branching 3.4

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agodoc/APIchanges: Update
Michael Niedermayer [Tue, 10 Oct 2017 22:12:12 +0000 (00:12 +0200)]
doc/APIchanges: Update

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavutil/frame: Fix project name
Michael Niedermayer [Tue, 10 Oct 2017 22:01:10 +0000 (00:01 +0200)]
avutil/frame: Fix project name

Issue introduced in: caa12027baf1180453846c58da08fc87accc0ff6

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mips: Improve avc uni copy mc msa functions
Kaustubh Raste [Mon, 9 Oct 2017 12:18:45 +0000 (17:48 +0530)]
avcodec/mips: Improve avc uni copy mc msa functions

Load the specific bytes instead of MSA load.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mips: Improve hevc uni-w horiz mc msa functions
Kaustubh Raste [Mon, 9 Oct 2017 12:17:34 +0000 (17:47 +0530)]
avcodec/mips: Improve hevc uni-w horiz mc msa functions

Load the specific destination bytes instead of MSA load and pack.
Pack the data to half word before clipping.
Use immediate unsigned saturation for clip to max saving one vector register.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mips: Improve avc put mc 21, 23 and 02 msa functions
Kaustubh Raste [Mon, 9 Oct 2017 12:11:40 +0000 (17:41 +0530)]
avcodec/mips: Improve avc put mc 21, 23 and 02 msa functions

Remove loops and unroll as block sizes are known.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mips: Improve avc chroma hv mc msa functions
Kaustubh Raste [Mon, 9 Oct 2017 08:45:37 +0000 (14:15 +0530)]
avcodec/mips: Improve avc chroma hv mc msa functions

Replace generic with block size specific function.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mips: Improve avc bi-weighted mc msa functions
Kaustubh Raste [Mon, 9 Oct 2017 07:18:39 +0000 (12:48 +0530)]
avcodec/mips: Improve avc bi-weighted mc msa functions

Replace generic with block size specific function.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mips: preload data in hevc sao edge 135 degree filter msa functions
Kaustubh Raste [Mon, 9 Oct 2017 06:01:20 +0000 (11:31 +0530)]
avcodec/mips: preload data in hevc sao edge 135 degree filter msa functions

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/ffv1dec: Fix out of array read in slice counting
Michael Niedermayer [Mon, 9 Oct 2017 09:49:28 +0000 (11:49 +0200)]
avcodec/ffv1dec: Fix out of array read in slice counting

Fixes: test-201710.mp4

Found-by: 连一汉 <lianyihan@360.cn> and Zhibin Hu
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/dirac_dwt: Fix integer overflow in COMPOSE_53iL0()
Michael Niedermayer [Sun, 8 Oct 2017 23:46:28 +0000 (01:46 +0200)]
avcodec/dirac_dwt: Fix integer overflow in COMPOSE_53iL0()

Fixes: runtime error: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int'
Fixes: 3485/clusterfuzz-testcase-minimized-4940429332054016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mpeg_er: Clear mcsel in mpeg_er_decode_mb()
Michael Niedermayer [Sun, 8 Oct 2017 22:32:30 +0000 (00:32 +0200)]
avcodec/mpeg_er: Clear mcsel in mpeg_er_decode_mb()

Fixes out of array read
Should fix: 3516/clusterfuzz-testcase-minimized-4608518562775040 (not reprodoceable)

Found-by: Insu Yun, Georgia Tech.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/mpeg4videodec: Use 64 bit intermediates for sprite delta
Michael Niedermayer [Sun, 8 Oct 2017 19:41:54 +0000 (21:41 +0200)]
avcodec/mpeg4videodec: Use 64 bit intermediates for sprite delta

Fixes: runtime error: signed integer overflow: -104713 * 65536 cannot be represented in type 'int'
Fixes: 3453/clusterfuzz-testcase-minimized-5555554657239040
Fixes: 3528/clusterfuzz-testcase-minimized-6283628420005888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoconfigure: fix decklink dependencies
Marton Balint [Tue, 10 Oct 2017 18:20:28 +0000 (20:20 +0200)]
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>
22 months agodoc/filters: note minimum resolution for pixscope
Gyan Doshi [Tue, 10 Oct 2017 10:35:18 +0000 (16:05 +0530)]
doc/filters: note minimum resolution for pixscope

Signed-off-by: Gyan Doshi <gyandoshi@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
22 months agolibavdevice/decklink: add support for 10-bit output for Decklink SDI
Devin Heitmueller [Fri, 6 Oct 2017 12:55:44 +0000 (08:55 -0400)]
libavdevice/decklink: add support for 10-bit output for Decklink SDI

Can be tested via the following command:

./ffmpeg -i foo.ts -f decklink -vcodec v210 'DeckLink Duo (1)'

Note that the 8-bit support works as it did before, and setting
the pix_fmt isn't required for 10-bit mode.  The code defaults to
operating in 8-bit mode when no vcodec is specified, for backward
compatibility.

Updated to reflect feedback from Marton Balint <cus@passwd.hu>

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agolibavdevice/decklink: add support for -sources and -sinks arguments
Devin Heitmueller [Fri, 6 Oct 2017 12:55:43 +0000 (08:55 -0400)]
libavdevice/decklink: add support for -sources and -sinks arguments

Add support for enumerating the sources/sinks via the ffmpeg
command line options, as opposed to having to create a real pipeline
and use the "-list_devices" option which does exit() after dumping
out the options.

Note that this patch preserves the existing "-list_devices" option,
but now shares common code for the actual enumeration.

Updated to reflect feedback from Marton Balint <cus@passwd.hu>.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agoMakefile: generate stripped CLI tools directly instead of copying unstripped ones...
Marton Balint [Fri, 6 Oct 2017 20:15:35 +0000 (22:15 +0200)]
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>
22 months agofate: update fate-api reference files after 71e2ec017a
James Almer [Tue, 10 Oct 2017 01:45:36 +0000 (22:45 -0300)]
fate: update fate-api reference files after 71e2ec017a

Signed-off-by: James Almer <jamrial@gmail.com>
22 months agobuild: prevent SDL2 from polluting global cflags and extralibs
James Almer [Sun, 8 Oct 2017 19:54:18 +0000 (16:54 -0300)]
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>
22 months agolavc/vaapi_decode: fix profile search when profile mismatch is allowed
Jun Zhao [Mon, 9 Oct 2017 07:50:19 +0000 (15:50 +0800)]
lavc/vaapi_decode: fix profile search when profile mismatch is allowed

When profile mismatch is allowed, use the highest supported profile for
VAAPI decoding.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
22 months agolavc: enable hwaccel_flags option
Jun Zhao [Mon, 9 Oct 2017 07:49:58 +0000 (15:49 +0800)]
lavc: enable hwaccel_flags option

Enable per-stream hwaccel_flags.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
22 months agoavcodec/wmaprodec: support multichannel XMA stream configurations
bnnm [Tue, 3 Oct 2017 21:49:00 +0000 (23:49 +0200)]
avcodec/wmaprodec: support multichannel XMA stream configurations

Signed-off-by: bnnm <bananaman255@gmail.com>
Now accepts any combination of 1/2ch streams, described in the RIFF chunks/extradata

22 months agoavcodec/dca_core: always limit frame size to data size
foo86 [Mon, 9 Oct 2017 13:26:06 +0000 (16:26 +0300)]
avcodec/dca_core: always limit frame size to data size

Silences pointless error message when decoding DTS-in-WAV stream with
excessive frame size stored in header.

22 months agoavcodec/dca_parser: revert to conservative sync distance estimation
foo86 [Mon, 9 Oct 2017 13:12:19 +0000 (16:12 +0300)]
avcodec/dca_parser: revert to conservative sync distance estimation

Fixes regression introduced by commit a0349ae27c127df8c72de1c30dc4090360ec7ef4
when parsing 14-bit streams with excessive frame size stored in header.

Fixes ticket #6723.

22 months agolavf/adp: Fix the probe function on systems with signed char.
Carl Eugen Hoyos [Sun, 8 Oct 2017 21:41:14 +0000 (23:41 +0200)]
lavf/adp: Fix the probe function on systems with signed char.

22 months agoconfigure: Disable -Wbool-operation using check_disable_warning().
Carl Eugen Hoyos [Mon, 9 Oct 2017 00:21:08 +0000 (02:21 +0200)]
configure: Disable -Wbool-operation using check_disable_warning().

Suggested-by: James Almer
22 months agoRevert "configure: Disable -Wbool-operation."
Mark Thompson [Sun, 8 Oct 2017 23:53:51 +0000 (00:53 +0100)]
Revert "configure: Disable -Wbool-operation."

This reverts commit c2d155e11ee5ec732d471982f2dee43703bcd5a7.

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’

22 months agohwcontext_vaapi: Add support for mapping to DRM objects
Mark Thompson [Sun, 8 Oct 2017 15:00:47 +0000 (16:00 +0100)]
hwcontext_vaapi: Add support for mapping to DRM objects

Uses vaExportSurfaceHandle() from libva2.

22 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.  For VAAPI,
it fixes some failures when deriving from a DRM device because this
initialisation did not run.

22 months agohwcontext_vaapi: Set message callbacks on internally-created devices
Mark Thompson [Sun, 8 Oct 2017 15:54:37 +0000 (16:54 +0100)]
hwcontext_vaapi: Set message callbacks on internally-created devices

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

22 months agohwcontext_vaapi: Factorise out common connection code
Mark Thompson [Sun, 1 Oct 2017 21:51:31 +0000 (22:51 +0100)]
hwcontext_vaapi: Factorise out common connection code

This was duplicated between normal device creation and creation by
derivation from a DRM device.

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

22 months agovaapi: Remove H.264 baseline profile
Mark Thompson [Sun, 8 Oct 2017 13:48:24 +0000 (14:48 +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.

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

22 months agoconfigure: disable libxcb dependent features if libxcb is not enabled
James Almer [Sun, 8 Oct 2017 21:46:21 +0000 (18:46 -0300)]
configure: disable libxcb dependent features if libxcb is not enabled

Signed-off-by: James Almer <jamrial@gmail.com>
22 months agolavu/opt: Use "&&" instead of "*" in boolean expression.
Carl Eugen Hoyos [Thu, 4 May 2017 23:30:19 +0000 (01:30 +0200)]
lavu/opt: Use "&&" instead of "*" in boolean expression.

Fixes the following warning:
libavutil/opt.c:101:47: warning: '*' in boolean context, suggest '&&' instead

22 months agoconfigure: Disable -Wbool-operation.
Carl Eugen Hoyos [Sun, 8 Oct 2017 21:08:09 +0000 (23:08 +0200)]
configure: Disable -Wbool-operation.

Requested-by: Ronald and Derek
22 months agolavd/decklink_dec: Do not claim to output transparency information.
Carl Eugen Hoyos [Sun, 8 Oct 2017 20:58:33 +0000 (22:58 +0200)]
lavd/decklink_dec: Do not claim to output transparency information.

22 months agoffmpeg: always use single threaded decoding for attached pictures
Marton Balint [Fri, 6 Oct 2017 19:49:09 +0000 (21:49 +0200)]
ffmpeg: always use single threaded decoding for attached pictures

Since af1761f7b5b1b72197dc40934953b775c2d951cc ffmpeg waits for a frame in each
stream before writing the output header. If we are using threaded decoding for
attached pictures, we have to read till EOF to be able to finally flush the
decoder and output the decoded frame. This essentially makes ffmpeg buffer all
non-attached picture packets, which will cause a "Too many packets buffered for
output stream" eventually.

By forcing single threaded decoding, we get a frame from a single packet as
well and we can avoid the error.

Fixes part of ticket #6375:
ffmpeg -i 46564100.mp3 -acodec libmp3lame -ab 128k -ac 2 out.mp3

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agolavc: add support for OpenJPEG 2.3.0
Michael Bradshaw [Wed, 4 Oct 2017 22:37:11 +0000 (15:37 -0700)]
lavc: add support for OpenJPEG 2.3.0

Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
22 months agolavu/utils: Use "__asm__" like everywhere else in the codebase.
Carl Eugen Hoyos [Sat, 7 Oct 2017 23:13:16 +0000 (01:13 +0200)]
lavu/utils: Use "__asm__" like everywhere else in the codebase.

22 months agolavfi: Rename local variables "main" as "master".
Carl Eugen Hoyos [Sat, 7 Oct 2017 13:59:22 +0000 (15:59 +0200)]
lavfi: Rename local variables "main" as "master".

Silences several warnings:
main is usually a function

22 months agolavf/rtpenc: Add support for little-endian G.726.
Carl Eugen Hoyos [Sat, 7 Oct 2017 18:47:10 +0000 (20:47 +0200)]
lavf/rtpenc: Add support for little-endian G.726.

22 months agolavf/sdp: Fix MIME-type for big-endian G.726.
Carl Eugen Hoyos [Sat, 7 Oct 2017 18:41:38 +0000 (20:41 +0200)]
lavf/sdp: Fix MIME-type for big-endian G.726.

RFC 3551 defines "G726" for little-endian ("right-justified") G.726
and announces "AAL2-G726" for big-endian ("left-justified") G.726.

22 months agolavfi/avfilter.c: Correct guess_status_pts to account for differing link timebases.
Sasi Inguva [Fri, 6 Oct 2017 16:31:13 +0000 (09:31 -0700)]
lavfi/avfilter.c: Correct guess_status_pts to account for differing link timebases.

Signed-off-by: Sasi Inguva <isasi@google.com>
22 months agolavf/img2dec: Auto-detect svg images.
Carl Eugen Hoyos [Mon, 2 Oct 2017 09:38:34 +0000 (11:38 +0200)]
lavf/img2dec: Auto-detect svg images.

22 months agoavformat/mp3enc: flush buffered packets if referencing fails
James Almer [Fri, 6 Oct 2017 18:55:09 +0000 (15:55 -0300)]
avformat/mp3enc: flush buffered packets if referencing fails

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
22 months agoavcodec/v4l2: fix single plane decoding
Jorge Ramirez-Ortiz [Fri, 6 Oct 2017 07:51:43 +0000 (09:51 +0200)]
avcodec/v4l2: fix single plane decoding

22 months agoavdevice/decklink_dec: fix extracting luma
Marton Balint [Wed, 4 Oct 2017 20:55:00 +0000 (22:55 +0200)]
avdevice/decklink_dec: fix extracting luma

Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agoavfilter/vf_fps: add eof_action filter option
Tobias Rapp [Thu, 21 Sep 2017 11:40:36 +0000 (13:40 +0200)]
avfilter/vf_fps: add eof_action filter option

Allows to specify the action to be performed when reading the last frame
from the internal FIFO buffer. By default the last frame is written to
filter output depending on the timestamp rounding method. When using
"pass" action the last frame is passed through if input duration
has not been reached yet.

Examples using an input file with 25Hz, 1.4sec duration:
 - "fps=fps=1:round=near" generates an output file of 1sec
 - "fps=fps=1:round=near:eof_action=pass" generates an output file of
   2sec

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
22 months agortsp: Move message parsing to a separate function
Luca Barbato [Tue, 14 Mar 2017 16:44:45 +0000 (17:44 +0100)]
rtsp: Move message parsing to a separate function

Make easier to handle the polling function before we implement
full threading support.

(cherry picked from libav commit ca960161f087ca38267b88ce90592010c59584f1)
Signed-off-by: James Almer <jamrial@gmail.com>
22 months agoavcodec/mips: Cleanup unused functions
Kaustubh Raste [Thu, 5 Oct 2017 07:45:06 +0000 (13:15 +0530)]
avcodec/mips: Cleanup unused functions

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavformat: fix id3 chapters
Lukas Stabe [Thu, 5 Oct 2017 01:34:19 +0000 (03:34 +0200)]
avformat: fix id3 chapters

These changes store id3 chapter data in ID3v2ExtraMeta and introduce
ff_id3v2_parse_chapters to parse them into the format context if needed.

Encoders using ff_id3v2_read, which previously parsed chapters into the
format context automatically, were adjusted to call
ff_id3v2_parse_chapters.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
22 months agobuild: add install targets for the examples
James Almer [Thu, 5 Oct 2017 03:47:41 +0000 (00:47 -0300)]
build: add install targets for the examples

Split it off from install-data.

Among other things, this prevents spamming triplicate log lines during install.

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: James Almer <jamrial@gmail.com>
22 months agoavfilter/vf_fps: clean-up filter options
Tobias Rapp [Thu, 5 Oct 2017 08:18:57 +0000 (10:18 +0200)]
avfilter/vf_fps: clean-up filter options

Add missing AV_OPT_FLAG_FILTERING_PARAM flag to "start_time" option.
Fix indent of "round" named constants and clear unused field values.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
22 months agodoc/filters: align order of fps filter options to implementation
Tobias Rapp [Thu, 5 Oct 2017 08:14:26 +0000 (10:14 +0200)]
doc/filters: align order of fps filter options to implementation

Align order of "start_time" option within fps filter documentation to actual
implementation. Also fix some documentation cosmetics.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
22 months agolavc/v4l2: Fix printf format for int64_t
Mark Thompson [Thu, 5 Oct 2017 00:06:08 +0000 (01:06 +0100)]
lavc/v4l2: Fix printf format for int64_t

22 months agoavformat/wavenc: replace literal numbers with enum constants
Tobias Rapp [Fri, 29 Sep 2017 14:28:47 +0000 (16:28 +0200)]
avformat/wavenc: replace literal numbers with enum constants

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
22 months agox86/blockdsp: use three operand form for an instruction
James Almer [Thu, 5 Oct 2017 02:51:17 +0000 (23:51 -0300)]
x86/blockdsp: use three operand form for an instruction

Fixes assembling with old yasm.

22 months agoavcodec/x86/lossless_videoencdsp: Fix warning: signed dword value exceeds bounds
Michael Niedermayer [Fri, 29 Sep 2017 22:26:51 +0000 (00:26 +0200)]
avcodec/x86/lossless_videoencdsp: Fix warning: signed dword value exceeds bounds

Add () to regsize define

Suggested-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/x86/lossless_videoencdsp: Fix handling of small widths
Michael Niedermayer [Fri, 29 Sep 2017 22:20:09 +0000 (00:20 +0200)]
avcodec/x86/lossless_videoencdsp: Fix handling of small widths

Fixes out of array access
Fixes: crash-huf.avi

Regression since: 6b41b4414934cc930468ccd5db598dd6ef643987

This could also be fixed by adding checks in the C code that calls the dsp

Found-by: Zhibin Hu and 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/v4l2: set sizeimage param for non-raw buffers [fixes #6716]
Jorge Ramirez-Ortiz [Wed, 4 Oct 2017 19:04:16 +0000 (21:04 +0200)]
avcodec/v4l2: set sizeimage param for non-raw buffers [fixes #6716]

Some V4L2 drivers fail to allocate buffers when sizeimage is not set
to a max value. This is indeed the case for s5p-mfc [1]

Most drivers should be able to calculate this value from the frame
dimensions and format - or at least have their own default.

However since this work around should not impact those drivers doing
the "right thing" this commit just provides such a default.

The calculations were extracted from the v4l2 driver used to develop
the ffmpeg v4l2_m2m support [2]. See venc.c and vdec.c

[1] linux.git/drivers/media/platform/s5p-mfc
[2] linux.git/drivers/media/platform/qcom/venus/

22 months agolavc/v4l2: Mark static const tables as such
Mark Thompson [Tue, 3 Oct 2017 20:02:25 +0000 (21:02 +0100)]
lavc/v4l2: Mark static const tables as such

22 months agolavc/v4l2: Remove use of lfind()
Mark Thompson [Tue, 3 Oct 2017 19:57:14 +0000 (20:57 +0100)]
lavc/v4l2: Remove use of lfind()

This is not present in older bionic and therefore fails to build there,
and the code is much simpler without it anyway.

22 months agoconfigure: fix detecting libdl when dlsym requires extra linker flags
James Almer [Wed, 4 Oct 2017 21:55:32 +0000 (18:55 -0300)]
configure: fix detecting libdl when dlsym requires extra linker flags

Regression since 84b3f53acadced2dd31f6be95b491b25183b8c22.

22 months agoavdevice/decklink: Fix segfault when running -list_devices on OSX
Devin Heitmueller [Tue, 26 Sep 2017 16:06:20 +0000 (12:06 -0400)]
avdevice/decklink: Fix segfault when running -list_devices on OSX

The string is allocated with CFStringGetCString but was being
deallocated with free(), which would intermittently result in
a segmentation fault.  Use the correct function for freeing the
allocated CFString.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agoavdevice/decklink_dec: fix multipacket op47 decoding
Marton Balint [Sat, 30 Sep 2017 21:40:45 +0000 (23:40 +0200)]
avdevice/decklink_dec: fix multipacket op47 decoding

It was disabled by mistake.

Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agoMAINTAINERS: change the decklink maintainer to myself
Marton Balint [Sat, 30 Sep 2017 21:37:01 +0000 (23:37 +0200)]
MAINTAINERS: change the decklink maintainer to myself

Signed-off-by: Marton Balint <cus@passwd.hu>
22 months agomovenc: take packet dts shifting into mention in check_pkt
Jan Ekström [Fri, 29 Sep 2017 22:04:00 +0000 (01:04 +0300)]
movenc: take packet dts shifting into mention in check_pkt

This FFmpeg-specific "fuzzer fix" was never perfect, but now it
stopped encoding of actual content with a big enough DTS shift.
This returns the function to its original state of results
before negative CTS offsets were added.

I remember dealing with this function before, but somehow had
forgotten about it during VDD. The test cases not tripping this
over also didn't help.

22 months agobuild: make h264 VT encoder select the VT encoder dependency
Clément Bœsch [Fri, 29 Sep 2017 09:05:33 +0000 (11:05 +0200)]
build: make h264 VT encoder select the VT encoder dependency

Otherwise, it's never enabled unless the user explicitely enables it.

Regression since 9ef5a2f5f30bdc4ac86275ae4b4708ab4681b21d.

Fixes Ticket #6702.

22 months agoMerge commit 'd154bdd3d053128c908a994bb26e14bbc17f0e53'
James Almer [Wed, 4 Oct 2017 04:05:56 +0000 (01:05 -0300)]
Merge commit 'd154bdd3d053128c908a994bb26e14bbc17f0e53'

* commit 'd154bdd3d053128c908a994bb26e14bbc17f0e53':
  configure: Simplify dlopen check

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit 'd7b2bb5391bf55e8f9421bff7feb4c1fddfac4bf'
James Almer [Wed, 4 Oct 2017 04:03:29 +0000 (01:03 -0300)]
Merge commit 'd7b2bb5391bf55e8f9421bff7feb4c1fddfac4bf'

* commit 'd7b2bb5391bf55e8f9421bff7feb4c1fddfac4bf':
  h264_sei: Check actual presence of picture timing SEI message

This commit is a noop, see 6a37abc59af4d87d4c55f7d812ac62d4d6a7464b

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit '21cca00dfeaec08ca93cf94ed33f4311cf1d8c84'
James Almer [Wed, 4 Oct 2017 02:49:37 +0000 (23:49 -0300)]
Merge commit '21cca00dfeaec08ca93cf94ed33f4311cf1d8c84'

* commit '21cca00dfeaec08ca93cf94ed33f4311cf1d8c84':
  build: Explicitly disable external libraries when not explicitly enabled

This commit is a noop.

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit 'e1a6d63c7eeff2f0ec8173546357bfaa9deecea4'
James Almer [Wed, 4 Oct 2017 02:36:25 +0000 (23:36 -0300)]
Merge commit 'e1a6d63c7eeff2f0ec8173546357bfaa9deecea4'

* commit 'e1a6d63c7eeff2f0ec8173546357bfaa9deecea4':
  fate: Rename WMV8_DRM decoder tests to WMV3_DRM

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit '79331df362fb05a0d04ca9489c87e5b80077a3f4'
James Almer [Wed, 4 Oct 2017 02:08:06 +0000 (23:08 -0300)]
Merge commit '79331df362fb05a0d04ca9489c87e5b80077a3f4'

* commit '79331df362fb05a0d04ca9489c87e5b80077a3f4':
  rtsp: Lazily set up the pollfd array once

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit 'd8f36a6aa33e9f904fa47caa0329ddaac391cd7d'
James Almer [Wed, 4 Oct 2017 02:03:10 +0000 (23:03 -0300)]
Merge commit 'd8f36a6aa33e9f904fa47caa0329ddaac391cd7d'

* commit 'd8f36a6aa33e9f904fa47caa0329ddaac391cd7d':
  nvenc: Fix the preset mapping list

This commit is a noop.

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit '698ac8f9cabd053f2c19346a77b92f8eae4218fc'
James Almer [Wed, 4 Oct 2017 01:59:08 +0000 (22:59 -0300)]
Merge commit '698ac8f9cabd053f2c19346a77b92f8eae4218fc'

* commit '698ac8f9cabd053f2c19346a77b92f8eae4218fc':
  fate: Make null comparison method more useful

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit 'c483398bb7ef66f61ed2dcb09f3d6160683da0eb'
James Almer [Wed, 4 Oct 2017 01:11:58 +0000 (22:11 -0300)]
Merge commit 'c483398bb7ef66f61ed2dcb09f3d6160683da0eb'

* commit 'c483398bb7ef66f61ed2dcb09f3d6160683da0eb':
  build: Drop DOC_ prefix from EXAMPLES-related variables

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit '5263f464db5f2df74ddf712f6d1221b24475fa8e'
James Almer [Wed, 4 Oct 2017 00:40:22 +0000 (21:40 -0300)]
Merge commit '5263f464db5f2df74ddf712f6d1221b24475fa8e'

* commit '5263f464db5f2df74ddf712f6d1221b24475fa8e':
  rtsp: Lazily allocate the pollfd array

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86'
James Almer [Wed, 4 Oct 2017 00:37:37 +0000 (21:37 -0300)]
Merge commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86'

* commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86':
  rtsp: Move the pollfd setup out of the for loop

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit '150e99d694f33ab9ad678834964909aa315d14a1'
James Almer [Wed, 4 Oct 2017 00:34:08 +0000 (21:34 -0300)]
Merge commit '150e99d694f33ab9ad678834964909aa315d14a1'

* commit '150e99d694f33ab9ad678834964909aa315d14a1':
  rtsp: Factor out packet reading

Merged-by: James Almer <jamrial@gmail.com>
22 months agoMerge commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7'
James Almer [Wed, 4 Oct 2017 00:28:07 +0000 (21:28 -0300)]
Merge commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7'

* commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7':
  Use modern avconv syntax for codec selection in documentation and tests

Merged-by: James Almer <jamrial@gmail.com>
22 months agoavformat/mp3dec: Fix definition of MIDDLE_BITS
Ingo Brückl [Tue, 3 Oct 2017 13:50:37 +0000 (15:50 +0200)]
avformat/mp3dec: Fix definition of MIDDLE_BITS

The number of bits from bit #m to #n is n - m plus 1.

Signed-off-by: Ingo Brückl <ib@wupperonline.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/dxv: Check for end of input in dxv_decompress_dxt5()
Michael Niedermayer [Sat, 30 Sep 2017 16:54:07 +0000 (18:54 +0200)]
avcodec/dxv: Check for end of input in dxv_decompress_dxt5()

Fixes: Timeout
Fixes: 3291/clusterfuzz-testcase-4630024655208448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/truemotion2: Fix integer overflows in tm2_high_chroma()
Michael Niedermayer [Sat, 30 Sep 2017 16:54:06 +0000 (18:54 +0200)]
avcodec/truemotion2: Fix integer overflows in tm2_high_chroma()

Fixes: runtime error: signed integer overflow: -1408475220 + -1408475220 cannot be represented in type 'int'
Fixes: 3336/clusterfuzz-testcase-minimized-5656839179993088

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
22 months agoavcodec/aacdec_template: Clear tns present flag on error
Michael Niedermayer [Sat, 30 Sep 2017 16:54:05 +0000 (18:54 +0200)]
avcodec/aacdec_template: Clear tns present flag on error

Fixes: 3444/clusterfuzz-testcase-minimized-6270352105668608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>