Commit Graph

94913 Commits

Author SHA1 Message Date
Paul B Mahol
7f8f886344 avfilter/vf_v360: refactor dimensions and offsets calculations 2019-09-15 10:37:42 +02:00
Paul B Mahol
197985c5bf doc/filters: add another v360 example 2019-09-14 19:52:05 +02:00
Paul B Mahol
45bb80dccc avfilter/vf_v360: implement stereo 3D support 2019-09-14 19:35:13 +02:00
Paul B Mahol
451cee662c avfilter/vf_v360: reduce by one cosf call less 2019-09-14 17:40:46 +02:00
Paul B Mahol
2a672a93d2 avfilter/vf_v360: define variables in for loops consistently 2019-09-14 17:33:31 +02:00
Paul B Mahol
f78abca0c2 avfilter/vf_v360: call tanf() once 2019-09-14 13:33:24 +02:00
Paul B Mahol
cb8d6a4e3e avfilter/vf_v360: implement diagonal field of view 2019-09-14 10:47:01 +02:00
Steven Liu
8efc9fcc56 avformat/hlsenc: make fix code style of hls_write_trailer
change vs->avf to oc
2019-09-14 13:09:16 +08:00
Steven Liu
2e82b50bce avformat/dashdec: reindent code at parse_manifest 2019-09-14 12:54:21 +08:00
Jun Zhao
0c5726a332 lavf/hls: fix memory leak in error handling path for option tmp
fix memory leak in error handling path for option tmp.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-14 10:02:00 +08:00
Jun Zhao
90a5bebd19 lavf/hls: remove redundancy seekable setting
ffio_init_context with NULL seek callback will setting seekable with 0, so
remove the redundancy seekable setting.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-14 10:01:19 +08:00
Jun Zhao
eada079e71 lavf/hls: drop unnecessary check before ff_format_io_close
ff_format_io_close will check the AVIOContext pointer pb, so drop
the unnecessary check before ff_format_io_close.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-14 10:00:12 +08:00
Jun Zhao
48d96ce29a lavf/hls: refine the log message
refine the log message, it's will help the debugging

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-14 10:00:03 +08:00
Andreas Rheinhardt
1a066d87e3 avformat/hlsenc: Fix memleak when using single_file
This commit fixes a memleak in the hls muxer when one uses a single file
as output. It has been forgotten to free the temporary buffers used to write
the packets so that the size of the leaks basically amounts to the size
of the output file. This commit adds the necessary free.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-09-14 09:55:49 +08:00
Daniel Oberhoff
88a26abcc6 hlsenc: flush segments to guarantuee atomic single file hls 2019-09-14 09:53:22 +08:00
Michael Niedermayer
3b5ce76b1a avcodec/mjpegdec: Restore non bayer checks in ljpeg_decode_rgb_scan()
Fixes: out of array write
Fixes: 17088/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5654877765632000

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-13 21:53:27 +02:00
Michael Niedermayer
2006e5ccb6 avcodec/mjpegdec: Only allow 0x11110000 pix_fmt_id for bayer mode
Fixes: NULL pointer dereference
Fixes: assertion failure
Fixes: 17003/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5696929253556224
Fixes: 17039/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5651008134316032

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-13 21:53:27 +02:00
Paul B Mahol
de125a0942 avformat/sccdec: remove not needed code 2019-09-13 19:47:03 +02:00
Paul B Mahol
ed4ad6e1ed avfilter/vf_v360: use always float version instead of double floating-point function 2019-09-13 12:32:35 +02:00
Paul B Mahol
2b3094d61d avfilter/vf_v360: fix flat projection field of view calculation 2019-09-13 11:31:11 +02:00
Gyan Doshi
0993327939 cmdutils: promote report level if loglevel is higher 2019-09-13 11:53:54 +05:30
Paul B Mahol
e1dd355b3d avfilter/vf_v360: add dfisheye output 2019-09-12 20:07:26 +02:00
Paul B Mahol
24d4eea921 avfilter/vf_v360: fix setting default height for stereographic 2019-09-12 18:37:38 +02:00
Paul B Mahol
801fd6e410 avfilter/vf_v360: fix errors is comments 2019-09-12 18:37:38 +02:00
Paul B Mahol
b4562301ee avfilter/vf_v360: fix M_PI_4 usage consistency 2019-09-12 18:37:38 +02:00
Steven Liu
e55018ee11 avformat/dashdec: add startNumber parser for segmentlist
and get start_number for compute current segment number.

fix ticket: 7976

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-12 10:41:06 +08:00
Steven Liu
9ff8fbda65 avformat/hlsenc: fix memleak at hls_write_trailer
Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-12 10:40:41 +08:00
Steven Liu
5b809a8d4b avformat/hlsenc: print warning at the end when upload the last segment failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-12 10:39:15 +08:00
Steven Liu
307e0627db avformat/hlsenc: merge fmp4 and mpegts segment type m3u8 list AVIOConext
hlsenc has been merge fmp4 and mpegts workflow before
so it can merge m3u8 list AVIOContext now.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-12 10:38:47 +08:00
James Almer
1faedb9a11 x85/opusdsp: enable the functions on all FMA3 CPUs
It's not using ymm registers, so limiting it to CPUs with fast AVX
is not necessary.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-11 20:50:45 -03:00
James Almer
80444e23ac x86/opusdps: clear the high bits from some gprs
Fixes checkasm on systems like win64.

