1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

94854 Commits

Author SHA1 Message Date
Lukas Rusak
f9b0f88aa4 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>
2019-09-10 19:05:18 -07:00
Aman Gupta
c0c7946196 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>
2019-09-10 19:01:13 -07:00
Dave Stevenson
d61cf1b1eb 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>
2019-09-10 18:56:40 -07:00
Aman Gupta
7bb6898b16 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>
2019-09-10 18:52:37 -07:00
Aman Gupta
ac52e06e56 avcodec/v4l2_m2m: disable info logging during device probe
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-10 18:52:37 -07:00
Aman Gupta
ab4835f418 avcodec/v4l2_m2m_enc: add support for -force_key_frames
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-10 18:52:37 -07:00
Paul B Mahol
0f0f5188ac avfilter/vf_v360: remove w/h changing for flat output
Fixes crashes with bigger h/v fov.
2019-09-11 00:37:02 +02:00
Paul B Mahol
f705dc9a74 avfilter/vf_v360: increase h_fov max limit 2019-09-11 00:37:02 +02:00
Paul B Mahol
ccaeabd092 avfilter/vf_v360: fix fov calculation for stereographic output 2019-09-11 00:37:02 +02:00
Aman Gupta
7fddf4b266 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>
2019-09-10 13:51:05 -07:00
Aman Gupta
8a3623e2fb 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>
2019-09-10 13:51:05 -07:00
Paul B Mahol
e26fb6a714 doc/filters: extend flip options in v360 filter 2019-09-10 20:29:43 +02:00
Paul B Mahol
5fcb3cbaf0 avfilter/vf_v360: increase v_fov max limit 2019-09-10 20:18:10 +02:00
Paul B Mahol
329505d908 avfilter/vf_v360: add support for stereographic as input projection 2019-09-10 18:58:51 +02:00
Michael Niedermayer
10ea6c3116 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>
2019-09-10 17:21:54 +02:00
Nikolas Bowe
b794df43f3 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>
2019-09-10 17:21:54 +02:00
Pascal Massimino
857fd2ad99 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>
2019-09-10 17:21:54 +02:00
Jun Zhao
3740bdee77 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>
2019-09-10 17:21:54 +02:00
Shiyou Yin
de5543d8d4 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>
2019-09-10 17:21:53 +02:00
Nicolas Gaullier
cae5b36e20 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
2019-09-10 12:19:23 +02:00
Michael Niedermayer
9d1e98afee 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>
2019-09-09 23:04:53 +02:00
Paul B Mahol
2f071767d9 doc/filters: fix typo in v360 2019-09-09 22:47:36 +02:00
Aman Gupta
35b0e75b54 avcodec/mediacodec_surface: drop unnecessary local variable
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-09 13:25:12 -07:00
Aman Gupta
d0e6762768 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>
2019-09-09 13:25:09 -07:00
Aman Gupta
ca613dcc38 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>
2019-09-09 13:25:06 -07:00
Aman Gupta
f821d19531 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>
2019-09-09 13:25:03 -07:00
Aman Gupta
425be35c26 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>
2019-09-09 13:24:58 -07:00
Paul B Mahol
558265d4bc avfilter/vf_v360: add padding to u/v/ker
Fixes use of uninitialized variables.
2019-09-09 18:40:39 +02:00
Limin Wang
29bde4b3b6 swscale/swscale: delete unwanted assignments
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-09 18:16:06 +02:00
Andrey Semashev
6d9d053edb 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>
2019-09-09 18:16:06 +02:00
Paul B Mahol
0c9e01011b avfilter/vf_v360: add guards against NaNs
Also normalize vector after rotation, it might be needed,
otherwise one can get NaNs.
2019-09-09 18:03:17 +02:00
Paul B Mahol
799c07e5c8 avfilter/vf_v360: partialy revert previous commit
roll/pitch can do exactly same thing.
2019-09-09 17:47:03 +02:00
Paul B Mahol
976617c7d2 avfilter/vf_v360: extend stereographic projection
Add option to change central point projection.
2019-09-09 14:17:22 +02:00
Paul B Mahol
7985430c70 avfilter/vf_v360: factor vector normalization out 2019-09-09 11:07:39 +02:00
Jun Zhao
a0abcb4a31 lavfi/concat: fix logic error in framerate check
fix logic error in framerate check, it's introduced by commit
3ad5d4df9c

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-09 16:03:17 +08:00
Hendrik Leppkes
4e759b5675 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
2019-09-09 09:56:12 +02:00
Paul B Mahol
8a1f0cb9e3 doc/filters: update v360 2019-09-08 21:07:59 +02:00
Paul B Mahol
973051e3bd avfilter/vf_v360: add stereographic output projection 2019-09-08 21:07:59 +02:00
Paul B Mahol
a13b61b7fd avfilter/vf_v360: disallow too low h_fov/v_fov 2019-09-08 21:07:59 +02:00
Calvin Walton
3ad5d4df9c 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.
2019-09-08 16:48:28 +02:00
Paul B Mahol
85386c36e3 avfilter/vf_v360: add aliases for some projections 2019-09-08 10:52:35 +02:00
Limin Wang
cbc63d61b2 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>
2019-09-08 02:15:46 +02:00
Paul B Mahol
5b12a47e08 avfilter/vf_v360: add options to h/w unflip input video 2019-09-07 22:36:28 +02:00
Paul B Mahol
a06d70350b avfilter/vf_v360: support transposed input/output 2019-09-07 22:09:17 +02:00
Michael Niedermayer
12b909ba31 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>
2019-09-06 22:26:55 +02:00
Michael Niedermayer
55d4e22d71 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>
2019-09-06 22:25:35 +02:00
Michael Niedermayer
413e0f2516 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>
2019-09-06 22:24:50 +02:00
Limin Wang
ede15bf2e3 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>
2019-09-06 22:06:12 +02:00
Linjie Fu
ef1342650f swscale/output: fix some code indentations
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-06 22:06:12 +02:00
Michael Niedermayer
722fd46965 avcodec/vorbisdec: fix FASTDIV usage for vr_type == 2
This reverts a hunk from f1ca40ee00

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>
2019-09-06 22:06:12 +02:00