ffmpeg.git
2 years agoMerge commit 'eeb6849cedac099d41feb482da581f4059c63ca7'
Hendrik Leppkes [Mon, 14 Nov 2016 11:03:00 +0000 (12:03 +0100)]
Merge commit 'eeb6849cedac099d41feb482da581f4059c63ca7'

* commit 'eeb6849cedac099d41feb482da581f4059c63ca7':
  rle: K&R formatting cosmetics

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '326d9116936ab61d13ac4142b49c7337daf7c4c0'
Hendrik Leppkes [Mon, 14 Nov 2016 10:50:03 +0000 (11:50 +0100)]
Merge commit '326d9116936ab61d13ac4142b49c7337daf7c4c0'

* commit '326d9116936ab61d13ac4142b49c7337daf7c4c0':
  build: Drop unnecessary libavcodec <-> libavformat object dependencies

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'e72d6fa08a3c1876109149401753a8d2c736d418'
Hendrik Leppkes [Mon, 14 Nov 2016 10:19:25 +0000 (11:19 +0100)]
Merge commit 'e72d6fa08a3c1876109149401753a8d2c736d418'

* commit 'e72d6fa08a3c1876109149401753a8d2c736d418':
  build: Move MP2 muxer declaration away from MP3 muxer code

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '67cb2c0f73ec08bdcecd675c1ffe25c3a5b26ef2'
Hendrik Leppkes [Mon, 14 Nov 2016 09:50:50 +0000 (10:50 +0100)]
Merge commit '67cb2c0f73ec08bdcecd675c1ffe25c3a5b26ef2'

* commit '67cb2c0f73ec08bdcecd675c1ffe25c3a5b26ef2':
  checkasm: hevc: Iterate over features first, then over bitdepths

Noop, we don't have these checkasm tests.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'fe27792fd779ac4cdd5e57be5f6f488483c307b2'
Hendrik Leppkes [Mon, 14 Nov 2016 09:42:36 +0000 (10:42 +0100)]
Merge commit 'fe27792fd779ac4cdd5e57be5f6f488483c307b2'

* commit 'fe27792fd779ac4cdd5e57be5f6f488483c307b2':
  build: Move ff_mpeg12_frame_rate_tab to a separate file

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agolavc/hevc_ps: Use correct pix_fmt for 10bit 4:0:0.
Carl Eugen Hoyos [Mon, 14 Nov 2016 09:36:25 +0000 (10:36 +0100)]
lavc/hevc_ps: Use correct pix_fmt for 10bit 4:0:0.

Fixes the second sample from ticket #5544.

2 years agolsws: Add GRAY10 conversion.
Carl Eugen Hoyos [Mon, 14 Nov 2016 00:55:49 +0000 (01:55 +0100)]
lsws: Add GRAY10 conversion.

Based on 19be5fb7 by Luca Barbato.

2 years agolavu/pixfmt: Add GRAY10
Carl Eugen Hoyos [Mon, 14 Nov 2016 00:43:40 +0000 (01:43 +0100)]
lavu/pixfmt: Add GRAY10

Based on 7471352f by Luca Barbato.

2 years agoMerge commit '8c929037ec75fbe9f367e0a31ee34839e92de481'
Hendrik Leppkes [Mon, 14 Nov 2016 09:09:44 +0000 (10:09 +0100)]
Merge commit '8c929037ec75fbe9f367e0a31ee34839e92de481'

* commit '8c929037ec75fbe9f367e0a31ee34839e92de481':
  build: Add a new component for H.264 parsing code

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '3c08b7bc761b6411f55db68189721638dde2c46a'
Hendrik Leppkes [Mon, 14 Nov 2016 09:05:43 +0000 (10:05 +0100)]
Merge commit '3c08b7bc761b6411f55db68189721638dde2c46a'

* commit '3c08b7bc761b6411f55db68189721638dde2c46a':
  ffv1: Report additional bitstream information in verbose mode

Noop, we already have bitstream information printing.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'fe6e5cbea7dbd5d2c67d79b5570e26debb70e95b'
Hendrik Leppkes [Mon, 14 Nov 2016 09:03:30 +0000 (10:03 +0100)]
Merge commit 'fe6e5cbea7dbd5d2c67d79b5570e26debb70e95b'

* commit 'fe6e5cbea7dbd5d2c67d79b5570e26debb70e95b':
  ffv1: Remove version 2 and mark version 3 as non-experimental

