]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agodoc/swscaler: explain default Lanczos parameter
Werner Robitza [Sun, 26 May 2019 15:52:00 +0000 (17:52 +0200)]
doc/swscaler: explain default Lanczos parameter

Explain that the default Lanczos filter parameter is 3 and that it can be
changed by the param0 option.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
5 years agoavcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its...
James Almer [Mon, 27 May 2019 15:49:01 +0000 (12:49 -0300)]
avcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its data

To ensure the custom allocator is effectively used.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/libdav1d: export level from the Sequence Header
James Almer [Mon, 27 May 2019 15:47:33 +0000 (12:47 -0300)]
avcodec/libdav1d: export level from the Sequence Header

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter/af_superequalizer: switch to activate
Paul B Mahol [Mon, 27 May 2019 15:24:22 +0000 (17:24 +0200)]
avfilter/af_superequalizer: switch to activate

5 years agofftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
Antonin Gouzer [Fri, 24 May 2019 07:46:50 +0000 (09:46 +0200)]
fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)

Slightly modified by Marton Balint to produce valid json as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/mips: [loongson] fix mpeg4 decoding error on loongson platform.
Shiyou Yin [Fri, 24 May 2019 02:26:43 +0000 (10:26 +0800)]
avcodec/mips: [loongson] fix mpeg4 decoding error on loongson platform.

In function ff_dct_unquantize_mpeg2_intra_mmi,
addr0 shoudn't be changed before storage operation.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/avf_showfreqs: switch to activate
Paul B Mahol [Sun, 26 May 2019 15:11:17 +0000 (17:11 +0200)]
avfilter/avf_showfreqs: switch to activate

5 years agoswresample/swresample: check for invalid sample rates
Paul B Mahol [Fri, 24 May 2019 16:04:50 +0000 (18:04 +0200)]
swresample/swresample: check for invalid sample rates

5 years agoavcodec/libx265: Support full range videos
Derek Buitenhuis [Fri, 24 May 2019 15:15:11 +0000 (16:15 +0100)]
avcodec/libx265: Support full range videos

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
5 years agoavformat/webm_chunk: Specify expected argument length of get_chunk_filename()
Michael Niedermayer [Thu, 2 May 2019 18:36:18 +0000 (20:36 +0200)]
avformat/webm_chunk: Specify expected argument length of get_chunk_filename()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/webm_chunk: Check header filename length
Michael Niedermayer [Thu, 2 May 2019 18:45:14 +0000 (20:45 +0200)]
avformat/webm_chunk: Check header filename length

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/pngdec: Check nb_blocks
Michael Niedermayer [Sat, 27 Apr 2019 21:49:33 +0000 (23:49 +0200)]
avcodec/pngdec: Check nb_blocks

Fixes: Timeout (23sec -> 0.5sec)
Fixes: 14329/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LSCR_fuzzer-5679252923482112
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>
5 years agoavfilter/f_loop: warn about unset loop sizes
Marton Balint [Thu, 23 May 2019 20:20:44 +0000 (22:20 +0200)]
avfilter/f_loop: warn about unset loop sizes

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavfilter/f_loop: fix video loop issues with 0 size or when size is bigger than input
Marton Balint [Sun, 19 May 2019 19:16:03 +0000 (21:16 +0200)]
avfilter/f_loop: fix video loop issues with 0 size or when size is bigger than input

Fixes infinte loop with -vf loop=loop=1 and also fixes looping when the input
is less frames than the specified loop size.

Possible regressions since ef1aadffc785b48ed62c45d954289e754f43ef46.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/scpr3: fix checking ret value of decode_run_i
Marton Balint [Thu, 23 May 2019 19:41:21 +0000 (21:41 +0200)]
avcodec/scpr3: fix checking ret value of decode_run_i

Fixes Coverity CID 1441461.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/scpr: fix checking ret value of decode_run_i
Marton Balint [Thu, 23 May 2019 19:45:29 +0000 (21:45 +0200)]
avcodec/scpr: fix checking ret value of decode_run_i

Fixes Coverity CID 1441460.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/utils: fix stream ordering for program ID stream specifiers
Marton Balint [Sat, 18 May 2019 22:43:29 +0000 (00:43 +0200)]
avformat/utils: fix stream ordering for program ID stream specifiers

