ffmpeg.git
2 years agodoc/developer: Add terse documentation of assumed C implementation defined behavior
Michael Niedermayer [Fri, 28 Apr 2017 00:50:42 +0000 (02:50 +0200)]
doc/developer: Add terse documentation of assumed C implementation defined behavior

Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/bmp: Use ff_set_dimensions()
Michael Niedermayer [Mon, 1 May 2017 15:53:11 +0000 (17:53 +0200)]
avcodec/bmp: Use ff_set_dimensions()

Fixes out of memory

Fixes: 1282/clusterfuzz-testcase-minimized-5400131681648640

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 agolibavformat/http: Ignore expired cookies
Micah Galizia [Sun, 30 Apr 2017 18:25:29 +0000 (14:25 -0400)]
libavformat/http: Ignore expired cookies

Signed-off-by: Micah Galizia <micahgalizia@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate/exr : add test for negative float value
Martin Vignali [Sun, 23 Apr 2017 15:49:05 +0000 (17:49 +0200)]
fate/exr : add test for negative float value

the tested sample contain negative value in the red channel
need to be clip to zero, and not set to MAX_RED

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate/exr : add tests for piz uncompress
Martin Vignali [Sun, 23 Apr 2017 13:15:31 +0000 (15:15 +0200)]
fate/exr : add tests for piz uncompress

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavcodec/exr : fix piz uncompress on big endian
Martin Vignali [Sun, 23 Apr 2017 13:38:14 +0000 (15:38 +0200)]
libavcodec/exr : fix piz uncompress on big endian

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/options: do a more thorough clean up in avcodec_copy_context()
James Almer [Mon, 24 Apr 2017 17:53:47 +0000 (14:53 -0300)]
avcodec/options: do a more thorough clean up in avcodec_copy_context()

Free coded_frame, coded_side_data and unref hw_device_ctx to prevent
potential leaks.

Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/options: factorize avcodec_copy_context() cleanup code
James Almer [Sat, 22 Apr 2017 16:25:32 +0000 (13:25 -0300)]
avcodec/options: factorize avcodec_copy_context() cleanup code

Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/matroskaenc: add support for writing Content Light Level elements
James Almer [Tue, 25 Apr 2017 18:42:51 +0000 (15:42 -0300)]
avformat/matroskaenc: add support for writing Content Light Level elements

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/matroskadec: export Content Light Level metadata
James Almer [Tue, 25 Apr 2017 18:04:00 +0000 (15:04 -0300)]
avformat/matroskadec: export Content Light Level metadata

Based on a patch by Hendrik Leppkes

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f'
James Almer [Sun, 30 Apr 2017 13:23:50 +0000 (10:23 -0300)]
Merge commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f'

* commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f':
  mpeg12dec: move setting first_field to mpeg_field_start()

This commit is a noop, see 2f6f2f4f73c068979829e785d08cb1dd345c7fc8

Merged-by: James Almer <jamrial@gmail.com>
2 years agotools: Eliminate codec_type complexity from fuzzer
Michael Niedermayer [Sun, 30 Apr 2017 09:44:51 +0000 (11:44 +0200)]
tools: Eliminate codec_type complexity from fuzzer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibswscale/tests/swscale: Fix uninitialized variables
Michael Niedermayer [Sat, 29 Apr 2017 16:46:48 +0000 (18:46 +0200)]
libswscale/tests/swscale: Fix uninitialized variables

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/af_crystalizer: add support for more sample formats
Paul B Mahol [Sun, 30 Apr 2017 10:56:23 +0000 (12:56 +0200)]
avfilter/af_crystalizer: add support for more sample formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pthread_frame, decode: allow errors to happen on draining
Muhammad Faiz [Fri, 28 Apr 2017 10:19:13 +0000 (17:19 +0700)]
avcodec/pthread_frame, decode: allow errors to happen on draining

So, all frames and errors are correctly reported in order.
Also limit the numbers of error during draining to prevent infinite loop.

This fix fate failure with THREADS>=4:
  make fate-h264-attachment-631 THREADS=4
This also reverts a755b725ec1d657609c8bd726ce37e7cf193d03f.