Noop, our ffv1 decoder is far more advanced and version 3 has been stable for a while.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '7c55fac7dfa8bad9644dea5d03309da30be69563'
Hendrik Leppkes [Mon, 14 Nov 2016 09:02:33 +0000 (10:02 +0100)]
Merge commit '7c55fac7dfa8bad9644dea5d03309da30be69563'

* commit '7c55fac7dfa8bad9644dea5d03309da30be69563':
  fate: Add test for webp

Noop, we already have a variety of webp tests, including a fate-webp target,
which would collide with this test.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agolavf/mux: don't warn about missing timestamps on attached pictures
Rodger Combs [Sun, 13 Nov 2016 00:01:52 +0000 (18:01 -0600)]
lavf/mux: don't warn about missing timestamps on attached pictures

2 years agolavc/audiotoolboxdec: fix OSX SDK detection
Dmitry Kalinkin [Tue, 6 Sep 2016 04:11:17 +0000 (07:11 +0300)]
lavc/audiotoolboxdec: fix OSX SDK detection

__MAC_10_11 can be present in updated revision of an older SDK so it
can't reliably detect availability of kAudioFormatEnhancedAC3 constant.

Fixes: b4daa2c40f ('lavc/audiotoolboxdec: add eac3 decoder')
Cc: Rodger Combs <rodger.combs@gmail.com>
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Previous version reviewed by: Rodger Combs <rodger.combs@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi/ebur128: use ff_ prefix
Kyle Swanson [Mon, 14 Nov 2016 01:11:07 +0000 (19:11 -0600)]
lavfi/ebur128: use ff_ prefix

Signed-off-by: Kyle Swanson <k@ylo.ph>
2 years agodoc/ffmpeg: add documentation for the disposition option
Simon Thelen [Fri, 11 Nov 2016 00:27:12 +0000 (01:27 +0100)]
doc/ffmpeg: add documentation for the disposition option

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc/dpx: Support GRAY12 colourspace.
Carl Eugen Hoyos [Thu, 10 Nov 2016 22:04:46 +0000 (23:04 +0100)]
lavc/dpx: Support GRAY12 colourspace.

2 years agoMerge commit 'e48746deec48e9ff195841bc3266b4e153a878cd'
Hendrik Leppkes [Sun, 13 Nov 2016 22:02:39 +0000 (23:02 +0100)]
Merge commit 'e48746deec48e9ff195841bc3266b4e153a878cd'

* commit 'e48746deec48e9ff195841bc3266b4e153a878cd':
  checkasm: h264dsp: Move the x and y variables into the randomize_buffer macro

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'e57de6faa1e796099091c9af947d4755edacccaf'
Hendrik Leppkes [Sun, 13 Nov 2016 22:00:07 +0000 (23:00 +0100)]
Merge commit 'e57de6faa1e796099091c9af947d4755edacccaf'

* commit 'e57de6faa1e796099091c9af947d4755edacccaf':
  checkasm: h264dsp: Initialize the padding area

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '82b7525173f20702a8cbc26ebedbf4b69b8fecec'
Hendrik Leppkes [Sun, 13 Nov 2016 21:59:35 +0000 (22:59 +0100)]
Merge commit '82b7525173f20702a8cbc26ebedbf4b69b8fecec'

* commit '82b7525173f20702a8cbc26ebedbf4b69b8fecec':
  Add an OpenH264 decoder wrapper

This commit is a noop, see c5d326f551b0312ff581bf1df35b21d956e01523

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05'
Hendrik Leppkes [Sun, 13 Nov 2016 21:55:34 +0000 (22:55 +0100)]
Merge commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05'

* commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05':
  movenc: Apply offsets on timestamps when peeking into interleaving queues

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'eccfb9778ae939764d17457f34338d140832d9e1'
Hendrik Leppkes [Sun, 13 Nov 2016 21:38:45 +0000 (22:38 +0100)]
Merge commit 'eccfb9778ae939764d17457f34338d140832d9e1'

* commit 'eccfb9778ae939764d17457f34338d140832d9e1':
  qsvdec_hevc: add the UID of the HEVC HW decoder plugin

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'c67594a2c7fd4381e6d44246b18487c7e6b75f02'
Hendrik Leppkes [Sun, 13 Nov 2016 21:38:29 +0000 (22:38 +0100)]
Merge commit 'c67594a2c7fd4381e6d44246b18487c7e6b75f02'

* commit 'c67594a2c7fd4381e6d44246b18487c7e6b75f02':
  qsvdec_hevc: fix a variable name

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'f62bb216ac4cfbbff16108c6bac35a0282532972'
Hendrik Leppkes [Sun, 13 Nov 2016 21:36:18 +0000 (22:36 +0100)]
Merge commit 'f62bb216ac4cfbbff16108c6bac35a0282532972'