Fixes a regression introduced in dbfd042983eed8586d4048795c00af820f5b6b1f.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/cache - delete cache file after closing handle
Gyan Doshi [Wed, 22 May 2019 12:35:04 +0000 (18:05 +0530)]
avformat/cache - delete cache file after closing handle

Verified that cache files get deleted on Windows.

5 years agocompat/cuda/ptx2c: don't drop final newline
Timo Rothenpieler [Fri, 24 May 2019 17:23:39 +0000 (19:23 +0200)]
compat/cuda/ptx2c: don't drop final newline

5 years agoavfilter/vf_scale_cuda: reset frame size after acquiring from hwframe
Josh Allmann [Fri, 24 May 2019 16:39:47 +0000 (09:39 -0700)]
avfilter/vf_scale_cuda: reset frame size after acquiring from hwframe

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
5 years agoavfilter/vf_xmedian: set sar to outlink
Paul B Mahol [Fri, 24 May 2019 16:37:08 +0000 (18:37 +0200)]
avfilter/vf_xmedian: set sar to outlink

5 years agoavfilter/vf_mix: set sar to outlink
Paul B Mahol [Fri, 24 May 2019 16:35:27 +0000 (18:35 +0200)]
avfilter/vf_mix: set sar to outlink

5 years agoavfilter/vf_mix: use time_base from framesync
Paul B Mahol [Fri, 24 May 2019 16:33:16 +0000 (18:33 +0200)]
avfilter/vf_mix: use time_base from framesync

5 years agolavfi/opencl: add nlmeans_opencl filter
Ruiling Song [Fri, 12 Apr 2019 08:29:03 +0000 (16:29 +0800)]
lavfi/opencl: add nlmeans_opencl filter

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 years agolibavfilter/dnn_native: Add support of dilated convolution in dnn_native.
Xuewei Meng [Wed, 22 May 2019 13:02:58 +0000 (21:02 +0800)]
libavfilter/dnn_native: Add support of dilated convolution in dnn_native.

Add dilation parameter in dnn native to support dilated convolution.

Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
5 years agolavc/qsvenc: Fix the memory leak for enc_ctrl.Payload
Linjie Fu [Mon, 15 Apr 2019 13:23:18 +0000 (21:23 +0800)]
lavc/qsvenc: Fix the memory leak for enc_ctrl.Payload

frame->enc_ctrl.Payload is malloced in get_free_frame, directly memset
the whole structure of enc_ctrl to zero will cause the memory leak for
enc_ctrl.Payload.

frame->enc_ctrl as a structure will be malloc and init to zero by calling
frame = av_mallocz(sizeof(*frame)), so the memset is redundant and can
be removed.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agodoc/writing_filters: Use ff_filter_get_nb_threads() get number of threads
Jun Zhao [Wed, 22 May 2019 01:49:43 +0000 (09:49 +0800)]
doc/writing_filters: Use ff_filter_get_nb_threads() get number of threads

ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and
graph->nb_threads both, in most case, we perfer this API than using
ctx->graph->nb_threads directly.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavfi/lensfun: Use ff_filter_get_nb_threads() get number of threads
Jun Zhao [Wed, 22 May 2019 01:41:56 +0000 (09:41 +0800)]
lavfi/lensfun: Use ff_filter_get_nb_threads() get number of threads

ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and
graph->nb_threads both, in most case, we perfer this API than using
ctx->graph->nb_threads directly.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolibavfilter/dnn_native: Add multiple activation functions in dnn native
Xuewei Meng [Tue, 21 May 2019 06:52:49 +0000 (14:52 +0800)]
libavfilter/dnn_native: Add multiple activation functions in dnn native

Add "Leaky_relu" and "None" option in activation function.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
5 years agolibavfilter/dnn_native: Add multiple padding methods in dnn native
Xuewei Meng [Sat, 18 May 2019 07:19:18 +0000 (15:19 +0800)]
libavfilter/dnn_native: Add multiple padding methods in dnn native