Suggested-by: wm4, Ronald S. Bultje, Marton Balint
Reviewed-by: w4 <nfxjfg@googlemail.com>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter: add video oscilloscope filter
Paul B Mahol [Tue, 25 Apr 2017 17:31:05 +0000 (19:31 +0200)]
avfilter: add video oscilloscope filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter: add pixscope filter
Paul B Mahol [Sat, 22 Apr 2017 20:02:49 +0000 (22:02 +0200)]
avfilter: add pixscope filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoMerge commit 'e807491fc6a336e4becc0cbc981274a8fde18aba'
Clément Bœsch [Sat, 29 Apr 2017 11:49:06 +0000 (13:49 +0200)]
Merge commit 'e807491fc6a336e4becc0cbc981274a8fde18aba'

* commit 'e807491fc6a336e4becc0cbc981274a8fde18aba':
  mpeg12dec: avoid signed overflow in bitrate calculation
  mpegvideo_parser: avoid signed overflow in bitrate calculation

This merge is a noop.

2017-04-29 12:54:15     @ubitux michaelni: is 740959fdbfbf804ccd8a6e426b1b1ba321fe5cfb enough to fix the overflow fixed in 58405de0951a843765625159402870c1eea3c3b1?
2017-04-29 12:55:53     @ubitux same question with e807491fc6a336e4becc0cbc981274a8fde18aba
2017-04-29 13:21:45     michaelni       ubitux, the libav code refered to is wrong for us and i doubt the problem it fixes applies to us.
2017-04-29 13:24:29     @ubitux michaelni: ok, for both commits?
2017-04-29 13:33:55     michaelni       yes, they do more or less the same thing

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '46191a2da16f751e53d93646ae1388d421d12bee'
Clément Bœsch [Sat, 29 Apr 2017 10:46:48 +0000 (12:46 +0200)]
Merge commit '46191a2da16f751e53d93646ae1388d421d12bee'

* commit '46191a2da16f751e53d93646ae1388d421d12bee':
  mov: fix a possible invalid read in mov_read_mac_string()

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9'
Clément Bœsch [Sat, 29 Apr 2017 10:46:00 +0000 (12:46 +0200)]
Merge commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9'

* commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9':
  vaapi_decode: use the correct logging context

This commit is a noop, see 79307ae56374b35cf12563a7c8e3e759658f847e

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1'
Clément Bœsch [Sat, 29 Apr 2017 10:45:21 +0000 (12:45 +0200)]
Merge commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1'

* commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1':
  hevcdec: add a VAAPI hwaccel

This commit is a noop, see adb54e59c18db347f39e55832104fc3e40a3c42b

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '1783d7ec03d730c5bd96c07bc5fa7aa566f85c66'
Clément Bœsch [Sat, 29 Apr 2017 10:43:37 +0000 (12:43 +0200)]
Merge commit '1783d7ec03d730c5bd96c07bc5fa7aa566f85c66'

* commit '1783d7ec03d730c5bd96c07bc5fa7aa566f85c66':
  Changelog: add some missing entries

Merged-by: Clément Bœsch <u@pkh.me>
2 years agodoc/filters: add one lowpass filter example
Paul B Mahol [Sat, 29 Apr 2017 09:44:21 +0000 (11:44 +0200)]
doc/filters: add one lowpass filter example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/movenc: Explicitly address potential division by zero.
Lucas Cooper [Thu, 27 Apr 2017 22:08:29 +0000 (15:08 -0700)]
avformat/movenc: Explicitly address potential division by zero.

find_fps attempts to infer framerate from AVCodec's timebase. When this
results in a frame rate that isn't explicitly marked as supported in
av_timecode_check_frame_rate, find_fps returns the AVStream's
avg_frame_rate, which, per avformat.h, _may_ be set (or not).

mov_get_mpeg2_xdcam_codec_tag, mov_get_h264_codec_tag and
find_compressor attempt to call av_q2d on the return value of find_fps,
which in the above case, may result in division by zero and therefore,
an undefined frame rate when NaN is converted to int.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibvpxenc: allow aq-mode 4 (equator360)
James Zern [Fri, 14 Apr 2017 01:26:44 +0000 (18:26 -0700)]
libvpxenc: allow aq-mode 4 (equator360)

this was added in 1.6.0

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2 years agoavfilter/lavfutils: use image2pipe demuxer on ff_load_image
Muhammad Faiz [Tue, 25 Apr 2017 07:33:24 +0000 (14:33 +0700)]
avfilter/lavfutils: use image2pipe demuxer on ff_load_image

allow protocols other than file to be used
for example, use data protocol to embed a file in script

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavformat/hlsenc: fix CID 1405135
Steven Liu [Fri, 28 Apr 2017 02:18:44 +0000 (10:18 +0800)]
avformat/hlsenc: fix CID 1405135

