]> git.sesse.net Git - ffmpeg/log
ffmpeg
6 years agoavformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10
Michael Niedermayer [Tue, 17 Apr 2018 22:09:00 +0000 (00:09 +0200)]
avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Write Audio Ref Level for D10
Michael Niedermayer [Fri, 6 Apr 2018 19:44:23 +0000 (21:44 +0200)]
avformat/mxfenc: Write Audio Ref Level for D10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add Padding Bits
Michael Niedermayer [Thu, 5 Apr 2018 21:30:37 +0000 (23:30 +0200)]
avformat/mxfenc: Add Padding Bits

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: add white/black ref /color range
Michael Niedermayer [Thu, 5 Apr 2018 20:53:22 +0000 (22:53 +0200)]
avformat/mxfenc: add white/black ref /color range

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add vertical subsampling support
Michael Niedermayer [Wed, 21 Mar 2018 18:32:32 +0000 (19:32 +0100)]
avformat/mxfenc: Add vertical subsampling support

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Fix stored width
Michael Niedermayer [Sat, 17 Mar 2018 22:04:50 +0000 (23:04 +0100)]
avformat/mxfenc: Fix stored width

This fixes the width to have computations matching the height

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add object model version
Michael Niedermayer [Sat, 17 Mar 2018 20:16:26 +0000 (21:16 +0100)]
avformat/mxfenc: Add object model version

Other tools (XFConvert at least) write this as well.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Add Product Version, Toolkit version and Platform
Michael Niedermayer [Sat, 17 Mar 2018 15:01:15 +0000 (16:01 +0100)]
avformat/mxfenc: Add Product Version, Toolkit version and Platform

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Bump minor versions for S377-1-2009
Michael Niedermayer [Tue, 8 May 2018 19:24:15 +0000 (21:24 +0200)]
avformat/mxfenc: Bump minor versions for S377-1-2009

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfenc: Correct KAG alignment of preface
Michael Niedermayer [Mon, 30 Apr 2018 00:26:37 +0000 (02:26 +0200)]
avformat/mxfenc: Correct KAG alignment of preface

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavfi/vf_srcnn: use avio_check instead of access
Hendrik Leppkes [Tue, 8 May 2018 15:25:26 +0000 (17:25 +0200)]
lavfi/vf_srcnn: use avio_check instead of access

The filter uses avio for file access already, and avio_check is
portable.

Fixes trac #7192.

6 years agolavc/cfhd: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT
Clément Bœsch [Tue, 8 May 2018 10:45:11 +0000 (12:45 +0200)]
lavc/cfhd: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT

6 years agolavfi/swaprect: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT
Clément Bœsch [Tue, 8 May 2018 10:44:57 +0000 (12:44 +0200)]
lavfi/swaprect: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT

6 years agolavfi/nlmeans: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT
Clément Bœsch [Tue, 8 May 2018 10:44:48 +0000 (12:44 +0200)]
lavfi/nlmeans: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT

6 years agofate/hapenc : remove tests due to inconsistent result
Martin Vignali [Tue, 8 May 2018 09:41:52 +0000 (11:41 +0200)]
fate/hapenc : remove tests due to inconsistent result

6 years agolavfi/nlmeans: inline integral patch value function
Clément Bœsch [Mon, 7 May 2018 21:28:08 +0000 (23:28 +0200)]
lavfi/nlmeans: inline integral patch value function

This prevents redundant position computation and make the code faster
(1.1x faster overall).

6 years agolavfi/nlmeans: use unsigned for the integral patch value
Clément Bœsch [Mon, 7 May 2018 16:45:52 +0000 (18:45 +0200)]
lavfi/nlmeans: use unsigned for the integral patch value

This value can not be negative.

6 years agolavfi/nlmeans: reorder memory accesses in get_integral_patch_value
Clément Bœsch [Sun, 6 May 2018 11:31:32 +0000 (13:31 +0200)]
lavfi/nlmeans: reorder memory accesses in get_integral_patch_value

This doesn't seem to make much of a difference but it can't hurt.

6 years agolavfi/nlmeans: move final weighted averaging out of nlmeans_plane
Clément Bœsch [Sun, 6 May 2018 11:26:45 +0000 (13:26 +0200)]
lavfi/nlmeans: move final weighted averaging out of nlmeans_plane

