ffmpeg.git
9 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>
(cherry picked from commit e3a96309826dd0ea33db0300f7c75414fdbea0a4)

10 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>
(cherry picked from commit aecd63b926812148014c4f01270473722ae5e945)

10 months agoavfilter/vf_fade: fix start/duration max value
Mark Harris [Mon, 12 Nov 2018 06:54:04 +0000 (22:54 -0800)]
avfilter/vf_fade: fix start/duration max value

A fade out (usually at the end of a video) can easily start beyond
INT32_MAX (about 36 minutes).  Regression since d40dc64173.

(cherry picked from commit ae4323548ae821db81b73bc66cf5a2f9885296cb)

10 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>
(cherry picked from commit f0f2832a5ce93bad9b1d29f99df6bda2380fc41c)

10 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>
(cherry picked from commit 79831f4531d98c3c1eab96c10f1135d08abef5f3)

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

(cherry picked from commit 2ce3a48f30fe3cec7153aa3f18a1012a366aca3a)

10 months agoavcodec/hevcdec: fix non-ref frame judgement
Mark Wu [Tue, 23 Oct 2018 04:49:08 +0000 (12:49 +0800)]
avcodec/hevcdec: fix non-ref frame judgement

After inspecting the source code of x265, mpv and ffmpeg, I've found that
ffmpeg mistakenly regards EVC_NAL_BLA_N_LP and HEVC_NAL_IDR_N_LP as non-
reference frames, which are acutally reference frames according to the
specification in x265, and drops them.

This patch should address the problem. I have tested it with mpv.

Signed-off-by: Mark Wu <wfwf1997@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 10bc4c3a7df7bb26303067b97311b7eeedfd453e)

10 months agocbs_av1: Support redundant frame headers n4.1
Mark Thompson [Sun, 4 Nov 2018 23:58:01 +0000 (23:58 +0000)]
cbs_av1: Support redundant frame headers

(cherry picked from commit f5894178fb8063ec17c61c04df96a70607ca2daa)

10 months agocbs_av1: Fix header writing when already aligned
Mark Thompson [Sun, 4 Nov 2018 23:56:39 +0000 (23:56 +0000)]
cbs_av1: Fix header writing when already aligned

(cherry picked from commit 6bdb7712ae0267ba4f69c7434d2b3dee12762d1d)

10 months agoconfigure: Add missing V4L2 M2M decoder BSF dependencies
Mark Thompson [Mon, 5 Nov 2018 14:22:10 +0000 (14:22 +0000)]
configure: Add missing V4L2 M2M decoder BSF dependencies

(cherry picked from commit e9d2e3fdaacb6872dd689ffd5a65e476b70dee3d)

10 months agoconfigure: Add missing IVF muxer BSF dependency
Mark Thompson [Mon, 5 Nov 2018 14:22:05 +0000 (14:22 +0000)]
configure: Add missing IVF muxer BSF dependency

(cherry picked from commit a4fb2b115071220f23ad7b3d82037647e94279ed)

10 months agoavcodec/cbs_av1: fix decoder/encoder_buffer_delay variable types
James Almer [Sun, 4 Nov 2018 20:07:39 +0000 (17:07 -0300)]
avcodec/cbs_av1: fix decoder/encoder_buffer_delay variable types

buffer_delay_length_minus_1 is five bits long, meaning decode_buffer_delay and
encoder_buffer_delay can have values up to 32 bits long.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 89a0d33e3a53e8edefd734b131a7035d13052947)

10 months agoconfigure: Fix av1_metadata BSF dependency
Mark Thompson [Mon, 5 Nov 2018 00:01:54 +0000 (00:01 +0000)]
configure: Fix av1_metadata BSF dependency

(cherry picked from commit 34429182b93123a25e38819ef15bdae42793209f)

