]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agoavcodec/v4l2_m2m_enc: fix indentation and add M2MENC_CLASS macro
Aman Gupta [Tue, 27 Aug 2019 18:59:50 +0000 (11:59 -0700)]
avcodec/v4l2_m2m_enc: fix indentation and add M2MENC_CLASS macro

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m_dec: fix indentation and add M2MDEC_CLASS macro
Lukas Rusak [Wed, 25 Apr 2018 05:48:23 +0000 (22:48 -0700)]
avcodec/v4l2_m2m_dec: fix indentation and add M2MDEC_CLASS macro

This just makes the M2MDEC_CLASS similar to how it is done in rkmpp. It looks
clean and has proper indentation

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: decouple v4l2_m2m helpers from AVCodecContext
Aman Gupta [Fri, 23 Aug 2019 19:56:33 +0000 (12:56 -0700)]
avcodec/v4l2_m2m: decouple v4l2_m2m helpers from AVCodecContext

This will allow re-use of the m2m backend with AVFilterContext

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_buffers: Add handling for NV21 and YUV420P
Dave Stevenson [Thu, 22 Mar 2018 16:01:35 +0000 (16:01 +0000)]
avcodec/v4l2_buffers: Add handling for NV21 and YUV420P

The single planar support was for NV12 only.
Add NV21 and YUV420P support.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: fix av_pix_fmt changing when multiple /dev/video* devices are probed
Aman Gupta [Wed, 28 Aug 2019 00:21:36 +0000 (17:21 -0700)]
avcodec/v4l2_m2m: fix av_pix_fmt changing when multiple /dev/video* devices are probed

On the RPI, three different /dev/video devices exist (decoder, scaler, encoder).

When probing the devices in order, the originally requested pix fmt
would be mutated causing the wrong one to be chosen when a matching
device was finally found.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: disable info logging during device probe
Aman Gupta [Thu, 22 Aug 2019 18:33:24 +0000 (11:33 -0700)]
avcodec/v4l2_m2m: disable info logging during device probe

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m_enc: add support for -force_key_frames
Aman Gupta [Thu, 22 Aug 2019 22:04:48 +0000 (15:04 -0700)]
avcodec/v4l2_m2m_enc: add support for -force_key_frames

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavfilter/vf_v360: remove w/h changing for flat output
Paul B Mahol [Tue, 10 Sep 2019 22:33:33 +0000 (00:33 +0200)]
avfilter/vf_v360: remove w/h changing for flat output

Fixes crashes with bigger h/v fov.

4 years agoavfilter/vf_v360: increase h_fov max limit
Paul B Mahol [Tue, 10 Sep 2019 22:32:43 +0000 (00:32 +0200)]
avfilter/vf_v360: increase h_fov max limit

4 years agoavfilter/vf_v360: fix fov calculation for stereographic output
Paul B Mahol [Tue, 10 Sep 2019 21:34:53 +0000 (23:34 +0200)]
avfilter/vf_v360: fix fov calculation for stereographic output

4 years agoavcodec/mediacodec_surface: define and use FFANativeWindow to mimic NDK interface
Aman Gupta [Thu, 5 Sep 2019 19:49:00 +0000 (12:49 -0700)]
avcodec/mediacodec_surface: define and use FFANativeWindow to mimic NDK interface

This will make it easy to switch to ANativeWindow_fromSurface
and ANativeWindow_release in the future.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/mediacodecdec: warn when input buffers are not configured with proper size
Aman Gupta [Thu, 5 Sep 2019 18:04:09 +0000 (11:04 -0700)]
avcodec/mediacodecdec: warn when input buffers are not configured with proper size

In rare circumstances, if the codec is not configured with the
proper parameters the input buffers can be allocated with a size
that's too small to hold an individual packet. Since MediaCodec
expects exactly one incoming buffer with a given PTS, it is not
valid to split data for a given PTS across two input buffers.

See https://developer.android.com/reference/android/media/MediaCodec#data-processing:

  > Do not submit multiple input buffers with the same timestamp

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agodoc/filters: extend flip options in v360 filter
Paul B Mahol [Tue, 10 Sep 2019 18:29:43 +0000 (20:29 +0200)]
doc/filters: extend flip options in v360 filter

