ffmpeg.git
2 years agoavfilter: add chromashift filter
Paul B Mahol [Sat, 17 Nov 2018 13:04:16 +0000 (14:04 +0100)]
avfilter: add chromashift filter

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

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

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

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

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

Matching previous commit for H.264.

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

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

Fixes #7502.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Affects:

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

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

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

The valid range is -255 to 255.

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

Fixes #7538.

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agoh264_levels, h264_metadata_bsf: Fix levels typo
Andreas Rheinhardt [Mon, 12 Nov 2018 14:18:12 +0000 (15:18 +0100)]
h264_levels, h264_metadata_bsf: Fix levels typo

profile_idc for level 1b should be 11, not 10.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agoavcodec/prores_metadata_bsf : fix colorspace check
Martin Vignali [Tue, 13 Nov 2018 09:52:52 +0000 (10:52 +0100)]
avcodec/prores_metadata_bsf : fix colorspace check

Report by coverity
CID 1441165

2 years agoavcodec/libopenh264enc: fix class_name
Tobias Rapp [Mon, 12 Nov 2018 16:04:43 +0000 (17:04 +0100)]
avcodec/libopenh264enc: fix class_name

Reverts some accidental change in commit e621b1ca646a2f268797adc3194b694a852548d2.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2 years agoavfilter/vf_alphamerge: do not check for ret value if all wanted frames are present
Paul B Mahol [Mon, 12 Nov 2018 21:07:13 +0000 (22:07 +0100)]
avfilter/vf_alphamerge: do not check for ret value if all wanted frames are present

It is not needed and may be uninitialized.

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

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

2 years agoavfilter/af_afftfilt: use first input frame timestamp
Paul B Mahol [Mon, 12 Nov 2018 11:30:37 +0000 (12:30 +0100)]
avfilter/af_afftfilt: use first input frame timestamp

2 years agolavc/videotoolbox: Fix cropping with HEVC and H264 videos
Akemi [Sat, 10 Nov 2018 15:09:05 +0000 (16:09 +0100)]
lavc/videotoolbox: Fix cropping with HEVC and H264 videos

videotoolbox returns an already cropped stream which led to double
cropping. this issue was introduced with the refactor of the cropping
mechanism in commit 07596e4 for h264 and 000fb61 for HEVC.

to fix this we set the cropping of the frame and the output frame to 0.

Tested-by: ponpon
Fixes ticket #7544.

2 years agofate: Add test for vc1test demuxer
Jun Zhao [Tue, 23 Oct 2018 13:45:01 +0000 (21:45 +0800)]
fate: Add test for vc1test demuxer

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2 years agoavfilter/vf_alphamerge: switch to activate
Paul B Mahol [Sun, 11 Nov 2018 11:29:03 +0000 (12:29 +0100)]
avfilter/vf_alphamerge: switch to activate

2 years agoavformat/hlsenc: check dirname and fix vtt problem
Steven Liu [Mon, 12 Nov 2018 09:42:12 +0000 (17:42 +0800)]
avformat/hlsenc: check dirname and fix vtt problem

fix ticket: 7527
check dirname before use it
refine webvtt code in the hls_delete_old_segments

Reported-by: caspy
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavcodec/tiff: add initial bayer and sub image support
Paul B Mahol [Tue, 30 Oct 2018 21:05:52 +0000 (22:05 +0100)]
avcodec/tiff: add initial bayer and sub image support

2 years agoavfilter/af_headphone: do not leak input frames on error
Paul B Mahol [Mon, 12 Nov 2018 08:38:30 +0000 (09:38 +0100)]
avfilter/af_headphone: do not leak input frames on error

2 years agoavfilter/af_afftfilt: calculate all channels FFT values upfront
Paul B Mahol [Mon, 12 Nov 2018 08:27:08 +0000 (09:27 +0100)]
avfilter/af_afftfilt: calculate all channels FFT values upfront

2 years agocbs_h2645: Improve performance of writing slices
Andreas Rheinhardt [Sun, 11 Nov 2018 22:43:05 +0000 (23:43 +0100)]
cbs_h2645: Improve performance of writing slices