10 months agoavformat/ivfenc: use the av1_metadata bsf to insert Temporal Delimiter OBUs if needed
James Almer [Wed, 3 Oct 2018 00:08:54 +0000 (21:08 -0300)]
avformat/ivfenc: use the av1_metadata bsf to insert Temporal Delimiter OBUs if needed

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 2d2af23349cae0d84c8ed51c249bfc1e6f2e28a2)

10 months agoavformat/ftp: allow nonstandard 202 reply to OPTS UTF8
Marton Balint [Thu, 1 Nov 2018 20:03:59 +0000 (21:03 +0100)]
avformat/ftp: allow nonstandard 202 reply to OPTS UTF8

Fixes ticket #7481.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 8e5a2495a8dad262e0a00fbca09b7779b4ebf0bf)

10 months agoavcodec/cavsdec: Propagate error codes inside decode_mb_i()
Michael Niedermayer [Sun, 4 Nov 2018 19:00:16 +0000 (20:00 +0100)]
avcodec/cavsdec: Propagate error codes inside decode_mb_i()

Fixes: Timeout
Fixes: 10702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CAVS_fuzzer-5669940938407936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1cee0565692c541f589aefd7f375d37f55b9d94)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/mpeg4videodec: Clear partitioned frame in decode_studio_vop_header()
Michael Niedermayer [Sun, 4 Nov 2018 18:02:55 +0000 (19:02 +0100)]
avcodec/mpeg4videodec: Clear partitioned frame in decode_studio_vop_header()

partitioned_frame is also set/cleared in decode_vop_header()

Fixes: out of array read
Fixes: 9789/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5638681627983872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 074187d599a2ece2bdf77bd08b4b797c5800eda6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/mpegaudio_parser: Consume more than 0 bytes in case of the unsupported mp3adu...
Michael Niedermayer [Sun, 28 Oct 2018 20:08:39 +0000 (21:08 +0100)]
avcodec/mpegaudio_parser: Consume more than 0 bytes in case of the unsupported mp3adu case

Fixes: Timeout
Fixes: 10966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADU_fuzzer-5348695024336896
Fixes: 10969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5691669402877952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit df91af140c5543cfbbed187f696e79b554d2c135)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/prosumer: Simplify bit juggling of the c variable in decompress()
Michael Niedermayer [Wed, 31 Oct 2018 09:19:43 +0000 (10:19 +0100)]
avcodec/prosumer: Simplify bit juggling of the c variable in decompress()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 66425add270cd262a22c0fdaf6aad09a0db6f8c0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/prosumer: Remove always true check in decompress()
Michael Niedermayer [Wed, 31 Oct 2018 09:19:08 +0000 (10:19 +0100)]
avcodec/prosumer: Remove always true check in decompress()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1dfa0b6f36d29293f2d0219c4095dc8bb7a4b0dc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/prosumer: Remove unneeded ()
Michael Niedermayer [Wed, 31 Oct 2018 09:18:45 +0000 (10:18 +0100)]
avcodec/prosumer: Remove unneeded ()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 506839a3e9cc34c8f719937430008fc12d132fce)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/prosumer: Check for bytestream eof in decompress()
Michael Niedermayer [Wed, 31 Oct 2018 02:06:59 +0000 (03:06 +0100)]
avcodec/prosumer: Check for bytestream eof in decompress()

Fixes: Infinite loop
Fixes: 10685/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5652236881887232

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9acdf17b2c30c44e6e6a3d3b3c22989b7e1117c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation
Philip Langdale [Fri, 2 Nov 2018 21:08:18 +0000 (14:08 -0700)]
avfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation

This requires a newer version of CUDA than we want to require.

(cherry picked from commit 8e50215b5e02074b0773dfcf55867654ee59c179)

10 months agoavcodec/nvdec: Increase frame pool size to help deinterlacing
Philip Langdale [Thu, 25 Oct 2018 01:38:44 +0000 (18:38 -0700)]
avcodec/nvdec: Increase frame pool size to help deinterlacing

With the cuda yadif filter in use, the number of mapped decoder
frames could increase by two, as the filter holds on to additional
frames.

