ffmpeg.git
5 months agoavcodec/vp9_raw_reorder: reset state when flushing
James Almer [Mon, 6 May 2019 03:22:32 +0000 (00:22 -0300)]
avcodec/vp9_raw_reorder: reset state when flushing

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavformat/aacdec: fix demuxing of small frames
James Almer [Thu, 25 Apr 2019 22:04:01 +0000 (19:04 -0300)]
avformat/aacdec: fix demuxing of small frames

10 bytes (id3v2 header amount of bytes) were being read before any checks
were made on the bitstream. The result was that we were overreading into
the next frame if the current one was 8 or 9 bytes long.

Fixes tickets #7271 and #7869.

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavcodec/hevcdec: Declare that VDPAU can handle HEVC 4:4:4 content
ManojGuptaBonda [Fri, 26 Apr 2019 04:13:36 +0000 (09:43 +0530)]
avcodec/hevcdec: Declare that VDPAU can handle HEVC 4:4:4 content

The latest generation video decoder on the Turing chips supports
decoding HEVC 4:4:4. This change adds AV_PIX_FMT_VDPAU as a valid format
for HEVC 4:4:4 8 bit.

5 months agoavcodec/vdpau_hevc: Pass sps and pps range extension flags to VDPAU
ManojGuptaBonda [Fri, 26 Apr 2019 04:13:37 +0000 (09:43 +0530)]
avcodec/vdpau_hevc: Pass sps and pps range extension flags to VDPAU

Pass SPS, PPS range extensions to VDPAU layer via
VdpPictureInfoHEVC444. Added VdpPictureInfoHEVC444 struct to
VdpPictureInfo union to populate the range extension params. Mapped
FF_PROFILE_HEVC_REXT to VDP_DECODER_PROFILE_HEVC_MAIN_444.

5 months agoavutil/hwcontext_vdpau: Map 444 pix fmts to new VdpYCbCr types
ManojGuptaBonda [Fri, 3 May 2019 20:57:53 +0000 (02:27 +0530)]
avutil/hwcontext_vdpau: Map 444 pix fmts to new VdpYCbCr types

New VdpYCbCr Formats VDP_YCBCR_FORMAT_Y_U_V_444 and,
VDP_YCBCR_FORMAT_Y_UV_444 have been added in VDPAU with libvdpau-1.2
to be used in get/putbits for YUV 4:4:4 surfaces. Earlier mapping of
AV_PIX_FMT_YUV444P to VDP_YCBCR_FORMAT_YV12 is not valid.

Hence this Change maps AV_PIX_FMT_YUV444P to VDP_YCBCR_FORMAT_Y_U_V_444
to access the YUV 4:4:4 surface via read-back API's of VDPAU.

5 months agolavf/rpl: Don't be case-sensitive detecting codecs.
Carl Eugen Hoyos [Sun, 5 May 2019 14:32:11 +0000 (16:32 +0200)]
lavf/rpl: Don't be case-sensitive detecting codecs.

Fixes ticket #7859
Reported and tested by Steffen Ohrendorf, steffen d ohrendorf a gmx d de

5 months agoavfilter/vf_freezedetect: fix missing freeze_start when the freeze length is around...
Marton Balint [Wed, 1 May 2019 17:11:52 +0000 (19:11 +0200)]
avfilter/vf_freezedetect: fix missing freeze_start when the freeze length is around the detection duration

Fixes ticket #7875.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavdevice/decklink: fix checking video mode in SDK version 11
Marton Balint [Wed, 1 May 2019 10:47:43 +0000 (12:47 +0200)]
avdevice/decklink: fix checking video mode in SDK version 11

Apparently in the new SDK one cannot query if VANC output is supported, so we
will fall back to non-VANC output if enabling the video output with VANC fails.

Fixes ticket #7867.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavfilter/f_interleave: switch to activate
Paul B Mahol [Fri, 3 May 2019 18:17:28 +0000 (20:17 +0200)]
avfilter/f_interleave: switch to activate

5 months agoavcodec/truehd_core: reset state when flushing
James Almer [Sun, 5 May 2019 01:10:40 +0000 (22:10 -0300)]
avcodec/truehd_core: reset state when flushing

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavfilter/vf_vibrance: add alternate option
Paul B Mahol [Sun, 5 May 2019 11:26:24 +0000 (13:26 +0200)]
avfilter/vf_vibrance: add alternate option