Fixes Coverity CID: 1405135

Reviewed-by: Rodger Combs <rodger.combs@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/hlsenc: hold old key info when append list
Steven Liu [Fri, 28 Apr 2017 02:17:40 +0000 (10:17 +0800)]
avformat/hlsenc: hold old key info when append list

fix ticket id: #6353

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoopus_pvq: use function pointers for recursion
Rostislav Pehlivanov [Thu, 27 Apr 2017 04:50:39 +0000 (05:50 +0100)]
opus_pvq: use function pointers for recursion

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavcodec/opus_pvq: fix recursive inlining compilation failures
James Almer [Thu, 27 Apr 2017 03:33:24 +0000 (00:33 -0300)]
avcodec/opus_pvq: fix recursive inlining compilation failures

They were introduced by f16180f44859587e0211170bd82b1bfd26f24b5a

2 years agoavcodec/mdec: Fix runtime error: left shift of negative value -127
Michael Niedermayer [Thu, 27 Apr 2017 00:27:16 +0000 (02:27 +0200)]
avcodec/mdec: Fix runtime error: left shift of negative value -127

Fixes undefined behavior
Fixes: 1275/clusterfuzz-testcase-minimized-6718162017976320

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 agotools/target_dec_fuzzer: Fix return code on open failure
Michael Niedermayer [Thu, 27 Apr 2017 00:18:03 +0000 (02:18 +0200)]
tools/target_dec_fuzzer: Fix return code on open failure

Fixes: 1271/clusterfuzz-testcase-minimized-6095220498235392

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 agoavcodec/x86/vc1dsp_init: Fix build failure with --disable-optimizations and clang
Michael Niedermayer [Thu, 27 Apr 2017 00:08:54 +0000 (02:08 +0200)]
avcodec/x86/vc1dsp_init: Fix build failure with --disable-optimizations and clang

compilers doing DCE at -O0 do not necessarily understand "complex" boolean expressions
Build succeeds with this change, this was the only failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavcodec/exr : fix float to uint16 conversion for negative float value
Martin Vignali [Tue, 25 Apr 2017 20:52:50 +0000 (22:52 +0200)]
libavcodec/exr : fix float to uint16 conversion for negative float value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoopus_pvq: merge band encoding and decoding into one function
Rostislav Pehlivanov [Thu, 27 Apr 2017 01:15:36 +0000 (02:15 +0100)]
opus_pvq: merge band encoding and decoding into one function

Most code between the 2 functions was duplicated which made keeping
both in sync difficult.

This also fixes some discovered issues with encoding (incorrect
TF switching buffers) and reduces stack usage (reuse the already
allocated CeltFrame->scratch buffer for the quantized coefficients).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus_pvq: remove outdated/incorrect comments and redundant variables
Rostislav Pehlivanov [Wed, 26 Apr 2017 22:28:16 +0000 (23:28 +0100)]
opus_pvq: remove outdated/incorrect comments and redundant variables

Removes the last style issues with opus_pvq.c

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopus_pvq: minor cleanups
Rostislav Pehlivanov [Thu, 20 Apr 2017 19:00:25 +0000 (20:00 +0100)]
opus_pvq: minor cleanups

Removes unneeded variables, renames confusing and innacurate variables
and rewrites and slightly optimizes hadamard interleave/deinterleave
functions.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavcodec/nvenc: surface allocation reduction
Ben Chang [Tue, 25 Apr 2017 21:57:56 +0000 (14:57 -0700)]
avcodec/nvenc: surface allocation reduction

This patch aims to reduce the number of input/output surfaces
NVENC allocates per session. Previous default sets allocated surfaces to 32
(unless there is user specified param or lookahead involved). Having large
number of surfaces consumes extra video memory (esp for higher resolution
encoding). The patch changes the surfaces calculation for default, B-frames,
lookahead scenario respectively.

The other change involves surface selection. Previously, if a session
allocates x surfaces, only x-1 surfaces are used (due to combination
of output delay and lock toggle logic). To prevent unused surfaces,
changing surface rotation to using predefined fifo.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agolavc/hevcdec: fix invalid use of ff_get_format()
Clément Bœsch [Wed, 26 Apr 2017 15:35:28 +0000 (17:35 +0200)]
lavc/hevcdec: fix invalid use of ff_get_format()

Regression since 76cc100afba25308eaa909acd8804cc0b42057f6.

