ffmpeg.git
19 months agolavc: Add trace_headers bitstream filter
Mark Thompson [Thu, 4 May 2017 22:06:20 +0000 (23:06 +0100)]
lavc: Add trace_headers bitstream filter

Supports all streams that the coded bitstream infrastructure does
(currently H.264, H.265 and MPEG-2).

(cherry picked from commit f11d8a5e8b185340cc50fcbc8a1437b0fbe7e931)

19 months agolavc: Add coded bitstream read/write support for MPEG-2
Mark Thompson [Thu, 4 May 2017 22:03:03 +0000 (23:03 +0100)]
lavc: Add coded bitstream read/write support for MPEG-2

(cherry picked from commit 2bc9ba8d3c41f3a8e56484bd67b05040c7909a01)
(cherry picked from commit a41b69b5eb950c10d8ede472bcc4e88ce4246db9)

19 months agolavc: Add coded bitstream read/write support for H.265
Mark Thompson [Sun, 14 May 2017 15:32:00 +0000 (16:32 +0100)]
lavc: Add coded bitstream read/write support for H.265

(cherry picked from commit 867381b8b51fa21fa2b8f071f508f3d39cc9c1f0)
(cherry picked from commit f763489364416bb6866adc4f4a96012dd2ca1bd0)
(cherry picked from commit 067a9ddeb8feff1f724856f0054930c55219f76b)

19 months agolavc: Add coded bitstream read/write support for H.264
Mark Thompson [Sun, 14 May 2017 15:18:25 +0000 (16:18 +0100)]
lavc: Add coded bitstream read/write support for H.264

(cherry picked from commit acf06f45441be24c5cbae0920579cd69427326a1)
(cherry picked from commit 768eb9182e94a94bc2ef46f565a0dac7afef3b57)
(cherry picked from commit e7f64191b27bcf37cbf7006606f0f439c6cdc24f)

19 months agolavc: Add coded bitstream read/write API
Mark Thompson [Thu, 4 May 2017 22:01:51 +0000 (23:01 +0100)]
lavc: Add coded bitstream read/write API

(cherry picked from commit 18f1706f331bf5dd565774eae680508c8d3a97ad)
(cherry picked from commit 44cde38c8acbef7d5250e6d1b52b1020871e093b)

19 months agohevc: Improve stream constraint values in common header
Mark Thompson [Fri, 23 Jun 2017 23:29:02 +0000 (00:29 +0100)]
hevc: Improve stream constraint values in common header

Add comments to describe the sources of the constraint values expressed here,
and add some more related values which will be used in following patches.

Fix the incorrect values for SPS and PPS count (they are not the same as those
used for H.264), and remove HEVC_MAX_CU_SIZE because it is not used anywhere.

(cherry picked from commit b88da98b34809dedf8882d43ed543632ed233538)

19 months agoh264: Add stream constraint values to the common header
Mark Thompson [Fri, 23 Jun 2017 23:30:20 +0000 (00:30 +0100)]
h264: Add stream constraint values to the common header

With comments describing the derivation of each value.

(cherry picked from commit aaf441465080b9bc57f5ca8dea656f9b2c5dc821)

19 months agoMerge commit '0429f01e4722b8e0c3576a4810a16ca8f6dbc4d4'
James Almer [Tue, 17 Oct 2017 19:48:33 +0000 (16:48 -0300)]
Merge commit '0429f01e4722b8e0c3576a4810a16ca8f6dbc4d4'

* commit '0429f01e4722b8e0c3576a4810a16ca8f6dbc4d4':
  mkv: Export bounds and padding from spherical metadata

This commit is a noop, see bde96422686fdb4bf754e9d03c0c535572b02f30

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '251849f06ce36ce8dc076e0fca2922119fa7e39e'
James Almer [Tue, 17 Oct 2017 19:47:30 +0000 (16:47 -0300)]
Merge commit '251849f06ce36ce8dc076e0fca2922119fa7e39e'

* commit '251849f06ce36ce8dc076e0fca2922119fa7e39e':
  mkv: Add support for Spherical Video elements

See 445204cd5777e029a6674ed0739777817eda5646

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit 'a825980f9f93af32c719497f9aab1e14248ab471'
James Almer [Tue, 17 Oct 2017 19:44:17 +0000 (16:44 -0300)]
Merge commit 'a825980f9f93af32c719497f9aab1e14248ab471'

