ffmpeg.git
18 months agoavfilter/formats: fix wrong function name in error message
Jun Zhao [Mon, 4 Dec 2017 04:50:34 +0000 (12:50 +0800)]
avfilter/formats: fix wrong function name in error message

Use perdefined micro __FUNCTION__ rather than hard coding function name
to fix wrong function name in error message.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavformat/mux: factorize AVFormatContext->avoid_negative_ts initialization
James Almer [Mon, 11 Dec 2017 04:02:30 +0000 (01:02 -0300)]
avformat/mux: factorize AVFormatContext->avoid_negative_ts initialization

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
18 months agoavfilter/vf_pseudocolor: add support for more formats
Paul B Mahol [Tue, 12 Dec 2017 18:31:50 +0000 (19:31 +0100)]
avfilter/vf_pseudocolor: add support for more formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agoavformat/hlsenc: reindent after previous commits
Steven Liu [Tue, 12 Dec 2017 03:50:23 +0000 (11:50 +0800)]
avformat/hlsenc: reindent after previous commits

18 months agodoc/filters: re-arrange options for testsrc family
Lou Logan [Mon, 11 Dec 2017 21:46:02 +0000 (12:46 -0900)]
doc/filters: re-arrange options for testsrc family

Additionally:
* Mention that allrgb and allyuv do not support the "size" option.
* Separate examples into subsection.

Fixes ticket #6906.

Signed-off-by: Lou Logan <lou@lrcd.com>
18 months agoavfilter/avfiltergraph: remove ugly dead code
Paul B Mahol [Mon, 11 Dec 2017 21:39:26 +0000 (22:39 +0100)]
avfilter/avfiltergraph: remove ugly dead code

Remnant of old merge.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agoRevert "libavcodec/utils.c: simplify avcodec locking with atomics"
Hendrik Leppkes [Mon, 11 Dec 2017 19:59:56 +0000 (20:59 +0100)]
Revert "libavcodec/utils.c: simplify avcodec locking with atomics"

This reverts commit 590136e78da3d091ea99ab5432543d47a559a461.

Atomics are not required for this variable, because it is protected
through the lock manager, and the use of atomics here is not compatible
with the c11 emulation wrappersi.

Fixes FATE on MSVC, among other setups which use the compat wrappers.

18 months agoavcodec/libvpx: remove disabled code
James Almer [Mon, 11 Dec 2017 03:42:26 +0000 (00:42 -0300)]
avcodec/libvpx: remove disabled code

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agoavformat/hlsenc: move init operations from write_header to init
Steven Liu [Mon, 11 Dec 2017 03:03:25 +0000 (11:03 +0800)]
avformat/hlsenc: move init operations from write_header to init

Reviewed-by: Vishwanath Dixit <vdixit@akamai.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
18 months agoh264dec: Remove mpeg4video.h header dependency
Kieran Kunhya [Sun, 10 Dec 2017 23:51:37 +0000 (23:51 +0000)]
h264dec: Remove mpeg4video.h header dependency

18 months agolibavcodec: Move ff_print_debug_info2 to mpegutils.c
Kieran Kunhya [Mon, 11 Dec 2017 00:04:44 +0000 (00:04 +0000)]
libavcodec: Move ff_print_debug_info2 to mpegutils.c

18 months agodoc/libav-merge: add a line about the skipped HEVC MC arm functions
James Almer [Mon, 11 Dec 2017 00:03:28 +0000 (21:03 -0300)]
doc/libav-merge: add a line about the skipped HEVC MC arm functions

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agoMerge commit '7993ec19af394fdc58ec64165bc0b12619543a5d'
James Almer [Mon, 11 Dec 2017 00:02:45 +0000 (21:02 -0300)]
Merge commit '7993ec19af394fdc58ec64165bc0b12619543a5d'

* commit '7993ec19af394fdc58ec64165bc0b12619543a5d':
  hevc: Add hevc_get_pixel_4/8/12/16/24/32/48/64

This commit is a noop, see
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-December/184777.html

Merged-by: James Almer <jamrial@gmail.com>
18 months agoMerge commit '3ff8fbbf5a7bc40c09db74d4952364997fd3c611'
James Almer [Sun, 10 Dec 2017 23:54:49 +0000 (20:54 -0300)]
Merge commit '3ff8fbbf5a7bc40c09db74d4952364997fd3c611'