Spotted-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit 'd4a91e65343be5d79a4afa61c791191e1b57499a'
Clément Bœsch [Wed, 26 Apr 2017 15:32:40 +0000 (17:32 +0200)]
Merge commit 'd4a91e65343be5d79a4afa61c791191e1b57499a'

* commit 'd4a91e65343be5d79a4afa61c791191e1b57499a':
  pthread_frame: do not run hwaccel decoding asynchronously unless it's safe

This commit is a noop, see e0cd598bc4684654d63942e9ff4872c0b48a7dc2

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '8dfba25ce89b62c80ba83e2116d549176c376144'
Clément Bœsch [Wed, 26 Apr 2017 15:31:22 +0000 (17:31 +0200)]
Merge commit '8dfba25ce89b62c80ba83e2116d549176c376144'

* commit '8dfba25ce89b62c80ba83e2116d549176c376144':
  pthread_frame: ensure the threads don't run simultaneously with hwaccel

This commit is a noop, see 14bb15bfd56d6e907fabe4620206c1ee152b7a20

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'
Clément Bœsch [Wed, 26 Apr 2017 15:25:54 +0000 (17:25 +0200)]
Merge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'

* commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a':
  hevcdec: do not set decoder-global SPS prematurely

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '0fea8555ae25124c21f4c4f55a5fa76e9169aa03'
Clément Bœsch [Wed, 26 Apr 2017 15:17:50 +0000 (17:17 +0200)]
Merge commit '0fea8555ae25124c21f4c4f55a5fa76e9169aa03'

* commit '0fea8555ae25124c21f4c4f55a5fa76e9169aa03':
  v4l2: use codec descriptors for mapping a codec name to id

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'ee480790c7eeb03c9cebd8971c46e0cb7db65277'
Clément Bœsch [Wed, 26 Apr 2017 14:57:11 +0000 (16:57 +0200)]
Merge commit 'ee480790c7eeb03c9cebd8971c46e0cb7db65277'

* commit 'ee480790c7eeb03c9cebd8971c46e0cb7db65277':
  build: Add name parameter to check_lib() helper function

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '1faffe7e8fab21186a233011bc8a62f47962e2cd'
Clément Bœsch [Wed, 26 Apr 2017 14:42:17 +0000 (16:42 +0200)]
Merge commit '1faffe7e8fab21186a233011bc8a62f47962e2cd'

* commit '1faffe7e8fab21186a233011bc8a62f47962e2cd':
  configure: Disentangle vfw32 and user32 lib handling

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'f7174d7ed045445d00a6d557236737d09ad32343'
Clément Bœsch [Wed, 26 Apr 2017 14:39:37 +0000 (16:39 +0200)]
Merge commit 'f7174d7ed045445d00a6d557236737d09ad32343'

* commit 'f7174d7ed045445d00a6d557236737d09ad32343':
  configure: fix linking with MSVC when using --disable-optimizations

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'ef9a711be718ed3802a263d1d9ed340a4aaef224'
Clément Bœsch [Wed, 26 Apr 2017 14:38:10 +0000 (16:38 +0200)]
Merge commit 'ef9a711be718ed3802a263d1d9ed340a4aaef224'

* commit 'ef9a711be718ed3802a263d1d9ed340a4aaef224':
  configure: put d3d11 check in alphabetical order

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'a4fec9a7eab842ea5eea1b1ee98624356cb31422'
Clément Bœsch [Wed, 26 Apr 2017 14:34:51 +0000 (16:34 +0200)]
Merge commit 'a4fec9a7eab842ea5eea1b1ee98624356cb31422'

* commit 'a4fec9a7eab842ea5eea1b1ee98624356cb31422':
  rtmppkt: Check for packet size mismatches

See 7d57ca4d9a75562fa32e40766211de150f8b3ee7

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'cdcfa97dc49d83b5eefd0a651db6bb0a6f98e8f2'
Clément Bœsch [Wed, 26 Apr 2017 14:30:01 +0000 (16:30 +0200)]
Merge commit 'cdcfa97dc49d83b5eefd0a651db6bb0a6f98e8f2'

* commit 'cdcfa97dc49d83b5eefd0a651db6bb0a6f98e8f2':
  libavformat: Fix a faulty api deprecation guard in prepare_input_packet

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '2425d7329fdccfa9954faba748f3865151354f0c'
Clément Bœsch [Wed, 26 Apr 2017 14:28:57 +0000 (16:28 +0200)]
Merge commit '2425d7329fdccfa9954faba748f3865151354f0c'