4 years agoavfilter/vf_v360: increase v_fov max limit
Paul B Mahol [Tue, 10 Sep 2019 18:18:10 +0000 (20:18 +0200)]
avfilter/vf_v360: increase v_fov max limit

4 years agoavfilter/vf_v360: add support for stereographic as input projection
Paul B Mahol [Tue, 10 Sep 2019 16:56:03 +0000 (18:56 +0200)]
avfilter/vf_v360: add support for stereographic as input projection

4 years agoavcodec/pnm_parser: Use memchr() in pnm_parse()
Michael Niedermayer [Mon, 9 Sep 2019 22:04:08 +0000 (00:04 +0200)]
avcodec/pnm_parser: Use memchr() in pnm_parse()

Fixes: Timeout (45sec -> 0.5sec)
Fixes: 16942/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5085393073995776
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>
4 years agoavfilter/vf_fps: Avoid inlink fifo build up.
Nikolas Bowe [Thu, 29 Aug 2019 02:13:20 +0000 (19:13 -0700)]
avfilter/vf_fps: Avoid inlink fifo build up.

When duplicating frames we need to schedule for activation again, otherwise frames can build up in the inlink fifo.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/webp: fix decoding for trailing junk
Pascal Massimino [Wed, 28 Aug 2019 07:41:42 +0000 (09:41 +0200)]
avcodec/webp: fix decoding for trailing junk

some bitstream have trailing junk, despite being valid webp data.
In case of apparent error, abort the loop and let *got_frame
decide whether this is an error or not.

fixes trac #8107 (/#7612)

Another possibility would be turning the loop into:
    while (!*got_frame) {...}

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavf/avidec: fix memory leak in error handling path
Jun Zhao [Tue, 10 Sep 2019 11:39:27 +0000 (19:39 +0800)]
lavf/avidec: fix memory leak in error handling path

free the value in error handling path to avoid the memory leak.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mips: Fix a warnning of indentation not reflect the block structure.
Shiyou Yin [Mon, 9 Sep 2019 03:50:51 +0000 (11:50 +0800)]
avcodec/mips: Fix a warnning of indentation not reflect the block structure.

The indentation of code dose not reflect the if block structure in
'apply_ltp_mips', and this will generate a warnning when build with
'-Wall' or '-Wmisleading-indentation'.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/h264: Fix poc_lsb in open gop context
Nicolas Gaullier [Tue, 23 Jul 2019 12:08:59 +0000 (14:08 +0200)]
avcodec/h264: Fix poc_lsb in open gop context

When no IDR nor mmco_reset is found, prev_poc_lsb is
undefined and shall not be assumed to be zero

4 years agotools/target_dec_fuzzer: Adjust threshold for LSCR
Michael Niedermayer [Sun, 25 Aug 2019 15:42:19 +0000 (17:42 +0200)]
tools/target_dec_fuzzer: Adjust threshold for LSCR

Fixes: Timeout (12sec -> 3sec)
Fixes: 15327/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LSCR_fuzzer-5702887719567360
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/filters: fix typo in v360
Paul B Mahol [Mon, 9 Sep 2019 20:46:48 +0000 (22:46 +0200)]
doc/filters: fix typo in v360

4 years agoavcodec/mediacodec_surface: drop unnecessary local variable
Aman Gupta [Mon, 9 Sep 2019 20:20:41 +0000 (13:20 -0700)]
avcodec/mediacodec_surface: drop unnecessary local variable

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/mediacodecdec_common: log codec name during configure/start failures
Aman Gupta [Thu, 5 Sep 2019 18:33:32 +0000 (11:33 -0700)]
avcodec/mediacodecdec_common: log codec name during configure/start failures

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
4 years agoavcodec/mediacodecdec_common: ensure current input buffer is always used correctly
Aman Gupta [Thu, 5 Sep 2019 18:20:40 +0000 (11:20 -0700)]
avcodec/mediacodecdec_common: ensure current input buffer is always used correctly