* commit '3ff8fbbf5a7bc40c09db74d4952364997fd3c611':
  vaapi_h265: Add named options for setting profile and level
  vaapi_h264: Add named options for setting profile and level
  vaapi: Make the decode profile matching more explicit
  vaapi_h264: Fix VUI max_dec_frame_buffering
  vaapi_h265: Enable VBR mode

This commit is a noop, see
385cafb07ac1e46433931ea9749a134efd7350be
f31478ba1472afe5c1eed60f219ae331816425a2
efd0612fdcb7490ed371899f532d73ef8bb7cba0
c490fc9536dcea7fdf1245a340bf075533610bc2
71421f382f5c53b1a109489a906a80c1b7e3eed7

Merged-by: James Almer <jamrial@gmail.com>
18 months agoMerge commit '5a6707e49b7710f48d658b2f2591b9a6337fb9b7'
James Almer [Sun, 10 Dec 2017 23:49:50 +0000 (20:49 -0300)]
Merge commit '5a6707e49b7710f48d658b2f2591b9a6337fb9b7'

* commit '5a6707e49b7710f48d658b2f2591b9a6337fb9b7':
  cbs_mpeg2: Fix marker_bit type
  cbs: Add padding to slice data allocations

This commit is a noop, see
b4c915f4b3e15c3e787e319b961e4389762f6309
5b2c71bb94d7cab23ee81b5c29388f5fadbcaf22

Merged-by: James Almer <jamrial@gmail.com>
18 months agoMerge commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5'
James Almer [Sun, 10 Dec 2017 23:44:26 +0000 (20:44 -0300)]
Merge commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5'

* commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5':
  rtsp: only break on parse_rtsp_message on error

Merged-by: James Almer <jamrial@gmail.com>
18 months agolavc/huffyuvenc: Move a variable declaration up.
Carl Eugen Hoyos [Sun, 10 Dec 2017 19:46:55 +0000 (20:46 +0100)]
lavc/huffyuvenc: Move a variable declaration up.

Fixes a warning with gcc-6.3:
libavcodec/huffyuvenc.c:93:5: warning: ISO C90 forbids mixed declarations and code

18 months agoavcodec/vp9_superframe_split_bsf: Fix integer overflow in frame_size/total_size checks
Michael Niedermayer [Wed, 6 Dec 2017 21:42:05 +0000 (22:42 +0100)]
avcodec/vp9_superframe_split_bsf: Fix integer overflow in frame_size/total_size checks

Fixes: signed integer overflow: -1698586465 + -551542752 cannot be represented in type 'int'
Fixes: 4490/clusterfuzz-testcase-minimized-5210014592532480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/amrwbdec: Fix division by 0 in voice_factor()
Michael Niedermayer [Thu, 7 Dec 2017 14:32:54 +0000 (15:32 +0100)]
avcodec/amrwbdec: Fix division by 0 in voice_factor()

The added value matches "Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Floating-point ANSI-C code (3GPP TS 26.304 version 14.0.0 Release 14)
Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Floating-point ANSI-C code"

Fixes: runtime error: division by zero
Fixes: 4415/clusterfuzz-testcase-minimized-4677752314658816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoconfigure: Move V4L2 M2M help line to the hardware library section
Mark Thompson [Sun, 10 Dec 2017 17:15:06 +0000 (17:15 +0000)]
configure: Move V4L2 M2M help line to the hardware library section

18 months agolavc: Make hardware config method support more explicit for hwaccels
Thomas Guillem [Fri, 8 Dec 2017 15:59:39 +0000 (15:59 +0000)]
lavc: Make hardware config method support more explicit for hwaccels

This fixes the use of old ad-hoc methods which are still supported by some
hwaccels which also support newer methods (DXVA2, VAAPI, VDPAU,
videotoolbox) - without the method being visible here, ff_get_format()
would refuse to use it.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
18 months agofix MSVC compilation errors
Mateusz [Fri, 8 Dec 2017 07:46:52 +0000 (08:46 +0100)]
fix MSVC compilation errors