This helps figuring out where the filter is slow:

  70.53%  ffmpeg_g  ffmpeg_g          [.] nlmeans_slice
  25.73%  ffmpeg_g  ffmpeg_g          [.] compute_safe_ssd_integral_image_c
   1.74%  ffmpeg_g  ffmpeg_g          [.] compute_unsafe_ssd_integral_image
   0.82%  ffmpeg_g  ffmpeg_g          [.] ff_mjpeg_decode_sos
   0.51%  ffmpeg_g  [unknown]         [k] 0xffffffff91800a80
   0.24%  ffmpeg_g  ffmpeg_g          [.] weight_averages

(Tested with a large image that takes several seconds to process)

Since this function is irrelevant speed wise, the file's TODO is
updated.

6 years agolavfi/nlmeans: switch from double to float
Clément Bœsch [Sun, 6 May 2018 10:55:23 +0000 (12:55 +0200)]
lavfi/nlmeans: switch from double to float

Overall speed appears to be 1.1x faster with no noticeable quality
impact.

6 years agolavfi/nlmeans: make compute_safe_ssd_integral_image_c faster
Clément Bœsch [Sun, 6 May 2018 10:34:54 +0000 (12:34 +0200)]
lavfi/nlmeans: make compute_safe_ssd_integral_image_c faster

before:  ssd_integral_image_c: 49204.6
after:   ssd_integral_image_c: 44272.8

Unrolling by 4 made the biggest difference on odroid-c2 (aarch64);
unrolling by 2 or 8 both raised 46k cycles vs 44k for 4.

Additionally, this is a much better reference when writing SIMD (SIMD
vectorization will just target 16 instead of 4).

6 years agocheckasm: add vf_nlmeans test for ssd_integral_image
Clément Bœsch [Sun, 6 May 2018 08:57:23 +0000 (10:57 +0200)]
checkasm: add vf_nlmeans test for ssd_integral_image

6 years agolavfi/nlmeans: add AArch64 SIMD for compute_safe_ssd_integral_image
Clément Bœsch [Sun, 6 May 2018 08:54:49 +0000 (10:54 +0200)]
lavfi/nlmeans: add AArch64 SIMD for compute_safe_ssd_integral_image

ssd_integral_image_c: 49204.6
ssd_integral_image_neon: 28346.8

6 years agolavfi/nlmeans: use ptrdiff_t for linesizes
Clément Bœsch [Sun, 6 May 2018 08:43:04 +0000 (10:43 +0200)]
lavfi/nlmeans: use ptrdiff_t for linesizes

Similarly to previous commit, this will help writing SIMD code by not
having manual zero-extension in SIMD code

6 years agolavfi/nlmeans: add SIMD-friendly assumptions for compute_safe_ssd_integral_image
Clément Bœsch [Sun, 6 May 2018 08:38:30 +0000 (10:38 +0200)]
lavfi/nlmeans: add SIMD-friendly assumptions for compute_safe_ssd_integral_image

SIMD code will not have to deal with padding itself. Overwriting in that
function may have been possible but involve large overreading of the
sources. Instead, we simply make sure the width to process is always a
multiple of 16. Additionally, there must be some actual area to process
so the SIMD code can have its boundary checks after processing the first
pixels.

6 years agolavfi/nlmeans: random code shuffling to help compiler
Clément Bœsch [Sat, 5 May 2018 22:06:19 +0000 (00:06 +0200)]
lavfi/nlmeans: random code shuffling to help compiler

This makes nlmeans_slice() slightly faster at least on GCC 7.3.

6 years agoavformat/segafilmenc - set keyframe bit correctly
Gyan Doshi [Sat, 5 May 2018 11:34:53 +0000 (17:04 +0530)]
avformat/segafilmenc - set keyframe bit correctly

As per
https://web.archive.org/web/20020803104640/http://www.pcisys.net:80/~melanson/codecs/film-format.txt,

the top bit of the info1 chunk is set as 1 for inter-coded frames and 0
otherwise.

6 years agomdct15: simplify x86 exptab permutation
Rostislav Pehlivanov [Mon, 7 May 2018 22:16:37 +0000 (23:16 +0100)]
mdct15: simplify x86 exptab permutation

Removes an unneeded copy and does the 5-point permute in-place.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agomdct15: simplify the fft15 x86 SIMD
Rostislav Pehlivanov [Sun, 6 May 2018 22:15:08 +0000 (23:15 +0100)]
mdct15: simplify the fft15 x86 SIMD