(cherry picked from commit 1b41115ef70896d9b98ce842dc5f21c465396ce2)

10 months agoavfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer
Philip Langdale [Sun, 21 Oct 2018 20:49:16 +0000 (13:49 -0700)]
avfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer

This is a cuda implementation of yadif, which gives us a way to
do deinterlacing when using the nvdec hwaccel. In that scenario
we don't have access to the nvidia deinterlacer.

(cherry picked from commit d5272e94ab22bfc8f01fa3174e2c4664161ddf5a)

10 months agolibavfilter/vf_yadif: Make frame management logic and options shareable
Philip Langdale [Wed, 24 Oct 2018 18:52:42 +0000 (11:52 -0700)]
libavfilter/vf_yadif: Make frame management logic and options shareable

I'm writing a cuda implementation of yadif, and while this
obviously has a very different implementation of the actual
filtering, all the frame management is unchanged. To avoid
duplicating that logic, let's make it shareable.

From the perspective of the existing filter, the only real change
is introducing a function pointer for the filter() function so it
can be specified for the specific filter.

(cherry picked from commit 598f0f39271d6033588b4d8ccc672c5bdc85fec7)

10 months agofate/api-h264-slice-test: use cleaner error handling
Josh de Kock [Tue, 30 Oct 2018 14:38:42 +0000 (14:38 +0000)]
fate/api-h264-slice-test: use cleaner error handling

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 1052578dadf72e400cee5ad2ad5dce899032d362)

10 months agofate/api-h264-slice-test: don't use ssize_t
Josh de Kock [Tue, 30 Oct 2018 14:38:41 +0000 (14:38 +0000)]
fate/api-h264-slice-test: don't use ssize_t

Fixes ticket #7521

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 8096f52049acb1861645815a54435b9fd2d5e77a)

10 months agoRELEASE_NOTES: Based on the version from 4.0
Michael Niedermayer [Fri, 2 Nov 2018 00:36:21 +0000 (01:36 +0100)]
RELEASE_NOTES: Based on the version from 4.0

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoUpdate for 4.1
Michael Niedermayer [Fri, 2 Nov 2018 00:33:08 +0000 (01:33 +0100)]
Update for 4.1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoBump minor versions for branching 4.1
Michael Niedermayer [Thu, 1 Nov 2018 23:15:32 +0000 (00:15 +0100)]
Bump minor versions for branching 4.1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoChangelog: next is 4.1
Michael Niedermayer [Thu, 1 Nov 2018 22:54:35 +0000 (23:54 +0100)]
Changelog: next is 4.1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agodoc/APIchanges: Update for 4.1
Michael Niedermayer [Thu, 1 Nov 2018 22:53:01 +0000 (23:53 +0100)]
doc/APIchanges: Update for 4.1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavformat/ftp: return AVERROR_EOF for EOF
Marton Balint [Thu, 1 Nov 2018 19:48:55 +0000 (20:48 +0100)]
avformat/ftp: return AVERROR_EOF for EOF

Without this FTP just hangs on eof...

Signed-off-by: Marton Balint <cus@passwd.hu>
10 months agoavdevice/libndi_newtek_dec: add extra_ips option to libndi_newtek allowing use remote...
Anton Platov [Mon, 29 Oct 2018 12:57:31 +0000 (15:57 +0300)]
avdevice/libndi_newtek_dec: add extra_ips option to libndi_newtek allowing use remote network sources

Signed-off-by: Anton Platov <anton@platov.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
10 months agoavdevice/decklink_dec: fix codec_tag of RGBA formats
BIGLER Don (Framatome) [Thu, 1 Nov 2018 16:49:37 +0000 (17:49 +0100)]
avdevice/decklink_dec: fix codec_tag of RGBA formats

Fixes ticket #7505.

Signed-off-by: Marton Balint <cus@passwd.hu>
10 months agodoc/filter: add some loop filter trivial examples
Paul B Mahol [Thu, 1 Nov 2018 12:50:51 +0000 (13:50 +0100)]
doc/filter: add some loop filter trivial examples