After commit 3701d49 'error_resilience: remove avpriv_atomic usage'
we have included windows.h in much more files and we should
avoid conflicts with defines/function declarations.

Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agocheckasm/llviddsp: fix mixed code and declarations
James Almer [Sun, 10 Dec 2017 03:51:35 +0000 (00:51 -0300)]
checkasm/llviddsp: fix mixed code and declarations

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agox86/lossless_videodsp: rename ff_add_left_pred_int16_sse4 to ff_add_left_pred_int16_u...
James Almer [Sun, 10 Dec 2017 03:51:01 +0000 (00:51 -0300)]
x86/lossless_videodsp: rename ff_add_left_pred_int16_sse4 to ff_add_left_pred_int16_unaligned_ssse3

SSSE3_FAST is the proper check for it.

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agox86/lossless_videodsp: don't overread the dst buffer in ff_add_left_pred_unaligned_avx2
James Almer [Sun, 10 Dec 2017 03:38:05 +0000 (00:38 -0300)]
x86/lossless_videodsp: don't overread the dst buffer in ff_add_left_pred_unaligned_avx2

Fixes valgrind

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agoamf: fix wrong profile level after auto-correction in H264 and HEVC
Mironov, Mikhail [Fri, 8 Dec 2017 19:23:38 +0000 (19:23 +0000)]
amf: fix wrong profile level after auto-correction in H264 and HEVC

Moved bitrate parameters set before Init() call because bitrate is used in
profile level correction code inside Init().

Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agolavf/mov: modify code indentation
tiejun.peng [Fri, 8 Dec 2017 16:39:29 +0000 (00:39 +0800)]
lavf/mov: modify code indentation

Signed-off-by: tiejun.peng <tiejun.peng@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agolavf/mov: add some useful warning log of eof
tiejun.peng [Fri, 8 Dec 2017 16:28:41 +0000 (00:28 +0800)]
lavf/mov: add some useful warning log of eof

Signed-off-by: tiejun.peng <tiejun.peng@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/Makefile: Fix opus parser dependency.
Jacob Trimble [Thu, 7 Dec 2017 19:05:46 +0000 (11:05 -0800)]
avcodec/Makefile: Fix opus parser dependency.

The opus.c file uses ff_celt_freq_range and ff_celt_freq_bands which are
defined in opustab.c.  The opus parser needs to include that file to
avoid linker errors when not including the opus encoder/decoder.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/decode: reset codec on receiving packet after EOF in compat_decode
James Cowgill [Thu, 9 Nov 2017 12:21:23 +0000 (12:21 +0000)]
avcodec/decode: reset codec on receiving packet after EOF in compat_decode

In commit 061a0c14bb57 ("decode: restructure the core decoding code"), the
deprecated avcodec_decode_* APIs were reworked so that they called into the
new avcodec_send_packet / avcodec_receive_frame API. This had the side effect
of prohibiting sending new packets containing data after a drain
packet, but in previous versions of FFmpeg this "worked" and some
applications relied on it.

To restore some compatibility, reset the codec if we receive a new non-drain
packet using the old API after draining has completed. While this does
not give the same behaviour as the old API did, in the majority of cases
it works and it does not require changes to any other part of the decoding
code.

Fixes ticket #6775
Signed-off-by: James Cowgill <jcowgill@debian.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
18 months agoarm/hevc_idct: fix compilation on Android
James Almer [Fri, 8 Dec 2017 22:14:13 +0000 (19:14 -0300)]
arm/hevc_idct: fix compilation on Android

Compilation error "out of range" fixed for armeabi-v7a. Compilation failed
trying to build libvlc.aar for ARM7 android on ubuntu 16.04 host. Error
messages is "Offset out of range". The reason of the error is assembler LDR
directives in function "ff_hevc_transform_luma_4x4_neon_8" need local storage
in range <1k, but no such storage provided.

Based on a patch by Ihor Bobalo <bob@eleks.com>

Suggested-by: wbs
Signed-off-by: James Almer <jamrial@gmail.com>
18 months agocheckasm/llviddsp : add test for add_gradient_pred
Martin Vignali [Sat, 2 Dec 2017 18:47:24 +0000 (19:47 +0100)]
checkasm/llviddsp : add test for add_gradient_pred