* commit 'f62bb216ac4cfbbff16108c6bac35a0282532972':
  hwcontext_vaapi: allow transfers to/from any size of sw frame

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'c3f113d58488df7594a489bdbb993a69ad47063c'
Hendrik Leppkes [Sun, 13 Nov 2016 21:35:57 +0000 (22:35 +0100)]
Merge commit 'c3f113d58488df7594a489bdbb993a69ad47063c'

* commit 'c3f113d58488df7594a489bdbb993a69ad47063c':
  vf_hwdownload: allocate the destination frame for the pool size

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8'
Hendrik Leppkes [Sun, 13 Nov 2016 21:35:49 +0000 (22:35 +0100)]
Merge commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8'

* commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8':
  hwcontext: allocate the destination frame for the pool size

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498'
Hendrik Leppkes [Sun, 13 Nov 2016 21:35:04 +0000 (22:35 +0100)]
Merge commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498'

* commit '5fcae3b3f93fd02b3d1e009b9d9b17410fca9498':
  hwcontext: clarify the behaviour of transfer_data() for cropped frames

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agodoc/libav-merge: add skipped fixup commits to the list of missing changes
Hendrik Leppkes [Sun, 13 Nov 2016 21:34:01 +0000 (22:34 +0100)]
doc/libav-merge: add skipped fixup commits to the list of missing changes

2 years agoMerge commit '94ebf5565849e4dc036d2ca43979571ed3736457'
Hendrik Leppkes [Sun, 13 Nov 2016 21:33:05 +0000 (22:33 +0100)]
Merge commit '94ebf5565849e4dc036d2ca43979571ed3736457'

* commit '94ebf5565849e4dc036d2ca43979571ed3736457':
  avconv: restructure sending EOF to filters

Noop, as its a fixup to a previously skipped commit

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'd2e56cf753a6c462041dee897d9d0c90f349988c'
Hendrik Leppkes [Sun, 13 Nov 2016 21:32:48 +0000 (22:32 +0100)]
Merge commit 'd2e56cf753a6c462041dee897d9d0c90f349988c'

* commit 'd2e56cf753a6c462041dee897d9d0c90f349988c':
  avconv: move flushing the queued frames to configure_filtergraph()

Noop, as its a fixup to a previously skipped commit

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '7a745f014f528d1001394ae4d2f4ed1a20bf7fa2'
Hendrik Leppkes [Sun, 13 Nov 2016 21:29:04 +0000 (22:29 +0100)]
Merge commit '7a745f014f528d1001394ae4d2f4ed1a20bf7fa2'

* commit '7a745f014f528d1001394ae4d2f4ed1a20bf7fa2':
  options_table: Add aliases for color properties

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agohwcontext_vaapi: add a quirk for the missing MemoryType attribute
Anton Khirnov [Fri, 30 Sep 2016 19:21:46 +0000 (21:21 +0200)]
hwcontext_vaapi: add a quirk for the missing MemoryType attribute

The Intel binary iHD driver does not support the
VASurfaceAttribMemoryType, so surface allocation will fail when using
it.

(cherry picked from commit 2124711b950b03c582a119c75f52a87acc32d6ec)

2 years agohwcontext_vaapi: Try the first render node as the default DRM device
Mark Thompson [Thu, 28 Jul 2016 22:28:30 +0000 (23:28 +0100)]
hwcontext_vaapi: Try the first render node as the default DRM device

If no string argument is supplied when av_hwdevice_ctx_create() is
called to create a VAAPI device, we currently only try the default
X11 display (that is, $DISPLAY) to find a device, and will therefore
fail in the absence of an X server to connect to.  Change the logic
to also look for a device via the first DRM render node (that is,
"/dev/dri/renderD128"), which is probably the right thing to use in
most simple configurations which only have one DRM device.

(cherry picked from commit 121f34d5f0c8d7d376829a467590fbbe4c228f4f)

2 years agovf_scale_vaapi: Respect driver quirks around buffer destruction
Mark Thompson [Sun, 26 Jun 2016 21:35:49 +0000 (22:35 +0100)]
vf_scale_vaapi: Respect driver quirks around buffer destruction

(cherry picked from commit 582d4211e00015b68626f77ce4af53161e2b1713)

2 years agovaapi_encode: Respect driver quirks around buffer destruction
Mark Thompson [Sun, 12 Jun 2016 16:28:28 +0000 (17:28 +0100)]
vaapi_encode: Respect driver quirks around buffer destruction