10 months agoavcodec/vdpau: Initialise driver version variable explicitly
Philip Langdale [Wed, 31 Oct 2018 23:58:09 +0000 (16:58 -0700)]
avcodec/vdpau: Initialise driver version variable explicitly

If the identification string ever changed, we might not match anything
in the sscanf(). At least have predictable behaviour.

10 months agocbs_h265: Add PTL parsing for Main 10 Still Picture profile
Mark Thompson [Sat, 27 Oct 2018 21:39:47 +0000 (22:39 +0100)]
cbs_h265: Add PTL parsing for Main 10 Still Picture profile

This was added in the 2018 version of the standard.

10 months agocbs_h264: Include SEI type names in trace output
Mark Thompson [Sat, 27 Oct 2018 21:39:46 +0000 (22:39 +0100)]
cbs_h264: Include SEI type names in trace output

10 months agodoc/fate.texi: Mention that samples should be uploaded before pushing dependent commits
Michael Niedermayer [Tue, 23 Oct 2018 21:31:24 +0000 (23:31 +0200)]
doc/fate.texi: Mention that samples should be uploaded before pushing dependent commits

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavfilter: add (a)graphmonitor filter(s)
Paul B Mahol [Sat, 27 Oct 2018 17:17:08 +0000 (19:17 +0200)]
avfilter: add (a)graphmonitor filter(s)

10 months agoavcodec/vdpau: Enable HEVC support for working Nvidia driver versions
ManojGuptaBonda [Mon, 29 Oct 2018 08:09:54 +0000 (13:39 +0530)]
avcodec/vdpau: Enable HEVC support for working Nvidia driver versions

The driver bugs that caused decoded HEVC content to have an incorrect
memory layout have been fully fixed in the 410.xx driver release so
we can start exposing support.

10 months agoavcodec/cbs_vp9: store profile in the private context
James Almer [Tue, 30 Oct 2018 18:41:21 +0000 (15:41 -0300)]
avcodec/cbs_vp9: store profile in the private context

Derived from profile_low_bit and profile_high_bit.

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoavcodec/cbs_vp9: keep track of reference frames
James Almer [Tue, 30 Oct 2018 16:44:55 +0000 (13:44 -0300)]
avcodec/cbs_vp9: keep track of reference frames

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agocbs_vp9: Ensure that reserved zero bits are actually zero
Mark Thompson [Sat, 27 Oct 2018 19:41:00 +0000 (20:41 +0100)]
cbs_vp9: Ensure that reserved zero bits are actually zero

10 months agodoc/hls: fix grammar for HLS options
Werner Robitza [Tue, 30 Oct 2018 19:22:55 +0000 (20:22 +0100)]
doc/hls: fix grammar for HLS options

This fixes the grammar of two HLS option descriptions and makes them less
ambiguous.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
10 months agoavcodec/libvpxdec: fix setting auto threads
James Zern [Sat, 27 Oct 2018 20:09:27 +0000 (13:09 -0700)]
avcodec/libvpxdec: fix setting auto threads

a thread count of 0 is treated the same as 1, use av_cpu_count() to get
the correct thread count when auto threads is requested.

this matches the fix in libvpxenc:
27df34bf1f avcodec/libvpxenc: fix setting amount of threads used for encoding

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
10 months agolavu/frame: Add error report if av_image_fill_pointers fail.
Jun Zhao [Sun, 28 Oct 2018 02:44:29 +0000 (10:44 +0800)]
lavu/frame: Add error report if av_image_fill_pointers fail.

Add error handle if av_image_fill_pointers fail.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agolavc/decode: Fix the error number report if av_image_fill_pointers fail.
Jun Zhao [Sun, 28 Oct 2018 02:27:22 +0000 (10:27 +0800)]
lavc/decode: Fix the error number report if av_image_fill_pointers fail.