* commit '2425d7329fdccfa9954faba748f3865151354f0c':
  arm64: replace 'bic' with immediate with 'and' with inverted immediate

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '05a603a94e4b3eeefa5e18ae653a848001461e89'
Clément Bœsch [Wed, 26 Apr 2017 14:27:24 +0000 (16:27 +0200)]
Merge commit '05a603a94e4b3eeefa5e18ae653a848001461e89'

* commit '05a603a94e4b3eeefa5e18ae653a848001461e89':
  ppc: Merge types_altivec.h into util_altivec.h

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013'
Clément Bœsch [Wed, 26 Apr 2017 14:21:00 +0000 (16:21 +0200)]
Merge commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013'

* commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013':
  ppc: Centralize compiler-specific altivec.h #include handling in one place

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd'
Clément Bœsch [Wed, 26 Apr 2017 12:39:28 +0000 (14:39 +0200)]
Merge commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd'

* commit '39929e55eb13eeb8dfbe1bc99301fecf6b8942dd':
  ppc: hevcdsp: Use shorthands for vector types

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '554e55bbf0e4a3640a784cb512b816e776c56333'
Clément Bœsch [Wed, 26 Apr 2017 12:38:46 +0000 (14:38 +0200)]
Merge commit '554e55bbf0e4a3640a784cb512b816e776c56333'

* commit '554e55bbf0e4a3640a784cb512b816e776c56333':
  decode.h: Add missing headers to fix standalone compilation

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '343e2833994655c252d5236a3394bf6db7a4d8b1'
Clément Bœsch [Wed, 26 Apr 2017 12:37:52 +0000 (14:37 +0200)]
Merge commit '343e2833994655c252d5236a3394bf6db7a4d8b1'

* commit '343e2833994655c252d5236a3394bf6db7a4d8b1':
  pthread_frame: use better memory orders for frame progress

This commit is a noop, see c358c62550e60a150c49f192d72631142a6eedd6

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'e94b9313b21c3d91a36ef064f7fe3e867616f47f'
Clément Bœsch [Wed, 26 Apr 2017 12:36:31 +0000 (14:36 +0200)]
Merge commit 'e94b9313b21c3d91a36ef064f7fe3e867616f47f'

* commit 'e94b9313b21c3d91a36ef064f7fe3e867616f47f':
  fate: Add h264 test for frame num gaps

This commit is a noop, see b7e4ea0c80f4b3e060625fd97ffdd3b9689bfcd1

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '5c7f2cf81df06614f255f061850132355a01d75e'
Clément Bœsch [Wed, 26 Apr 2017 12:35:28 +0000 (14:35 +0200)]
Merge commit '5c7f2cf81df06614f255f061850132355a01d75e'

* commit '5c7f2cf81df06614f255f061850132355a01d75e':
  h264_slice: Wait for refs to be available before we use them in error concealment

This commit is a noop, see 4413e950b26396bfb797168e4f81164a022cc6f3

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81'
Clément Bœsch [Wed, 26 Apr 2017 11:35:57 +0000 (13:35 +0200)]
Merge commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81'

* commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81':
  hevc: decouple calling get_format() from exporting the SPS parameters

See 786032cad8ecabe577d9cff0356da6e9e9488a2d (which has been reverted
and replaced with Anton's version to reduce diffs between the two
projects).

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoavformat/concatdec: fix the h264 annexb extradata check
James Almer [Tue, 25 Apr 2017 23:23:12 +0000 (20:23 -0300)]
avformat/concatdec: fix the h264 annexb extradata check

The start code can be either in the first three or four bytes.

2 years agoMerge commit '730c02326094bcfb1fa67f10a7e7b22f03f5a88f'
Clément Bœsch [Tue, 25 Apr 2017 17:10:39 +0000 (19:10 +0200)]
Merge commit '730c02326094bcfb1fa67f10a7e7b22f03f5a88f'

* commit '730c02326094bcfb1fa67f10a7e7b22f03f5a88f':
  binkaudio: switch to the new send/receive API

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'fa1749dd34c55fb997c97dfc4da9383c9976ab91'
Clément Bœsch [Tue, 25 Apr 2017 17:01:59 +0000 (19:01 +0200)]
Merge commit 'fa1749dd34c55fb997c97dfc4da9383c9976ab91'

