ffmpeg.git
5 months agoavfilter/vf_chromashift: Fix mixed declaration and code
Mark Harris [Sun, 25 Nov 2018 03:17:40 +0000 (19:17 -0800)]
avfilter/vf_chromashift: Fix mixed declaration and code

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavformat/vivo: Don't log null value
Mark Harris [Sun, 25 Nov 2018 03:18:43 +0000 (19:18 -0800)]
avformat/vivo: Don't log null value

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/libaomenc: increase the default bitrate
James Almer [Mon, 26 Nov 2018 22:05:50 +0000 (19:05 -0300)]
avcodec/libaomenc: increase the default bitrate

aom_codec_enc_config_default() sets it to 256kbps, so don't replace
it with 200kbps.

See https://bugs.chromium.org/p/aomedia/issues/detail?id=2219

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavcodec/tiff: Limit filtering to decoded data
Michael Niedermayer [Fri, 23 Nov 2018 01:33:04 +0000 (02:33 +0100)]
avcodec/tiff: Limit filtering to decoded data

Fixes: Timeout
Fixes: 11068/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5698456681709568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoswscale/output: Altivec-optimize yuv2plane1_8
Lauri Kasanen [Sat, 17 Nov 2018 08:12:14 +0000 (10:12 +0200)]
swscale/output: Altivec-optimize yuv2plane1_8

./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p \
-f null -vframes 100 -v error -nostats -

1158 UNITS in planar1,   65528 runs,      8 skips

-cpuflags 0

19082 UNITS in planar1,   65533 runs,      3 skips

16.48 speedup ratio. On x86, SSE2 is ~7. Curiously, the Power C version
takes as many cycles as the x86 SSE2 version, yikes it's fast.

Note that this function uses VSX instructions, but is not marked so.
This is because several existing functions also make that mistake.
I'll submit a patch moving them once this is reviewed.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/libdav1d: update the API usage after upstream changes
James Almer [Sun, 25 Nov 2018 20:28:53 +0000 (17:28 -0300)]
avcodec/libdav1d: update the API usage after upstream changes

The color fields were moved to another struct, and a way to propagate
timestamps and other input metadata was introduced, so the packet fifo
can be removed.

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agofate/prores-metadata : make output bit exact
Martin Vignali [Sat, 24 Nov 2018 17:43:12 +0000 (18:43 +0100)]
fate/prores-metadata : make output bit exact

5 months agoavcodec/eac3dec: remove obsolete comment
Paul B Mahol [Sun, 25 Nov 2018 20:41:40 +0000 (21:41 +0100)]
avcodec/eac3dec: remove obsolete comment

5 months agoavformat/hlsenc: remove the cannot reach result
Steven Liu [Sun, 25 Nov 2018 08:28:56 +0000 (16:28 +0800)]
avformat/hlsenc: remove the cannot reach result

fix CID: 1441166
because the logic have checked the vtt_dirname before

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 months agolibavcodec/libdavs2.c: Fix for the wrong line size is used
Limin Wang [Sun, 25 Nov 2018 06:01:22 +0000 (14:01 +0800)]
libavcodec/libdavs2.c: Fix for the wrong line size is used

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
5 months agoconfigure: Add -Wno-char-subscripts.
Carl Eugen Hoyos [Sun, 18 Nov 2018 03:32:07 +0000 (04:32 +0100)]
configure: Add -Wno-char-subscripts.

Silences many warnings on systems with signed char where
the compiler cannot distinguish between char and int8_t.

5 months agoconfigure: Disable direct stripping on sunos.
Carl Eugen Hoyos [Sun, 18 Nov 2018 03:25:29 +0000 (04:25 +0100)]
configure: Disable direct stripping on sunos.

Sunos strip doesn't know -o.
Reported-by: Michael Kostylev
5 months agoavformat/pcmdec: endianness for audio/L16 mime type
Igor Derzhavin [Thu, 22 Nov 2018 07:54:42 +0000 (10:54 +0300)]
avformat/pcmdec: endianness for audio/L16 mime type

5 months agoavformat/pcmdec: audio/L16 should be in network byte order by default (rfc 2586)
Igor Derzhavin [Thu, 22 Nov 2018 07:39:57 +0000 (10:39 +0300)]
avformat/pcmdec: audio/L16 should be in network byte order by default (rfc 2586)