5 months agoavfilter/vf_vibrance: factor some calculations out of loop
Paul B Mahol [Sun, 5 May 2019 11:09:37 +0000 (13:09 +0200)]
avfilter/vf_vibrance: factor some calculations out of loop

5 months agoavcodec/h263dec: Fixed VA API, VDPAU, and VideoToolbox hardware acceleration due...
fumoboy007 [Mon, 29 Apr 2019 21:12:33 +0000 (14:12 -0700)]
avcodec/h263dec: Fixed VA API, VDPAU, and VideoToolbox hardware acceleration due to missing `hw_configs` property.

Bug originally introduced in commit 758fbc54fef2f31957b5c5f22e05e5fd9b04f631.

5 months agoconfigure: Do not overwrite src symlink if it already exists.
Carl Eugen Hoyos [Wed, 24 Apr 2019 22:42:48 +0000 (00:42 +0200)]
configure: Do not overwrite src symlink if it already exists.

Allows running fate from out-of-tree builds on wsl.

5 months agoavcodec/jvdec: Use ff_get_buffer() when the content is not reused
Michael Niedermayer [Fri, 3 May 2019 22:15:33 +0000 (00:15 +0200)]
avcodec/jvdec: Use ff_get_buffer() when the content is not reused

Fixes: Timeout (11sec -> 5sec)
Fixes: 14473/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JV_fuzzer-5761630857592832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/pnm_parser: clear state if buffer is discarded
Michael Niedermayer [Fri, 3 May 2019 21:21:19 +0000 (23:21 +0200)]
avcodec/pnm_parser: clear state if buffer is discarded

Fixes: Assertion failure
Fixes: 14484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5150016408125440

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 months agoavfilter/f_realtime: add option to scale speed
Moritz Barsnick [Wed, 1 May 2019 14:12:59 +0000 (16:12 +0200)]
avfilter/f_realtime: add option to scale speed

5 months agoavfilter/af_amultiply: use pts from frame from first input
Paul B Mahol [Sat, 4 May 2019 09:28:14 +0000 (11:28 +0200)]
avfilter/af_amultiply: use pts from frame from first input

5 months agoavfilter/vf_vmafmotion: remove unused header
Paul B Mahol [Sat, 4 May 2019 09:09:47 +0000 (11:09 +0200)]
avfilter/vf_vmafmotion: remove unused header

5 months agoavisynth: adapt 239d02eff3ffe9f7d40caa21dde50fb4a0e94c24 to dlsym
Stephen Hutchinson [Sat, 30 Mar 2019 21:46:32 +0000 (17:46 -0400)]
avisynth: adapt 239d02eff3ffe9f7d40caa21dde50fb4a0e94c24 to dlsym

This commit was merged in a couple years ago as a no-op because we
had already switched from GetProcAddress to dlsym some time before
that.  However, not applying the actual cast causes warnings about
FARPROC and when attempting to build FFmpeg in MSVC with AviSynth-GCC
32-bit compatibility, those FARPROC warnings turn into FARPROC errors.

5 months agodoc/general.texi: add note about 32-bit GCC builds of AviSynth+
Stephen Hutchinson [Mon, 1 Apr 2019 00:12:55 +0000 (20:12 -0400)]
doc/general.texi: add note about 32-bit GCC builds of AviSynth+

5 months agodoc/general.texi: update AviSynth+ reference page
Stephen Hutchinson [Sun, 24 Mar 2019 20:25:39 +0000 (16:25 -0400)]
doc/general.texi: update AviSynth+ reference page

Directed to the AviSynth+ entry on AviSynth Wiki rather than to
the github repository, since the wiki page is both more informative
and has the relevant Git/download links.  The github releases page
is little more than a changelog.

5 months agodoc/general.texi: remove note about regressed AviSynth+ header
Stephen Hutchinson [Sun, 24 Mar 2019 20:29:33 +0000 (16:29 -0400)]
doc/general.texi: remove note about regressed AviSynth+ header

It's been fixed both AviSynth+-side and locally.

5 months agolibavformat/avisynth: enable additional pix_fmts
Stephen Hutchinson [Sun, 24 Mar 2019 20:25:37 +0000 (16:25 -0400)]
libavformat/avisynth: enable additional pix_fmts

These pix_fmts have been added to FFmpeg in the 31 months since
commit 92916e8542e425ca20daddb490261a5818643206 added support for
the larger number of pix_fmts that AviSynth+ can use. They were
present in AviSynth+ even then, just not in libavutil.