18 months agoavcodec/utvideodec : add SIMD (SSSE3 and AVX2) for gradient_pred
Martin Vignali [Sat, 2 Dec 2017 18:46:42 +0000 (19:46 +0100)]
avcodec/utvideodec : add SIMD (SSSE3 and AVX2) for gradient_pred

18 months agoavcodec/x86/lossless_videodsp : add avx2 version for add_left_pred
Martin Vignali [Sat, 2 Dec 2017 18:09:58 +0000 (19:09 +0100)]
avcodec/x86/lossless_videodsp : add avx2 version for add_left_pred

18 months agoavcodec/x86/lossless_videodsp.asm : make macro for add_left_pred_unaligned in order...
Martin Vignali [Sat, 2 Dec 2017 18:04:11 +0000 (19:04 +0100)]
avcodec/x86/lossless_videodsp.asm : make macro for add_left_pred_unaligned in order to add avx2 version

18 months agocheckasm/llviddsp : test return of add_left_pred(16)
Martin Vignali [Sat, 2 Dec 2017 18:03:30 +0000 (19:03 +0100)]
checkasm/llviddsp : test return of add_left_pred(16)

18 months agoavcodec/huffyuvenc : sub_left_prediction_bgr32, call dsp after 32 first byte of the...
Martin Vignali [Sat, 2 Dec 2017 17:33:25 +0000 (18:33 +0100)]
avcodec/huffyuvenc : sub_left_prediction_bgr32, call dsp after 32 first byte of the line in order to try to call the align version (diff bytes have avx2 version)

18 months agoavcodec/huffyuvenc : remove code duplication in sub_left_prediction
Martin Vignali [Sat, 2 Dec 2017 17:32:05 +0000 (18:32 +0100)]
avcodec/huffyuvenc : remove code duplication in sub_left_prediction

start of the line (before dsp call), can be merge with width < 32 part

18 months agoavcodec/huffyuvenc : increase scalar loop count
Martin Vignali [Sat, 2 Dec 2017 17:30:26 +0000 (18:30 +0100)]
avcodec/huffyuvenc : increase scalar loop count

in order to try to call dsp in aligned mode
(diff_int16 have AVX2 now)

18 months agoavcodec/utvideodec : use dsp add_median_pred for second line
Martin Vignali [Sun, 26 Nov 2017 18:18:48 +0000 (19:18 +0100)]
avcodec/utvideodec : use dsp add_median_pred for second line

process start of the line in scalar, before call dsp
(dsp need align 16)

18 months agocheckasm/vf_threshold : add test for threshold16
Martin Vignali [Thu, 7 Dec 2017 21:03:44 +0000 (22:03 +0100)]
checkasm/vf_threshold : add test for threshold16

18 months agoavfilter/x86/vf_threshold : add threshold16 SIMD (SSE4 and AVX2)
Martin Vignali [Thu, 7 Dec 2017 21:01:54 +0000 (22:01 +0100)]
avfilter/x86/vf_threshold : add threshold16 SIMD (SSE4 and AVX2)

18 months agohevc: Add hevc_get_pixel_4/8/12/16/24/32/48/64
Alexandra Hájková [Sun, 3 Dec 2017 08:15:23 +0000 (09:15 +0100)]
hevc: Add hevc_get_pixel_4/8/12/16/24/32/48/64

Checkasm timings:
block size bitdepth  C       NEON
4           8 bit:    146.7   48.7
           10 bit:    146.7   52.7
8           8 bit:    430.3   84.4
           10 bit:    430.4  119.5
12          8 bit:    812.8  141.0
           10 bit:    812.8  195.0
16          8 bit:   1499.1  268.0
           10 bit:   1498.9  368.4
24          8 bit:   4394.2  574.8
           10 bit:   3696.3  804.8
32          8 bit:   5108.6  568.9
           10 bit:   4249.6  918.8
48          8 bit:  16819.6 2304.9
           10 bit:  13882.0 3178.5
64          8 bit:  13490.8 1799.5
           10 bit:  11018.5 2519.4

Signed-off-by: Martin Storsjö <martin@martin.st>
18 months agoavfilter/vf_scale: add more aliases for "range" options
Paul B Mahol [Fri, 8 Dec 2017 19:35:08 +0000 (20:35 +0100)]
avfilter/vf_scale: add more aliases for "range" options

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agofate: Fix fate-mov-bbi-elst-starts-b on ARM
Michael Niedermayer [Fri, 8 Dec 2017 15:58:10 +0000 (16:58 +0100)]
fate: Fix fate-mov-bbi-elst-starts-b on ARM