Instead of using a combination of bitreader and -writer for copying data,
one can byte-align the (obsolete and removed) bitreader to improve performance.
With the right alignment one can even use memcpy. The right alignment
normally exists for CABAC and hence for H.265 in general.
For aligned data this reduced the time to copy the slicedata from
776520 decicycles to 33889 with 262144 runs and a 6.5mb/s H.264 video.
For unaligned data the number went down from 279196 to 97739 decicycles.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agofate/prores_metadata : fix md5 value
Martin Vignali [Sun, 11 Nov 2018 20:40:08 +0000 (21:40 +0100)]
fate/prores_metadata : fix md5 value

2 years agoavfilter/af_afftfilt: add more window types
Paul B Mahol [Sun, 11 Nov 2018 20:21:14 +0000 (21:21 +0100)]
avfilter/af_afftfilt: add more window types

2 years agoavfilter/af_afftfilt: extend filter functionality
Paul B Mahol [Sun, 11 Nov 2018 20:11:30 +0000 (21:11 +0100)]
avfilter/af_afftfilt: extend filter functionality

2 years agofate/prores_metadata_bsf : add test for setting color property
Martin Vignali [Sun, 28 Oct 2018 11:54:18 +0000 (12:54 +0100)]
fate/prores_metadata_bsf : add test for setting color property

2 years agoavcodec : add prores_metadata bsf for set the color property of each prores frame
Martin Vignali [Sun, 28 Oct 2018 11:53:25 +0000 (12:53 +0100)]
avcodec : add prores_metadata bsf for set the color property of each prores frame

2 years agoavfilter/vf_minterpolate: use common scene sad functions
Marton Balint [Sun, 7 Oct 2018 16:55:47 +0000 (18:55 +0200)]
avfilter/vf_minterpolate: use common scene sad functions

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavfilter/vf_select: use common scene sad functions
Marton Balint [Wed, 4 Apr 2018 23:47:32 +0000 (01:47 +0200)]
avfilter/vf_select: use common scene sad functions

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavfilter/vf_framerate: factorize SAD functions which compute SAD for a whole frame
Marton Balint [Wed, 4 Apr 2018 23:37:25 +0000 (01:37 +0200)]
avfilter/vf_framerate: factorize SAD functions which compute SAD for a whole frame

Also add SIMD which works on lines because it is faster then calculating it on
8x8 blocks using pixelutils.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agocbs_mpeg2: Improve performance of writing slices
Andreas Rheinhardt [Sun, 4 Nov 2018 04:48:40 +0000 (05:48 +0100)]
cbs_mpeg2: Improve performance of writing slices

Instead of using a combination of bitreader and -writer for copying data,
one can byte-align the (obsolete and removed) bitreader to improve performance.
One can even use memcpy in the normal case.
This improved the time needed for writing the slicedata from 33618 to
2370 decicycles when tested on a video originating from a DVD (4194394
runs).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agocbs_h265: Add PTL parsing for sublayers
Mark Thompson [Sat, 27 Oct 2018 21:01:16 +0000 (22:01 +0100)]
cbs_h265: Add PTL parsing for sublayers

With fate test using the SLPPLP_A_VIDYO_2 conformance file, which contains
two sublayers with full PTL information.

2 years agofate/libavcodec: Fix config dependency of h264-levels test
Mark Thompson [Sat, 27 Oct 2018 22:19:49 +0000 (23:19 +0100)]
fate/libavcodec: Fix config dependency of h264-levels test

2 years agoavfilter/vf_lut3d: ignore last whitespace when comparing LUT size string
Paul B Mahol [Sun, 11 Nov 2018 12:36:45 +0000 (13:36 +0100)]
avfilter/vf_lut3d: ignore last whitespace when comparing LUT size string

In some situations it might be tab character and in others normal space.

2 years agofftools/ffmpeg: Indent the code
Jun Zhao [Fri, 9 Nov 2018 12:33:51 +0000 (20:33 +0800)]
fftools/ffmpeg: Indent the code

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2 years agofftools/ffmpeg: Put the variable declaration at uppper for block.
Jun Zhao [Fri, 9 Nov 2018 06:35:30 +0000 (14:35 +0800)]
fftools/ffmpeg: Put the variable declaration at uppper for block.

move the variable declaration at start of upper for block and
remove the redundant brace.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2 years agofftools/ffmpeg: Remove the micor like "#if 1"
Jun Zhao [Fri, 9 Nov 2018 06:11:24 +0000 (14:11 +0800)]
fftools/ffmpeg: Remove the micor like "#if 1"