* commit 'a825980f9f93af32c719497f9aab1e14248ab471':
  mov: Export bounds and padding from spherical metadata
  spherical: Add tiled equirectangular type and projection-specific properties
  mov: Validate cubemap layout

This commit is a noop, see
ac8c72f8f1f758ae7606db42eac83d04418aec48
1b7ffddb3a999f37443c58232b112534c0abcf28
022b4ea5837bb79b9fe32bf707c3117be8e6d730

Merged-by: James Almer <jamrial@gmail.com>
19 months agolavf/cafenc: Allow muxing opus.
Carl Eugen Hoyos [Tue, 17 Oct 2017 19:35:28 +0000 (21:35 +0200)]
lavf/cafenc: Allow muxing opus.

QuickTime does not require the (unknown) kuki chunk for decoding.

19 months agoMerge commit '0f8512c4a87b89b4694053d8ffda48066ee1da62'
James Almer [Tue, 17 Oct 2017 18:27:43 +0000 (15:27 -0300)]
Merge commit '0f8512c4a87b89b4694053d8ffda48066ee1da62'

* commit '0f8512c4a87b89b4694053d8ffda48066ee1da62':
  mov: Validate spherical metadata version

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '236577230051ad61ec67fa2d68e817d54232d2a0'
James Almer [Tue, 17 Oct 2017 18:26:27 +0000 (15:26 -0300)]
Merge commit '236577230051ad61ec67fa2d68e817d54232d2a0'

* commit '236577230051ad61ec67fa2d68e817d54232d2a0':
  mov: Ignore old spherical metadata when newer version is present

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '17adcc40adf1f30cba55c9727dabc1365944d32b'
James Almer [Tue, 17 Oct 2017 18:18:12 +0000 (15:18 -0300)]
Merge commit '17adcc40adf1f30cba55c9727dabc1365944d32b'

* commit '17adcc40adf1f30cba55c9727dabc1365944d32b':
  mov: Fix spherical metadata_source parsing

This commit is a noop, see b9f2f93261548f7cfdfc7a4040b23baed11e5554

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '81bffae368f331b6cd386a814f225a58e3f32f40'
James Almer [Tue, 17 Oct 2017 18:14:10 +0000 (15:14 -0300)]
Merge commit '81bffae368f331b6cd386a814f225a58e3f32f40'

* commit '81bffae368f331b6cd386a814f225a58e3f32f40':
  configure: Check for -no_weak_imports in ldflags on macOS

Merged-by: James Almer <jamrial@gmail.com>
19 months agoavformat: fix build wihout dashenc
Jacek Jendrzej [Thu, 5 Oct 2017 08:34:43 +0000 (10:34 +0200)]
avformat: fix build wihout dashenc

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: add missing optional dep on libfribidi to the drawtext filter
James Almer [Tue, 17 Oct 2017 04:17:32 +0000 (01:17 -0300)]
configure: add missing optional dep on libfribidi to the drawtext filter

Fixes ticket #6740

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoffmpeg: remove hwaccel_lax_profile_check option
Jun Zhao [Mon, 9 Oct 2017 06:13:14 +0000 (02:13 -0400)]
ffmpeg: remove hwaccel_lax_profile_check option

This has been unused for a long time, and the original purpose has been
replaced by the per-stream hwaccel_flags.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
19 months agoconfigure: add missing optional deps on gcrypt and openssl to the hls muxer
James Almer [Mon, 16 Oct 2017 20:47:01 +0000 (17:47 -0300)]
configure: add missing optional deps on gcrypt and openssl to the hls muxer

Should fix ticket #6738

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agolibavcodec/texturedspenc : indent after add rgtc1u_alpha func
Martin Vignali [Thu, 28 Sep 2017 19:46:08 +0000 (21:46 +0200)]
libavcodec/texturedspenc : indent after add rgtc1u_alpha func

Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
19 months agolibavcodec/texturedsp : indent after add rgtc1u_alpha func
Martin Vignali [Thu, 28 Sep 2017 19:45:31 +0000 (21:45 +0200)]
libavcodec/texturedsp : indent after add rgtc1u_alpha func

Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
19 months agolibavcodec/texturedspenc : add rgtc1_u_alpha encoding func
Martin Vignali [Thu, 28 Sep 2017 19:37:46 +0000 (21:37 +0200)]
libavcodec/texturedspenc : add rgtc1_u_alpha encoding func