The loop may mutate the input buffer, so re-fetch it to ensure
the current one is always used.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
4 years agoavcodec/mediacodecdec_common: improve trace logging for end-of-stream
Aman Gupta [Thu, 5 Sep 2019 18:11:15 +0000 (11:11 -0700)]
avcodec/mediacodecdec_common: improve trace logging for end-of-stream

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
4 years agoavcodec/mediacodecdec_common: warn when PTS is missing
Aman Gupta [Thu, 5 Sep 2019 18:10:03 +0000 (11:10 -0700)]
avcodec/mediacodecdec_common: warn when PTS is missing

MediaCodec decoders require PTS for proper operation.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
4 years agoavfilter/vf_v360: add padding to u/v/ker
Paul B Mahol [Mon, 9 Sep 2019 16:36:56 +0000 (18:36 +0200)]
avfilter/vf_v360: add padding to u/v/ker

Fixes use of uninitialized variables.

4 years agoswscale/swscale: delete unwanted assignments
Limin Wang [Sun, 8 Sep 2019 13:12:14 +0000 (21:12 +0800)]
swscale/swscale: delete unwanted assignments

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agotests: Fix bash errors in lavf_container tests.
Andrey Semashev [Wed, 28 Aug 2019 15:32:37 +0000 (18:32 +0300)]
tests: Fix bash errors in lavf_container tests.

Because the lavf_container is sometimes called with only 2 arguments,
fate tests produce bash errors like this:

  tests/fate-run.sh: 299: test: =: unexpected operator

This commit fixes this.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_v360: add guards against NaNs
Paul B Mahol [Mon, 9 Sep 2019 16:03:17 +0000 (18:03 +0200)]
avfilter/vf_v360: add guards against NaNs

Also normalize vector after rotation, it might be needed,
otherwise one can get NaNs.

4 years agoavfilter/vf_v360: partialy revert previous commit
Paul B Mahol [Mon, 9 Sep 2019 15:43:16 +0000 (17:43 +0200)]
avfilter/vf_v360: partialy revert previous commit

roll/pitch can do exactly same thing.

4 years agoavfilter/vf_v360: extend stereographic projection
Paul B Mahol [Mon, 9 Sep 2019 12:01:23 +0000 (14:01 +0200)]
avfilter/vf_v360: extend stereographic projection

Add option to change central point projection.

4 years agoavfilter/vf_v360: factor vector normalization out
Paul B Mahol [Mon, 9 Sep 2019 08:55:36 +0000 (10:55 +0200)]
avfilter/vf_v360: factor vector normalization out

4 years agolavfi/concat: fix logic error in framerate check
Jun Zhao [Mon, 9 Sep 2019 01:39:38 +0000 (09:39 +0800)]
lavfi/concat: fix logic error in framerate check

fix logic error in framerate check, it's introduced by commit
3ad5d4df9ce794d3eeb0f526c5f3e446bf97c616

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoconfigure: check for a sufficiently recent enough AMF version
Hendrik Leppkes [Sun, 8 Sep 2019 22:49:23 +0000 (00:49 +0200)]
configure: check for a sufficiently recent enough AMF version

Due to the recent addition of Vulkan support to AMF, we require more
recent headers that include the new structures, which have been
available since AMF 1.4.9 released in September 2018.

Fixes Ticket #8125

4 years agodoc/filters: update v360
Paul B Mahol [Sun, 8 Sep 2019 16:44:30 +0000 (18:44 +0200)]
doc/filters: update v360

4 years agoavfilter/vf_v360: add stereographic output projection
Paul B Mahol [Sun, 8 Sep 2019 16:17:57 +0000 (18:17 +0200)]
avfilter/vf_v360: add stereographic output projection

4 years agoavfilter/vf_v360: disallow too low h_fov/v_fov
Paul B Mahol [Sun, 8 Sep 2019 16:19:27 +0000 (18:19 +0200)]
avfilter/vf_v360: disallow too low h_fov/v_fov

4 years agolavfi/concat: allow to support inputs with different frame rates
Calvin Walton [Fri, 30 Aug 2019 17:28:17 +0000 (13:28 -0400)]
lavfi/concat: allow to support inputs with different frame rates

Right now, the concat filter does not set the frame_rate value on any of
the out links. As a result, the default ffmpeg behaviour kicks in - to
copy the framerate from the first input to the outputs.