* commit 'fa1749dd34c55fb997c97dfc4da9383c9976ab91':
  vp9: split superframes in the filtering stage before actual decoding

This commit is a noop.

2017-04-24 20:45:04     @ubitux BBB: btw, do you think you can get the bsf thing this week or we should skip it to give you more time and go on with the merges?
2017-04-24 20:45:20     @BBB    I’m not sure I’ll finish it that soon
2017-04-24 20:45:26     @BBB    I’d skip it and leave it for later
2017-04-24 20:45:35     @BBB    I’ll do it, I promise, but I Can’t guarantee it’ll be done by $date

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoavfilter/af_biquads: allow filtering only selected channels
Paul B Mahol [Tue, 25 Apr 2017 16:08:26 +0000 (18:08 +0200)]
avfilter/af_biquads: allow filtering only selected channels

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agofate/exr : fix pix_fmt
Martin Vignali [Sun, 2 Apr 2017 20:37:51 +0000 (22:37 +0200)]
fate/exr : fix pix_fmt

rgb_scanline_pxr24_half_uint32_13x9.exr doesn't have alpha

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agotools/target_dec_fuzzer: Remove FuzzerInterface.h dependancy
Michael Niedermayer [Tue, 25 Apr 2017 01:08:27 +0000 (03:08 +0200)]
tools/target_dec_fuzzer: Remove FuzzerInterface.h dependancy

The header is not always available in the docker build environment

Suggested-by: Kostya Serebryany
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate: Add test for pkt_size of ffprobe
Michael Niedermayer [Sun, 23 Apr 2017 22:19:36 +0000 (00:19 +0200)]
fate: Add test for pkt_size of ffprobe

Suggested-by: James Almer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoMake tools/target_dec_*_fuzzer buildable with configure and make
Michael Niedermayer [Fri, 21 Apr 2017 21:58:32 +0000 (23:58 +0200)]
Make tools/target_dec_*_fuzzer buildable with configure and make

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agotools/target_dec_fuzzer: Fix build with default FFmpeg build flags
Michael Niedermayer [Mon, 24 Apr 2017 21:16:53 +0000 (23:16 +0200)]
tools/target_dec_fuzzer: Fix build with default FFmpeg build flags

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter: add lumakey filter
Paul B Mahol [Sun, 23 Apr 2017 17:59:32 +0000 (19:59 +0200)]
avfilter: add lumakey filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/crystalhd: Another attempt at using mpeg4_unpack_bframes bsf
Philip Langdale [Sun, 23 Apr 2017 22:31:55 +0000 (15:31 -0700)]
avcodec/crystalhd: Another attempt at using mpeg4_unpack_bframes bsf

I tried doing this before, but it resulted in weird behaviour with
certain samples. I want to say I think I've got it sorted out now,
and the new autobsf stuff makes it trivial to turn on.

The native support for packed bframes is buggy and I think buggy
in ways beyond what I already try to account for, so this should be
a net improvements.

2 years agoavcodec/crystalhd: Explicitly set frame pts at all times
Philip Langdale [Sun, 23 Apr 2017 21:34:03 +0000 (14:34 -0700)]
avcodec/crystalhd: Explicitly set frame pts at all times

Previously, the pts value was initialised to AV_NOPTS_VALUE and so
it was not necessary to always set it. Now, with the new-new decode
API, this is no longer true. I'm not sure why I avoided setting the
pts when the decoder value was also AV_NOPTS_VALUE - it clearly
wouldn't have changed anything previously, but here we are.

Failing to do this, means the frame pts will be some random uninitalised
value.

2 years agodecode: Initialize ret before using it
Vittorio Giovara [Mon, 3 Apr 2017 19:58:15 +0000 (21:58 +0200)]
decode: Initialize ret before using it

libavcodec/decode.c:608:9: warning: variable 'ret' is
      used uninitialized whenever 'if' condition is false

(cherry picked from libav commit efddf2c09aed7400c73ecf327f86a4d0452b94b5)

2 years agoavcodec/movtextenc: Ignore unmatched closing style tags
Philip Langdale [Sun, 23 Apr 2017 17:42:25 +0000 (10:42 -0700)]
avcodec/movtextenc: Ignore unmatched closing style tags

The existing code will segfault if a closing tag shows up when there
was never an opening tag. This isn't a well formed style, but it's also
not a reason to crash.

Fixes: https://trac.ffmpeg.org/ticket/6303