this func encode the alpha channel of the rgba input
to an rgtc1u block

Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
19 months agolibavcodec/texturedsp : add rgtc1u_alpha decoding func
Martin Vignali [Thu, 28 Sep 2017 19:36:58 +0000 (21:36 +0200)]
libavcodec/texturedsp : add rgtc1u_alpha decoding func

this func decode an rgtc1 texture and overwrite only the alpha channel
of the dest RGBA picture

Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
19 months agoconfigure: add pkg-config checks for libcdio/cdparanoia
James Almer [Sun, 15 Oct 2017 00:20:27 +0000 (21:20 -0300)]
configure: add pkg-config checks for libcdio/cdparanoia

Should be more complete than the now fallback checks.

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoavcodec/dvbsubdec: Split best score computation out of loop in compute_default_clut()
Michael Niedermayer [Sun, 1 Oct 2017 16:10:36 +0000 (18:10 +0200)]
avcodec/dvbsubdec: Split best score computation out of loop in compute_default_clut()

3% faster

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoavcodec/dvbsubdec: Factor a few expressions out of compute_default_clut()
Michael Niedermayer [Sun, 1 Oct 2017 16:10:35 +0000 (18:10 +0200)]
avcodec/dvbsubdec: Factor a few expressions out of compute_default_clut()

32% faster loop

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 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>
19 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>
19 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>
19 months agoconfigure: switch the libzvbi check to pkg-config
Reino Wijnsma [Fri, 13 Oct 2017 22:52:27 +0000 (19:52 -0300)]
configure: switch the libzvbi check to pkg-config

The library has several dependencies that vary between systems.
Their pkg-config properly lists them all.

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: add missing pthreads extralib to the libilbc check
James Almer [Fri, 13 Oct 2017 22:50:37 +0000 (19:50 -0300)]
configure: add missing pthreads extralib to the libilbc check

Debugged with the help of Reino Wijnsma.

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: add a -lstdc++ flag to the some external library checks
James Almer [Fri, 13 Oct 2017 18:16:55 +0000 (15:16 -0300)]
configure: add a -lstdc++ flag to the some external library checks

Two of them are missing it in their pkg-config file, so adding it
here is a workaround until said pkg-config files are fixed.

Debugged with the help of Reino Wijnsma.

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agolibavformat/wtvdec: return AVERROR_EOF on EOF
Daniel Kucera [Mon, 5 Jun 2017 18:28:30 +0000 (20:28 +0200)]
libavformat/wtvdec: return AVERROR_EOF on EOF

Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
19 months agoconfigure: add missing zlib extralibs to the libmysofa check
James Almer [Fri, 13 Oct 2017 14:22:44 +0000 (11:22 -0300)]
configure: add missing zlib extralibs to the libmysofa check

Should fix checks with static builds.

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: list libv4l2 as an optional library for v4l2
James Almer [Thu, 12 Oct 2017 22:36:19 +0000 (19:36 -0300)]
configure: list libv4l2 as an optional library for v4l2

Fixes regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8
and 734ed38931103c523c42333633a315a0ce1b5eb2.

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agodoc/filters: correct typo and incomplete desc.
Gyan Doshi [Thu, 12 Oct 2017 13:16:06 +0000 (18:46 +0530)]
doc/filters: correct typo and incomplete desc.

Correct typo in signalstats filter section and qualify description for variable
in select filter.

Signed-off-by: Gyan Doshi <gyandoshi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoavcodec/mips: Improve hevc uni weighted vert mc msa functions
Kaustubh Raste [Wed, 11 Oct 2017 08:51:09 +0000 (14:21 +0530)]
avcodec/mips: Improve hevc uni weighted vert mc msa functions

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>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoavcodec/mips: Improve hevc uni horiz mc msa functions
Kaustubh Raste [Wed, 11 Oct 2017 08:50:28 +0000 (14:20 +0530)]
avcodec/mips: Improve hevc uni horiz mc msa functions