5 months agoavformat/pcmdec: mime-type should be case insensitive (audio/L16)
Igor Derzhavin [Thu, 22 Nov 2018 07:38:20 +0000 (10:38 +0300)]
avformat/pcmdec: mime-type should be case insensitive (audio/L16)

5 months agoavformat/dhav: improve A/V sync
Paul B Mahol [Sat, 24 Nov 2018 20:40:52 +0000 (21:40 +0100)]
avformat/dhav: improve A/V sync

Actual stored timestamps take only 16bits.

5 months agoavcodec/truemotion2: fix integer overflows in tm2_low_chroma()
Michael Niedermayer [Fri, 16 Nov 2018 23:38:53 +0000 (00:38 +0100)]
avcodec/truemotion2: fix integer overflows in tm2_low_chroma()

Fixes: 11295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-4888953459572736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoswscale : add support for YUVA444P12 and YUVA422P12
Martin Vignali [Sat, 24 Nov 2018 15:22:52 +0000 (16:22 +0100)]
swscale : add support for YUVA444P12 and YUVA422P12

5 months agoavutil : add YUVA444P12 and YUVA422P12
Martin Vignali [Sat, 24 Nov 2018 15:12:00 +0000 (16:12 +0100)]
avutil : add YUVA444P12 and YUVA422P12

5 months agoavformat: add DHAV demuxer
Paul B Mahol [Mon, 13 Feb 2017 14:13:09 +0000 (15:13 +0100)]
avformat: add DHAV demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 months agoavcodec: add truehd_core bitstream filter
Paul B Mahol [Mon, 19 Nov 2018 21:52:45 +0000 (22:52 +0100)]
avcodec: add truehd_core bitstream filter

5 months agolavf/dashenc: Fix segment duration overflow on fine time bases.
Andrey Semashev [Tue, 20 Nov 2018 17:33:52 +0000 (20:33 +0300)]
lavf/dashenc: Fix segment duration overflow on fine time bases.

When stream time bases are very fine grained (e.g. nanoseconds), 32-bit
segment duration may overflow for even for rather small segment duration
(about 4 seconds long). Therefore we use 64-bit values for segment duration.

5 months agocbs_h2645: Avoid memcpy when splitting fragment
Andreas Rheinhardt [Wed, 21 Nov 2018 18:34:29 +0000 (19:34 +0100)]
cbs_h2645: Avoid memcpy when splitting fragment

Now memcpy is avoided for NAL units that don't contain 0x03 escape
characters.

Improves performance of cbs_h2645_fragment_add_nals from 36940
decicycles to 6364 decicycles based on 8 runs with a 5.1 Mb/s H.264
sample (262144 runs each).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
5 months agoavformat/movenc: get number of written bytes from bitstream writer
Paul B Mahol [Thu, 22 Nov 2018 20:28:59 +0000 (21:28 +0100)]
avformat/movenc: get number of written bytes from bitstream writer

Update fate test.

5 months agoavformat/movenc: fix size calculation in mov_write_eac3_tag()
Paul B Mahol [Wed, 21 Nov 2018 10:45:02 +0000 (11:45 +0100)]
avformat/movenc: fix size calculation in mov_write_eac3_tag()

Otherwise it would assert when flushing bits.

5 months agoavutil/avsscanf: do not use unsupported p suffix for hex variable
Paul B Mahol [Wed, 21 Nov 2018 18:07:33 +0000 (19:07 +0100)]
avutil/avsscanf: do not use unsupported p suffix for hex variable

5 months agoavformat/http : Added check for valid URL context before calling shutdown
kjeyapal@akamai.com [Fri, 16 Nov 2018 08:57:12 +0000 (14:27 +0530)]
avformat/http : Added check for valid URL context before calling shutdown

5 months agoavformat/dashenc : Handled error from ff_http_do_new_request() cleanly
kjeyapal@akamai.com [Fri, 16 Nov 2018 08:57:11 +0000 (14:27 +0530)]
avformat/dashenc : Handled error from ff_http_do_new_request() cleanly