18 months agofate/mxf: add reel name test
Mark Reid [Tue, 5 Dec 2017 04:46:23 +0000 (20:46 -0800)]
fate/mxf: add reel name test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavformat/mxfenc: write reel_name if metadata key is present
Mark Reid [Tue, 5 Dec 2017 04:46:22 +0000 (20:46 -0800)]
avformat/mxfenc: write reel_name if metadata key is present

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavformat/mxfenc: use track count to generate component instance uuid
Mark Reid [Tue, 5 Dec 2017 04:46:21 +0000 (20:46 -0800)]
avformat/mxfenc: use track count to generate component instance uuid

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agolibavcodec/hevc_filter: move AVDISCARD_NONREF switch-case into function
sfan5 [Thu, 7 Dec 2017 19:37:48 +0000 (20:37 +0100)]
libavcodec/hevc_filter: move AVDISCARD_NONREF switch-case into function

In preparation for implementation of skip_frame.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/nvdec: Fix capability check with old drivers.
Jacob Trimble [Thu, 30 Nov 2017 20:35:50 +0000 (12:35 -0800)]
avcodec/nvdec: Fix capability check with old drivers.

Copied the check from cuviddec.c (*_cuvid decoders) to allow the
capability check to be optional for older drivers.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
18 months agovf_zscale: Fix alpha destination graph for floating point pixel formats
Vittorio Giovara [Thu, 7 Dec 2017 21:32:22 +0000 (16:32 -0500)]
vf_zscale: Fix alpha destination graph for floating point pixel formats

This was setting the input pixel type instead of the output one,
leading to incorrect data being fed to the library.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
18 months agoavformat: add NSP demuxer
Paul B Mahol [Fri, 1 Dec 2017 14:15:13 +0000 (15:15 +0100)]
avformat: add NSP demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agoavfilter/vf_waveform: add default case when picking input formats
Paul B Mahol [Fri, 8 Dec 2017 11:31:01 +0000 (12:31 +0100)]
avfilter/vf_waveform: add default case when picking input formats

Should silence compiler warnings.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agoopus: fix hybrid folding indexing during band quantization
Rostislav Pehlivanov [Fri, 8 Dec 2017 03:40:41 +0000 (03:40 +0000)]
opus: fix hybrid folding indexing during band quantization

Resulted in valgrind errors due to uninitialized memory.
Also updates fate and makes it use the tron sample result.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agofate-opus: run and test inactive samples
Rostislav Pehlivanov [Tue, 5 Dec 2017 02:03:15 +0000 (02:03 +0000)]
fate-opus: run and test inactive samples

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agox86/vf_hflip: use xor to zero initialize registers
James Almer [Thu, 7 Dec 2017 22:28:19 +0000 (19:28 -0300)]
x86/vf_hflip: use xor to zero initialize registers

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agox86/vf_hflip: don't load the width argument twice
James Almer [Thu, 7 Dec 2017 21:09:00 +0000 (18:09 -0300)]
x86/vf_hflip: don't load the width argument twice

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agolavc/libx265: mark disposable frames
John Stebbins [Wed, 6 Dec 2017 00:36:58 +0000 (16:36 -0800)]
lavc/libx265: mark disposable frames

Used by movenc to fill sdtp box

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agovaapi_h265: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:53 +0000 (21:31 +0000)]
vaapi_h265: Add named options for setting profile and level

Also fixes the default, which previously contained a nonsense value.

18 months agovaapi_h264: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:11 +0000 (21:31 +0000)]
vaapi_h264: Add named options for setting profile and level

18 months agoavcodec/libx265 - Add named option to set profile
Gyan Doshi [Tue, 5 Dec 2017 07:47:53 +0000 (13:17 +0530)]
avcodec/libx265 - Add named option to set profile

Adds call to x265_param_apply_profile after x265_param_parse.
Added as private option since HEVC profiles other than
Main, Main 10 and MSP in AVCodecContext are consolidated in a single
constant.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Lou Logan <lou@lrcd.com>
18 months agoavcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED()
Michael Niedermayer [Sat, 2 Dec 2017 20:53:22 +0000 (21:53 +0100)]
avcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED()