5 months agocompat/avisynth: update headers
Stephen Hutchinson [Sat, 30 Mar 2019 21:45:15 +0000 (17:45 -0400)]
compat/avisynth: update headers

As part of the update, it is now possible to test 32-bit GCC builds
of AviSynth+ with FFmpeg by using the AVS_WIN32_GCC32 define. Due to
different calling conventions between MSVC and GCC regarding 32-bit
Windows, this is unfortunately necessary.

5 months agoavfilter/vf_blend: remove unused header
Paul B Mahol [Fri, 3 May 2019 18:48:18 +0000 (20:48 +0200)]
avfilter/vf_blend: remove unused header

5 months agoaacdec: use float_dsp in apply_independent_coupling
Lynne [Fri, 12 Apr 2019 21:50:59 +0000 (22:50 +0100)]
aacdec: use float_dsp in apply_independent_coupling

Could not be used in apply_dependent_coupling because of alignment issues.

5 months agoavformat/mov: set AVFMT_SEEK_TO_PTS flag
Gyan Doshi [Thu, 2 May 2019 09:30:02 +0000 (15:00 +0530)]
avformat/mov: set AVFMT_SEEK_TO_PTS flag

Ever since 59ad504696, the demuxer expects its seek arg to be PTS
and adjusts internally to search index by DTS.

5 months agox86/v210dec: use named registers
James Almer [Fri, 3 May 2019 04:17:12 +0000 (01:17 -0300)]
x86/v210dec: use named registers

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agox86/v210dec: don't reserve more xmm regs than needed
James Almer [Fri, 3 May 2019 04:09:46 +0000 (01:09 -0300)]
x86/v210dec: don't reserve more xmm regs than needed

Prevents pointless register saving on win64 for the sse3 and avx
versions of the function.

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agox86/v210dec: remove duplicate load instruction
James Almer [Fri, 3 May 2019 04:08:34 +0000 (01:08 -0300)]
x86/v210dec: remove duplicate load instruction

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agofate/checkasm: add missing v210dec test
James Almer [Fri, 3 May 2019 04:07:38 +0000 (01:07 -0300)]
fate/checkasm: add missing v210dec test

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavcodec/x86/v210: fix operands of vpblendd used in new avx2 code
James Darnley [Thu, 2 May 2019 19:16:58 +0000 (21:16 +0200)]
avcodec/x86/v210: fix operands of vpblendd used in new avx2 code

Assembly failed when using yasm rather than nasm.

5 months agolavf/webm_chunk: Respect buffer size
Andreas Rheinhardt [Fri, 19 Apr 2019 22:03:14 +0000 (00:03 +0200)]
lavf/webm_chunk: Respect buffer size

The last argument of av_strlcpy is supposed to contain the size of the
destination buffer, but it was filled with the size of the source
string, effectively negating its very purpose.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agolibavcodec Adding ff_v210_planar_unpack AVX2
Michael Stoner [Sat, 16 Mar 2019 16:24:47 +0000 (09:24 -0700)]
libavcodec Adding ff_v210_planar_unpack AVX2

Replaced VSHUFPS with VPBLENDD to relieve port 5 bottleneck
AVX2 is 1.4x faster than AVX

5 months agocheckasm: add test for v210dec
James Darnley [Mon, 4 Mar 2019 18:50:35 +0000 (19:50 +0100)]
checkasm: add test for v210dec

5 months agoavcodec/v210dec: move DSP function setting into dedicated function
James Darnley [Mon, 4 Mar 2019 22:54:58 +0000 (23:54 +0100)]
avcodec/v210dec: move DSP function setting into dedicated function

Prepare for checkasm test.

5 months agoMerge commit 'c4642788e83b0858bca449f9b6e71ddb015dfa5d'
James Almer [Thu, 2 May 2019 16:50:31 +0000 (13:50 -0300)]
Merge commit 'c4642788e83b0858bca449f9b6e71ddb015dfa5d'

* commit 'c4642788e83b0858bca449f9b6e71ddb015dfa5d':
  time_internal: Prefix fallback versions of gmtime_r/localtime_r with ff_

Merged-by: James Almer <jamrial@gmail.com>
5 months agoMerge commit '9485cce6d55baf547e92ef1f54cad117f2a38287'
James Almer [Thu, 2 May 2019 16:48:43 +0000 (13:48 -0300)]
Merge commit '9485cce6d55baf547e92ef1f54cad117f2a38287'