5 months agox86/scene_sad: fix link errors when HAVE_X86ASM is not defined
James Almer [Wed, 21 Nov 2018 15:21:38 +0000 (12:21 -0300)]
x86/scene_sad: fix link errors when HAVE_X86ASM is not defined

Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 months agolavf/dashenc: Fix AVDictionary leaks in case of various init errors.
Andrey Semashev [Sat, 17 Nov 2018 17:40:53 +0000 (20:40 +0300)]
lavf/dashenc: Fix AVDictionary leaks in case of various init errors.

5 months agolavf/dashenc: Add support for format-specific file extensions.
Andrey Semashev [Sat, 17 Nov 2018 17:40:51 +0000 (20:40 +0300)]
lavf/dashenc: Add support for format-specific file extensions.

The file name template options now support a new "$ext$" placeholder,
which is replaced with a filename extension specific for the selected
file format. This is useful for the new "auto" format mode, when
different streams may use different file formats, and it is not
possible to specify the correct file name extension exactly.

Resolves warnings in the log about webm segments not having webm extensions.

5 months agolavf/dashenc: Add DASH segment type auto and make it the default
Andrey Semashev [Sat, 17 Nov 2018 17:40:50 +0000 (20:40 +0300)]
lavf/dashenc: Add DASH segment type auto and make it the default

This commit restores the ability to create DASH streams with codecs
that require different containers that was lost after commit
2efdbf7367989cf9d296c25fa3d2aff8d6e25fdd. It adds a new "auto" value for
the dash_segment_type option and makes it the default. When in this mode,
the segment format will be chosen based on the codec used in the stream:
webm for Vorbis, Opus, VP8 or VP9, mp4 otherwise.

5 months agoavfilter/graphmonitor: use SIZE_SPECIFIER for size_t type
Peter Ross [Mon, 19 Nov 2018 09:03:39 +0000 (20:03 +1100)]
avfilter/graphmonitor: use SIZE_SPECIFIER for size_t type

5 months agoavcodec/truemotion2: Check huffman code max bits
Michael Niedermayer [Mon, 19 Nov 2018 22:47:13 +0000 (23:47 +0100)]
avcodec/truemotion2: Check huffman code max bits

Fixes: Timeout
Fixes: 10984/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-6643310750859264

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agofate-api-h264-slice: use the heap for nal buffer
Peter Ross [Tue, 20 Nov 2018 14:31:44 +0000 (01:31 +1100)]
fate-api-h264-slice: use the heap for nal buffer

nal buffer is 512 kilobytes

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoapi-h264-slice-test: use av_be2ne16 instead of ntohs
Peter Ross [Tue, 20 Nov 2018 07:51:52 +0000 (18:51 +1100)]
api-h264-slice-test: use av_be2ne16 instead of ntohs

avformat/network.h is not required here.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavfilter/vf_overlay: fix crash with negative y
Paul B Mahol [Tue, 20 Nov 2018 22:18:47 +0000 (23:18 +0100)]
avfilter/vf_overlay: fix crash with negative y

5 months agoavcodec/mpeg_er: fix clearing chroma blocks for 422 and 444
Marton Balint [Sat, 17 Nov 2018 22:26:24 +0000 (23:26 +0100)]
avcodec/mpeg_er: fix clearing chroma blocks for 422 and 444