-1 will be map to error number "EPERM", and will be map to the error
message like "Error while decoding stream #0:0: Operation not permitted",
it's a strange error message when debug update_frame_pool fail,
now only return the error code from av_image_fill_pointers in case
of av_image_fill_pointers failure.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
10 months agoavformat/hlsenc.c: fix the output's duration smaller than input's in sub-range mode.
Charles Liu [Tue, 30 Oct 2018 03:11:27 +0000 (11:11 +0800)]
avformat/hlsenc.c: fix the output's duration smaller than input's in sub-range mode.

In fmp4 & sub-range mode, the output's duration always smaller than expected,
because the size of the last #EXT-X-BYTERANGE is too small.

Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
10 months agoavformat/hlsenc.c: the size of init.mp4 is zero.
Charles Liu [Tue, 30 Oct 2018 03:10:27 +0000 (11:10 +0800)]
avformat/hlsenc.c: the size of init.mp4 is zero.

The size of init.mp4 is zero in fmp4 mode,
when the input duraton smaller than the expected segment time.

fix ticket: 7166

Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
10 months agoavformat/hlsenc.c: remove the useless variable fmp4_init_mode.
Charles Liu [Tue, 30 Oct 2018 03:09:14 +0000 (11:09 +0800)]
avformat/hlsenc.c: remove the useless variable fmp4_init_mode.

Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
10 months agoavformat/hlsenc.c: fix memory leak in fmp4 mode.
Charles Liu [Tue, 30 Oct 2018 03:08:29 +0000 (11:08 +0800)]
avformat/hlsenc.c: fix memory leak in fmp4 mode.

Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
10 months agoavformat/hlsenc: fix the duration of m4s segment is unusually smaller than expected.
Charles Liu [Tue, 30 Oct 2018 03:07:14 +0000 (11:07 +0800)]
avformat/hlsenc: fix the duration of m4s segment is unusually smaller than expected.

In fmp4 mode, the duration of the second m4s segment is
unusually smaller than the expected segment time.

Signed-off-by: Charles Liu <liuchh83@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
10 months agoavcodec/vp9: Check in decode_tiles() if there is data remaining
Michael Niedermayer [Sat, 4 Aug 2018 20:21:02 +0000 (22:21 +0200)]
avcodec/vp9: Check in decode_tiles() if there is data remaining

Fixes: Timeout
Fixes: 9330/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5707345857347584
Fixes: 9775/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5643845344690176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/vp56: Add vpX_rac_is_end() to check for the end of input
Michael Niedermayer [Sat, 11 Aug 2018 20:28:31 +0000 (22:28 +0200)]
avcodec/vp56: Add vpX_rac_is_end() to check for the end of input

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agovaapi_encode_mpeg2: Fix width/height columns/rows confusion
Mark Thompson [Mon, 29 Oct 2018 19:41:24 +0000 (19:41 +0000)]
vaapi_encode_mpeg2: Fix width/height columns/rows confusion

Fixes #7522.

10 months agoavcodec/vp3: reindent unpack_superblocks()
Michael Niedermayer [Mon, 29 Oct 2018 15:28:20 +0000 (16:28 +0100)]
avcodec/vp3: reindent unpack_superblocks()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/vp3: Do not recalculate coded_fragment_list for keyframes
Michael Niedermayer [Sun, 28 Oct 2018 13:44:37 +0000 (14:44 +0100)]
avcodec/vp3: Do not recalculate coded_fragment_list for keyframes

This improves decoding speed of keyframes

Fixes: Timeout (102->27sec)
Fixes: 9642/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-6676767875006464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/vp3: Reuse local variable in unpack_superblocks()
Michael Niedermayer [Sun, 28 Oct 2018 11:49:40 +0000 (12:49 +0100)]
avcodec/vp3: Reuse local variable in unpack_superblocks()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/vp3: Do not initialize unused tables for keyframes in unpack_superblock()
Michael Niedermayer [Sun, 28 Oct 2018 11:46:52 +0000 (12:46 +0100)]
avcodec/vp3: Do not initialize unused tables for keyframes in unpack_superblock()