If a later input is higher framerate, this results in dropped frames; if
a later input is lower framerate it might cause judder.

This patch checks if all of the video inputs have the same framerate, and
if not it sets the out link to use '1/0' as the frame rate, the value
meaning "unknown/vfr".

A test is added to verify the VFR behaviour. The existing test for CFR
behaviour passes unchanged.

4 years agoavfilter/vf_v360: add aliases for some projections
Paul B Mahol [Sun, 8 Sep 2019 08:47:38 +0000 (10:47 +0200)]
avfilter/vf_v360: add aliases for some projections

4 years agoavfilter/vf_scale: split the scale_frame function from filter_frame for activate...
Limin Wang [Sat, 7 Sep 2019 15:11:25 +0000 (23:11 +0800)]
avfilter/vf_scale: split the scale_frame function from filter_frame for activate function support

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_v360: add options to h/w unflip input video
Paul B Mahol [Sat, 7 Sep 2019 17:54:00 +0000 (19:54 +0200)]
avfilter/vf_v360: add options to h/w unflip input video

4 years agoavfilter/vf_v360: support transposed input/output
Paul B Mahol [Sat, 7 Sep 2019 14:32:16 +0000 (16:32 +0200)]
avfilter/vf_v360: support transposed input/output

4 years agoavcodec/qdm2: Check frame size
Michael Niedermayer [Thu, 29 Aug 2019 19:26:43 +0000 (21:26 +0200)]
avcodec/qdm2: Check frame size

Fixes: index 2304 out of bounds for type 'float [2304]'
Fixes: 16332/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5679142481166336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/vividas: check for tiny blocks using alignment
Michael Niedermayer [Sat, 31 Aug 2019 21:20:01 +0000 (23:20 +0200)]
avformat/vividas: check for tiny blocks using alignment

Ask for a sample for these
Fixes: out of array access
Fixes: 16624/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5762455661182976
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/vc1_pred: Fix refdist in scaleforopp()
Michael Niedermayer [Sat, 31 Aug 2019 20:12:38 +0000 (22:12 +0200)]
avcodec/vc1_pred: Fix refdist in scaleforopp()

Fixes: out of array access
Fixes: 16601/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5656105392275456
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_showinfo: display GOP timecode side data
Limin Wang [Sat, 24 Aug 2019 16:17:59 +0000 (00:17 +0800)]
avfilter/vf_showinfo: display GOP timecode side data

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoswscale/output: fix some code indentations
Linjie Fu [Thu, 5 Sep 2019 03:01:15 +0000 (11:01 +0800)]
swscale/output: fix some code indentations

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/vorbisdec: fix FASTDIV usage for vr_type == 2
Michael Niedermayer [Fri, 6 Sep 2019 10:06:30 +0000 (12:06 +0200)]
avcodec/vorbisdec: fix FASTDIV usage for vr_type == 2

This reverts a hunk from f1ca40ee00402102046fc7e59606651930436b0e

Fixes: out of array read
Fixes: 16924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-5157893162139648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavf/rawenc: Only accept the appropriate stream type for raw muxers.
Carl Eugen Hoyos [Sun, 30 Jun 2019 22:37:08 +0000 (00:37 +0200)]
lavf/rawenc: Only accept the appropriate stream type for raw muxers.

This does not affect the rawvideo muxer.

Fixes ticket #7979.

4 years agox86/vf_v360: use a faster horizontal add in remap4_8bit_line_avx2
James Almer [Fri, 6 Sep 2019 14:18:45 +0000 (11:18 -0300)]
x86/vf_v360: use a faster horizontal add in remap4_8bit_line_avx2

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agox86/vf_v360: make remap{1,2}_8bit_line_avx2 work on x86_32
James Almer [Fri, 6 Sep 2019 14:11:45 +0000 (11:11 -0300)]
x86/vf_v360: make remap{1,2}_8bit_line_avx2 work on x86_32

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_v360: add option to pick rotation order
Paul B Mahol [Fri, 6 Sep 2019 11:14:29 +0000 (13:14 +0200)]
avfilter/vf_v360: add option to pick rotation order