Fixes: runtime error: signed integer overflow: 2147483646 + 2048 cannot be represented in type 'int'
Fixes: 4479/clusterfuzz-testcase-minimized-6529894147162112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97*
Michael Niedermayer [Sat, 2 Dec 2017 20:48:04 +0000 (21:48 +0100)]
avcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97*

Fixes: 4478/clusterfuzz-testcase-minimized-4752113767809024
Fixes: runtime error: signed integer overflow: -2147483626 + -319489 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavformat/mux: stop delaying writing the header
James Almer [Sun, 26 Nov 2017 19:47:26 +0000 (16:47 -0300)]
avformat/mux: stop delaying writing the header

Every bitstream filter behaves as intended now, so there's no need to
wait for the first packet of every stream.

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agoavcodec/extract_extradata_bsf: Fix leak discovered via fuzzing
Nikolas Bowe [Tue, 5 Dec 2017 23:11:26 +0000 (15:11 -0800)]
avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavfilter: add setrange filter
Paul B Mahol [Sun, 3 Dec 2017 10:59:58 +0000 (11:59 +0100)]
avfilter: add setrange filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agotests/fate/mov: Fix fate-mov-invalid-elst-entry-count failure on ARM
Michael Niedermayer [Wed, 6 Dec 2017 00:03:28 +0000 (01:03 +0100)]
tests/fate/mov: Fix fate-mov-invalid-elst-entry-count failure on ARM

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agofate/hevc: add skip_loop_filter test
sfan5 [Tue, 5 Dec 2017 11:47:47 +0000 (12:47 +0100)]
fate/hevc: add skip_loop_filter test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agodoc/developer: revise mailing list section
Jim DeLaHunt [Mon, 4 Dec 2017 07:09:02 +0000 (23:09 -0800)]
doc/developer: revise mailing list section

The Developer Documentation had instructions to
subscribe to the ffmpeg-cvslog email list. But that is
no longer accurate. For the purposes in this section --
review of patches, discussion of development issues --
ffmpeg_devel is the appropriate email list. Some developers
may want to monitor ffmpeg-cvslog, but it is not mandatory.

This is v3 of this doc, based on discussion in thread
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220528.html>
and in response to docs Maintainer comments in
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-December/221596.html>.

1. In doc/developer.texi, add a new section about
ffmpeg-devel, based on existing text from ffmpeg-cvslog
section regarding discussion of patches and of
development issues. Reflect wording from discussion at
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/221199.html>
but with copy-editing to make wording more concise.

2. In doc/developer.texi, rewrite the ffmpeg-cvslog section
to match the current usage of ffmpeg-cvslog. Some
developers choose to follow this list, but it is not
mandatory.

There are a lot of improvements possible to the
Developer Documentation page, beyond this refactoring.
However, making those improvements is a much bigger
and more difficult task.  This change is "low hanging
fruit".

Signed-off-by: Jim DeLaHunt <from.ffmpeg-dev@jdlh.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
18 months agovaapi_h265: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:53 +0000 (21:31 +0000)]
vaapi_h265: Add named options for setting profile and level

Also fixes the default, which previously contained a nonsense value.

18 months agovaapi_h264: Add named options for setting profile and level
Mark Thompson [Wed, 29 Nov 2017 21:31:11 +0000 (21:31 +0000)]
vaapi_h264: Add named options for setting profile and level

18 months agorkmpp: Add hardware config information
Mark Thompson [Fri, 1 Dec 2017 22:01:41 +0000 (22:01 +0000)]
rkmpp: Add hardware config information

This is not strictly required here because the rkmpp decoder does not
call ff_get_format(), but it may be helpful metadata for users.