Fixes: Timeout (139sec -> 102sec)
Fixes: 9642/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-6676767875006464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agodoc/filters: add small description to geq filter section
Paul B Mahol [Mon, 29 Oct 2018 15:44:23 +0000 (16:44 +0100)]
doc/filters: add small description to geq filter section

Previously there was no description at all.

10 months agoavfilter/af_afftdn: fix memory leaks reported by coverity
Paul B Mahol [Sun, 28 Oct 2018 21:30:06 +0000 (22:30 +0100)]
avfilter/af_afftdn: fix memory leaks reported by coverity

10 months agolibaomenc: Add support for tiles
Mark Thompson [Mon, 22 Oct 2018 22:40:07 +0000 (23:40 +0100)]
libaomenc: Add support for tiles

Adds an option to specify the number of tile rows and columns, then uses
a uniform tiling if possible and otherwise a fixed tiling with equal-sized
tiles to fill the frame.

Also adds -tile-columns and -tile-rows options to make tilings with
power-of-two numbers of tiles, matching the behaviour of the libvpx/VP9
encoder.

10 months agoavfilter/af_afftdn: add alias for sample_noise end
Paul B Mahol [Sun, 28 Oct 2018 14:00:34 +0000 (15:00 +0100)]
avfilter/af_afftdn: add alias for sample_noise end

Added the same one as one mentioned in documentation.

10 months agoavfilter/af_afftdn: switch to activate
Paul B Mahol [Sun, 28 Oct 2018 13:27:32 +0000 (14:27 +0100)]
avfilter/af_afftdn: switch to activate

10 months agolavc/libxavs2: Remove yuv420p10le from fromat list.
Jun Zhao [Sun, 28 Oct 2018 07:13:45 +0000 (15:13 +0800)]
lavc/libxavs2: Remove yuv420p10le from fromat list.

now libxavs2 can't support 10bits mode, so remove the
yuv420p10le from fromat list.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
10 months agolavc/libdavs2: Remove yuv420p10le from fromat list.
Jun Zhao [Sun, 28 Oct 2018 07:10:47 +0000 (15:10 +0800)]
lavc/libdavs2: Remove yuv420p10le from fromat list.

now libdavs2 can't support 10bits mode, so remove the
yuv420p10le from fromat list.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
10 months agolavc/libxavs2: enable OpenGop
hwren [Thu, 18 Oct 2018 15:02:10 +0000 (23:02 +0800)]
lavc/libxavs2: enable OpenGop

Signed-off-by: hwren <hwrenx@126.com>
10 months agolavc/libxavs2: fix intra period meaning conflict
hwren [Thu, 18 Oct 2018 15:02:09 +0000 (23:02 +0800)]
lavc/libxavs2: fix intra period meaning conflict

Signed-off-by: hwren <hwrenx@126.com>
10 months agolavc/libxavs2: unified naming style
hwren [Thu, 18 Oct 2018 15:02:08 +0000 (23:02 +0800)]
lavc/libxavs2: unified naming style

Signed-off-by: hwren <hwrenx@126.com>
10 months agoavfilter/vf_pixdesctest: Use 32bit read/write
Michael Niedermayer [Thu, 25 Oct 2018 21:15:54 +0000 (23:15 +0200)]
avfilter/vf_pixdesctest: Use 32bit read/write

This is needed for processing 32bit floats

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavutil/pixdesc: Add av_write_image_line2(), av_read_image_line2()
Michael Niedermayer [Thu, 25 Oct 2018 21:08:20 +0000 (23:08 +0200)]
avutil/pixdesc: Add av_write_image_line2(), av_read_image_line2()

This is needed because of 32bit float formats (which are difficult to
store in 16bits)