4 years agoavfilter/vf_v360: reduce allocations by reusing duplicated remaps
Paul B Mahol [Fri, 6 Sep 2019 09:46:11 +0000 (11:46 +0200)]
avfilter/vf_v360: reduce allocations by reusing duplicated remaps

4 years agoavfilter/vf_v360: x86 SIMD for interpolations
Paul B Mahol [Tue, 3 Sep 2019 16:54:44 +0000 (18:54 +0200)]
avfilter/vf_v360: x86 SIMD for interpolations

4 years agoavfilter/vf_v360: add asserts to guard against invalid conditions
Paul B Mahol [Tue, 3 Sep 2019 15:02:20 +0000 (17:02 +0200)]
avfilter/vf_v360: add asserts to guard against invalid conditions

4 years agoavfilter/vf_v360: stop using floats in interpolation
Paul B Mahol [Tue, 3 Sep 2019 11:15:03 +0000 (13:15 +0200)]
avfilter/vf_v360: stop using floats in interpolation

4 years agoavfilter/vf_v360: rewrite storing of remap positions and interpolations
Paul B Mahol [Tue, 3 Sep 2019 09:45:25 +0000 (11:45 +0200)]
avfilter/vf_v360: rewrite storing of remap positions and interpolations

In preparation of SIMD assembly.

4 years agodoc/filters: correct range for contrast in eq filter
Sourabh Sharma [Fri, 6 Sep 2019 02:58:13 +0000 (08:28 +0530)]
doc/filters: correct range for contrast in eq filter

Fixes #8111

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
4 years agoavformat/hlsenc: fix compiling error of hlsenc
Steven Liu [Fri, 6 Sep 2019 04:47:15 +0000 (12:47 +0800)]
avformat/hlsenc: fix compiling error of hlsenc

4 years agoavformat/hlsenc: fix code style
Steven Liu [Fri, 6 Sep 2019 04:15:45 +0000 (12:15 +0800)]
avformat/hlsenc: fix code style

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hlsenc: move the warning message from every segment upload to init part
Steven Liu [Fri, 6 Sep 2019 04:10:15 +0000 (12:10 +0800)]
avformat/hlsenc: move the warning message from every segment upload to init part

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hlsenc: avformat/hlsenc: reopen new http session for http_persistent
Steven Liu [Thu, 29 Aug 2019 23:14:28 +0000 (07:14 +0800)]
avformat/hlsenc: avformat/hlsenc: reopen new http session for http_persistent

fix ticket: 7975

Tested-by: Ian Klassen <ian@virtualfunc.com>
Suggested-by: Ian Klassen <ian@virtualfunc.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/http: add ff_http_get_shutdown_status api for check the status of shutdown
Steven Liu [Thu, 29 Aug 2019 23:14:27 +0000 (07:14 +0800)]
avformat/http: add ff_http_get_shutdown_status api for check the status of shutdown

this function is used to get the previous shutdown status
when reusing the old connection in block mode.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agofate: add test for stream_loop
Gyan Doshi [Wed, 4 Sep 2019 09:53:35 +0000 (15:23 +0530)]
fate: add test for stream_loop

Checks that seek to start indeed seeks to start.

4 years agoffmpeg: switch to avformat_seek_file for stream_loop
Gyan Doshi [Sat, 31 Aug 2019 14:15:58 +0000 (19:45 +0530)]
ffmpeg: switch to avformat_seek_file for stream_loop

Fixes stream_loop with very short files where seeking is generic index
search

4 years agoavcodec/iff: Check for overlap in cmap_read_palette()
Michael Niedermayer [Wed, 21 Aug 2019 21:22:39 +0000 (23:22 +0200)]
avcodec/iff: Check for overlap in cmap_read_palette()

Fixes: undefined memcpy() use
Fixes: 16302/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5678750575886336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/vqavideo: Limit resolution
Michael Niedermayer [Thu, 22 Aug 2019 17:39:29 +0000 (19:39 +0200)]
avcodec/vqavideo: Limit resolution

Fixes: Timeout (288sec -> 1ms)
Fixes: 16353/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-5633402606190592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/apedec: Fix 32bit int overflow in do_apply_filter()
Michael Niedermayer [Mon, 2 Sep 2019 20:44:50 +0000 (22:44 +0200)]
avcodec/apedec: Fix 32bit int overflow in do_apply_filter()