* commit '9485cce6d55baf547e92ef1f54cad117f2a38287':
  time_internal: Do not attempt to override *time_r() macros

This commit is a noop, see a604de4fd89e8fe37d2f8163282060fcaa64ee3e

Merged-by: James Almer <jamrial@gmail.com>
5 months agoMerge commit 'c93e92f2b25f4174350ded3f59ad117ec8eb1fe4'
James Almer [Thu, 2 May 2019 16:46:31 +0000 (13:46 -0300)]
Merge commit 'c93e92f2b25f4174350ded3f59ad117ec8eb1fe4'

* commit 'c93e92f2b25f4174350ded3f59ad117ec8eb1fe4':
  configure: Include time.h when checking for gmtime_r and localtime_r

This commit is a noop, see 1b4dd59e5fbdebb8d9f13ad2dbdaa0179d0cce57

Merged-by: James Almer <jamrial@gmail.com>
5 months agoMerge commit 'c0bd865ad60da31282c5d8e1000c98366249c31e'
James Almer [Thu, 2 May 2019 16:11:21 +0000 (13:11 -0300)]
Merge commit 'c0bd865ad60da31282c5d8e1000c98366249c31e'

* commit 'c0bd865ad60da31282c5d8e1000c98366249c31e':
  configure: Add -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 for mingw as well

Merged-by: James Almer <jamrial@gmail.com>
5 months agoMerge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'
James Almer [Thu, 2 May 2019 16:01:36 +0000 (13:01 -0300)]
Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'

* commit '1e56173515826aa4d680d3b216d80a3879ed1c68':
  rtsp: add pkt_size option

Merged-by: James Almer <jamrial@gmail.com>
5 months agoavcodec/wavpackenc: use ff_clz()
Paul B Mahol [Thu, 2 May 2019 13:35:09 +0000 (15:35 +0200)]
avcodec/wavpackenc: use ff_clz()

5 months agoavcodec/cinepak: Add missing const
Michael Niedermayer [Thu, 2 May 2019 06:00:46 +0000 (08:00 +0200)]
avcodec/cinepak: Add missing const

Found-by: <mkver>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavfilter/vf_tonemap: add slice threading
Paul B Mahol [Tue, 30 Apr 2019 09:59:51 +0000 (11:59 +0200)]
avfilter/vf_tonemap: add slice threading

5 months agoavfilter/avf_abitscope: switch to activate
Paul B Mahol [Wed, 1 May 2019 19:17:55 +0000 (21:17 +0200)]
avfilter/avf_abitscope: switch to activate

5 months agoavfilter/af_biquads: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:55:34 +0000 (12:55 +0200)]
avfilter/af_biquads: add timeline support

5 months agoavfilter/af_stereowiden: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:40:25 +0000 (12:40 +0200)]
avfilter/af_stereowiden: add timeline support

5 months agoavfilter/af_extrastereo: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:33:56 +0000 (12:33 +0200)]
avfilter/af_extrastereo: add timeline support

5 months agoavfilter/af_crossfeed: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:31:52 +0000 (12:31 +0200)]
avfilter/af_crossfeed: add timeline support

5 months agoavcodec/agm: Check output size before allocation
Michael Niedermayer [Wed, 24 Apr 2019 15:41:13 +0000 (17:41 +0200)]
avcodec/agm: Check output size before allocation

Fixes: OOM
Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/truemotion2: Fix 2 integer overflows in tm2_update_block()
Michael Niedermayer [Fri, 19 Apr 2019 23:05:44 +0000 (01:05 +0200)]
avcodec/truemotion2: Fix 2 integer overflows in tm2_update_block()

Fixes: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int'
Fixes: 14107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5694078680825856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/cinepak: Check slice_size before allocating image
Michael Niedermayer [Sat, 27 Apr 2019 21:37:26 +0000 (23:37 +0200)]
avcodec/cinepak: Check slice_size before allocating image

Fixes: Timeout (16sec -> 125msec)
Fixes: 14283/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5742851457024000

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 months agoavfilter/avf_showspectrum: convert some doubles to floats
Paul B Mahol [Tue, 30 Apr 2019 18:33:14 +0000 (20:33 +0200)]
avfilter/avf_showspectrum: convert some doubles to floats