Update macros to remove adds.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoavcodec/mips: Improve hevc bi copy mc msa functions
Kaustubh Raste [Wed, 11 Oct 2017 08:49:27 +0000 (14:19 +0530)]
avcodec/mips: Improve hevc bi copy mc msa functions

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

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoavcodec/mips: Improve avc put mc 12, 32 and 22 msa functions
Kaustubh Raste [Wed, 11 Oct 2017 08:47:21 +0000 (14:17 +0530)]
avcodec/mips: Improve avc put mc 12, 32 and 22 msa functions

Remove loops and unroll as block sizes are known.
Removed unused functions.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoavcodec/mips: Improve avc chroma avg horiz mc msa functions
Kaustubh Raste [Wed, 11 Oct 2017 08:13:30 +0000 (13:43 +0530)]
avcodec/mips: Improve avc chroma avg horiz mc msa functions

Replace generic with block size specific function.
Load the specific destination bytes instead of MSA load and pack.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoconfigure: explicitly list videotoolbox deps for avutil
James Almer [Fri, 13 Oct 2017 00:04:26 +0000 (21:04 -0300)]
configure: explicitly list videotoolbox deps for avutil

There's a bug in configure where they are not being resolved right,
so make them explicit deps for avutil for now.

19 months agoconfigure: Fix sem_timedwait probe
Luca Barbato [Thu, 12 Oct 2017 22:20:28 +0000 (19:20 -0300)]
configure: Fix sem_timedwait probe

(cherry-picked from libav commit 41262498ff89ef48e5ce4823b2fc2dc514a3eb0c)
Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: fix pthread_cancel check
James Almer [Thu, 12 Oct 2017 23:24:36 +0000 (20:24 -0300)]
configure: fix pthread_cancel check

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: fix CoreGraphics module name
James Almer [Thu, 12 Oct 2017 23:05:39 +0000 (20:05 -0300)]
configure: fix CoreGraphics module name

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agolavc/pixlet: remove unecessary intermediate nb_levels variable
Clément Bœsch [Thu, 12 Oct 2017 22:21:11 +0000 (00:21 +0200)]
lavc/pixlet: remove unecessary intermediate nb_levels variable

This is a change imported from Libav.

19 months agolavc/pixlet: reduce diff with Libav (cosmetics only)
Clément Bœsch [Thu, 12 Oct 2017 18:45:53 +0000 (20:45 +0200)]
lavc/pixlet: reduce diff with Libav (cosmetics only)

19 months agobuild: fix builds configured with a suffix
James Almer [Thu, 12 Oct 2017 20:32:10 +0000 (17:32 -0300)]
build: fix builds configured with a suffix

Regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
19 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>
19 months agolavc/ppc/fft_init: Fix compilation on ppc64le with --disable-vsx.
Carl Eugen Hoyos [Thu, 12 Oct 2017 21:14:55 +0000 (23:14 +0200)]
lavc/ppc/fft_init: Fix compilation on ppc64le with --disable-vsx.

19 months agoMerge commit '57b753b445e23363c997a8ec1c556e0b0f6e9da3'
James Almer [Thu, 12 Oct 2017 21:09:11 +0000 (18:09 -0300)]
Merge commit '57b753b445e23363c997a8ec1c556e0b0f6e9da3'

* commit '57b753b445e23363c997a8ec1c556e0b0f6e9da3':
  build: Prefer NASM assembler over YASM
  build: Make x86 assembler commandline-selectable
  build: Special-case handling of SDL CFLAGS

This commit is a noop, see
fde3bb16f90ac456709c7305b9e230e8327d8625
3cc73d3d6d2a98cd0da3deda90760729c82cdeeb
4f9297ac3b39098547863d28fbc8d2a906d5be49

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '003124ebf4a05f1347c74104216887ddd2e5aad4'
James Almer [Thu, 12 Oct 2017 20:44:06 +0000 (17:44 -0300)]
Merge commit '003124ebf4a05f1347c74104216887ddd2e5aad4'

* commit '003124ebf4a05f1347c74104216887ddd2e5aad4':
  build: Fix logic of clock_gettime() check