Fixes ticket #7494.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavfilter/vf_freezedetect: add filter to detect frozen input
Marton Balint [Sun, 4 Nov 2018 21:22:24 +0000 (22:22 +0100)]
avfilter/vf_freezedetect: add filter to detect frozen input

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agolibvpxenc,cosmetics: fix { placement
James Zern [Mon, 19 Nov 2018 19:36:36 +0000 (11:36 -0800)]
libvpxenc,cosmetics: fix { placement

Signed-off-by: James Zern <jzern@google.com>
5 months agoavcodec/libvpxenc: add VP8 temporal scalability config options
Ard Oerlemans [Wed, 14 Nov 2018 20:56:31 +0000 (12:56 -0800)]
avcodec/libvpxenc: add VP8 temporal scalability config options

This commit adds configuration options to libvpxenc.c that can be used to
enable VP8 temporal scalability. It also adds a way to programmatically set the
per-frame encoding flags which can be used to control usage and updates of
reference frames while encoding with temporal scalability enabled.

Signed-off-by: James Zern <jzern@google.com>
5 months agoconfigure: update api version of libxavs2
hwrenx [Sun, 18 Nov 2018 07:19:02 +0000 (15:19 +0800)]
configure: update api version of libxavs2

abolish parameter IntraPeriod &&
replaced by IntraPeriodMax/Min

Signed-off-by: hwrenx <hwrenx@126.com>
5 months agoavutil/avsscanf: use ptrdiff_t instead of off_t
Paul B Mahol [Mon, 19 Nov 2018 14:16:36 +0000 (15:16 +0100)]
avutil/avsscanf: use ptrdiff_t instead of off_t

5 months agoavfilter: add rgbashift filter
Paul B Mahol [Sun, 18 Nov 2018 12:03:03 +0000 (13:03 +0100)]
avfilter: add rgbashift filter

5 months agoavfilter: add chromashift filter
Paul B Mahol [Sat, 17 Nov 2018 13:04:16 +0000 (14:04 +0100)]
avfilter: add chromashift filter

5 months agoavutil/mem: Correct documentation of av_fast_*alloc(z)
Andreas Rheinhardt [Sun, 18 Nov 2018 14:08:45 +0000 (15:08 +0100)]
avutil/mem: Correct documentation of av_fast_*alloc(z)

The current wording regarding size and min_size is completely wrong and
ignores that min_size is indeed only a desired minimal size, not the
actually allocated size.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agolibaomenc: Drop unused noise-sensitivity option
Mark Thompson [Mon, 5 Nov 2018 14:52:46 +0000 (14:52 +0000)]
libaomenc: Drop unused noise-sensitivity option

5 months agoavcodec/scpr: add version 3 support
Paul B Mahol [Sat, 27 May 2017 12:28:08 +0000 (14:28 +0200)]
avcodec/scpr: add version 3 support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 months agovaapi_encode_h265: Reduce SAR to valid range
Mark Thompson [Sun, 28 Oct 2018 17:13:54 +0000 (17:13 +0000)]
vaapi_encode_h265: Reduce SAR to valid range

Matching previous commit for H.264.

5 months agovaapi_encode_h264: Reduce SAR to valid range
Mark Thompson [Sun, 28 Oct 2018 17:13:53 +0000 (17:13 +0000)]
vaapi_encode_h264: Reduce SAR to valid range

The SAR of the input could have a numerator or denominator greater than
2^16 which would then be truncated to a 16-bit integer when written to
the VUI parameters, giving a random result.  Instead, reduce the SAR to
the nearest representable fraction.

Fixes #7502.

5 months agoavfilter/vf_limiter: remove unused header
Paul B Mahol [Sun, 18 Nov 2018 21:14:02 +0000 (22:14 +0100)]
avfilter/vf_limiter: remove unused header

5 months agoavfilter/vf_limiter: always limit min/max to format depth
Paul B Mahol [Sun, 18 Nov 2018 21:11:53 +0000 (22:11 +0100)]
avfilter/vf_limiter: always limit min/max to format depth

5 months agoh264_redundant_pps: Fix memleak in case of errors
Andreas Rheinhardt [Fri, 9 Nov 2018 05:31:36 +0000 (06:31 +0100)]
h264_redundant_pps: Fix memleak in case of errors

Now the fragment is uninitialized and the input packet freed in case of
errors.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
5 months agoavfilter/f_drawgraph: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:41:04 +0000 (20:41 +0100)]
avfilter/f_drawgraph: use av_sscanf()

5 months agoavfilter/af_aecho: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:39:44 +0000 (20:39 +0100)]
avfilter/af_aecho: use av_sscanf()

5 months agoavfilter/af_ladspa: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:38:24 +0000 (20:38 +0100)]
avfilter/af_ladspa: use av_sscanf()

5 months agoavfilter/vf_mix: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:35:21 +0000 (20:35 +0100)]
avfilter/vf_mix: use av_sscanf()

5 months agoavfilter/af_sofalizer: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:32:28 +0000 (20:32 +0100)]
avfilter/af_sofalizer: use av_sscanf()

5 months agoavfilter/af_afftdn: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:22:40 +0000 (20:22 +0100)]
avfilter/af_afftdn: use av_sscanf()

5 months agoavfilter/af_adelay: use av_sscanf()
Paul B Mahol [Sun, 18 Nov 2018 19:16:59 +0000 (20:16 +0100)]
avfilter/af_adelay: use av_sscanf()