No longer leaks memory when used with a driver with the "render does
not destroy param buffers" quirk (i.e. Intel i965).

(cherry picked from commit 221ffca6314ed3ba9d38464ea50cd85251c04e74)
Fixes ticket #5871.

2 years agohwcontext_vaapi: Add driver quirks to the hwdevice
Mark Thompson [Sun, 12 Jun 2016 16:20:25 +0000 (17:20 +0100)]
hwcontext_vaapi: Add driver quirks to the hwdevice

The driver being used is detected inside av_hwdevice_ctx_init() and
the quirks field then set from a table of known device.  If this
behaviour is unwanted, the user can also set the quirks field
manually.

Also adds the Intel i965 driver quirk (it does not destroy parameter
buffers used in a call to vaRenderPicture()) and detects that driver
to set it.

(cherry picked from commit 4926fa9a4aa03f3b751f52e900b9efb87fea0591)

2 years agofilmstripdec: correctly check image dimensions
Andreas Cadhalpun [Sun, 13 Nov 2016 17:22:12 +0000 (18:22 +0100)]
filmstripdec: correctly check image dimensions

This prevents a division by zero in read_packet.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoffmpeg_qsv: Fix hwaccel transcoding
Mark Thompson [Sun, 13 Nov 2016 15:37:52 +0000 (15:37 +0000)]
ffmpeg_qsv: Fix hwaccel transcoding

Set up the encoder with a hardware context which will match the one
the decoder will use when it starts later.

Includes 02c2761973dfc886e94a60a9c7d6d30c296d5b8c, with additional
hackery to get around a3a0230a9870b9018dc7415ae5872784d524cfe5 being
skipped.

2 years agoMerge commit '444a36269f853844369af0a9836507e5a2780323'
Hendrik Leppkes [Sun, 13 Nov 2016 17:38:16 +0000 (18:38 +0100)]
Merge commit '444a36269f853844369af0a9836507e5a2780323'

* commit '444a36269f853844369af0a9836507e5a2780323':
  pixdesc: Fix AVCOL_TRC_BT2020_12 name

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'f172e22d6aed0bff36e975bafb0183b6779f9444'
Hendrik Leppkes [Sun, 13 Nov 2016 17:32:07 +0000 (18:32 +0100)]
Merge commit 'f172e22d6aed0bff36e975bafb0183b6779f9444'

* commit 'f172e22d6aed0bff36e975bafb0183b6779f9444':
  pixdesc: Add aliases to SMPTE color properties

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '8a62d2c28fbacd1ae20c35887a1eecba2be14371'
Hendrik Leppkes [Sun, 13 Nov 2016 16:38:40 +0000 (17:38 +0100)]
Merge commit '8a62d2c28fbacd1ae20c35887a1eecba2be14371'

* commit '8a62d2c28fbacd1ae20c35887a1eecba2be14371':
  vaapi_encode: Maintain a pool of bitstream output buffers

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'bd31c61cf94d01dbe1051cf65874e7b2c0ac5454'
Hendrik Leppkes [Sun, 13 Nov 2016 16:33:31 +0000 (17:33 +0100)]
Merge commit 'bd31c61cf94d01dbe1051cf65874e7b2c0ac5454'

* commit 'bd31c61cf94d01dbe1051cf65874e7b2c0ac5454':
  avconv: Remove hw_device_ctx output filter reinit hack

Noop, since our hwaccel infrastructure still requires this.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '4a081f224e12f4227ae966bcbdd5384f22121ecf'
Hendrik Leppkes [Sun, 13 Nov 2016 16:30:33 +0000 (17:30 +0100)]
Merge commit '4a081f224e12f4227ae966bcbdd5384f22121ecf'

* commit '4a081f224e12f4227ae966bcbdd5384f22121ecf':
  libavcodec: fix constness in clobber test avcodec_open2() wrappers

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agodoc: update merge status for recent additions and skipped merges
Hendrik Leppkes [Sun, 13 Nov 2016 16:29:01 +0000 (17:29 +0100)]
doc: update merge status for recent additions and skipped merges

2 years agoMerge commit '02c2761973dfc886e94a60a9c7d6d30c296d5b8c'
Hendrik Leppkes [Sun, 13 Nov 2016 16:26:53 +0000 (17:26 +0100)]
Merge commit '02c2761973dfc886e94a60a9c7d6d30c296d5b8c'

* commit '02c2761973dfc886e94a60a9c7d6d30c296d5b8c':
  avconv_qsv: use the device creation API

