ffmpeg.git
17 months agoffmpeg_hw: Mark some strings as const
Mark Thompson [Mon, 6 May 2019 14:29:01 +0000 (15:29 +0100)]
ffmpeg_hw: Mark some strings as const

17 months agovaapi_encode: Warn if input has cropping information
Mark Thompson [Sun, 31 Mar 2019 14:39:44 +0000 (15:39 +0100)]
vaapi_encode: Warn if input has cropping information

Cropping is not supported by VAAPI encode.

17 months agovf_scale_vaapi: Add options to configure output colour properties
Mark Thompson [Thu, 28 Feb 2019 00:38:09 +0000 (00:38 +0000)]
vf_scale_vaapi: Add options to configure output colour properties

The "out_color_matrix" and "out_range" properties match the same options
in vf_scale; the others attempt to follow the same pattern.

17 months agolavfi/vaapi: Improve support for colour properties
Mark Thompson [Thu, 28 Feb 2019 00:38:08 +0000 (00:38 +0000)]
lavfi/vaapi: Improve support for colour properties

Attempts to pick the set of supported colour properties best matching the
input.  Output is then set with the same values, except for the colour
matrix which may change when converting between RGB and YUV.

17 months agovf_misc_vaapi: Add missing return value checks
Mark Thompson [Sun, 31 Mar 2019 14:39:40 +0000 (15:39 +0100)]
vf_misc_vaapi: Add missing return value checks

Parameter buffer creation can fail.

17 months agolavfi/vaapi: Factorise out common code for parameter buffer setup
Mark Thompson [Sun, 31 Mar 2019 14:39:35 +0000 (15:39 +0100)]
lavfi/vaapi: Factorise out common code for parameter buffer setup

Also enables cropping on all VAAPI filters, inherited from the existing
support in scale_vaapi.

17 months agodoc/indevs: Add example using cropping to capture part of a plane
Mark Thompson [Sat, 23 Mar 2019 16:18:49 +0000 (16:18 +0000)]
doc/indevs: Add example using cropping to capture part of a plane

17 months agovf_crop: Add support for cropping hardware frames
Mark Thompson [Sat, 23 Mar 2019 16:18:48 +0000 (16:18 +0000)]
vf_crop: Add support for cropping hardware frames

Set the cropping fields in the AVFrame.

17 months agodoc/muxers: fix typo of the hls var_stream_map example
Steven Liu [Sun, 2 Jun 2019 13:53:11 +0000 (21:53 +0800)]
doc/muxers: fix typo of the hls var_stream_map example

And fix typo of the 1833 of hlsenc.c

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <lq@onvideo.cn>
17 months agoavfilter/af_anlmdn: avoid creating frames with zero samples
Paul B Mahol [Sun, 2 Jun 2019 11:00:35 +0000 (13:00 +0200)]
avfilter/af_anlmdn: avoid creating frames with zero samples

17 months agoavfilter/af_anlmdn: try to recover when cache becomes negative
Paul B Mahol [Sun, 2 Jun 2019 10:58:07 +0000 (12:58 +0200)]
avfilter/af_anlmdn: try to recover when cache becomes negative

17 months agoavfilter/af_anlmdn: add smooth factor option
Paul B Mahol [Sun, 2 Jun 2019 09:58:49 +0000 (11:58 +0200)]
avfilter/af_anlmdn: add smooth factor option

17 months agoavfilter/vf_xmedian: remove limitation of only odd number of inputs
Paul B Mahol [Sun, 2 Jun 2019 09:03:08 +0000 (11:03 +0200)]
avfilter/vf_xmedian: remove limitation of only odd number of inputs

17 months agodoc/filters: move reference to framesync options from lut3d to haldclut
Marton Balint [Fri, 31 May 2019 21:05:52 +0000 (23:05 +0200)]
doc/filters: move reference to framesync options from lut3d to haldclut

Signed-off-by: Marton Balint <cus@passwd.hu>
18 months agoavutil/dynarry.h: fix comment grammar mistakes of FF_DYNARRAY_ADD
Steven Liu [Thu, 30 May 2019 14:27:28 +0000 (22:27 +0800)]
avutil/dynarry.h: fix comment grammar mistakes of FF_DYNARRAY_ADD

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
18 months agoavcodec/gdv: Check remaining output after decode 5/6/8/
Michael Niedermayer [Tue, 28 May 2019 23:12:39 +0000 (01:12 +0200)]
avcodec/gdv: Check remaining output after decode 5/6/8/