Add another two padding methods "VALID" and "SAME" as tensorflow,
and keep the existing "SAME_CLAMP_TO_EDGE" method suggested by sr filter.
As "SAME_CLAMP_TO_EDGE"can keep the output with the same size as original input,
and gives a slight better result as mentioned by sr filter.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
5 years agolavc/vp9_superframe_bsf: avoid error messages in one line
Fu Linjie [Thu, 16 May 2019 15:04:31 +0000 (11:04 -0400)]
lavc/vp9_superframe_bsf: avoid error messages in one line

Add "\n" to avoid continuous error messages in one line.

Signed-off-by: Fu Linjie <linjie.fu@intel.com>
5 years agodoc: add basic documentation for libdav1d
James Almer [Mon, 20 May 2019 21:18:33 +0000 (18:18 -0300)]
doc: add basic documentation for libdav1d

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoffplay: added option always on top for video window
Daniel Kucera [Mon, 13 May 2019 11:42:37 +0000 (13:42 +0200)]
ffplay: added option always on top for video window

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Daniel Kucera <github@danman.eu>
5 years agoavcodec/libdav1d: fine tune thread distribution
James Almer [Mon, 13 May 2019 02:29:36 +0000 (23:29 -0300)]
avcodec/libdav1d: fine tune thread distribution

As suggested by Ronald, don't map auto threads to frame threads only, and
instead distribute them between frame and tile more efficiently.
Add a new framethreads override option, similar to the tilethreads one.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/mxfenc: support XAVC long gop
Baptiste Coudurier [Thu, 18 Oct 2018 20:37:05 +0000 (13:37 -0700)]
avformat/mxfenc: support XAVC long gop

5 years agoavcodec/cpia: Check input size also against linesizes and EOL
Michael Niedermayer [Sun, 19 May 2019 15:42:04 +0000 (17:42 +0200)]
avcodec/cpia: Check input size also against linesizes and EOL

Fixes: Timeout (14sec -> 29ms)
Fixes: 14733/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CPIA_fuzzer-5707022445576192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/v210dec: Fix alignment check for AVX2
Michael Niedermayer [Sat, 18 May 2019 07:32:58 +0000 (09:32 +0200)]
avcodec/v210dec: Fix alignment check for AVX2

Fixes: "null pointer dereference" (actually misaligned access but the tools seem not to support this)
Fixes: 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoRevert "lavf/utils: Allow url credentials to contain a slash."
Marton Balint [Sun, 5 May 2019 18:40:06 +0000 (20:40 +0200)]
Revert "lavf/utils: Allow url credentials to contain a slash."

This reverts commit dd06f022b07438d650c82255dff16908ba04244a.

Fixes ticket #7871 and reopens ticket #7816.

The introduced regression caused URL's with @ in them to be parsed incorrectly
which is a bigger issue then not being able to specify the slash character as a
password.

I think there are better ways to fix the original issue, like being able to
specify HTTP username and password as a protocol option, or adding a protocol
option to percent-decode the URL first.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavfilter/vf_ocr: also export confidence of result
Paul B Mahol [Fri, 17 May 2019 17:00:47 +0000 (19:00 +0200)]
avfilter/vf_ocr: also export confidence of result

5 years agoavcodec/options: remove dead test code
James Almer [Fri, 17 May 2019 15:48:24 +0000 (12:48 -0300)]
avcodec/options: remove dead test code

It's been unused since 5d48e4eafa6c4559683892b8638d10508125f3cf.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agodoc/scaler: explain values for src_range, dst_range
Werner Robitza [Fri, 17 May 2019 08:58:02 +0000 (10:58 +0200)]
doc/scaler: explain values for src_range, dst_range

This fixes the description of the values for src_range and dst_range to
include the possible values and their meanings.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agolibavdevice/gdigrab: fix ffmpeg -devices doesn't show gdigrab
Jun Zhao [Fri, 17 May 2019 07:35:28 +0000 (15:35 +0800)]
libavdevice/gdigrab: fix ffmpeg -devices doesn't show gdigrab

missed the category AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT lead to
ffmpeg -devices doesn't show gdigrab as a input device

FIx #7848

Found-by: dangibson
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agodoc/scaler: indicate some options as API only.
Gyan Doshi [Fri, 17 May 2019 07:32:04 +0000 (13:02 +0530)]
doc/scaler: indicate some options as API only.