Merged-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: add missing libfontconfig and libfreetype dependencies to showcqt filter
James Almer [Thu, 12 Oct 2017 17:17:43 +0000 (14:17 -0300)]
configure: add missing libfontconfig and libfreetype dependencies to showcqt filter

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit 'b44bd7ee7f7d834c1e22b5f33674393e5c0267c5'
James Almer [Thu, 12 Oct 2017 18:03:23 +0000 (15:03 -0300)]
Merge commit 'b44bd7ee7f7d834c1e22b5f33674393e5c0267c5'

* commit 'b44bd7ee7f7d834c1e22b5f33674393e5c0267c5':
  pixlet: Fix architecture-dependent code and values

This commit is a noop, see a6b1180e390925c0ceb78fd223fd18f8c1e39c94

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44'
James Almer [Thu, 12 Oct 2017 17:58:34 +0000 (14:58 -0300)]
Merge commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44'

* commit '808ef43597b1e3d6e69a5b9abe2237c8ddb97b44':
  build: Explicitly set 32-bit/64-bit object formats for nasm/yasm

See d44935cbf4e42e842c11b1eeeaa28377dc8fd6d2

Merged-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: fix libxavs check
James Almer [Thu, 12 Oct 2017 01:28:29 +0000 (22:28 -0300)]
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 6dfcbd80ad446ff163b47f2bf432bbf706436ea8.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '6eef263aca281fb582e1fa3d841ac20ef747a252'
James Almer [Thu, 12 Oct 2017 16:48:08 +0000 (13:48 -0300)]
Merge commit '6eef263aca281fb582e1fa3d841ac20ef747a252'

* commit '6eef263aca281fb582e1fa3d841ac20ef747a252':
  x86: Merge align directives into SECTION_RODATA declarations where possible

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '3303f86467efa99f23c670707f5be094cc9ce547'
James Almer [Thu, 12 Oct 2017 16:39:39 +0000 (13:39 -0300)]
Merge commit '3303f86467efa99f23c670707f5be094cc9ce547'

* commit '3303f86467efa99f23c670707f5be094cc9ce547':
  nvenc: Remove qmin and qmax constraints for nvenc vbr