Saves 1 gpr and 2 instructions and simplifies the macros a bit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agovaapi_encode_vp8: memset the the structure to 0
Haihao Xiang [Fri, 4 May 2018 14:41:07 +0000 (22:41 +0800)]
vaapi_encode_vp8: memset the the structure to 0

The structure has reserved bytes, it is required to set the reserved
bytes to 0 for future use.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
6 years agocbs_h264: Need [] in the name when subscript is required
Haihao Xiang [Fri, 4 May 2018 04:33:39 +0000 (12:33 +0800)]
cbs_h264: Need [] in the name when subscript is required

Otherwise it will hit an assert in the function
ff_cbs_trace_syntax_element() in cbs.c, line 400.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
6 years agolavc/qsvenc: set corret maximum value of look_ahead_downsampling
Zhong Li [Wed, 2 May 2018 08:42:35 +0000 (16:42 +0800)]
lavc/qsvenc: set corret maximum value of look_ahead_downsampling

Option "4x(MFX_LOOKAHEAD_DS_4x)" is provided but can't be set due to
wrong maximum value.

Signed-off-by: Zhong Li <zhong.li@intel.com>
6 years agoconfigure: fix and simplify xlib check
James Almer [Sun, 6 May 2018 23:45:53 +0000 (20:45 -0300)]
configure: fix and simplify xlib check

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoconfigure: add missing dependencies to vf_srcnn
James Almer [Sun, 6 May 2018 20:15:54 +0000 (17:15 -0300)]
configure: add missing dependencies to vf_srcnn

The access dependecy is temporary and should fix compilation with
msvc until a proper fix is committed.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/libzvbi-teletextdec: remove DEBUG code
Marton Balint [Sat, 28 Apr 2018 19:46:18 +0000 (21:46 +0200)]
avcodec/libzvbi-teletextdec: remove DEBUG code

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavcodec/libzvbi-teletextdec: allow -1 subtitle duration and make it the default
Marton Balint [Sat, 28 Apr 2018 17:17:31 +0000 (19:17 +0200)]
avcodec/libzvbi-teletextdec: allow -1 subtitle duration and make it the default

Most decoders (pgssubdec, ccaption_dec) are using -1 or UINT32_MAX for a
subtitle event which should be cleared at the next event.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavcodec/jpeg2000dec: Fix undefined shift in the jpeg2000_decode_packets_po_iteration...
Michael Niedermayer [Fri, 4 May 2018 17:18:25 +0000 (19:18 +0200)]
avcodec/jpeg2000dec: Fix undefined shift in the jpeg2000_decode_packets_po_iteration() CPRL case

Fixes: shift exponent 47 is too large for 32-bit type 'int'
Fixes: 7955/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6016721977606144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/jpeg2000dec: Skip init for component in CPRL if nothing is to be done
Michael Niedermayer [Fri, 4 May 2018 17:11:36 +0000 (19:11 +0200)]
avcodec/jpeg2000dec: Skip init for component in CPRL if nothing is to be done

Fixes: assertion failure
Fixes: 7949/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-4819602782552064
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/jpeg2000dec: Reduce the number of tile parts allocated
Michael Niedermayer [Fri, 4 May 2018 16:28:07 +0000 (18:28 +0200)]
avcodec/jpeg2000dec: Reduce the number of tile parts allocated

This is large enough for all jpeg2000 files i tested. If some need more then this
should be changed to dynamic allocation. Dynamic allocation would need to be done
carefully as these are many relatively small arrays so repeatly reallocating them
would not be good.
The decrease is a clean and simple solution assuming it works for all files.

Fixes: OOM
Fixes: 6534/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-4821490731057152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/g2meet: Change order of operations to avoid undefined behavior
Michael Niedermayer [Fri, 4 May 2018 16:16:08 +0000 (18:16 +0200)]
avcodec/g2meet: Change order of operations to avoid undefined behavior

Fixes: signed integer overflow: 65280 * 196032 cannot be represented in type 'int'
Fixes: 7279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5977332473921536
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoconfigure: add pkg-config check for zlib
Jan Ekström [Sat, 5 May 2018 18:57:44 +0000 (21:57 +0300)]
configure: add pkg-config check for zlib