srcw, srch, dstw, dsth, src_format and dst_format were blocked for
CLI use in a0af9fd954 in order to fix ticket #4856

5 years agoavformat/dashenc: use 64bit for handling the return of avio_tell()
Michael Niedermayer [Tue, 14 May 2019 11:04:51 +0000 (13:04 +0200)]
avformat/dashenc: use 64bit for handling the return of avio_tell()

The return code is 64bit, so this is more correct, especially in case it
actually would be a file of such large size

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/filters: update URL for sr filter script repository
Steven Liu [Thu, 16 May 2019 23:34:17 +0000 (07:34 +0800)]
doc/filters: update URL for sr filter script repository

Because the Original repository author loss loss of communication,
add new sr filter script repository.

Thanks to Gyan Doshi for a suggestion.

Signed-Off-By: Steven Liu <lq@chinaffmpeg.org>
5 years agoRevert "doc/filters: update URL for sr filter script repository"
Steven Liu [Thu, 16 May 2019 23:33:25 +0000 (07:33 +0800)]
Revert "doc/filters: update URL for sr filter script repository"

This reverts commit c2771bbf815bd7d0ff273ba590b7db02a303399f.

5 years agoavutil/tx: should check against (*ctx)
Ruiling Song [Thu, 16 May 2019 04:47:36 +0000 (12:47 +0800)]
avutil/tx: should check against (*ctx)

ctx is a pointer to pointer here.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 years agodoc/filters: update URL for sr filter script repository
Gyan Doshi [Thu, 16 May 2019 18:52:04 +0000 (00:22 +0530)]
doc/filters: update URL for sr filter script repository

Thanks to Steven Liu for the update.

5 years agoavutil/tx: fix forward compound non-mod-15 based MDCTs
Lynne [Thu, 16 May 2019 16:26:10 +0000 (17:26 +0100)]
avutil/tx: fix forward compound non-mod-15 based MDCTs

There was a hardcoded value left. Wasn't caught earlier as no code uses
compound forward mod-3/5 MDCTs yet.

5 years agoavfilter/vf_separatefields: switch to activate
Paul B Mahol [Thu, 16 May 2019 10:31:57 +0000 (12:31 +0200)]
avfilter/vf_separatefields: switch to activate

Fixes timestamp of last output frame.

5 years agodoc/filters: mention obvious operation, for our always clueless users
Paul B Mahol [Thu, 16 May 2019 08:40:38 +0000 (10:40 +0200)]
doc/filters: mention obvious operation, for our always clueless users

5 years agoavfilter/drawtext: stop resource leak
Gyan Doshi [Wed, 15 May 2019 07:06:05 +0000 (12:36 +0530)]
avfilter/drawtext: stop resource leak

Fixes Coverity CID 1445099

5 years agolavu: bump minor and update APIchanges for the new transform API
Lynne [Wed, 15 May 2019 23:01:14 +0000 (00:01 +0100)]
lavu: bump minor and update APIchanges for the new transform API

5 years agoconfigure: replace 'pr' with printf since busybox does not support pr
Guo, Yejun [Wed, 24 Apr 2019 13:13:21 +0000 (21:13 +0800)]
configure: replace 'pr' with printf since busybox does not support pr

This patch is based on https://trac.ffmpeg.org/ticket/5680 provided by
Kylie McClain <somasis@exherbo.org> at Wed, 29 Jun 2016 16:37:20 -0400,
and have some changes.

contributor: Kylie McClain <somasis@exherbo.org>
contributor: avih <avihpit@yahoo.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
5 years agoavfilter/vf_scale_cuda: Simplify output plane addressing
Philip Langdale [Tue, 14 May 2019 03:07:42 +0000 (20:07 -0700)]
avfilter/vf_scale_cuda: Simplify output plane addressing

I'm not sure why this was written the way it was originally. We
initialise the plane addresses correctly in hwcontext_cuda so
why try and play games to calculate the plane offsets directly
in this code?

5 years agoavfilter/vf_scale_cuda: Add support for YUV444P16
Philip Langdale [Tue, 14 May 2019 03:00:12 +0000 (20:00 -0700)]
avfilter/vf_scale_cuda: Add support for YUV444P16

This format is interesting because it's what you get for decoded
10/12bit HEVC 4:4:4.