Reviewed-by: Lynne
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-11 20:42:31 -03:00
Michael Niedermayer
b94cf549e2 avcodec/htmlsubtitles: Avoid locale dependant isdigit()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11 22:43:14 +02:00
Michael Niedermayer
39ff027fd8 avcodec/mpeg12enc: Add FF_CODEC_CAP_INIT_CLEANUP
Fixes: Multiple memleaks
Fixes: ffmpeg-memory-leak

Found-by: Francis Provencher <francis@protekresearchlab.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11 22:43:14 +02:00
Michael Niedermayer
e125578994 avcodec/alsdec: Check k from being outside what our implementation can handle
The specification does not seem to list what the maximum valid
value is

Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 16268/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5638164544225280

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-11 22:43:14 +02:00
Michael Niedermayer
f119273649 avcodec/takdec: Fix integer overflow in decorrelate()
Fixes: signed integer overflow: -2424832 - 2145653689 cannot be represented in type 'int'
Fixes: 16138/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5643451346976768

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-11 22:43:14 +02:00
Michael Niedermayer
ec749ed222 avcodec/aacps: Fix integer overflows in hybrid_synthesis()
Fixes: signed integer overflow: -822667928 + -1399761199 cannot be represented in type 'int'
Fixes: 15756/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5645182051024896

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-11 22:43:14 +02:00
Michael Niedermayer
0e4a0e962c avcodec/mpeg4videodec: Fix integer overflow in mpeg4_decode_studio_block()
Fixes: signed integer overflow: 24023040 * 112 cannot be represented in type 'int'
Fixes: 16570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5173275211071488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11 22:42:19 +02:00
Michael Niedermayer
b6b9ac5698 avcodec/vp56rac: delay signaling an error on truncated input
A threshold of 1 is sufficient for simple_dump_cut.webm, 10 is used
just to be sure the next truncated file doesnt cause the same issue

Obvious alternative fixes are to simply accept that the file is broken or to
write some advanced error concealment or to
simply accept that the decoder wont stop at the end of input.

Fixes: Ticket 8069 (artifacts not the differing md5 which was there before 1afd246960)
Fixes: simple_dump_cut.webm
Fixes: regression of 1afd246960

fate-vp5 changes because the last frame is truncated and now handled
differently.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11 22:36:33 +02:00
Maxime Jourdan
b81a1c5bea avcodec/v4l2_context: set frame SAR using VIDIOC_CROPCAP
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 13:07:42 -07:00
Aman Gupta
0085c4d478 avcodec/v4l2_buffers: use correct timebase for encoder/decoder
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 13:07:42 -07:00
Aman Gupta
80c9237b2f avcodec/v4l2_m2m_dec: fix compile
internal.h header required for FF_CODEC_CAP_SETS_PKT_DTS

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 11:29:48 -07:00
Maxime Jourdan
584ac1ad0b avcodec/v4l2_m2m_dec: fix dropped packets while decoding
* FFmpeg retrieves a packet from the bitstream
* It attempts to get an input buffer (from its own list or by dequeuing one from the driver)
* If no input buffer is found, the bitstream packet is dropped instead of scheduled for trying again later

It's an issue that showed especially at high speeds (like using `-f null -` as output parameters).

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 10:31:21 -07:00
Aman Gupta
fac834b2ae avcodec/v4l2_context: expose timeout for dequeue_frame
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 10:31:18 -07:00
Aman Gupta
3475758a37 avcodec/v4l2_m2m_dec: set pkt_dts on decoded frames to NOPTS
Without this ffmpeg will attempt to copy the dts from the
most recently enqueued packet into the most recently dequeued
frame, which does not account for the buffering inside v4l2
and is not accurate.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 10:28:56 -07:00
Aman Gupta
8dc973dc89 avcodec/v4l2_buffers: read height/width from the proper context
Frames are generally dequeued into capture buffers, so using
the output properties here was incorrect. It happened to work
fine for decoding, since the output/capture buffers have the same
dimensions.

For the v4l2 scaler, the dimensions can be different between output
and capture. Using the buffer's associated context makes this code
work correctly regardless of where the frame is coming from.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11 10:28:56 -07:00
Paul B Mahol
efc73b13ac avfilter/vf_v360: remove pointless special case when allocating stuff 2019-09-11 16:43:10 +02:00
Paul B Mahol
7ce7002664 avfilter/vf_v360: refactor FoV calculation for stereographic
Move in out of loop.
2019-09-11 16:25:21 +02:00
Andriy Gelman
78b86c30d3 avcodec/h2645_parse: simplify memset call
Removed (new_size - pkt->nals_allocated) because this value is always 1
during the call.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-11 10:23:26 -03:00
Paul B Mahol
783ea9c1c5 avfilter/vf_v360: extend max limit to vertical fov 2019-09-11 15:12:56 +02:00
Paul B Mahol
cb41c2af92 avfilter/vf_v360: really fix FoV selection
Big thanks to Michael Koch for providing actual formula.
2019-09-11 15:12:56 +02:00