2 years agowebm_dash_manifest_demuxer: Fix initialization range for files with cues at the front
Derek Buitenhuis [Fri, 21 Apr 2017 15:40:35 +0000 (16:40 +0100)]
webm_dash_manifest_demuxer: Fix initialization range for files with cues at the front

The WebM DASH spec states:
    The Initialization Segment shall not contain Clusters or Cues.
    The Segment Index corresponds to the Cues.

Previously, it included the cues if they were at the front.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2 years agowebm_dash_manifest_demuxer: Fix UB in cue timestamp string code and make it actually...
Derek Buitenhuis [Thu, 20 Apr 2017 14:02:54 +0000 (15:02 +0100)]
webm_dash_manifest_demuxer: Fix UB in cue timestamp string code and make it actually work

Output was apparently not tested for correctness. Passing overlapping
memory to snprintf causes undefined behavior, and usually resulted in
only the very last timestamp being written to metadata, and not a list
at all.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2 years agoavcodec/crystalhd: Switch to the new generic filtering mechanism
Philip Langdale [Sun, 23 Apr 2017 03:03:27 +0000 (20:03 -0700)]
avcodec/crystalhd: Switch to the new generic filtering mechanism

This lets us drop all the code for handling the mp4toannexb
conversion.

2 years agoavfilter/vf_maskedmerge: fix bug when copying >8bit plane(s)
Paul B Mahol [Sun, 23 Apr 2017 16:31:05 +0000 (18:31 +0200)]
avfilter/vf_maskedmerge: fix bug when copying >8bit plane(s)

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/vf_premultiply: add planes option
Paul B Mahol [Sun, 23 Apr 2017 16:19:40 +0000 (18:19 +0200)]
avfilter/vf_premultiply: add planes option

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/vf_maskedclamp: fix bug when copying >8bit plane(s)
Paul B Mahol [Sun, 23 Apr 2017 16:01:00 +0000 (18:01 +0200)]
avfilter/vf_maskedclamp: fix bug when copying >8bit plane(s)

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/decode: also update consumed bytes on last_pkt_props->size
James Almer [Sun, 23 Apr 2017 15:51:52 +0000 (12:51 -0300)]
avcodec/decode: also update consumed bytes on last_pkt_props->size

2 years agoavfilter/vf_maskedclamp: limit overshot and undershot to UINT16_MAX
Paul B Mahol [Sun, 23 Apr 2017 15:36:33 +0000 (17:36 +0200)]
avfilter/vf_maskedclamp: limit overshot and undershot to UINT16_MAX

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoffmpeg: do not report EOF on filters as an error.
Nicolas George [Sun, 23 Apr 2017 12:22:22 +0000 (14:22 +0200)]
ffmpeg: do not report EOF on filters as an error.

Also print the error message in case of real error.

2 years agoavcodec/dnxhd_parser: fix parsing interlaced video, simplify code
Paul B Mahol [Sun, 23 Apr 2017 09:53:57 +0000 (11:53 +0200)]
avcodec/dnxhd_parser: fix parsing interlaced video, simplify code

There appears to be no need to treat interlaced videos differently,
also that code is flawed, as for at least one input cur_field would
be always 0.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agotests: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:59:09 +0000 (15:59 +0700)]
tests: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoexamples: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:58:37 +0000 (15:58 +0700)]
examples: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoff*: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:58:03 +0000 (15:58 +0700)]
ff*: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:57:18 +0000 (15:57 +0700)]
avfilter: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavdevice: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:56:47 +0000 (15:56 +0700)]
avdevice: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavformat: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:55:45 +0000 (15:55 +0700)]
avformat: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavcodec: do not use AVFrame accessor
Muhammad Faiz [Sat, 22 Apr 2017 08:54:58 +0000 (15:54 +0700)]
avcodec: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoMerge commit '03a80925effc2698d21dc0b00290eecf42dd9e68'
James Almer [Sun, 23 Apr 2017 02:07:59 +0000 (23:07 -0300)]
Merge commit '03a80925effc2698d21dc0b00290eecf42dd9e68'

* commit '03a80925effc2698d21dc0b00290eecf42dd9e68':
  lavc: add a bitstream filter for splitting VP9 superframes

Merged-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit '8fb4210ad8785c01fccf2fc59af6a6fa2892b6b2'
James Almer [Sun, 23 Apr 2017 02:02:02 +0000 (23:02 -0300)]
Merge commit '8fb4210ad8785c01fccf2fc59af6a6fa2892b6b2'