Fixes: signed integer overflow: 2147480546 + 4096 cannot be represented in type 'int'
Fixes: 16280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5123442566758400
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>
4 years agoconfigure: fix --disable-v4l2-m2m can't work
Jun Zhao [Wed, 4 Sep 2019 09:39:59 +0000 (17:39 +0800)]
configure: fix --disable-v4l2-m2m can't work

Use the command ./configure with/without --disable-v4l2-m2m test.

Reviewed-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoconfigure: fix --disable-alsa can't work
Jun Zhao [Wed, 4 Sep 2019 09:27:09 +0000 (17:27 +0800)]
configure: fix --disable-alsa can't work

fix --disable-alsa can't work in configure

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agodoc/filters: fix alphabetic order of some video filters
Paul B Mahol [Thu, 5 Sep 2019 09:32:21 +0000 (11:32 +0200)]
doc/filters: fix alphabetic order of some video filters

4 years agoavutil/version: bump for hwcontext_videotoolbox api change
Aman Gupta [Wed, 4 Sep 2019 19:55:52 +0000 (12:55 -0700)]
avutil/version: bump for hwcontext_videotoolbox api change

av_map_videotoolbox_format_from_pixfmt2() added in previous
commit to support full-range pixel formats.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/videotoolbox: add support for full range pixel formats
Akemi [Sat, 13 Apr 2019 14:36:01 +0000 (16:36 +0200)]
avcodec/videotoolbox: add support for full range pixel formats

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavformat/mxfenc: fix warning: unused function 'klv_ber_length' [-Wunused-function]
Limin Wang [Thu, 29 Aug 2019 08:44:01 +0000 (16:44 +0800)]
avformat/mxfenc: fix warning: unused function 'klv_ber_length' [-Wunused-function]

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agolibavfilter/dnn: add header into native model file
Guo, Yejun [Mon, 2 Sep 2019 04:35:58 +0000 (12:35 +0800)]
libavfilter/dnn: add header into native model file

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavformat/matroskadec: use av_fast_realloc to reallocate ebml list arrays
James Almer [Tue, 3 Sep 2019 21:45:04 +0000 (18:45 -0300)]
avformat/matroskadec: use av_fast_realloc to reallocate ebml list arrays

Speeds up the process considerably.

Fixes ticket #8109.

Suggested-by: nevcairiel
Suggested-by: cehoyos
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/matroskadec: use proper types for some EbmlSyntax fields
James Almer [Tue, 3 Sep 2019 21:52:51 +0000 (18:52 -0300)]
avformat/matroskadec: use proper types for some EbmlSyntax fields

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/nuv: prevent frame copying when outputting duplicate frames
James Almer [Wed, 4 Sep 2019 02:54:19 +0000 (23:54 -0300)]
avcodec/nuv: prevent frame copying when outputting duplicate frames

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/wcmv: prevent frame copying when outputting duplicate frames
James Almer [Wed, 4 Sep 2019 02:53:46 +0000 (23:53 -0300)]
avcodec/wcmv: prevent frame copying when outputting duplicate frames

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoRevert "avcodec/wcmv: Avoid copying frames if they are unchanged"
James Almer [Wed, 4 Sep 2019 02:49:00 +0000 (23:49 -0300)]
Revert "avcodec/wcmv: Avoid copying frames if they are unchanged"

This reverts commit 976dae8b32f48d17cccfd6b19d2beb01770dfa7c.

An alternative approach to reduce frame copying will follow.

4 years agoavcodec/wcmv: use ff_reget_buffer()
James Almer [Thu, 29 Aug 2019 22:24:10 +0000 (19:24 -0300)]
avcodec/wcmv: use ff_reget_buffer()

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/decode: add a flags parameter to ff_reget_buffer()
James Almer [Fri, 30 Aug 2019 14:37:25 +0000 (11:37 -0300)]
avcodec/decode: add a flags parameter to ff_reget_buffer()