Improves: Timeout (355sec -> 97sec)
Improves: 14709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5704215281795072

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
18 months agotools: Add fuzzer for demuxers
Michael Niedermayer [Mon, 27 May 2019 19:50:08 +0000 (21:50 +0200)]
tools: Add fuzzer for demuxers

This is based on target_dec_fuzzer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agolavfi/showspatial: Remove two write-only variables.
Carl Eugen Hoyos [Fri, 31 May 2019 20:30:46 +0000 (22:30 +0200)]
lavfi/showspatial: Remove two write-only variables.

Fixes two warnings:
libavfilter/avf_showspatial.c:157:26: warning: variable â€˜w’ set but not used
libavfilter/avf_showspatial.c:157:23: warning: variable â€˜h’ set but not used

18 months agoavfilter: add showspatial multimedia filter
Paul B Mahol [Tue, 30 Apr 2019 14:44:28 +0000 (16:44 +0200)]
avfilter: add showspatial multimedia filter

18 months agoavcodec/tiff: Recognize DNG/CinemaDNG images
Nick Renieris [Thu, 30 May 2019 10:42:42 +0000 (13:42 +0300)]
avcodec/tiff: Recognize DNG/CinemaDNG images

Additionally:
- Renamed TIFF_WHITE_LEVEL to DNG_WHITE_LEVEL since it is specified
  in the DNG spec.
- Added/changed some comments to be more precise in differentiating
  between TIFF, TIFF/EP and DNG values.

Related to ticket: https://trac.ffmpeg.org/ticket/4364

Signed-off-by: Nick Renieris <velocityra@gmail.com>
18 months agolibavcodec/tiff: Process SubIFDs tag with multiple entries
Nick Renieris [Thu, 30 May 2019 10:42:41 +0000 (13:42 +0300)]
libavcodec/tiff: Process SubIFDs tag with multiple entries

SubIFDs that were part of more than single-sized "SubIFDs" tags were
being ignored due to existing code ignoring that case.

This patch makes is so the first entry is read, which is not ideal
but enough for some DNG images present in the wild to be decodeable
More specifically, the first SubIFD which we would process with this
patch is the main image and the second one is a second thumbnail,
which is not as important to decode.

In DNG images with the .tiff extension, it solves the issue where
the TIFF thumbnail in IFD 0 was incorrectly parsed (related
confusion: [1]).

Embedded thumbnails for DNG images can still be decoded with the
"-thumbnail" option.

Related to ticket: https://trac.ffmpeg.org/ticket/4364

[1]: https://superuser.com/questions/546879/creating-video-from-dng-images-with-ffmpeg

Signed-off-by: Nick Renieris <velocityra@gmail.com>
18 months agoavcodec/tiff: Option to decode embedded thumbnail
Nick Renieris [Thu, 30 May 2019 10:42:40 +0000 (13:42 +0300)]
avcodec/tiff: Option to decode embedded thumbnail

Adds the "-thumbnail" option, that works like the current "-subifd"
option, but only for non-full-sized images.

This is particularly useful for DNG images (see next commit) that
have SubIFDs that are not necessarily thumbnails.

Signed-off-by: Nick Renieris <velocityra@gmail.com>
18 months agolavf/qsvvpp: avoid the double-free when working in sys memory mode
Linjie Fu [Mon, 15 Apr 2019 13:24:06 +0000 (21:24 +0800)]
lavf/qsvvpp: avoid the double-free when working in sys memory mode

Currently, picref will be freed by calling av_frame_free(&picref) in
submit_frame() in qsvvpp.c when working in system memory mode,and normally it
is freed in filter_frame() in vf_vpp_qsv.c when working in other modes.

Double free happens when working in system memory mode, remove to
fix the memory issue.

Reproduce:
ffmpeg -init_hw_device qsv=foo -filter_hw_device foo -f rawvideo -pix_fmt nv12 -s:v 852x480 \
-i 852x480.nv12 -vf 'vpp_qsv=w=500:h=400' -f rawvideo -pix_fmt nv12 qsv.nv12

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
18 months agoavformat/gif: abort early if nothing was written yet
Paul B Mahol [Wed, 29 May 2019 08:57:18 +0000 (10:57 +0200)]
avformat/gif: abort early if nothing was written yet

Fixes crash when writting trailer without any previous packets.