* commit '8fb4210ad8785c01fccf2fc59af6a6fa2892b6b2':
  qsvdec_h2645: switch to the new generic filtering mechanism

Merged-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit '972c71e9cb63e24f57ee481e413199c7d88a8813'
James Almer [Sun, 23 Apr 2017 01:35:27 +0000 (22:35 -0300)]
Merge commit '972c71e9cb63e24f57ee481e413199c7d88a8813'

* commit '972c71e9cb63e24f57ee481e413199c7d88a8813':
  lavc: add support for filtering packets before decoding

Merged-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/bsf: Check for packet payload when setting BSF EOF flag.
Jan Sebechlebsky [Sun, 23 Apr 2017 00:56:56 +0000 (21:56 -0300)]
avcodec/bsf: Check for packet payload when setting BSF EOF flag.

Set BSF EOF flag only if pkt == NULL or both data and
side data are not present in packet.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoRevert "avcodec/bsf: Forbid packet without payload in av_bsf_send_packet"
James Almer [Sun, 23 Apr 2017 00:52:06 +0000 (21:52 -0300)]
Revert "avcodec/bsf: Forbid packet without payload in av_bsf_send_packet"

This reverts commit bfdca87ab55c7f69087d962dc47aa45c8c6436fb.

Packets with no data or side data will be valid EOF signal in an
upcoming merge.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/crystalhd: Adapt to new new decode API
Philip Langdale [Sat, 22 Apr 2017 19:01:52 +0000 (12:01 -0700)]
avcodec/crystalhd: Adapt to new new decode API

The new new decode API requires the decoder to ask for the next input
packet, and it cannot just return EAGAIN if that packet cannot be
processed yet. This means we must finally confront how we get this
decoder to block when the input buffer is full and no output frames
are ready yet.

In the end, that isn't too hard to achieve - the main trick seems to
be that you have to aggressively poll the hardware - it doesn't seem
to make any forward progress if you sleep.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit '061a0c14bb5767bca72e3a7227ca400de439ba09'
James Almer [Sat, 22 Apr 2017 23:08:42 +0000 (20:08 -0300)]
Merge commit '061a0c14bb5767bca72e3a7227ca400de439ba09'

* commit '061a0c14bb5767bca72e3a7227ca400de439ba09':
  decode: restructure the core decoding code

CUVID decoder adapted by wm4.

Merged-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f'
James Almer [Sat, 22 Apr 2017 23:06:47 +0000 (20:06 -0300)]
Merge commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f'

* commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f':
  decode: be more explicit about storing the last packet properties

Also copy pkt->size in extract_packet_props(), as it's needed for
AVFrame.pkt_size

Merged-by: James Almer <jamrial@gmail.com>
2 years agolibavutil/thread.h: Fixed g++ build error when ASSERT_LEVEL is greater than 1
Aaron Levinson [Mon, 17 Apr 2017 00:13:31 +0000 (17:13 -0700)]
libavutil/thread.h: Fixed g++ build error when ASSERT_LEVEL is greater than 1

Purpose: libavutil/thread.h: Fixed g++ build error when ASSERT_LEVEL
is greater than 1.  This is only relevant when thread.h is included by
C++ files.  In this case, the relevant code is only defined if
HAVE_PTHREADS is defined as 1.  Use configure --assert-level=2 to do
so.

Note: Issue discovered as a result of Coverity build failure.  Cause
of build failure pinpointed by Hendrik Leppkes.

Comments:

-- libavutil/thread.h: Altered ASSERT_PTHREAD_NORET definition such
   that it uses av_make_error_string instead of av_err2str().
   av_err2str() uses a "parenthesized type followed by an initializer
   list", which is apparently not valid C++.  This issue started
   occurring because thread.h is now included by the DeckLink C++
   files.  The alteration does the equivalent of what av_err2str()
   does, but instead declares the character buffer as a local
   variable.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoffmpeg; check return code of avcodec_send_frame when flushing encoders
Marton Balint [Sat, 15 Apr 2017 18:30:51 +0000 (20:30 +0200)]
ffmpeg; check return code of avcodec_send_frame when flushing encoders

Fixes Coverity CID 1404841.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavcodec/h264_cavlc: Fix undefined behavior on qscale overflow
Michael Niedermayer [Sat, 22 Apr 2017 19:59:29 +0000 (21:59 +0200)]
avcodec/h264_cavlc: Fix undefined behavior on qscale overflow

Fixes: 1214/clusterfuzz-testcase-minimized-6130606599569408

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