5 years agoavfilter/vf_scale_cuda: Fix incorrect scaling of > 8bit content
Philip Langdale [Tue, 14 May 2019 02:15:41 +0000 (19:15 -0700)]
avfilter/vf_scale_cuda: Fix incorrect scaling of > 8bit content

When i converted the filter to use texture objects instead of
texture references, I incorrect dropped the `pixel_size` scaling
factor when setting `pitchInBytes`. `src_pitch` is in pixels and
so must be scaled up.

5 years agolibavutil: add an FFT & MDCT implementation
Lynne [Thu, 2 May 2019 14:07:12 +0000 (15:07 +0100)]
libavutil: add an FFT & MDCT implementation

This commit adds a new API to libavutil to allow for arbitrary transformations
on various types of data.
This is a partly new implementation, with the power of two transforms taken
from libavcodec/fft_template, the 5 and 15-point FFT taken from mdct15, while
the 3-point FFT was written from scratch.
The (i)mdct folding code is taken from mdct15 as well, as the mdct_template
code was somewhat old, messy and not easy to separate.

A notable feature of this implementation is that it allows for 3xM and 5xM
based transforms, where M is a power of two, e.g. 384, 640, 768, 1280, etc.
AC-4 uses 3xM transforms while Siren uses 5xM transforms, so the code will
allow for decoding of such streams.
A non-exaustive list of supported sizes:
4, 8, 12, 16, 20, 24, 32, 40, 48, 60, 64, 80, 96, 120, 128, 160, 192, 240,
256, 320, 384, 480, 512, 640, 768, 960, 1024, 1280, 1536, 1920, 2048, 2560...

The API was designed such that it allows for not only 1D transforms but also
2D transforms of certain block sizes. This was partly on accident as the stride
argument is required for Opus MDCTs, but can be used in the context of a 2D
transform as well.
Also, various data types would be implemented eventually as well, such as
"double" and "int32_t".

Some performance comparisons with libfftw3f (SIMD disabled for both):
120:
  22353 decicycles in     fftwf_execute,     1024 runs,      0 skips
  21836 decicycles in compound_fft_15x8,     1024 runs,      0 skips

128:
  22003 decicycles in       fftwf_execute,   1024 runs,      0 skips
  23132 decicycles in monolithic_fft_ptwo,   1024 runs,      0 skips

384:
  75939 decicycles in      fftwf_execute,    1024 runs,      0 skips
  73973 decicycles in compound_fft_3x128,    1024 runs,      0 skips

640:
 104354 decicycles in       fftwf_execute,   1024 runs,      0 skips
 149518 decicycles in compound_fft_5x128,    1024 runs,      0 skips

768:
 109323 decicycles in      fftwf_execute,    1024 runs,      0 skips
 164096 decicycles in compound_fft_3x256,    1024 runs,      0 skips

960:
 186210 decicycles in      fftwf_execute,    1024 runs,      0 skips
 215256 decicycles in compound_fft_15x64,    1024 runs,      0 skips

1024:
 163464 decicycles in       fftwf_execute,   1024 runs,      0 skips
 199686 decicycles in monolithic_fft_ptwo,   1024 runs,      0 skips

With SIMD we should be faster than fftw for 15xM transforms as our fft15 SIMD
is around 2x faster than theirs, even if our ptwo SIMD is slightly slower.

The goal is to remove the libavcodec/mdct15 code and deprecate the
libavcodec/avfft interface once aarch64 and x86 SIMD code has been ported.
New code throughout the project should use this API.

The implementation passes fate when used in Opus, AAC and Vorbis, and the output
is identical with ATRAC9 as well.

5 years agoaarch64/asm-offsets: remove old CELT offsets
Lynne [Sat, 20 Apr 2019 01:04:51 +0000 (02:04 +0100)]
aarch64/asm-offsets: remove old CELT offsets

They're not used and they're incorrect.

5 years agoavcodec/Makefile: add missing pngdsp dependency to the lscr decoder
James Almer [Tue, 14 May 2019 19:47:56 +0000 (16:47 -0300)]
avcodec/Makefile: add missing pngdsp dependency to the lscr decoder

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter: add asr filter
Paul B Mahol [Sun, 5 May 2019 13:01:53 +0000 (15:01 +0200)]
avfilter: add asr filter