Not merged, our ffmpeg hwaccel infra is not quite the same as avconvs.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '232399e3ee219d16d0e0d482c9f31a26202d4993'
Hendrik Leppkes [Sun, 13 Nov 2016 16:25:23 +0000 (17:25 +0100)]
Merge commit '232399e3ee219d16d0e0d482c9f31a26202d4993'

* commit '232399e3ee219d16d0e0d482c9f31a26202d4993':
  avconv: pass the hwaccel frames context to the decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'a3a0230a9870b9018dc7415ae5872784d524cfe5'
Hendrik Leppkes [Sun, 13 Nov 2016 16:25:05 +0000 (17:25 +0100)]
Merge commit 'a3a0230a9870b9018dc7415ae5872784d524cfe5'

* commit 'a3a0230a9870b9018dc7415ae5872784d524cfe5':
  avconv: init filtergraphs only after we have a frame on each input

This commit is a noop since it doesn't apply cleanly due to differences
in the dataflow between avconv and ffmpeg, and thus fixing this in the
scope of a merge is unfeasible.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '3e265ca58f0505470186dce300ab66a6eac3978e'
Hendrik Leppkes [Sun, 13 Nov 2016 16:23:57 +0000 (17:23 +0100)]
Merge commit '3e265ca58f0505470186dce300ab66a6eac3978e'

* commit '3e265ca58f0505470186dce300ab66a6eac3978e':
  avconv: do packet ts rescaling in write_packet()

This commit is a noop since it doesn't apply cleanly due to differences
in the dataflow between avconv and ffmpeg, and thus fixing this in the
scope of a merge is unfeasible.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5'
Hendrik Leppkes [Sun, 13 Nov 2016 14:33:39 +0000 (15:33 +0100)]
Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5'

* commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5':
  avconv: decouple configuring filtergraphs and setting output parameters

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoMerge commit 'ba7397baef796ca3991fe1c921bc91054407c48b'
Hendrik Leppkes [Sun, 13 Nov 2016 14:17:00 +0000 (15:17 +0100)]
Merge commit 'ba7397baef796ca3991fe1c921bc91054407c48b'

* commit 'ba7397baef796ca3991fe1c921bc91054407c48b':
  avconv: factor out initializing stream parameters for encoding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2 years agoffmpeg_filter: fix hwaccel transcoding
Hendrik Leppkes [Fri, 11 Nov 2016 13:47:49 +0000 (14:47 +0100)]
ffmpeg_filter: fix hwaccel transcoding

Based on a patch by Yogender Gupta <ygupta@nvidia.com>

2 years agovp9_mc_template: limit assert to SCALED == 0
Andreas Cadhalpun [Sat, 12 Nov 2016 22:45:52 +0000 (23:45 +0100)]
vp9_mc_template: limit assert to SCALED == 0

The handling of the other block sizes was limited to 'SCALED == 0' in
commit dc96c0f9fc96bf4167633befc074394062793322, so this assert should
be disabled, too, as it can now be triggered.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoconfigure: use check_lib2 for cuda and cuvid
Hendrik Leppkes [Sat, 12 Nov 2016 00:37:57 +0000 (01:37 +0100)]
configure: use check_lib2 for cuda and cuvid

Fixes building for Windows x86 with MSVC using the link libraries distributed with the CUDA SDK.

check_lib2 is required here because it includes the header to get the full signature of the
function, including the stdcall calling convention and all of its arguments, which enables
the linker to determine the fully qualified object name and resolve it through the import
library, since the CUDA SDK libraries do not include un-qualified aliases.

2 years agoavformat: Add Pro-MPEG CoP #3-R2 FEC protocol
Vlad Tarca [Thu, 2 Jun 2016 14:28:13 +0000 (16:28 +0200)]
avformat: Add Pro-MPEG CoP #3-R2 FEC protocol

Pro-MPEG Code of Practice #3 release 2 forward error correction for rtp_mpegts streams

Signed-off-by: Vlad Tarca <vtarca@mobibase.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi: split frame_count between input and output.
Nicolas George [Tue, 30 Aug 2016 13:28:41 +0000 (15:28 +0200)]
lavfi: split frame_count between input and output.

AVFilterLink.frame_count is supposed to count the number of frames
that were passed on the link, but with min_samples, that number is
not always the same for the source and destination filters.
With the addition of a FIFO on the link, the difference will become
more significant.

Split the variable in two: frame_count_in counts the number of
frames that entered the link, frame_count_out counts the number
of frames that were sent to the destination filter.