It exists, so why not use it? Helps one get rid of additional
search path related flags in addition to PKG_CONFIG_{PATH,LIBDIR}
when utilizing a cross-prefix separate from the sysroot.

6 years agolavf/bluray: translate a read of 0 to EOF
Jan Ekström [Sun, 6 May 2018 14:15:52 +0000 (17:15 +0300)]
lavf/bluray: translate a read of 0 to EOF

Yet another case of forgotten 0 =! EOF translation. The libbluray
documentation specifically mentions that a read of 0 is EOF.

Reported by Fyr on IRC.

6 years agolavf/format: Remove the dead code in av_probe_input_buffer2.
Jun Zhao [Sun, 8 Apr 2018 00:09:13 +0000 (08:09 +0800)]
lavf/format: Remove the dead code in av_probe_input_buffer2.

Remove the dead code in av_probe_input_buffer2

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agoavformat/avio: make the logic simple
Jun Zhao [Sun, 8 Apr 2018 00:05:08 +0000 (08:05 +0800)]
avformat/avio: make the logic simple

remove the "ret" to make the code simple and generic.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
6 years agofate: update fate-sws-pixdesc-query reference file
James Almer [Sat, 5 May 2018 22:20:29 +0000 (19:20 -0300)]
fate: update fate-sws-pixdesc-query reference file

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agofate: update pad pixfmt test
Paul B Mahol [Sat, 5 May 2018 20:05:07 +0000 (22:05 +0200)]
fate: update pad pixfmt test

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/drawutils: support gray14
Paul B Mahol [Sat, 5 May 2018 19:50:22 +0000 (21:50 +0200)]
avfilter/drawutils: support gray14

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_extractplanes: add support for extracting planes with 14 depth
Paul B Mahol [Thu, 3 May 2018 20:48:16 +0000 (22:48 +0200)]
avfilter/vf_extractplanes: add support for extracting planes with 14 depth

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoswscale: add gray14 support
Paul B Mahol [Thu, 3 May 2018 20:19:38 +0000 (22:19 +0200)]
swscale: add gray14 support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavutil: add gray14 pixel format
Paul B Mahol [Thu, 3 May 2018 20:15:53 +0000 (22:15 +0200)]
avutil: add gray14 pixel format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter: forward status back in some filters that missed it
Paul B Mahol [Sat, 5 May 2018 19:24:41 +0000 (21:24 +0200)]
avfilter: forward status back in some filters that missed it

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_amerge: port to activate API
Paul B Mahol [Fri, 4 May 2018 09:48:35 +0000 (11:48 +0200)]
avfilter/af_amerge: port to activate API

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agompegvideo: add deprecated flags to the rc_strategy option
Rostislav Pehlivanov [Sat, 5 May 2018 19:14:43 +0000 (20:14 +0100)]
mpegvideo: add deprecated flags to the rc_strategy option

Forgotten with the commit which removed support for libxvid_rc.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agodcaenc: fix segfault when attempting to encode with invalid samplerate
Rostislav Pehlivanov [Sat, 5 May 2018 17:42:53 +0000 (18:42 +0100)]
dcaenc: fix segfault when attempting to encode with invalid samplerate

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agompegvideo: remove support for libxvid's RC system
Rostislav Pehlivanov [Tue, 1 May 2018 18:58:38 +0000 (19:58 +0100)]
mpegvideo: remove support for libxvid's RC system

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoavfilter/vf_colorchannelmixer: add planar rgb support
Paul B Mahol [Sat, 5 May 2018 15:25:13 +0000 (17:25 +0200)]
avfilter/vf_colorchannelmixer: add planar rgb support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_colorchannelmixer: refactor code
Paul B Mahol [Sat, 5 May 2018 14:31:54 +0000 (16:31 +0200)]
avfilter/vf_colorchannelmixer: refactor code

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_colorbalance: fix off by one overflow
Paul B Mahol [Sat, 5 May 2018 14:11:35 +0000 (16:11 +0200)]
avfilter/vf_colorbalance: fix off by one overflow

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_colorchannelmixer: add slice threading
Paul B Mahol [Sat, 5 May 2018 14:09:29 +0000 (16:09 +0200)]
avfilter/vf_colorchannelmixer: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/flac_parser: Fix infinite loop
Michael Niedermayer [Mon, 30 Apr 2018 20:20:28 +0000 (22:20 +0200)]
avcodec/flac_parser: Fix infinite loop