5 months agoavfilter/af_acrossover: use av_strtod() to parse single number
Paul B Mahol [Sun, 18 Nov 2018 19:13:55 +0000 (20:13 +0100)]
avfilter/af_acrossover: use av_strtod() to parse single number

5 months agoavcodec/cbs_av1: don't abort when splitting Temporal Units containing OBUs with no...
James Almer [Thu, 15 Nov 2018 04:07:49 +0000 (01:07 -0300)]
avcodec/cbs_av1: don't abort when splitting Temporal Units containing OBUs with no obu_size field

The ISOBMFF and Matroska specs allow the last OBU in a Sample/Block to have
obu_has_size_field equal to 0.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agolavc/libdavs2: correct frame type setting
hwren [Fri, 2 Nov 2018 13:30:10 +0000 (21:30 +0800)]
lavc/libdavs2: correct frame type setting

Signed-off-by: hwren <hwrenx@126.com>
6 months agolavc/libdavs2: remove unused frame counter
hwren [Fri, 2 Nov 2018 13:30:09 +0000 (21:30 +0800)]
lavc/libdavs2: remove unused frame counter

Signed-off-by: hwren <hwrenx@126.com>
6 months agovaapi_encode: Improve log message for unsupported profiles
Mark Thompson [Mon, 5 Nov 2018 18:00:48 +0000 (18:00 +0000)]
vaapi_encode: Improve log message for unsupported profiles

6 months agodoc/encoders: Add libaom-av1
Mark Thompson [Mon, 5 Nov 2018 14:47:19 +0000 (14:47 +0000)]
doc/encoders: Add libaom-av1

6 months agodoc/encoders: Move libxavs2 to correct place in alphabetical order
Mark Thompson [Sun, 28 Oct 2018 20:08:17 +0000 (20:08 +0000)]
doc/encoders: Move libxavs2 to correct place in alphabetical order

6 months agomjpegdec: Fill raw huffman tables with default values too
Mark Thompson [Sun, 11 Nov 2018 16:16:54 +0000 (16:16 +0000)]
mjpegdec: Fill raw huffman tables with default values too

These may be used by hwaccel decoders when the standard tables are not
otherwise available.  At the same time, clean up that code into an array
so it's a little less repetitive.

6 months agocbs_h265: Add a lot more SEI parsing support
Mark Thompson [Sat, 27 Oct 2018 21:36:46 +0000 (22:36 +0100)]
cbs_h265: Add a lot more SEI parsing support

Supports both prefix and suffix SEI, decoding all of the common SEI
types and some more obscure ones.  Most of this is tested by the
existing tests in fate.

6 months agolavu/avsscanf: Do not mix declaration and code.
Carl Eugen Hoyos [Sun, 18 Nov 2018 02:51:42 +0000 (03:51 +0100)]
lavu/avsscanf: Do not mix declaration and code.

Fixes the following warning:
libavutil/avsscanf.c: In function 'decfloat':
libavutil/avsscanf.c:354:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
         int bitlim = bits-3*(int)(rp-9);
         ^~~

6 months agoavfilter: use av_clip_uintp2 instead of av_clip for 10b and 12b
Martin Vignali [Sat, 17 Nov 2018 16:57:27 +0000 (17:57 +0100)]
avfilter: use av_clip_uintp2 instead of av_clip for 10b and 12b

6 months agoavutil/cuda_check: Make sure this passes make fate-source
Philip Langdale [Sat, 17 Nov 2018 16:16:28 +0000 (08:16 -0800)]
avutil/cuda_check: Make sure this passes make fate-source

The header guards were unnecessarily non-standard and the c file
inclusion trick means the files dont't have standard licence
headers.

Based on a patch by: Martin Vignali <martin.vignali@gmail.com>

6 months agoavfilter/vf_neighbor: fix >8 bit deflate/inflate
Paul B Mahol [Sat, 17 Nov 2018 10:07:58 +0000 (11:07 +0100)]
avfilter/vf_neighbor: fix >8 bit deflate/inflate

6 months agolavf/hlsenc: Do not mix declarations and code.
Carl Eugen Hoyos [Fri, 16 Nov 2018 21:03:37 +0000 (22:03 +0100)]
lavf/hlsenc: Do not mix declarations and code.