[10:06:59 CEST] <BtbN> jamrial, 3303f86467 is a no-op. NV_ENC_PARAMS_RC_2_PASS_VBR is a deprecated rc mode(http://git.videolan.org/?p=ffmpeg.git;a=blob;f=compat/nvenc/nvEncodeAPI.h;h=c3a829421282d5f22f82fc285723f13eb660f053;hb=HEAD#l268).
[10:07:14 CEST] <BtbN> And the first hunk with qmin/qmax was applied to ffmpeg quite a while ago already.
[10:07:49 CEST] <BtbN> In a slightly different fashion, but with the same effect
[10:07:58 CEST] <BtbN> Came as a patch from nvidia iirc

Merged-by: James Almer <jamrial@gmail.com>
19 months agoconfigure: add missing OpenCL dependency to libavutil
James Almer [Thu, 12 Oct 2017 15:27:48 +0000 (12:27 -0300)]
configure: add missing OpenCL dependency to libavutil

Tested-by: wm4
Signed-off-by: James Almer <jamrial@gmail.com>
19 months agolavc/proresdec2: Do not mix variable declaration and statement.
Carl Eugen Hoyos [Thu, 12 Oct 2017 10:43:09 +0000 (12:43 +0200)]
lavc/proresdec2: Do not mix variable declaration and statement.

Fixes ticket #6728.

19 months agoconfigure: fix dependencies for v4l2_indev
James Almer [Thu, 12 Oct 2017 01:23:51 +0000 (22:23 -0300)]
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>
19 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>
19 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>
19 months agoMerge commit 'aba5b94859ef1cb8f517dc64bce86a3021316ae8'
James Almer [Wed, 11 Oct 2017 22:44:56 +0000 (19:44 -0300)]
Merge commit 'aba5b94859ef1cb8f517dc64bce86a3021316ae8'

* commit 'aba5b94859ef1cb8f517dc64bce86a3021316ae8':
  Add Apple Pixlet decoder
  libavutil: add av_mod_uintp2
  intmath: add faster clz support

This commit is a noop, see
0dd8a3d71e2c01d42e868d6c6b8974fadfcc529e
d13e521cc861e791545dd6022fbf93f821e33618
73651090ca1183f37753ee30a7e206ca4fb9f4f0

Merged-by: James Almer <jamrial@gmail.com>
19 months agofate: add missing closing bracket
James Almer [Wed, 11 Oct 2017 22:35:56 +0000 (19:35 -0300)]
fate: add missing closing bracket

Regression since 85e2fe6281834ac7f16a12a332d9de4b2ec3cd29

Signed-off-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '5ff3b5cafcc685b6936d16602b0f80aa09a95870'
James Almer [Wed, 11 Oct 2017 22:05:58 +0000 (19:05 -0300)]
Merge commit '5ff3b5cafcc685b6936d16602b0f80aa09a95870'

* commit '5ff3b5cafcc685b6936d16602b0f80aa09a95870':
  build: Add pthreads to list of avutil extralibs

This commit is a noop, see 6dfcbd80ad446ff163b47f2bf432bbf706436ea8

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit 'db869f4ea4405fb8f9736e5ecdca70f77621a28e'
James Almer [Wed, 11 Oct 2017 22:02:04 +0000 (19:02 -0300)]
Merge commit 'db869f4ea4405fb8f9736e5ecdca70f77621a28e'

* commit 'db869f4ea4405fb8f9736e5ecdca70f77621a28e':
  fate: Add build-only targets to FATE

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '3c0efbd03349ae68d3a25a082222652a102e3fd4'
James Almer [Wed, 11 Oct 2017 21:40:29 +0000 (18:40 -0300)]
Merge commit '3c0efbd03349ae68d3a25a082222652a102e3fd4'

* commit '3c0efbd03349ae68d3a25a082222652a102e3fd4':
  build: Allow generating dependencies as a side-effect of assembling
  build: Generalize yasm/nasm-related variable names

This commit is a noop, see
fd502f4f5fe8d2f241102ca9a529aa7f88209c22
0cc0c5b6dbf187f9c096de03d999da040197ffe6

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit 'd1d6230ea3dd2c34bcd121f958706f3177f8d8c5'
James Almer [Wed, 11 Oct 2017 21:37:56 +0000 (18:37 -0300)]
Merge commit 'd1d6230ea3dd2c34bcd121f958706f3177f8d8c5'

* commit 'd1d6230ea3dd2c34bcd121f958706f3177f8d8c5':
  build: Add "build" shorthand target that depends on all compile targets

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '4d1f7e8bc7516e6b7b15f754af4a665b3f8af79e'
James Almer [Wed, 11 Oct 2017 21:33:50 +0000 (18:33 -0300)]
Merge commit '4d1f7e8bc7516e6b7b15f754af4a665b3f8af79e'

* commit '4d1f7e8bc7516e6b7b15f754af4a665b3f8af79e':
  build: Skip generating .version files when cleaning

This commit is a noop, see cbe181c8e1611aaee2a85ab522e17b1322bdd4de

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '58407b4d74c99e30dbd40fe468c69dbd25ea4255'
James Almer [Wed, 11 Oct 2017 21:32:30 +0000 (18:32 -0300)]
Merge commit '58407b4d74c99e30dbd40fe468c69dbd25ea4255'

* commit '58407b4d74c99e30dbd40fe468c69dbd25ea4255':
  configure: Fix typo in objcc default setting
  x86: hevc: Add missing colons after assembly labels

This commit is a noop.

Merged-by: James Almer <jamrial@gmail.com>
19 months agoMerge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
James Almer [Wed, 11 Oct 2017 20:55:25 +0000 (17:55 -0300)]
Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

* commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
  build: Fine-grained link-time dependency settings

Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
d9da7151eef7fc469787e7298196cea291acfd82 and
5e27ef800bfa2be17a6353ddedac6b7400e4624f.

Merged-by: James Almer <jamrial@gmail.com>
19 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>
19 months agoRELEASE: update for git after 3.4 branchpoint
Michael Niedermayer [Wed, 11 Oct 2017 00:46:23 +0000 (02:46 +0200)]
RELEASE: update for git after 3.4 branchpoint

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 months agoBump version for master after 3.4 branchpoint n3.5-dev
Michael Niedermayer [Wed, 11 Oct 2017 00:45:37 +0000 (02:45 +0200)]
Bump version for master after 3.4 branchpoint

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>
19 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>