Fixes: crbug/827204
Reported-by: Frank Liberato <liberato@google.com>
Reviewed-by: Frank Liberato <liberato@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter/vf_colorbalance: add slice threading
Paul B Mahol [Sat, 5 May 2018 10:50:16 +0000 (12:50 +0200)]
avfilter/vf_colorbalance: add slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_colorbalance: add planar rgb support
Paul B Mahol [Sat, 5 May 2018 10:22:52 +0000 (12:22 +0200)]
avfilter/vf_colorbalance: add planar rgb support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_convolution: use already available dstride
Paul B Mahol [Sat, 5 May 2018 08:59:56 +0000 (10:59 +0200)]
avfilter/vf_convolution: use already available dstride

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/videotoolbox: fix kVTCouldNotFindVideoDecoderErr trying to decode HEVC on iOS
Aman Gupta [Thu, 19 Apr 2018 22:34:01 +0000 (15:34 -0700)]
avcodec/videotoolbox: fix kVTCouldNotFindVideoDecoderErr trying to decode HEVC on iOS

Older iOS devices don't have a hardware HEVC decoder, but the
software decoder offered by VideoToolbox is well-optimized and
performs much better than the ffmpeg decoder.

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavcodec/videotoolbox: improve logging of decoder errors
Aman Gupta [Sat, 5 May 2018 01:24:31 +0000 (18:24 -0700)]
avcodec/videotoolbox: improve logging of decoder errors

Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavfilter/vf_colorbalance: add 16bit depth support
Paul B Mahol [Fri, 4 May 2018 22:30:21 +0000 (00:30 +0200)]
avfilter/vf_colorbalance: add 16bit depth support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/nvenc: move reconfig_encoder call inside of push/pop ctx
Timo Rothenpieler [Thu, 3 May 2018 16:57:40 +0000 (18:57 +0200)]
avcodec/nvenc: move reconfig_encoder call inside of push/pop ctx

Also make it void, it must not fail the encode anyway.

6 years agoavcodec/nvenc: add A53CC support
Roman Arzumanyan [Thu, 22 Mar 2018 09:30:06 +0000 (12:30 +0300)]
avcodec/nvenc: add A53CC support

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agoavcodec/nvenc: support dynamic bitrate changes
pkviet [Thu, 3 May 2018 00:15:52 +0000 (02:15 +0200)]
avcodec/nvenc: support dynamic bitrate changes

The patch enables dynamic bitrate through ReconfigureEncoder method
from nvenc API.
This is useful for live streaming in case of network congestion.

Signed-off-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agoavcodec/nvenc: support dynamic aspect ratio change
Miroslav Slugeň [Sun, 12 Feb 2017 18:53:58 +0000 (19:53 +0100)]
avcodec/nvenc: support dynamic aspect ratio change

If there is input like DVB-T streams it can change aspect ratio
on-the-fly, so nvenc should respect this change and change aspect ratio
in encoder.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agoavcodec/nvenc: make hw_frames_ctx fully optional
Timo Rothenpieler [Mon, 23 Apr 2018 16:27:47 +0000 (18:27 +0200)]
avcodec/nvenc: make hw_frames_ctx fully optional

6 years agoavfilter/vf_libvmaf: the libvmaf filter tried to join on an invalid thread id
Kevin Wheatley [Mon, 30 Apr 2018 15:33:51 +0000 (16:33 +0100)]
avfilter/vf_libvmaf: the libvmaf filter tried to join on an invalid thread id

The thread id was invalid because it was not initialised
during the calls to init_complex_filtergraph.

This adds a flag to check for initialisation before trying to
peform the join.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
6 years agoavfilter/vf_lut3d: fix typo
Paul B Mahol [Fri, 4 May 2018 21:17:53 +0000 (23:17 +0200)]
avfilter/vf_lut3d: fix typo

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_edgedetect: add more formats support to canny mode
Paul B Mahol [Thu, 3 May 2018 13:39:06 +0000 (15:39 +0200)]
avfilter/vf_edgedetect: add more formats support to canny mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_edgedetect: add planes option
Paul B Mahol [Thu, 3 May 2018 13:20:21 +0000 (15:20 +0200)]
avfilter/vf_edgedetect: add planes option

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_edgedetect: add canny mode
Paul B Mahol [Thu, 3 May 2018 13:05:51 +0000 (15:05 +0200)]
avfilter/vf_edgedetect: add canny mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_convolution: add column/vertical mode
Paul B Mahol [Fri, 4 May 2018 19:05:52 +0000 (21:05 +0200)]
avfilter/vf_convolution: add column/vertical mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_lut3d: add planar rgb support
Paul B Mahol [Thu, 3 May 2018 18:00:25 +0000 (20:00 +0200)]
avfilter/vf_lut3d: add planar rgb support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/mediacodecdec: add workaround for buggy amlogic mpeg2 decoder
Aman Gupta [Thu, 26 Apr 2018 18:51:15 +0000 (11:51 -0700)]
avcodec/mediacodecdec: add workaround for buggy amlogic mpeg2 decoder