2 years agofate/colorkey: disable audio stream.
Nicolas George [Tue, 30 Aug 2016 18:12:20 +0000 (20:12 +0200)]
fate/colorkey: disable audio stream.

The test is not supposed to cover audio.
Also, using -vframes along with an audio stream depends on
the exact order the frames are processed by filters, it is
too much constraint to guarantee.

2 years agolavfi/ebur128: specify scaling_factor directly
Marton Balint [Sun, 13 Nov 2016 01:32:09 +0000 (02:32 +0100)]
lavfi/ebur128: specify scaling_factor directly

This should fix build with Solaris CC.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agolavf/fifo: fix undefined behaviour in deinit when destroying mutex
Marton Balint [Sat, 12 Nov 2016 01:07:24 +0000 (02:07 +0100)]
lavf/fifo: fix undefined behaviour in deinit when destroying mutex

Reviewed-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoffmpeg: add newline to avformat_write_header error message
Marton Balint [Sat, 12 Nov 2016 00:38:25 +0000 (01:38 +0100)]
ffmpeg: add newline to avformat_write_header error message

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mov: zero initialize codec_name in mov_parse_stsd_video()
James Almer [Sat, 12 Nov 2016 23:52:22 +0000 (20:52 -0300)]
avformat/mov: zero initialize codec_name in mov_parse_stsd_video()

Fixes valgrind warning about "Conditional jump or move depends on uninitialised value(s)"

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agofate: fix fate-api dependencies
James Almer [Sat, 12 Nov 2016 23:09:00 +0000 (20:09 -0300)]
fate: fix fate-api dependencies

No need to run the whole fate-lavf set. fate-lavf-flv_fmt is enough to
create the required source file.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoincrement initial_prog_date_time when removing old segments
Robert Nagy [Fri, 11 Nov 2016 13:56:00 +0000 (21:56 +0800)]
increment initial_prog_date_time when removing old segments

Fixes https://trac.ffmpeg.org/ticket/5940#ticket

Reviewed-by: Michael Niedermayer <<michael@niedermayer.cc>>
Signed-off-by: Robert Nagy <ronag89@gmail.com>
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2 years agoavcodec/htmlsubtitles: Fix reading one byte beyond the array
Michael Niedermayer [Fri, 11 Nov 2016 01:25:42 +0000 (02:25 +0100)]
avcodec/htmlsubtitles: Fix reading one byte beyond the array

Fixes: fuzz-2-ffmpeg_SUBTITLE_AV_CODEC_ID_SUBRIP_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agopnmdec: make sure v is capped by maxval
Andreas Cadhalpun [Wed, 9 Nov 2016 00:09:35 +0000 (01:09 +0100)]
pnmdec: make sure v is capped by maxval

Otherwise put_bits can be called with a value that doesn't fit in the
sample_len, causing an assertion failure.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agopnm: limit maxval to UINT16_MAX
Andreas Cadhalpun [Thu, 10 Nov 2016 19:31:02 +0000 (20:31 +0100)]
pnm: limit maxval to UINT16_MAX

From 'man ppm': The maximum color value (Maxval), again in ASCII decimal.
                Must be less than 65536.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agosmvjpegdec: make sure cur_frame is not negative
Andreas Cadhalpun [Thu, 10 Nov 2016 21:09:03 +0000 (22:09 +0100)]
smvjpegdec: make sure cur_frame is not negative

This fixes a heap-buffer-overflow detected by AddressSanitizer.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolavfi/loudnorm: add an internal libebur128 library
Marton Balint [Sat, 15 Oct 2016 17:21:22 +0000 (19:21 +0200)]
lavfi/loudnorm: add an internal libebur128 library

Also contains the following changes to the library:
- add ff_ prefix to functions
- remove cplusplus defines.
- add FF_ prefix to contants and some structs
- remove true peak calculation feature, since it uses its own resampler, and
  af_loudnorm does not need it.
- remove version info and some fprintf(stderr) functions
- convert to use av_malloc
- always use histogram mode for LRA calculation, otherwise LRA data is slowly
  consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
  BSD style linked list implementation which is probably not available on all
  platforms. So let's just remove the classic mode which not uses histogram.
- add ff_thread_once for calculating static histogram tables
- convert some functions to void which cannot fail
- remove intrinsics and some unused headers
- add support for planar audio
- remove channel / sample rate changer function, in ffmpeg usually we simply
  alloc a new context
- convert some static variables to defines
- declare static histogram variables as aligned
- convert some initalizations to mallocz
- add window size parameter to init function and remove window size setter
  function