Fixes the following warnings:
libavformat/hlsenc.c: In function 'hls_write_trailer':
libavformat/hlsenc.c:2364:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
                 uint8_t *buffer = NULL;
                 ^~~~~~~
libavformat/hlsenc.c:2372:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
                 int byterange_mode = (hls->flags & HLS_SINGLE_FILE) || (hls->max_seg_size > 0);
                 ^~~
libavformat/hlsenc.c:2379:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
             int range_length = 0;
             ^~~

6 months agolavfi/minterpolate: Remove declaration of two unused variables.
Carl Eugen Hoyos [Fri, 16 Nov 2018 20:45:49 +0000 (21:45 +0100)]
lavfi/minterpolate: Remove declaration of two unused variables.

6 months agoavfilter/vf_dedot: initizalize ret variable
Paul B Mahol [Fri, 16 Nov 2018 20:39:37 +0000 (21:39 +0100)]
avfilter/vf_dedot: initizalize ret variable

6 months agoavfilter/vf_lut3d: use av_sscanf
Paul B Mahol [Sun, 11 Nov 2018 16:41:14 +0000 (17:41 +0100)]
avfilter/vf_lut3d: use av_sscanf

6 months agolavu: add locale-independent sscanf implementation
Paul B Mahol [Sun, 11 Nov 2018 16:39:33 +0000 (17:39 +0100)]
lavu: add locale-independent sscanf implementation

Copied and adopted from musl implementation.
 * converted all 'long double' to 'double'
 * removed %m support

6 months agoavfilter: add dedot video filter
Paul B Mahol [Tue, 13 Nov 2018 13:13:10 +0000 (14:13 +0100)]
avfilter: add dedot video filter

6 months agodoc/filters: improve afftfilt documentation
Paul B Mahol [Fri, 16 Nov 2018 18:36:25 +0000 (19:36 +0100)]
doc/filters: improve afftfilt documentation

6 months agoavcodec/pngdec: Check compression method
Michael Niedermayer [Fri, 9 Nov 2018 02:12:45 +0000 (03:12 +0100)]
avcodec/pngdec: Check compression method

method 0 (inflate/deflate) is the only specified in the specification and the only supported

Fixes: Timeout
Fixes: 10976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-5729372588736512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agofftools/ffmpeg: Repair reinit_filter feature
Michael Niedermayer [Tue, 13 Nov 2018 19:29:40 +0000 (20:29 +0100)]
fftools/ffmpeg: Repair reinit_filter feature

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/libvpxenc: Add a maximum constraint of 16 encoder threads.
Chirag Lathia [Thu, 15 Nov 2018 18:51:32 +0000 (10:51 -0800)]
avcodec/libvpxenc: Add a maximum constraint of 16 encoder threads.

Signed-off-by: Chirag Lathia <clathia@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavfilter/af_afade: fix duration maximum
Marton Balint [Mon, 12 Nov 2018 21:00:49 +0000 (22:00 +0100)]
avfilter/af_afade: fix duration maximum

Signed-off-by: Marton Balint <cus@passwd.hu>
6 months agoavfilter/vf_convolution: use sqrtf as its faster
Paul B Mahol [Thu, 15 Nov 2018 18:09:20 +0000 (19:09 +0100)]
avfilter/vf_convolution: use sqrtf as its faster

6 months agoavfilter/vf_blend: add 12bit support
Paul B Mahol [Thu, 15 Nov 2018 13:53:15 +0000 (14:53 +0100)]
avfilter/vf_blend: add 12bit support

6 months agoavfilter/vf_blend: add 10bit support
Paul B Mahol [Thu, 15 Nov 2018 12:41:45 +0000 (13:41 +0100)]
avfilter/vf_blend: add 10bit support

6 months agoavfilter/vf_lut2: implement support for different input depths
Paul B Mahol [Wed, 14 Nov 2018 23:07:12 +0000 (00:07 +0100)]
avfilter/vf_lut2: implement support for different input depths

6 months agoavfilter/vf_bwdif: Use common yadif frame management logic
Philip Langdale [Sun, 4 Nov 2018 18:17:01 +0000 (10:17 -0800)]
avfilter/vf_bwdif: Use common yadif frame management logic

After adding field type management to the common yadif logic, we can
remove the duplicate copy of that logic from bwdif.