I tested the previous mediacodec changes on seven different Android
TV devices, with both mpeg2 and h264 content. All except one worked
as expected. The exception was the MiBox3 running Android 6.0.1,
where playback would freeze on a frame every few seconds. I tested
two other AMLogic devices with newer Android versions that did not
show the same problem. H264 decoding on the MiBox3 was also not affected,
so this workaround applies only to OMX.amlogic.mpeg2.decoder.awesome
on Android API22.

There is a rumor that Xiaomi is planning to release Android Oreo for
the MiBox3, so I will revisit in a few months to confirm whether this
is specific to os/driver version or the chipset used in that device.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
6 years agoavcodec/mediacodecdec: wait on first frame after input buffers are full
Aman Gupta [Wed, 25 Apr 2018 01:54:45 +0000 (18:54 -0700)]
avcodec/mediacodecdec: wait on first frame after input buffers are full

The output_buffer_count==0 special case is no longer required, and
can cause spurious EAGAIN to surface to the user when input buffers
are filled up. Since the caller now knows if the decoder is accepting
new input (via current_input_buffer>=0), let the wait parameter
control whether we block or not.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
6 years agoavcodec/mediacodecdec: restructure mediacodec_receive_frame
Aman Gupta [Tue, 24 Apr 2018 19:40:38 +0000 (12:40 -0700)]
avcodec/mediacodecdec: restructure mediacodec_receive_frame

The new logic follows a recommendation by @rcombs to use
dequeueInputBuffer with a timeout of 0 as a way to detect
whether the codec wants more data. The dequeued buffer index is
kept in MediaCodecDecContext until it can be used next.

A similar technique is also used by the Google's official media
player Exoplayer: see MediaCodecRenderer.feedInputBuffer().

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
6 years agoavcodec/mediacodec_wrapper: add helper to fetch SDK_INT
Aman Gupta [Thu, 26 Apr 2018 18:50:55 +0000 (11:50 -0700)]
avcodec/mediacodec_wrapper: add helper to fetch SDK_INT

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years agoavformat: add vapoursynth wrapper
wm4 [Fri, 27 Apr 2018 19:35:56 +0000 (21:35 +0200)]
avformat: add vapoursynth wrapper

This can "demux" .vpy files. Autodetection of .vpy scripts is
intentionally not done, because it would be a major security issue. You
need to force the format, for example with "-f vapoursynth" for the
FFmpeg CLI tools.

Some minor code copied from other LGPL parts of FFmpeg.

I did not find a good way to test a few of the more obscure VS features,
like VFR nodes, compat pixel formats, or nodes with dynamic size/format
changes. These can be easily implemented on demand.

6 years agoAdds SRCNN filter.
Sergey Lavrushkin [Tue, 10 Apr 2018 16:41:40 +0000 (19:41 +0300)]
Adds SRCNN filter.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
6 years agoavfilter/vf_amplify: add more options for finer filtering
Paul B Mahol [Fri, 4 May 2018 12:19:03 +0000 (14:19 +0200)]
avfilter/vf_amplify: add more options for finer filtering

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavformat/hls: don't propagate deprecated "user-agent" AVOption
wm4 [Sat, 28 Apr 2018 18:36:49 +0000 (20:36 +0200)]
avformat/hls: don't propagate deprecated "user-agent" AVOption

This code will print a warning if any user agent is set - even if the
API user used the proper non-deprecated "user_agent" option.

This change should not even break anything, because even if the user
sets the deprecated "user-agent" option, http.c copies it to the
"user_agent" option anyway.