They are come from 2003 and delete them.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2 years agoavcodec/imm4: Use ff_set_dimensions()
Michael Niedermayer [Fri, 9 Nov 2018 22:07:23 +0000 (23:07 +0100)]
avcodec/imm4: Use ff_set_dimensions()

Fixes: Out of memory
Fixes: 10970/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5698750043914240

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoh264_redundant_pps: Fix logging context
Andreas Rheinhardt [Fri, 9 Nov 2018 05:31:38 +0000 (06:31 +0100)]
h264_redundant_pps: Fix logging context

The first element of H264RedundantPPSContext is not a pointer to an
AVClass as required.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_lut3d: add spline 1D interpolation
Paul B Mahol [Sat, 10 Nov 2018 21:06:13 +0000 (22:06 +0100)]
avfilter/vf_lut3d: add spline 1D interpolation

2 years agoavfilter/vf_lut3d: add cosine 1D interpolation
Paul B Mahol [Sat, 10 Nov 2018 20:44:35 +0000 (21:44 +0100)]
avfilter/vf_lut3d: add cosine 1D interpolation

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

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

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

Signed-off-by: Mark Wu <wfwf1997@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/wmaprodec: improve XMA missing samples
bnnm [Fri, 26 Oct 2018 23:49:50 +0000 (01:49 +0200)]
avcodec/wmaprodec: improve XMA missing samples

Writes missing (delay) samples after EOF.

Signed-off-by: bnnm <bananaman255@gmail.com>
2 years agolibvpxenc: extend auto-alt-ref range
James Zern [Sat, 3 Nov 2018 20:50:32 +0000 (13:50 -0700)]
libvpxenc: extend auto-alt-ref range

vp9 now supports [0, 6]

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2 years agolibvpxenc,vp9: add enable-tpl option
James Zern [Sat, 3 Nov 2018 20:30:34 +0000 (13:30 -0700)]
libvpxenc,vp9: add enable-tpl option

enables temporal dependency model

Signed-off-by: James Zern <jzern@google.com>
2 years agoavfilter/af_headphone : fix mem leak
Martin Vignali [Thu, 8 Nov 2018 21:26:14 +0000 (22:26 +0100)]
avfilter/af_headphone : fix mem leak

report by coverity
CID 1439934
CID 1439935

2 years agoavfilter/af_afir: fix hang because video is first requested
Paul B Mahol [Fri, 9 Nov 2018 17:48:29 +0000 (18:48 +0100)]
avfilter/af_afir: fix hang because video is first requested

2 years agoavfilter/af_afir: kill useless code which increases latency for no reason
Paul B Mahol [Fri, 9 Nov 2018 09:40:16 +0000 (10:40 +0100)]
avfilter/af_afir: kill useless code which increases latency for no reason

2 years agoavcodec/qpeg: Optimize full width runs in qpeg_decode_intra()
Michael Niedermayer [Mon, 5 Nov 2018 21:46:43 +0000 (22:46 +0100)]
avcodec/qpeg: Optimize full width runs in qpeg_decode_intra()

This improves the speed of decoding large patches of constant color

Fixes: Timeout
Fixes: 10967/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-5630803793936384

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/prores_aw : add support for prores 444 with alpha
Martin Vignali [Thu, 8 Nov 2018 21:10:29 +0000 (22:10 +0100)]
avcodec/prores_aw : add support for prores 444 with alpha

only 16b alpha is supported (not 8 bits)

following official encoder, alpha data doesn't impact
yuv plane quality.

So the alpha data encoding is done after the yuv part.
It's also avoid to loose quality in yuv part when
alpha is not uniform.

the alpha encoding funcs is mainly take from prores_ks
encoder, except for the alpha data reorganization

2 years agoavcodec/prores_aw : cosmetic indent and add comment to describe frame header value
Martin Vignali [Thu, 8 Nov 2018 21:05:18 +0000 (22:05 +0100)]
avcodec/prores_aw : cosmetic indent and add comment to describe frame header value

description are based on multimedia wiki documentation

2 years agoavcodec/prores_aw : change src pix_fmt and alpha description
Martin Vignali [Thu, 8 Nov 2018 21:04:35 +0000 (22:04 +0100)]
avcodec/prores_aw : change src pix_fmt and alpha description

use b64a as src pix fmt (doesn't seems to have an impact on decoding)
but it's the value use by official encoder