5 years agoavfilter/vf_stack: Don't modify const strings
Andreas Rheinhardt [Tue, 14 May 2019 04:15:17 +0000 (06:15 +0200)]
avfilter/vf_stack: Don't modify const strings

b3b7ba62 introduced undefined behaviour: A (non-modifiable) string
literal has been assigned to a modifiable string; said string was indeed
modified later via av_strtok.
This of course caused compiler warnings because of the discarded
qualifier; these are in particular fixed by this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
5 years agoavfilter: add xmedian filter
Paul B Mahol [Fri, 3 May 2019 12:08:49 +0000 (14:08 +0200)]
avfilter: add xmedian filter

5 years agoavcodec/cinepak: Check available input against encoded buffer size
Michael Niedermayer [Sun, 12 May 2019 20:06:30 +0000 (22:06 +0200)]
avcodec/cinepak: Check available input against encoded buffer size

Fixes: Timeout (12sec -> 2sec)
Fixes: 14606/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5738687561728000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavutil: Add missing reference files for pixdesc fate test
Andreas Rheinhardt [Tue, 14 May 2019 05:53:13 +0000 (07:53 +0200)]
avutil: Add missing reference files for pixdesc fate test

Commit cd48318035 added support for NV24 and NV42, including several
fate tests for these formats, but did not include the reference files
for the tests filter-pixdesc-nv24 and filter-pixdesc-nv42. As a result,
these two tests were broken.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/dashdec: refactoring error handle logic for open_input
Jun Zhao [Sat, 11 May 2019 07:23:44 +0000 (15:23 +0800)]
lavf/dashdec: refactoring error handle logic for open_input

refactoring error handle logic for open_input.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavf/dashdec: fix the coding logic after open_input fail
Jun Zhao [Sat, 11 May 2019 07:23:43 +0000 (15:23 +0800)]
lavf/dashdec: fix the coding logic after open_input fail

setting return status following goto will never be executed, so
adjust the location in the code.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agodoc/filters: add scale2ref example for proportional scaling
Gyan Doshi [Mon, 13 May 2019 16:28:19 +0000 (21:58 +0530)]
doc/filters: add scale2ref example for proportional scaling

5 years agoswscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes
Michael Niedermayer [Mon, 13 May 2019 10:50:38 +0000 (12:50 +0200)]
swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes

Some formats use longer names than 12.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibswcale: Fix possible string overflow in test.
Adam Richter [Sun, 12 May 2019 12:03:25 +0000 (05:03 -0700)]
libswcale: Fix possible string overflow in test.

In libswcale/tests/swcale.c, the function fileTest() calls sscanf in
an argument of "%12s" on character srcStr[] and dstStr[], which are
only 12 bytes.  So, if the input string is 12 characters, a
terminating null byte can be written past the end of these arrays.

This bug was found by cppcheck.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_chromahold: implement blend option
Paul B Mahol [Mon, 13 May 2019 10:10:22 +0000 (12:10 +0200)]
avfilter/vf_chromahold: implement blend option

5 years agodoc/filters: mention drawtext command support
Gyan Doshi [Mon, 13 May 2019 06:52:05 +0000 (12:22 +0530)]
doc/filters: mention drawtext command support

5 years agoavfilter/drawtext: make command processing error-resilient
Gyan Doshi [Fri, 10 May 2019 13:43:33 +0000 (19:13 +0530)]
avfilter/drawtext: make command processing error-resilient

Prevents crash or interruption in text rendering
if new option string contains invalid values.

5 years agolavc/videotoolboxenc: Add support for 10-bit HEVC encoding.
Rick Kern [Sun, 12 May 2019 20:05:51 +0000 (16:05 -0400)]
lavc/videotoolboxenc: Add support for 10-bit HEVC encoding.

Hardware-accelerated encoding may not support 10-bit encoding. Use
'-require_sw 1' in this case.

Fixes: #7581
Signed-off-by: Rick Kern <kernrj@gmail.com>
5 years agolavc/videotoolboxenc: simplify frame creation logic between OS X and iOS.
Rick Kern [Sun, 12 May 2019 20:04:37 +0000 (16:04 -0400)]
lavc/videotoolboxenc: simplify frame creation logic between OS X and iOS.