18 months agoavcodec/cbs_mpeg2: fix leak of extra_information_slice buffer in cbs_mpeg2_read_slice...
James Almer [Wed, 22 May 2019 01:04:38 +0000 (03:04 +0200)]
avcodec/cbs_mpeg2: fix leak of extra_information_slice buffer in cbs_mpeg2_read_slice_header()

cbs_mpeg2_free_slice() calls av_buffer_unref() on extra_information_ref,
meaning allocating with av_malloc() was not the intention.

Signed-off-by: James Almer <jamrial@gmail.com>
18 months agocbs_mpeg2: Correct error codes
Andreas Rheinhardt [Wed, 22 May 2019 01:04:35 +0000 (03:04 +0200)]
cbs_mpeg2: Correct error codes

Up until now, things that are merely unsupported by cbs_mpeg2 have been
declared to be invalid input. This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
18 months agocbs_mpeg2: Fix storage type for frame_centre_*_offset
Andreas Rheinhardt [Wed, 22 May 2019 01:04:34 +0000 (03:04 +0200)]
cbs_mpeg2: Fix storage type for frame_centre_*_offset

The frame_centre_horizontal/vertical_offset values contained in picture
display extensions are actually signed values (i.e. it is possible to
indicate that the display device should add black bars/pillars).

The files sony-ct3.bs and tcela-6.bits (which are both used in fate
tests for mpeg2_metadata) contain picture display extensions; the former
even contains a negative frame_centre_vertical_offset. Fortunately, the
old code did not damage the picture display extensions when one did a
cycle of reading and writing. For the same reason the fate tests needn't
be updated either.

Furthermore these fields now use the trace output for matrices.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
18 months agocbs_mpeg2: Improve checks for invalid values
Andreas Rheinhardt [Wed, 22 May 2019 01:04:32 +0000 (03:04 +0200)]
cbs_mpeg2: Improve checks for invalid values

MPEG-2 contains several elements that mustn't be zero according to the
specifications: horizontal/vertical_size_value, aspect_ratio_information,
frame_rate_code, the quantiser matrices, the colour_description
elements, picture_coding_type, the f_code[r][s] values and
quantiser_scale_code. It is now checked that the invalid values don't
occur.

The colour_description elements are treated specially in this regard:
Given that there are files in the wild which use illegal values for the
colour_description elements (some of them created by mpeg2_metadata),
they will be corrected to the value meaning "unknown" (namely 2) during
reading. This has been done in such a way that trace_headers will
nevertheless report the original value, together with a message about
the fixup.

Furthermore, the trace_headers output of user_data has been beautified.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
18 months agocbs_mpeg2: Correct and use enum values
Andreas Rheinhardt [Wed, 22 May 2019 01:04:31 +0000 (03:04 +0200)]
cbs_mpeg2: Correct and use enum values

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
18 months agoavfilter/avf_aphasemeter: make use of av_rescale
Paul B Mahol [Tue, 28 May 2019 09:10:51 +0000 (11:10 +0200)]
avfilter/avf_aphasemeter: make use of av_rescale

18 months agoavfilter/avf_showwaves: make use of av_rescale_q
Paul B Mahol [Tue, 28 May 2019 09:07:47 +0000 (11:07 +0200)]
avfilter/avf_showwaves: make use of av_rescale_q

18 months agoavfilter/avf_ahistogram: make use of av_rescale
Paul B Mahol [Tue, 28 May 2019 08:51:57 +0000 (10:51 +0200)]
avfilter/avf_ahistogram: make use of av_rescale

18 months agoavfilter/avf_showvolume: make use of av_rescale
Paul B Mahol [Tue, 28 May 2019 08:49:09 +0000 (10:49 +0200)]
avfilter/avf_showvolume: make use of av_rescale

18 months agoavfilter/avf_abitscope: make use of av_rescale
Paul B Mahol [Tue, 28 May 2019 08:46:38 +0000 (10:46 +0200)]
avfilter/avf_abitscope: make use of av_rescale

18 months agoavfilter/avf_avectorscope: make use of av_rescale
Paul B Mahol [Tue, 28 May 2019 08:43:25 +0000 (10:43 +0200)]
avfilter/avf_avectorscope: make use of av_rescale

18 months agoavformat/segment: populate empty outer stream extradata from packet
Gyan Doshi [Tue, 21 May 2019 11:45:54 +0000 (17:15 +0530)]
avformat/segment: populate empty outer stream extradata from packet