18 months agoavfilter/vf_convolution: add 7x7 filter
Paul B Mahol [Mon, 4 Dec 2017 20:32:29 +0000 (21:32 +0100)]
avfilter/vf_convolution: add 7x7 filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agox86/vf_threshold: make threshold8 functions work on x86_32
James Almer [Mon, 4 Dec 2017 18:04:43 +0000 (15:04 -0300)]
x86/vf_threshold: make threshold8 functions work on x86_32

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agofate/checkasm: add missing target for vf_threshold test
James Almer [Mon, 4 Dec 2017 18:39:19 +0000 (15:39 -0300)]
fate/checkasm: add missing target for vf_threshold test

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agocheckasm/vf_threshold: fix mixed code and declarations
James Almer [Mon, 4 Dec 2017 18:26:34 +0000 (15:26 -0300)]
checkasm/vf_threshold: fix mixed code and declarations

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agolibavcodec/hevc_filter: support for all skip_loop_filter levels.
sfan5 [Thu, 30 Nov 2017 22:58:02 +0000 (23:58 +0100)]
libavcodec/hevc_filter: support for all skip_loop_filter levels.

Continues where commit 52c75d486ed5f75cbb79e5dbd07b7aef24f3071f left off.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavformat/hlsenc: fix compiling error when disable-network
Steven Liu [Mon, 4 Dec 2017 15:52:17 +0000 (23:52 +0800)]
avformat/hlsenc: fix compiling error when disable-network

18 months agoavfilter/x86/vf_hflip.asm: fix building on x32
Paul B Mahol [Mon, 4 Dec 2017 14:08:43 +0000 (15:08 +0100)]
avfilter/x86/vf_hflip.asm: fix building on x32

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agofate-opus: update tests to use new decoder outputs
Rostislav Pehlivanov [Mon, 4 Dec 2017 10:50:23 +0000 (10:50 +0000)]
fate-opus: update tests to use new decoder outputs

Can't overwrite old ones.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agoopus_pvq: do not compile encoding/decoding code if the encoder/decoder is disabled
Rostislav Pehlivanov [Mon, 4 Dec 2017 08:57:45 +0000 (08:57 +0000)]
opus_pvq: do not compile encoding/decoding code if the encoder/decoder is disabled

This should save quite a bit of space if either has been disabled for size reasons.
Could just check if the encoding flag is set during runtime on every single location,
however the overhead of branch misses would somewhat decrease performance.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agoopus_celt: deduplicate band quantization/dequantization function
Rostislav Pehlivanov [Mon, 4 Dec 2017 08:55:45 +0000 (08:55 +0000)]
opus_celt: deduplicate band quantization/dequantization function

No point in having the same code twice to do exactly the same thing.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agoavfilter: add hflip x86 SIMD
Paul B Mahol [Fri, 1 Dec 2017 19:56:45 +0000 (20:56 +0100)]
avfilter: add hflip x86 SIMD

Signed-off-by: Paul B Mahol <onemda@gmail.com>
18 months agofate-opus: update to match the changes from RFC8251
Rostislav Pehlivanov [Mon, 4 Dec 2017 07:26:33 +0000 (07:26 +0000)]
fate-opus: update to match the changes from RFC8251

Also change note to say that we compare against the officially decoded
samples rather than our own, this was changed long ago.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agoopus: add an option to toggle intensity stereo phase inversion
Rostislav Pehlivanov [Mon, 4 Dec 2017 06:36:42 +0000 (06:36 +0000)]
opus: add an option to toggle intensity stereo phase inversion

Due to a somewhat high volume of complains, phase inversion has
been made optional with RFC8251. This allows for better bass
frequency response when partially downmixing to play on systems
with an LFE speaker.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
18 months agoopus: Add Special Hybrid Folding (per RFC8251)
Andrew D'Addesio [Sat, 2 Dec 2017 17:46:58 +0000 (11:46 -0600)]
opus: Add Special Hybrid Folding (per RFC8251)

This decoder-side change, introduced in RFC 8251 (section 9), slightly
improves the decoded quality of 16kbps speech in Hybrid Mode.

Differences can be seen/heard in testvector05.bit, testvector06.bit,
and testvector12.bit in the RFC 6716/8251 testvectors found here:
https://people.xiph.org/~greg/opus_testvectors/

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
18 months agoopus_celt: Fix arithmetic overflow (per RFC8251)
Andrew D'Addesio [Sat, 2 Dec 2017 17:36:25 +0000 (11:36 -0600)]
opus_celt: Fix arithmetic overflow (per RFC8251)