5 months agoswscale/ppc: VSX-optimize hscale_fast
Lauri Kasanen [Tue, 23 Apr 2019 11:54:46 +0000 (14:54 +0300)]
swscale/ppc: VSX-optimize hscale_fast

./ffmpeg -f lavfi -i yuvtestsrc=duration=1:size=1200x1440 -sws_flags fast_bilinear \
        -s 2400x720 -f rawvideo -vframes 5 -pix_fmt abgr -nostats test.raw

4.27 speedup for hyscale_fast:
  24796 UNITS in hyscale_fast,    4096 runs,      0 skips
   5797 UNITS in hyscale_fast,    4096 runs,      0 skips

4.48 speedup for hcscale_fast:
  19911 UNITS in hcscale_fast,    4095 runs,      1 skips
   4437 UNITS in hcscale_fast,    4096 runs,      0 skips

5 months agolavu/hwcontext_qsv: Fix the realign check for hwupload
Linjie Fu [Mon, 15 Apr 2019 13:23:40 +0000 (21:23 +0800)]
lavu/hwcontext_qsv: Fix the realign check for hwupload

Fix the aligned check in hwupload, input surface should be 16 aligned
too.

Partly fix #7830.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
5 months agoavfilter/af_asoftclip: add timeline support
Paul B Mahol [Tue, 30 Apr 2019 09:02:36 +0000 (11:02 +0200)]
avfilter/af_asoftclip: add timeline support

5 months agoavfilter/af_dynaudnorm: add timeline support
Paul B Mahol [Tue, 30 Apr 2019 08:54:45 +0000 (10:54 +0200)]
avfilter/af_dynaudnorm: add timeline support

5 months agoavfilter/af_dynaudnorm: always update delay when flushing
Paul B Mahol [Tue, 30 Apr 2019 08:05:23 +0000 (10:05 +0200)]
avfilter/af_dynaudnorm: always update delay when flushing

5 months agoavfilter/vf_normalize: add timeline support
Paul B Mahol [Mon, 29 Apr 2019 21:28:40 +0000 (23:28 +0200)]
avfilter/vf_normalize: add timeline support

5 months agoavfilter/af_adeclick: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 20:19:15 +0000 (22:19 +0200)]
avfilter/af_adeclick: switch to activate

5 months agoavfilter/af_rubberband: make use of initial input timestamp
Paul B Mahol [Mon, 29 Apr 2019 19:11:46 +0000 (21:11 +0200)]
avfilter/af_rubberband: make use of initial input timestamp

5 months agoavfilter/avf_showwaves: Add draw mode also to showwavespic filter
Martin Vobruba [Fri, 26 Apr 2019 06:17:11 +0000 (08:17 +0200)]
avfilter/avf_showwaves: Add draw mode also to showwavespic filter

See commit a8c2d375ca68b7f001564ced14d8ac0757f53a29

5 months agoavfilter/f_ebur128: use correct type for chl
Paul B Mahol [Mon, 29 Apr 2019 14:46:42 +0000 (16:46 +0200)]
avfilter/f_ebur128: use correct type for chl

5 months agoavfilter/af_dynaudnorm: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 12:53:26 +0000 (14:53 +0200)]
avfilter/af_dynaudnorm: switch to activate

5 months agoavfilter/af_rubberband: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 12:22:13 +0000 (14:22 +0200)]
avfilter/af_rubberband: switch to activate

5 months agoavfilter/af_rubberband: check if rbs is valid
Paul B Mahol [Mon, 29 Apr 2019 11:47:46 +0000 (13:47 +0200)]
avfilter/af_rubberband: check if rbs is valid

5 months agoavfilter/af_sofalizer: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 11:35:04 +0000 (13:35 +0200)]
avfilter/af_sofalizer: switch to activate

5 months agoavfilter/avf_avectorscope: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 10:52:50 +0000 (12:52 +0200)]
avfilter/avf_avectorscope: switch to activate

5 months agoavfilter/avf_ahistogram: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 10:43:18 +0000 (12:43 +0200)]
avfilter/avf_ahistogram: switch to activate

5 months agoavfilter/avf_ahistogram: properly name pads
Paul B Mahol [Mon, 29 Apr 2019 10:28:38 +0000 (12:28 +0200)]
avfilter/avf_ahistogram: properly name pads