At present, if the outer stream extradata is empty but first packet
has extradata as a side data element, then only the first segment's
muxer instance may be able to extract this side data and use it.
For all other segments, extradata in packet side data could be missing
and generated segments may be invalid or unplayable in some apps
e.g. for an ADTS AAC stream segmented to MP4, the adtstoasc BSF will
add extradata to the first packet. The MOV muxer for the first segment
will add this to codecpar for the inner stream and write
Decoder Specific Information within the esds box. For other segments,
their esds' will not have this decSpecificInfo and they can't be opened
in Quicktime player or by services like nginx-vod-module.

18 months agolavfi/sr: Change the backend type from flags to int
Jun Zhao [Sat, 25 May 2019 11:59:42 +0000 (19:59 +0800)]
lavfi/sr: Change the backend type from flags to int

native and tensorflow is exclusive, so change the type from
flags to int.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
18 months agolavfi/sr: Remove slice thread flag
Jun Zhao [Sat, 25 May 2019 12:09:41 +0000 (20:09 +0800)]
lavfi/sr: Remove slice thread flag

sr didn't enable the slice threading, so remove the flag

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
18 months agodoc/encoders: Document eld_v2 option for libfdk_aac encoder.
Jun Zhao [Fri, 24 May 2019 03:09:11 +0000 (11:09 +0800)]
doc/encoders: Document eld_v2 option for libfdk_aac encoder.

Document eld_v2 option for libfdk_aac encoder.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
18 months agodoc/build_system: Document checkheaders/alltools and consistency fixes
Jun Zhao [Wed, 22 May 2019 04:46:05 +0000 (12:46 +0800)]
doc/build_system: Document checkheaders/alltools and consistency fixes

Document checkheaders/alltools and consistency fixes

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
18 months agoavformat/mp3enc: Avoid SEEK_END as it is unsupported
Michael Niedermayer [Tue, 14 May 2019 10:12:29 +0000 (12:12 +0200)]
avformat/mp3enc: Avoid SEEK_END as it is unsupported

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/diracdec: Check for arith decoder errors in dirac_unpack_block_motion_data()
Michael Niedermayer [Sun, 12 May 2019 17:43:08 +0000 (19:43 +0200)]
avcodec/diracdec: Check for arith decoder errors in dirac_unpack_block_motion_data()

Fixes: Timeout (54sec -> 188ms)
Fixes: 14585/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5649933052411904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/truemotion2: Fix several integer overflows in tm2_update_block()
Michael Niedermayer [Sat, 4 May 2019 22:31:24 +0000 (00:31 +0200)]
avcodec/truemotion2: Fix several integer overflows in tm2_update_block()

Fixes: signed integer overflow: -1877966852 + -469491713 cannot be represented in type 'int'
Fixes: 14561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5167608359288832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavcodec/ffv1dec_template: Optimize common case in run mode
Michael Niedermayer [Wed, 22 May 2019 23:06:58 +0000 (01:06 +0200)]
avcodec/ffv1dec_template: Optimize common case in run mode

Fixes: Timeout (14sec -> 9sec)
Fixes: 13398/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5664106709778432

decode_line() becomes 1% faster for fate/vsynth2-ffv1.avi
for another fate sample there is a 0.5% speedup
the effect should be bigger for files with "flat" colored areas
the new faster branch is used in 97-100% of the cases in fate samples
compared to the older more complex (which i tested)

vsynth3-ffv1-v3-bgr0.avi had the lowest percentual useage of about 97%

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18 months agoavfilter/avf_showvolume: switch to activate
Paul B Mahol [Mon, 27 May 2019 16:44:19 +0000 (18:44 +0200)]
avfilter/avf_showvolume: switch to activate

18 months agoavcodec/libdav1d: add support for RGB streams
James Almer [Tue, 21 May 2019 17:57:39 +0000 (14:57 -0300)]
avcodec/libdav1d: add support for RGB streams

Signed-off-by: James Almer <jamrial@gmail.com>
18 months 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>
18 months 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>
18 months 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>
18 months 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

18 months 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>
18 months 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>
18 months 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

18 months 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

18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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.

18 months 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

18 months 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>
18 months 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

18 months 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

18 months 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

18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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>
18 months 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

18 months 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>
18 months 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>
18 months 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>
18 months 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

18 months 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>
18 months 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>
18 months 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>
18 months 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

18 months 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>
18 months 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>
18 months 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.

18 months 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>
18 months 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.

18 months 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.

18 months 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.

18 months 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

18 months 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

18 months 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

18 months 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>