Some decoders may not need a writable buffer in some specific cases, but only
a reference to the existing buffer with updated frame properties instead, for
the purpose of returning duplicate frames. For this, the
FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential
allocations and buffer copies when they are not needed.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/mpegts: Check if ready on SCTE reception
Anthony Delannoy [Tue, 3 Sep 2019 15:54:24 +0000 (17:54 +0200)]
avformat/mpegts: Check if ready on SCTE reception

On some DVB stream SCTE-35 data packet are available before the end of
MpegTSContext initialization. We have to check if it is the case to
avoid a SEGFAULT.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoconfigure: ensure --enable-omx-rpi uses rpi-specific IL headers
Aman Gupta [Mon, 2 Sep 2019 20:04:42 +0000 (21:04 +0100)]
configure: ensure --enable-omx-rpi uses rpi-specific IL headers

When compiling natively on an RPI where libomxil-bellagio-dev
was also installed, `check_headers OMX_Core.h` succeeded and
the -isystem compiler flag was never added to the build.

For non-native builds, the error message now mentions the
raspberrypi/firmware repository where the RPI specific
headers are available.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: fix minor indentation issue
Aman Gupta [Wed, 28 Aug 2019 19:27:20 +0000 (12:27 -0700)]
avcodec/v4l2_m2m: fix minor indentation issue

4 years agoavcodec/v4l2_m2m: use log_ctx variable consistently
Aman Gupta [Fri, 23 Aug 2019 19:31:24 +0000 (12:31 -0700)]
avcodec/v4l2_m2m: use log_ctx variable consistently

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: log planar mode used by driver
Aman Gupta [Thu, 22 Aug 2019 18:03:31 +0000 (11:03 -0700)]
avcodec/v4l2_m2m: log planar mode used by driver

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_context: use EAGAIN to signal when input buffers are unavailable
Aman Gupta [Wed, 28 Aug 2019 23:42:46 +0000 (16:42 -0700)]
avcodec/v4l2_context: use EAGAIN to signal when input buffers are unavailable

ENOMEM indicates an allocation failure, and there are no allocations
happening here. The buffers are pre-allocated and there are simply
none available at this time.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2m2m: fix error handling during buffer init
Jorge Ramirez-Ortiz [Sun, 6 May 2018 17:56:30 +0000 (19:56 +0200)]
avcodec/v4l2m2m: fix error handling during buffer init

Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_buffers: return int64_t in v4l2_get_pts
Lukas Rusak [Mon, 8 Jan 2018 23:27:37 +0000 (15:27 -0800)]
avcodec/v4l2_buffers: return int64_t in v4l2_get_pts

v4l2_pts is type int64_t we should return that instead of uint64_t

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_context: return {decoder,encoder}_cmd errors
Aman Gupta [Mon, 26 Aug 2019 22:17:43 +0000 (15:17 -0700)]
avcodec/v4l2_context: return {decoder,encoder}_cmd errors

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m_enc: fix typo in log message
Aman Gupta [Fri, 23 Aug 2019 20:39:32 +0000 (13:39 -0700)]
avcodec/v4l2_m2m_enc: fix typo in log message

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m_enc: log errno on v4l2_set_ext_ctrl failures
Aman Gupta [Thu, 22 Aug 2019 23:00:37 +0000 (16:00 -0700)]
avcodec/v4l2_m2m_enc: log errno on v4l2_set_ext_ctrl failures

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_buffers: fix minor typos and whitespace
Aman Gupta [Thu, 22 Aug 2019 19:42:34 +0000 (12:42 -0700)]
avcodec/v4l2_buffers: fix minor typos and whitespace

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_context: log VIDIOC_REQBUFS failures
Aman Gupta [Thu, 22 Aug 2019 19:20:56 +0000 (12:20 -0700)]
avcodec/v4l2_context: log VIDIOC_REQBUFS failures

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: remove trailing whitespace in output identifier
Aman Gupta [Thu, 22 Aug 2019 19:20:40 +0000 (12:20 -0700)]
avcodec/v4l2_m2m: remove trailing whitespace in output identifier

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_m2m: log requested pixel formats
Aman Gupta [Thu, 22 Aug 2019 19:06:24 +0000 (12:06 -0700)]
avcodec/v4l2_m2m: log requested pixel formats

Signed-off-by: Aman Gupta <aman@tmm1.net>