6 years agoavformat/matroskaenc: do not write timebase as framerate
wm4 [Sat, 28 Apr 2018 17:24:12 +0000 (19:24 +0200)]
avformat/matroskaenc: do not write timebase as framerate

If the API user doesn't set avg_frame_rate, matroskaenc will write the
current timebase as "default duration" for the video track. This makes
no sense, because the "default duration" implies the framerate of the
video. Since the timebase is forced to 1/1000, this will make the
resulting file claim 1000fps.

Drop it and don't write the element. It's optional, so it's better not
to write it if the framerate is unknown.

Strangely does not require FATE changes.

6 years agoavcodec/h263dec: Document padding_bug_score heuristic used for wrong stuffing
Michael Niedermayer [Thu, 3 May 2018 19:41:40 +0000 (21:41 +0200)]
avcodec/h263dec: Document padding_bug_score heuristic used for wrong stuffing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agovaapi_encode_h264: Take VAAPIEncodeH264Context::sei_needed as an ORed value
Haihao Xiang [Thu, 3 May 2018 05:51:48 +0000 (13:51 +0800)]
vaapi_encode_h264: Take VAAPIEncodeH264Context::sei_needed as an ORed value

We may check priv->sei_needed only when writing SEI messages.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
6 years agoavfilter/drawutils: add support for full range
Paul B Mahol [Wed, 2 May 2018 11:10:10 +0000 (13:10 +0200)]
avfilter/drawutils: add support for full range

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/mpeg4videodec: Split decode_studio_vol_header() out of decode_studiovisualobj...
Michael Niedermayer [Sun, 29 Apr 2018 19:19:15 +0000 (21:19 +0200)]
avcodec/mpeg4videodec: Split decode_studio_vol_header() out of decode_studiovisualobject()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/mpeg4videodec: Move decode_studiovisualobject() parsing in the branch for...
Michael Niedermayer [Sun, 29 Apr 2018 19:19:14 +0000 (21:19 +0200)]
avcodec/mpeg4videodec: Move decode_studiovisualobject() parsing in the branch for visual object parsing

Fixes: runtime error: shift exponent -1 is negative
Fixes: 7510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5024523356209152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/yuv4mpegdec: simplify math
Paul B Mahol [Tue, 1 May 2018 15:46:08 +0000 (17:46 +0200)]
avformat/yuv4mpegdec: simplify math

This one actually works with hd1080 y4m files when seeking backwards.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_neighbor: add >8 depth suppport
Paul B Mahol [Thu, 3 May 2018 10:48:47 +0000 (12:48 +0200)]
avfilter/vf_neighbor: add >8 depth suppport

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_convolution: unbreak roberts filter
Paul B Mahol [Thu, 3 May 2018 09:26:40 +0000 (11:26 +0200)]
avfilter/vf_convolution: unbreak roberts filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_convolution: add horizontal/row mode
Paul B Mahol [Thu, 3 May 2018 08:55:10 +0000 (10:55 +0200)]
avfilter/vf_convolution: add horizontal/row mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_overlay: exclude nv12/nv21 formats from x86 asm check
Paul B Mahol [Thu, 3 May 2018 07:22:28 +0000 (09:22 +0200)]
avfilter/vf_overlay: exclude nv12/nv21 formats from x86 asm check

They are yet to be supported,

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agolavf/dashenc: pass standards compliance value to the internal context
Jan Ekström [Fri, 27 Apr 2018 00:51:37 +0000 (03:51 +0300)]
lavf/dashenc: pass standards compliance value to the internal context

Enables one to test possibly nonstandard formats such as Opus or
FLAC in ISOBMFF, among other things.

This becomes much more useful if output segment format becomes an
option, or if the WebM segment feature gets removed.

6 years agolavf/dashenc: require experimental mode to be enabled for WebM
Jan Ekström [Fri, 27 Apr 2018 00:51:36 +0000 (03:51 +0300)]
lavf/dashenc: require experimental mode to be enabled for WebM

It has not ever been working and has not been validated,
Additionally, mention that the segment file names should be changed
to end with webm instead of m4s, which is utilized for ISOBMFF
fragments.

6 years agolavf/dashenc: don't call flush_init_segment before avformat_write_header
Rodger Combs [Fri, 27 Apr 2018 00:51:35 +0000 (03:51 +0300)]
lavf/dashenc: don't call flush_init_segment before avformat_write_header

Fixes crash when muxing MKV-in-DASH