This also fixes undefined behavior found by fate

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/cbs_vp9: fix parsing sRGB samples
James Almer [Fri, 26 Oct 2018 19:32:56 +0000 (16:32 -0300)]
avcodec/cbs_vp9: fix parsing sRGB samples

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoavcodec/cbs_av1: fix parsing frame_size_with_refs
James Almer [Sat, 27 Oct 2018 00:32:36 +0000 (21:32 -0300)]
avcodec/cbs_av1: fix parsing frame_size_with_refs

found_ref is not a single value in the bitstream. Fixes parsing files with
frame size changes.

Based on code from cbs_vp9.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
10 months agovaapi_encode: Add flag to mark encoders supporting only constant-quality
Mark Thompson [Sun, 23 Sep 2018 21:53:00 +0000 (22:53 +0100)]
vaapi_encode: Add flag to mark encoders supporting only constant-quality

And set it for MJPEG.

10 months agovaapi_encode_h265: Enable multiple-slice support
Mark Thompson [Sun, 23 Sep 2018 21:52:59 +0000 (22:52 +0100)]
vaapi_encode_h265: Enable multiple-slice support

10 months agovaapi_encode_h264: Enable multiple-slice support
Mark Thompson [Sun, 23 Sep 2018 21:52:58 +0000 (22:52 +0100)]
vaapi_encode_h264: Enable multiple-slice support

10 months agovaapi_encode_mpeg2: Use common slice sizing code
Mark Thompson [Sun, 23 Sep 2018 21:52:57 +0000 (22:52 +0100)]
vaapi_encode_mpeg2: Use common slice sizing code

10 months agovaapi_encode: Support configurable slices
Mark Thompson [Sun, 23 Sep 2018 21:52:56 +0000 (22:52 +0100)]
vaapi_encode: Support configurable slices

This adds common code to query driver support and set appropriate
address/size information for each slice.  It only supports rectangular
slices for now, since that is the most common use-case.

10 months agoavfilter/window_func: add bohman window
Paul B Mahol [Sat, 27 Oct 2018 11:13:31 +0000 (13:13 +0200)]
avfilter/window_func: add bohman window

10 months agotests/api-h264-slice-test: use the correct function to free the AVHashContext
James Almer [Sat, 27 Oct 2018 03:12:30 +0000 (00:12 -0300)]
tests/api-h264-slice-test: use the correct function to free the AVHashContext

Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoavformat/rpl: Support files containing 8 bit PCM or VIDC audio
Cameron Cawley [Fri, 12 Oct 2018 23:06:40 +0000 (00:06 +0100)]
avformat/rpl: Support files containing 8 bit PCM or VIDC audio

Signed-off-by: Cameron Cawley <ccawley2011@gmail.com>
10 months agoavcodec: Implement Archimedes VIDC encoder/decoder
Cameron Cawley [Fri, 12 Oct 2018 23:06:39 +0000 (00:06 +0100)]
avcodec: Implement Archimedes VIDC encoder/decoder

Signed-off-by: Cameron Cawley <ccawley2011@gmail.com>
10 months agofate: add api-h264-slice test
Josh de Kock [Tue, 9 Oct 2018 12:07:15 +0000 (13:07 +0100)]
fate: add api-h264-slice test

This test ensures that you are able to send N number of slice NALUs in slice threaded mode to be decoded simultaneously

10 months agolavc/h264dec: don't error out when receiving multiple IDR slices
Josh de Kock [Wed, 26 Sep 2018 09:35:04 +0000 (10:35 +0100)]
lavc/h264dec: don't error out when receiving multiple IDR slices