5 months agoavfilter/avf_showspectrum: add log scale for frequency plot
Paul B Mahol [Sun, 28 Apr 2019 18:15:17 +0000 (20:15 +0200)]
avfilter/avf_showspectrum: add log scale for frequency plot

5 months agoavfilter/af_astats: fix msvc compile error
Matthias Troffaes [Mon, 29 Apr 2019 09:03:52 +0000 (11:03 +0200)]
avfilter/af_astats: fix msvc compile error

MSVC requires an explicit cast from void * to void when applying the
ternary conditional operator to switch between methods that return
void.

5 months agoavcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit
James Almer [Wed, 17 Apr 2019 02:00:49 +0000 (23:00 -0300)]
avcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit

This follows the spec definition, and removes a field from the relevant
structs.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavcodec/cbs_h2645: add macros to read and write fields with no custom range of values
James Almer [Wed, 17 Apr 2019 01:32:05 +0000 (22:32 -0300)]
avcodec/cbs_h2645: add macros to read and write fields with no custom range of values

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU
James Almer [Wed, 17 Apr 2019 04:23:36 +0000 (01:23 -0300)]
avcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU

Also infer the value time_offset_length as 0 when it's not present.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavformat/mxfdec: fix and enhance RIP KLV length checks
Marton Balint [Thu, 4 Apr 2019 21:08:42 +0000 (23:08 +0200)]
avformat/mxfdec: fix and enhance RIP KLV length checks

KLV length is BER encoded (variable size), but the code assumed the encoding to
always use 4 bytes.

Fixes parsing Random Index Pack in samples/MXF/issue2160/PW0805A0V01.4C5B5636.EFA330.mxf.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavformat/mxfdec: take into account run-in in find_partition_by_offset
Marton Balint [Tue, 2 Apr 2019 23:46:59 +0000 (01:46 +0200)]
avformat/mxfdec: take into account run-in in find_partition_by_offset

Also rename the function to find_partition_by_absolute_offset to make it clear
offset is absolute.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid
Marton Balint [Sun, 7 Apr 2019 00:27:49 +0000 (02:27 +0200)]
avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid

This affects the following samples:

samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf
samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf
samples/ffmpeg-bugs/trac/ticket5016/r0.mxf
samples/ffmpeg-bugs/trac/ticket5016/r1.mxf
samples/ffmpeg-bugs/trac/ticket5316/hq.MXF
samples/ffmpeg-bugs/trac/ticket5316/hqx.MXF

Some AVPacket->pos values are changed because for frame wrapped tracks we point
to the KLV offset and not the data.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavformat/mxfdec: rework mxf_essence_container_end
Marton Balint [Sun, 7 Apr 2019 00:06:35 +0000 (02:06 +0200)]
avformat/mxfdec: rework mxf_essence_container_end

We find the last essence container much faster if we go through the partitions
backwards...

Signed-off-by: Marton Balint <cus@passwd.hu>
5 months agoavcodec/scpr: avoid using uninitialized value
Paul B Mahol [Sun, 28 Apr 2019 09:06:36 +0000 (11:06 +0200)]
avcodec/scpr: avoid using uninitialized value

Fixes #7872.

5 months agoavfilter/vf_lut3d: increase MAX_LEVEL
Paul B Mahol [Sun, 28 Apr 2019 08:52:21 +0000 (10:52 +0200)]
avfilter/vf_lut3d: increase MAX_LEVEL

5 months agoavfilter/vf_lut3d: fix range domain processing for .cube format
Paul B Mahol [Thu, 25 Apr 2019 12:53:53 +0000 (14:53 +0200)]
avfilter/vf_lut3d: fix range domain processing for .cube format

The ranges are for input, not for output.

5 months agoavcodec/pnm_parser: Remember the length already scanned for ascii images
Michael Niedermayer [Sat, 27 Apr 2019 12:08:07 +0000 (14:08 +0200)]
avcodec/pnm_parser: Remember the length already scanned for ascii images

Fixes: speed regression with xmap_samsung_gear_2560x1280.pgm
Found-by: Michael Koch
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/pnm_parser: Remember the size of the image and do not reparse the header
Michael Niedermayer [Wed, 24 Apr 2019 19:14:19 +0000 (21:14 +0200)]
avcodec/pnm_parser: Remember the size of the image and do not reparse the header

Fixes: Timeout (11sec -> 60ms)
Fixes: 14270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5734809634078720

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 months agoavcodec/scpr3: add missing check for decode_value3() return value
James Almer [Fri, 26 Apr 2019 15:31:19 +0000 (12:31 -0300)]
avcodec/scpr3: add missing check for decode_value3() return value