- convert return codes to AVERROR
- fix indentation

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agotools: add loudnorm script example to use loudnorm
Marton Balint [Sun, 23 Oct 2016 21:36:37 +0000 (23:36 +0200)]
tools: add loudnorm script example to use loudnorm

Based on a patch by Kyle Swanson <k@ylo.ph>.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agodoc/encoders: sort list into alphabetical order
Lou Logan [Thu, 10 Nov 2016 23:41:37 +0000 (14:41 -0900)]
doc/encoders: sort list into alphabetical order

Signed-off-by: Lou Logan <lou@lrcd.com>
2 years agodoc/encoders: add documentation for the Hap encoder
Tom Butterworth [Thu, 10 Nov 2016 14:41:27 +0000 (14:41 +0000)]
doc/encoders: add documentation for the Hap encoder

Documents options and behaviour, noting when 'chunks' option will
not be honoured.

Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
Signed-off-by: Martin Vignali <martin.vignali@gmail.com>
2 years agoicodec: correctly check avio_read return value
Andreas Cadhalpun [Tue, 8 Nov 2016 22:29:28 +0000 (23:29 +0100)]
icodec: correctly check avio_read return value

It can read less than the requested amount, in which case buf contains
uninitialized data, causing problems like segmentation faults later on.

Also make sure that image->size is positive, so that it can't match a
negative error code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agodvbsubdec: fix division by zero in compute_default_clut
Andreas Cadhalpun [Tue, 8 Nov 2016 21:32:42 +0000 (22:32 +0100)]
dvbsubdec: fix division by zero in compute_default_clut

This problem was introduced in commit
4b90dcb8493552c17a811c8b1e6538dae4061f9d.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoproresdec_lgpl: explicitly check coff[3] against slice_data_size
Andreas Cadhalpun [Wed, 9 Nov 2016 22:49:46 +0000 (23:49 +0100)]
proresdec_lgpl: explicitly check coff[3] against slice_data_size

The implicit checks via v_data_size and a_data_size don't work in the case
'(hdr_size > 7) && !ctx->alpha_info'.

This fixes segmentation faults due to invalid reads.

This problem was introduced in commit
547c2f002a87f4412a83c23b0d60364be5e7ce58.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolavc/utils.c: Make sure skip_samples never goes negative.
Sasi Inguva [Fri, 4 Nov 2016 22:31:58 +0000 (15:31 -0700)]
lavc/utils.c: Make sure skip_samples never goes negative.

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe search fails.
Sasi Inguva [Wed, 9 Nov 2016 18:51:13 +0000 (10:51 -0800)]
lavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe search fails.

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hap: add "compressor" option to Hap encoder to disable secondary compression
Tom Butterworth [Mon, 7 Nov 2016 23:58:48 +0000 (23:58 +0000)]
avcodec/hap: add "compressor" option to Hap encoder to disable secondary compression

The secondary compression in Hap is optional, this change exposes that option to
the user as some use-cases favour higher bitrate files to reduce workload
decoding.
Adds "none" or "snappy" as options for "compressor". Selecting "none" disregards
"chunks" option: chunking is only of benefit decompressing Snappy.

Reviewed-by: Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2 years agolavc/hevc_ps: Fix an error message.
Carl Eugen Hoyos [Thu, 10 Nov 2016 07:22:26 +0000 (08:22 +0100)]
lavc/hevc_ps: Fix an error message.

2 years agolavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.
Carl Eugen Hoyos [Thu, 10 Nov 2016 07:11:12 +0000 (08:11 +0100)]
lavc/hevc_ps: Use correct pix_fmt for 12bit 4:0:0.

Fixes part of ticket #5544.

2 years agoavformat/flvenc: add add_keyframe_index option
Steven Liu [Tue, 8 Nov 2016 11:27:21 +0000 (19:27 +0800)]
avformat/flvenc: add add_keyframe_index option

Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
 1. read live streaming or file by sequence
 2. if use add_keyframe_index option, add a mark flag at the position,
    use to insert new context at the last step.
 3. add the keyframes *offset* and *timestamp* into a list
 4. if use add_keyframe_index option, shift the metadata data from
    mark flag offset
 5. insert the keyframes *offset* and *timestamp* from the list by
    sequence
 6. free the list
 7. end.