This error isn't particularly helpful as checking for mixed IDR/non-IDR
NALUs would need to be done at a higher level to actually be accurate.
Removing the error allows an API user to send individual slice NALUs
(i.e. incomplete frames) so they can take advantage of slice
threading. The ticket which this error was added for (#4408) no
longer segfaults after removing this error (as the bug was likely
fixed more properly elsewhere).

10 months agoavfilter: add xstack filter
Paul B Mahol [Wed, 24 Oct 2018 09:00:58 +0000 (11:00 +0200)]
avfilter: add xstack filter

10 months agoavformat/dashenc: Support HTTP persistent for init segments as well
kjeyapal@akamai.com [Sun, 21 Oct 2018 01:20:51 +0000 (06:50 +0530)]
avformat/dashenc: Support HTTP persistent for init segments as well

10 months agoavcodec/vp9_parser: set profile in AVCodecContext
James Almer [Thu, 25 Oct 2018 23:45:45 +0000 (20:45 -0300)]
avcodec/vp9_parser: set profile in AVCodecContext

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoavfilter/vf_lut3d: do not error out if TITLE is after other lines
Paul B Mahol [Wed, 24 Oct 2018 09:36:23 +0000 (11:36 +0200)]
avfilter/vf_lut3d: do not error out if TITLE is after other lines

10 months agoavfilter/af_adelay: switch to activate
Paul B Mahol [Thu, 25 Oct 2018 20:57:27 +0000 (22:57 +0200)]
avfilter/af_adelay: switch to activate

Also use less memory in special case when all channels have common delay.

10 months agoconfigure: add missing optional SDL2 dependency to OpenGL outdev
James Almer [Thu, 25 Oct 2018 00:12:32 +0000 (21:12 -0300)]
configure: add missing optional SDL2 dependency to OpenGL outdev

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agolavfi/ebur128: Fix mixed declarations and code
Mark Thompson [Tue, 23 Oct 2018 21:21:52 +0000 (22:21 +0100)]
lavfi/ebur128: Fix mixed declarations and code

10 months agoavcodec/libx264: remove FF_CODEC_CAP_INIT_THREADSAFE flag
Marton Balint [Sat, 20 Oct 2018 10:12:42 +0000 (12:12 +0200)]
avcodec/libx264: remove FF_CODEC_CAP_INIT_THREADSAFE flag

Libx264 uses strtok which is not thread safe. Strtok is used in
x264_param_default_preset in param_apply_tune in x264/common/base.c.
Therefore the flag must be removed.

x264 fixed the issue, once the fix is pushed to stable, an #if can be added
to re-enable the flag based on X264_BUILD number.

Fixes ticket #7446.

Signed-off-by: Marton Balint <cus@passwd.hu>
10 months agoavutil/integer: Fix integer overflow in av_mul_i()
Michael Niedermayer [Tue, 23 Oct 2018 23:44:12 +0000 (01:44 +0200)]
avutil/integer: Fix integer overflow in av_mul_i()

Found-by: fate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoavcodec/msrle: Check that the input is large enough to contain a end of picture code
Michael Niedermayer [Sun, 21 Oct 2018 12:40:14 +0000 (14:40 +0200)]
avcodec/msrle: Check that the input is large enough to contain a end of picture code

Fixes: Timeout
Fixes: 10625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSRLE_fuzzer-5659651283091456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 months agoRevert "avcodec/decode: copy the output parameters from the last bsf in the chain...
James Almer [Wed, 12 Sep 2018 18:01:14 +0000 (15:01 -0300)]
Revert "avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext"

This reverts commit f631c328e680a3dd491936b92f69970c20cdcfc7.

The avcodec_parameters_to_context() call was freeing and reallocating
AVCodecContext->extradata, essentially taking ownership of it, which according
to the doxy is user owned. This is an API break and has produced crashes in
some library users like Firefox[1].

Revert until a better solution is found to internally propagate the filtered
extradata back into the decoder context, or a decision is made to change the
API.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1486080

Signed-off-by: James Almer <jamrial@gmail.com>
10 months agoswscale/swscale_unscaled : rename packed_16bpc_bswap
Martin Vignali [Mon, 22 Oct 2018 21:07:20 +0000 (23:07 +0200)]
swscale/swscale_unscaled : rename packed_16bpc_bswap

is used for packed and planar format

10 months agoswscale/unscaled : add grayf32 le to be
Martin Vignali [Mon, 22 Oct 2018 21:05:29 +0000 (23:05 +0200)]
swscale/unscaled : add grayf32 le to be