As per Sec.8 of RFC8251:
    Cap on Band Energy
    NaN due to large log-energy value. Affects celt_denormalize().

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
18 months agoopus_silk: Fix arithmetic overflow (per RFC8251)
Andrew D'Addesio [Sat, 2 Dec 2017 17:36:25 +0000 (11:36 -0600)]
opus_silk: Fix arithmetic overflow (per RFC8251)

As per Sec.6 of RFC8251:
    Integer Wrap-Around in Inverse Gain Computation
    32-bit integer overflow in Levinson recursion. Affects
    silk_is_lpc_stable().

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
18 months agolibavutil: Add saturating subtraction functions
Andrew D'Addesio [Sat, 2 Dec 2017 17:36:24 +0000 (11:36 -0600)]
libavutil: Add saturating subtraction functions

Add av_sat_sub32 and av_sat_dsub32 as the subtraction analogues to
av_sat_add32/av_sat_dadd32.

Also clarify the formulas for dadd32/dsub32.

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
18 months agox86vf_threshold/: use the PBLENDVB macro
James Almer [Mon, 4 Dec 2017 05:20:52 +0000 (02:20 -0300)]
x86vf_threshold/: use the PBLENDVB macro

Fixes building with yasm

Tested-by: stevenliu
Signed-off-by: James Almer <jamrial@gmail.com>
18 months agoavformat/dashenc: add avpriv_io_move return value check
Steven Liu [Mon, 4 Dec 2017 04:06:26 +0000 (12:06 +0800)]
avformat/dashenc: add avpriv_io_move return value check

fix cid: 1424883

Suggested-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
18 months agoavformat/hlsplaylist: add return value check of strftime
Steven Liu [Mon, 4 Dec 2017 04:05:04 +0000 (12:05 +0800)]
avformat/hlsplaylist: add return value check of strftime

fix CID: 1424884
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
18 months agoavformat/hlsplaylist: add int type of API ff_hls_write_file_entry
Steven Liu [Mon, 4 Dec 2017 04:03:37 +0000 (12:03 +0800)]
avformat/hlsplaylist: add int type of API ff_hls_write_file_entry

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
18 months agoavformat/hlsenc: fix baseurl missing last char
Robert Nagy [Mon, 4 Dec 2017 04:00:13 +0000 (12:00 +0800)]
avformat/hlsenc: fix baseurl missing last char

Reviewed-by: Steven Liu <lq@onvideo.cn>
18 months agolavf/mov: Fix missing newline.
Carl Eugen Hoyos [Mon, 4 Dec 2017 03:15:49 +0000 (04:15 +0100)]
lavf/mov: Fix missing newline.

18 months agoavformat/mxfdec: fix last packet timestamps
Marton Balint [Thu, 23 Nov 2017 21:47:22 +0000 (22:47 +0100)]
avformat/mxfdec: fix last packet timestamps

The current edit unit cannot be reliably determined for the last packet of a
video stream, because we can't query the start offset of the next edit unit
from the index. This caused missing timestamps for the last video packet.

Therefore from now on, we allow setting the PTS even if we are not sure of the
current edit unit if mxf_set_current_edit_unit returned a specific failure, and
the assumed current edit unit is the last.

Fixes last packet timestamp of:
ffprobe -fflags nofillin -show_packets tests/data/lavf/lavf.mxf -select_streams v

Signed-off-by: Marton Balint <cus@passwd.hu>
18 months agoavfilter/x86/vf_threshold : cosmetic indent
Martin Vignali [Sun, 3 Dec 2017 16:04:38 +0000 (17:04 +0100)]
avfilter/x86/vf_threshold : cosmetic indent

18 months agoavfilter/x86/vf_threshold : add avx2 version for threshold 8
Martin Vignali [Sun, 3 Dec 2017 16:02:44 +0000 (17:02 +0100)]
avfilter/x86/vf_threshold : add avx2 version for threshold 8

18 months agoavfilter/x86/vf_threshold : make macro for threshold8 in order to add avx2 version
Martin Vignali [Sun, 3 Dec 2017 15:58:09 +0000 (16:58 +0100)]
avfilter/x86/vf_threshold : make macro for threshold8 in order to add avx2 version

18 months agocheckasm/vf_threshold : add checkasm test for threshold8
Martin Vignali [Sun, 3 Dec 2017 15:56:25 +0000 (16:56 +0100)]
checkasm/vf_threshold : add checkasm test for threshold8