Signed-off-by: Rick Kern <kernrj@gmail.com>
5 years agolavc/videotoolboxenc: add require_sw option to force software encoding.
Rick Kern [Sun, 12 May 2019 20:01:50 +0000 (16:01 -0400)]
lavc/videotoolboxenc: add require_sw option to force software encoding.

Signed-off-by: Rick Kern <kernrj@gmail.com>
5 years agoavfilter/af_astats: fix calculations involving last sample
Paul B Mahol [Sun, 12 May 2019 15:10:40 +0000 (17:10 +0200)]
avfilter/af_astats: fix calculations involving last sample

5 years agoavfilter/af_astats: fix initial values of variables
Paul B Mahol [Sun, 12 May 2019 14:56:00 +0000 (16:56 +0200)]
avfilter/af_astats: fix initial values of variables

5 years agoswscale: Add test for isSemiPlanarYUV to pixdesc_query
Philip Langdale [Sat, 11 May 2019 17:12:47 +0000 (10:12 -0700)]
swscale: Add test for isSemiPlanarYUV to pixdesc_query

Lauri had asked me what the semi planar formats were and that reminded
me that we could add it to pixdesc_query so we know exactly what the
list is.

5 years agoswscale: Add support for NV24 and NV42
Philip Langdale [Fri, 10 May 2019 04:02:09 +0000 (21:02 -0700)]
swscale: Add support for NV24 and NV42

The implementation is pretty straight-forward. Most of the existing
NV12 codepaths work regardless of subsampling and are re-used as is.
Where necessary I wrote the slightly different NV24 versions.

Finally, the one thing that confused me for a long time was the
asm specific x86 path that did an explicit exclusion check for NV12.
I replaced that with a semi-planar check and also updated the
equivalent PPC code, which Lauri kindly checked.

5 years agoavutil: Add NV24 and NV42 pixel formats
Philip Langdale [Tue, 7 May 2019 03:39:39 +0000 (20:39 -0700)]
avutil: Add NV24 and NV42 pixel formats

These are the 4:4:4 variants of the semi-planar NV12/NV21 formats.

These formats are not used much, so we've never had a reason to add
them until now. VDPAU recently added support HEVC 4:4:4 content
and when you use the OpenGL interop, the returned surfaces are in
NV24 format, so we need the pixel format for media players, even
if there's no direct use within ffmpeg.

Separately, there are apparently webcams that use NV24, but I've
never seen one.

5 years agoavcodec/h264_ps: Check offset_for_non_ref_pic, offset_for_top_to_bottom_field and...
Michael Niedermayer [Sat, 11 May 2019 17:36:55 +0000 (19:36 +0200)]
avcodec/h264_ps: Check offset_for_non_ref_pic, offset_for_top_to_bottom_field and offset_for_ref_frame

Fixes: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int'
Fixes: 14444/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5675880333967360
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hq_hqa: Check available space before reading slice offsets
Michael Niedermayer [Sat, 11 May 2019 21:05:47 +0000 (23:05 +0200)]
avcodec/hq_hqa: Check available space before reading slice offsets

Fixes: Timeout (43sec -> 18sec)
Fixes: 14556/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5673543024508928
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>
5 years agoavcodec/wmv2dec: Check input bits vs. coded MBs
Michael Niedermayer [Tue, 30 Apr 2019 22:40:03 +0000 (00:40 +0200)]
avcodec/wmv2dec: Check input bits vs. coded MBs

Fixes: Timeout (94sec ->8sec)
Fixes: 14387/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5723546887651328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavc/pngenc: check malloc fail before using the pointer
Jun Zhao [Fri, 10 May 2019 14:28:38 +0000 (22:28 +0800)]
lavc/pngenc: check malloc fail before using the pointer

Need to check malloc fail before using the pointer

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavc/mlpenc: remove the redundant condition check
Jun Zhao [Fri, 10 May 2019 13:24:17 +0000 (21:24 +0800)]
lavc/mlpenc: remove the redundant condition check

remove the redundant condition check for 'frame'

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavc/libvpxenc: remove redundant condition check
Jun Zhao [Fri, 10 May 2019 13:02:40 +0000 (21:02 +0800)]
lavc/libvpxenc: remove redundant condition check