Add FATE test case;

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agonut: add gray12 support
Michael Niedermayer [Thu, 10 Nov 2016 00:05:42 +0000 (01:05 +0100)]
nut: add gray12 support

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale: Add GRAY12
Luca Barbato [Thu, 3 Nov 2016 15:10:03 +0000 (16:10 +0100)]
swscale: Add GRAY12

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agopixfmt: Add GRAY12
Luca Barbato [Thu, 3 Nov 2016 15:03:54 +0000 (16:03 +0100)]
pixfmt: Add GRAY12

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale: Add GBRAP10 output
Michael Niedermayer [Wed, 9 Nov 2016 23:02:50 +0000 (00:02 +0100)]
swscale: Add GBRAP10 output

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale: Add the GBRAP12 output
Luca Barbato [Wed, 12 Oct 2016 19:30:34 +0000 (21:30 +0200)]
swscale: Add the GBRAP12 output

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale/output: Fix alpha shift in yuv2gbrp_full_X_c()
Michael Niedermayer [Wed, 9 Nov 2016 22:53:43 +0000 (23:53 +0100)]
swscale/output: Fix alpha shift in yuv2gbrp_full_X_c()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale/input: Fix alpha bswap for set readAlpPlanar
Michael Niedermayer [Wed, 9 Nov 2016 22:37:29 +0000 (23:37 +0100)]
swscale/input: Fix alpha bswap for set readAlpPlanar

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale: Drop is9_OR_10BPS() use, its name is not correct
Michael Niedermayer [Wed, 9 Nov 2016 19:45:33 +0000 (20:45 +0100)]
swscale: Drop is9_OR_10BPS() use, its name is not correct

Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoescape124: reject codebook size 0
Andreas Cadhalpun [Tue, 8 Nov 2016 23:38:50 +0000 (00:38 +0100)]
escape124: reject codebook size 0

It causes a cb_depth of 32, leading to assertion failures in get_bits.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoicodec: add ico_read_close to fix leaking ico->images
Andreas Cadhalpun [Tue, 8 Nov 2016 22:54:41 +0000 (23:54 +0100)]
icodec: add ico_read_close to fix leaking ico->images

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoicodec: fix leaking pkt on error
Andreas Cadhalpun [Tue, 8 Nov 2016 22:53:52 +0000 (23:53 +0100)]
icodec: fix leaking pkt on error

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoMAINTAINERS: Add myself to flvenc
Steven Liu [Wed, 9 Nov 2016 00:36:02 +0000 (08:36 +0800)]
MAINTAINERS: Add myself to flvenc

Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agompegts: prevent division by zero
Andreas Cadhalpun [Mon, 7 Nov 2016 22:37:59 +0000 (23:37 +0100)]
mpegts: prevent division by zero

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agomatroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header
Andreas Cadhalpun [Mon, 7 Nov 2016 23:42:23 +0000 (00:42 +0100)]
matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header

The code assumes that s->streams[0] is valid.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoavcodec/hap: pass texture-compression destination as argument, not in context
Tom Butterworth [Mon, 7 Nov 2016 16:25:33 +0000 (16:25 +0000)]
avcodec/hap: pass texture-compression destination as argument, not in context

This allows a subsequent change to compress directly into the output packet when possible.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2 years agoavformat/matroskadec: fix DiscardPadding element parsing
James Almer [Sat, 5 Nov 2016 20:46:52 +0000 (17:46 -0300)]
avformat/matroskadec: fix DiscardPadding element parsing

If the value is negative then it means padding at the start of the packet
instead of at the end.

Based on a patch by Hendrik Leppkes.

Reviewed-by: James Zern <jzern-at-google.com@ffmpeg.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoopus: move the entropy decoding functions to opus_rc.c
Rostislav Pehlivanov [Mon, 7 Nov 2016 22:33:11 +0000 (22:33 +0000)]
opus: move the entropy decoding functions to opus_rc.c

The intention is to have both encoding and decoding functions
in opus_rc.c.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus: move all tables to a separate file
Rostislav Pehlivanov [Mon, 7 Nov 2016 21:48:16 +0000 (21:48 +0000)]
opus: move all tables to a separate file

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavformat/mov: Read multiple stsd from DV
Vittorio Giovara [Tue, 8 Nov 2016 03:32:05 +0000 (22:32 -0500)]
avformat/mov: Read multiple stsd from DV

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffserver: use AVStream.codecpar in open_input_stream()
Reynaldo H. Verdejo Pinochet [Tue, 8 Nov 2016 09:34:58 +0000 (01:34 -0800)]
ffserver: use AVStream.codecpar in open_input_stream()

AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffserver: user AVStream.codecpar in compute_status()
Reynaldo H. Verdejo Pinochet [Tue, 8 Nov 2016 09:07:14 +0000 (01:07 -0800)]
ffserver: user AVStream.codecpar in compute_status()

AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>