Fixes ticket #7866.

Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavformat/microdvddec: skip empty lines
Paul B Mahol [Sat, 27 Apr 2019 10:47:39 +0000 (12:47 +0200)]
avformat/microdvddec: skip empty lines

5 months agoavformat/subtitles: ignore extra '\r' at line endings
Paul B Mahol [Thu, 25 Apr 2019 21:21:38 +0000 (23:21 +0200)]
avformat/subtitles: ignore extra '\r' at line endings

5 months agoavcodec/nvenc: fix indentation
Timo Rothenpieler [Wed, 24 Apr 2019 20:47:24 +0000 (22:47 +0200)]
avcodec/nvenc: fix indentation

5 months agoavcodec/nvenc: only unregister input resources when absolutely needed
Timo Rothenpieler [Wed, 24 Apr 2019 17:00:25 +0000 (19:00 +0200)]
avcodec/nvenc: only unregister input resources when absolutely needed

This reverts nvenc to old behaviour, which in some super rare edge cases
performs better.
The implication of this is that any potential API user who relies on
nvenc cleaning up every frames device resources after it's done using
them will have to change their usage pattern.

That should not be a problem, since pretty much every normal usage
pattern automatically implies that surfaces are reused from a common
pool, since constant re-allocation is also very expensive.

5 months agolavf/hls: Remove HLSContext.strict_std_compliance field
Jun Zhao [Tue, 16 Apr 2019 04:54:58 +0000 (12:54 +0800)]
lavf/hls: Remove HLSContext.strict_std_compliance field

After the commit 9f61abc8111, we can use AVFormatContext.strict_std_compliance
instead of HLSContext.strict_std_compliance to avoid the code redundancy.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 months agox86/opusdsp: replace loads with shuffles
Lynne [Wed, 24 Apr 2019 11:19:48 +0000 (12:19 +0100)]
x86/opusdsp: replace loads with shuffles

Has a slight speedup.
Can't be carried over to aarch64, since it has no shufps-like instruction.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 months agoavfilter: add audio soft clip filter
Paul B Mahol [Tue, 16 Apr 2019 17:55:27 +0000 (19:55 +0200)]
avfilter: add audio soft clip filter

5 months agoavfilter/vf_stack: use time_base from framesync
Paul B Mahol [Thu, 25 Apr 2019 19:14:48 +0000 (21:14 +0200)]
avfilter/vf_stack: use time_base from framesync

Fixes non-monotonous timestamps.

5 months agoavcodec/gdv: Check input palette size before rescale()
Michael Niedermayer [Thu, 25 Apr 2019 17:18:08 +0000 (19:18 +0200)]
avcodec/gdv: Check input palette size before rescale()

Fixes: Timeout (22sec -> 11sec)
Fixes: 13576/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5681024577568768

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 months agoavfilter/af_astats: count number of NaNs/Infs/denormals for floating-point audio too
Paul B Mahol [Mon, 22 Apr 2019 09:47:04 +0000 (11:47 +0200)]
avfilter/af_astats: count number of NaNs/Infs/denormals for floating-point audio too

5 months agolavfi/opencl: add more opencl helper macro
Ruiling Song [Fri, 12 Apr 2019 08:27:54 +0000 (16:27 +0800)]
lavfi/opencl: add more opencl helper macro

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 months agoavcodec/jpeg2000dec: Fix return type of get_plt()
Michael Niedermayer [Thu, 25 Apr 2019 16:57:26 +0000 (18:57 +0200)]
avcodec/jpeg2000dec: Fix return type of get_plt()

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/jpeg2000dec: Check PLT data somewhat
Michael Niedermayer [Tue, 16 Apr 2019 13:30:50 +0000 (15:30 +0200)]
avcodec/jpeg2000dec: Check PLT data somewhat

Fixes: Timeout (21sec -> 0.6sec)
Fixes: 14134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5768371078955008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months agoavcodec/jpeg2000dec: Replace the step_x/y assert by a check in the CPRL case as with...
Michael Niedermayer [Mon, 15 Apr 2019 22:54:09 +0000 (00:54 +0200)]
avcodec/jpeg2000dec: Replace the step_x/y assert by a check in the CPRL case as with the PCRL case

Fixes: assertion failure
Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>