Redundant condition: '!A || B' is equivalent to '!A || (A && B)' but
more clearly.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavc/bink: Remove the dead code block
Jun Zhao [Fri, 10 May 2019 11:22:01 +0000 (19:22 +0800)]
lavc/bink: Remove the dead code block

Remove the dead code block

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavc/avpacket: check NULL before using the pointer
Jun Zhao [Fri, 10 May 2019 11:03:54 +0000 (19:03 +0800)]
lavc/avpacket: check NULL before using the pointer

Need to check NULL before using the pointer

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavc/aacenc_ltp: remove unnecessary condition check.
Jun Zhao [Fri, 10 May 2019 07:49:45 +0000 (15:49 +0800)]
lavc/aacenc_ltp: remove unnecessary condition check.

Condition 'sum==2' is always true, so remove the check logic to
make the code clean.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavf/isom: Allow reading mp3-in-isom as written by vlc.
Carl Eugen Hoyos [Sat, 11 May 2019 23:35:47 +0000 (01:35 +0200)]
lavf/isom: Allow reading mp3-in-isom as written by vlc.

Reported-by: IRC user aiena
5 years agoavfilter: add colorhold filter
Paul B Mahol [Sun, 13 Jan 2019 18:02:52 +0000 (19:02 +0100)]
avfilter: add colorhold filter

Fixes #7671.

5 years agoavcodec/gif: remove flags from gifimage option
Paul B Mahol [Sat, 11 May 2019 14:40:59 +0000 (16:40 +0200)]
avcodec/gif: remove flags from gifimage option

It does not belong there.

5 years agoavcodec/gif: fix issues with transparent crop
Jacob Graff [Thu, 9 May 2019 20:45:56 +0000 (16:45 -0400)]
avcodec/gif: fix issues with transparent crop

Resolves issues with some transparent gifs.

5 years agolavc/libx265: Use avctx->framerate first for frame rate setting
Jun Zhao [Sat, 27 Apr 2019 10:52:57 +0000 (18:52 +0800)]
lavc/libx265: Use avctx->framerate first for frame rate setting

perfer avctx->framerate first than use avctx->time_base when setting
the frame rate to encoder. 1/time_base is not the average frame rate
if the frame rate is not constant, so use avctx->framerate if the
value is not zero.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavc/libx264: Use avctx->framerate first for frame rate setting
Jun Zhao [Sat, 27 Apr 2019 10:45:23 +0000 (18:45 +0800)]
lavc/libx264: Use avctx->framerate first for frame rate setting

perfer avctx->framerate first than use avctx->time_base when setting
the frame rate to encoder. 1/time_base is not the average frame rate
if the frame rate is not constant. In this case, we need to setting
avctx->framerate and avctx->time_base both, but avctx->framerate not
equal to 1/(avctx->time_base).

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agolavf/avidec: Do not test for bitrate <= INT_MAX.
Carl Eugen Hoyos [Fri, 10 May 2019 08:44:34 +0000 (10:44 +0200)]
lavf/avidec: Do not test for bitrate <= INT_MAX.

AVCodecContext->bit_rate is int64_t since 7404f3bd

Unbreaks non-interleaved detection of v210 4k avi files, broken since 0eec40b7.
Reported-by: Xavier Càmara, Centre de Conservació i Restauració, Filmoteca de Catalunya
5 years agolavf/cover_rect: Fix logic check issue
Jun Zhao [Wed, 8 May 2019 13:54:46 +0000 (21:54 +0800)]
lavf/cover_rect: Fix logic check issue

Fix logic check issue #6741

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agoLICENSE: Clarify --enable-nonfree.
Carl Eugen Hoyos [Thu, 9 May 2019 23:18:58 +0000 (01:18 +0200)]
LICENSE: Clarify --enable-nonfree.

Using the configure option --enable-nonfree makes the resulting binary unredistributable.

5 years agoLICENSE: Remove nvenc from the non-free section.
Carl Eugen Hoyos [Thu, 9 May 2019 23:15:44 +0000 (01:15 +0200)]
LICENSE: Remove nvenc from the non-free section.

The headers are auto-detected by current FFmpeg.