6 months agoavfilter/yadif_common: Add field type tracking to help bwdif
Philip Langdale [Sun, 4 Nov 2018 18:02:07 +0000 (10:02 -0800)]
avfilter/yadif_common: Add field type tracking to help bwdif

The bwdif filter can use common yadif frame management if we track
when a field is the first or last field in a sequence. While this
information is not used by yadif, the added benefit of removing the
duplicated frame management logic makes it worth tracking this state
in the common code.

6 months agoavutil/hwcontext_cuda: Define and use common CHECK_CU()
Philip Langdale [Sun, 11 Nov 2018 06:47:28 +0000 (22:47 -0800)]
avutil/hwcontext_cuda: Define and use common CHECK_CU()

We have a pattern of wrapping CUDA calls to print errors and
normalise return values that is used in a couple of places. To
avoid duplication and increase consistency, let's put the wrapper
implementation in a shared place and use it everywhere.

Affects:

* avcodec/cuviddec
* avcodec/nvdec
* avcodec/nvenc
* avfilter/vf_scale_cuda
* avfilter/vf_scale_npp
* avfilter/vf_thumbnail_cuda
* avfilter/vf_transpose_npp
* avfilter/vf_yadif_cuda

6 months agoavcodec/cbs_av1: fix parsing signed integer values
James Almer [Sun, 11 Nov 2018 01:52:12 +0000 (22:52 -0300)]
avcodec/cbs_av1: fix parsing signed integer values

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavcodec/cbs_av1: fix storage size for segmentation_params feature_value fields
James Almer [Sun, 11 Nov 2018 01:51:18 +0000 (22:51 -0300)]
avcodec/cbs_av1: fix storage size for segmentation_params feature_value fields

The valid range is -255 to 255.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoconfigure: Add missing xlib dependency for VAAPI X11 code
Mark Thompson [Wed, 14 Nov 2018 22:56:18 +0000 (22:56 +0000)]
configure: Add missing xlib dependency for VAAPI X11 code

Fixes #7538.

6 months agolavf/dashenc: set FLAC manifest codec string to "flac"
Jan Ekström [Wed, 14 Nov 2018 01:11:31 +0000 (03:11 +0200)]
lavf/dashenc: set FLAC manifest codec string to "flac"

Internally in ISOBMFF the FLAC-in-ISOBMFF draft uses "fLaC"
as the identifier for FLACSampleEntry, and there seems to be no
MPEG-DASH specification for the in-manifest identifier for FLAC.

After testing the browsers' implementations, it seems like all of
the major browser vendors have decided to utilize the MIME type for
FLAC ("audio/flac") as the identifier. This change set leads to
that string being utilized for FLAC streams instead of the sample
entry identifier ("fLaC"), which is the default behavior.

Verified by auri_ on IRC to play with the major browsers.

6 months agoavcodec/libdav1d: fix build after a recent API break
James Almer [Wed, 14 Nov 2018 13:05:25 +0000 (10:05 -0300)]
avcodec/libdav1d: fix build after a recent API break

Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavcodec/huffyuvenc: add support for gbrp16
Paul B Mahol [Mon, 12 Nov 2018 17:35:54 +0000 (18:35 +0100)]
avcodec/huffyuvenc: add support for gbrp16

6 months agoavcodec/shorten: Fix integer overflow with offset
Michael Niedermayer [Fri, 9 Nov 2018 18:59:27 +0000 (19:59 +0100)]
avcodec/shorten: Fix integer overflow with offset

Fixes: signed integer overflow: -1625810908 - 582229060 cannot be represented in type 'int'
Fixes: 10977/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5732602018267136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/golomb: Speed up long ur_golomb codes
Michael Niedermayer [Fri, 9 Nov 2018 20:50:23 +0000 (21:50 +0100)]
avcodec/golomb: Speed up long ur_golomb codes

Fixes: Timeout
Fixes: 10972/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLAC_fuzzer-5707569640243200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoh264_metadata: Don't use inferred value of buffering frames
Andreas Rheinhardt [Mon, 12 Nov 2018 14:18:15 +0000 (15:18 +0100)]
h264_metadata: Don't use inferred value of buffering frames

Using the value of buffering frames inferred from the old level is
not a sensible approach when one wants to guess the level.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>