sharpbai [Tue, 13 Aug 2019 06:18:21 +0000 (14:18 +0800)]
avcodec/videotoolboxenc: fix encoding frame crash on iOS 11
On iOS 11, encoding a frame may return error with log
"Error encoding frame 0", which means vtenc_output_callback
is called with status=0 and sample_buffer=NULL. Then the
encoding session will be crashed on next callback wether or not
closing the codec context.
Let us look through the link below introducing VTCompressionOutputCallback,
https://developer.apple.com/documentation/videotoolbox/vtcompressionoutputcallback?language=objc
"status=0" (noErr) means compression was successful.
"sampleBuffer=NULL" means the frame was dropped when compression
was successful (status=0) or compression was not successful (status!=0).
So we should not set AVERROR_EXTERNAL on "status=0" and "sample_buffer=NULL"
as it is not a error.
The fix is that we only set AVERROR_EXTERNAL with status value non zero.
When sample_buffer is NULL and status value is zero, we simply return
with no other operation.
This crash often occurs on iOS 11 for example encoding 720p@25fps.
Signed-off-by: sharpbai <sharpbai@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
Paul B Mahol [Mon, 16 Sep 2019 09:45:28 +0000 (11:45 +0200)]
avfilter/vf_stereo3d: assert that out variable is valid
Paul B Mahol [Mon, 16 Sep 2019 09:41:50 +0000 (11:41 +0200)]
avfilter/vf_stereo3d: merge same code in case branches
Paul B Mahol [Mon, 16 Sep 2019 09:28:03 +0000 (11:28 +0200)]
avfilter/vf_shuffleplanes: remove not needed line
Paul B Mahol [Mon, 16 Sep 2019 09:22:16 +0000 (11:22 +0200)]
avfilter/vf_ciescope: remove dead assignments
Paul B Mahol [Mon, 16 Sep 2019 08:57:09 +0000 (10:57 +0200)]
avfilter/window_func: clarify intention in dolph window calculation
Paul B Mahol [Mon, 16 Sep 2019 08:40:47 +0000 (10:40 +0200)]
avfilter/vf_v360: add missing av_assert0()
Paul B Mahol [Mon, 16 Sep 2019 08:31:05 +0000 (10:31 +0200)]
avfilter/vf_avgblur: remove dupe assignment
Paul B Mahol [Mon, 16 Sep 2019 08:27:42 +0000 (10:27 +0200)]
avfilter/af_headphone: return on error immediately
Paul B Mahol [Sun, 15 Sep 2019 16:13:26 +0000 (18:13 +0200)]
avfilter/x86/vf_360: add most of >8 depth asm
Michael Niedermayer [Sat, 31 Aug 2019 20:33:56 +0000 (22:33 +0200)]
avformat/vividas: Remove align offset which is always masked off
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 31 Aug 2019 20:32:32 +0000 (22:32 +0200)]
avformat/vividas: remove dead assignment
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Fri, 30 Aug 2019 22:20:39 +0000 (00:20 +0200)]
avformat/cdxl: Fix integer overflow in intermediate
Fixes: signed integer overflow: 65535 * 65312 cannot be represented in type 'int'
Fixes: 16704/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-
6294115603447808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 29 Aug 2019 16:59:10 +0000 (18:59 +0200)]
avcodec/cfhd: Check that cropped size is smaller than full
Fixes: signed integer overflow: 57342 * 120830 cannot be represented in type 'int'
Fixes: 16426/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-
5758744817827840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Michael Niedermayer [Thu, 29 Aug 2019 19:08:42 +0000 (21:08 +0200)]
tools/target_dec_fuzzer: increase snows threshold
snow allows creating large output from tiny input, like other
wavelet codecs
Fixes: Timeout (82sec -> 1.5sec)
Fixes: 9520/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-
6286612576075776
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 28 Aug 2019 17:01:41 +0000 (19:01 +0200)]
avcodec/hevcdec: repeat character in skiped
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 28 Aug 2019 17:04:42 +0000 (19:04 +0200)]
repeat an even number of characters in occured
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 28 Aug 2019 17:07:23 +0000 (19:07 +0200)]
avformat/hcom: Tell the compiler about set but not read variables
This avoids 3 warnings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 28 Aug 2019 17:09:46 +0000 (19:09 +0200)]
doc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations and code"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 28 Aug 2019 19:53:05 +0000 (21:53 +0200)]
avcodec/gdv: Replace assert() checking bitstream by if()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 27 Aug 2019 15:21:00 +0000 (17:21 +0200)]
libavcodec/utils: Free threads on init failure
Fixes: Multiple memleaks
Fixes: ffmpeg-memory-leak
Found-by: Francis Provencher <francis@protekresearchlab.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 25 Aug 2019 15:24:41 +0000 (17:24 +0200)]
tools/target_dec_fuzzer: Adjust motionpixels threshold
Fixes: Timeout (151sec -> 173ms)
Fixes: 16053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-
5647069169057792
Fixes: 16053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-
5108957126852608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
gxw [Tue, 6 Aug 2019 11:11:16 +0000 (19:11 +0800)]
avutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros.
Changing details as following:
1. The previous order of parameters are irregular and difficult to
understand. Adjust the order of the parameters according to the
rule: (RTYPE, input registers, input mask/input index/..., output registers).
Most of the existing msa macros follow the rule.
2. Remove the redundant macro SLDI_Bn_0 and use SLDI_Bn instead.
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Rodger Combs [Sat, 7 Sep 2019 03:31:06 +0000 (22:31 -0500)]
lavc/videotoolboxdec: fix crop handling when multithreaded
This was partially fixed by 233cd89, but it made changes to AVFrame fields
from within end_frame, which doesn't work consistently when multithreading
is enabled. This is what the post_process function is for.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Fri, 13 Sep 2019 23:30:13 +0000 (16:30 -0700)]
avcodec/v4l2: fix compile with older videodev2.h
Some of these symbols are only defined in newer kernel releases.
Signed-off-by: Aman Gupta <aman@tmm1.net>
James Almer [Sun, 15 Sep 2019 14:09:39 +0000 (11:09 -0300)]
avcodec/libdav1d: use the library default for the filmgrain option
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Sun, 15 Sep 2019 14:04:33 +0000 (11:04 -0300)]
avformat/rmdec.c: fix brackets around arguments
Regression since
78f52b4fe3
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Sun, 15 Sep 2019 03:06:34 +0000 (00:06 -0300)]
avformat/rmdec.c: fix left shift of negative value in rm_sync()
Fixes ticket 8143.
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Paul B Mahol [Sun, 15 Sep 2019 08:50:12 +0000 (10:50 +0200)]
avfilter/vf_stereo3d: add tb (top-bottom) aliases
Paul B Mahol [Sun, 15 Sep 2019 08:37:42 +0000 (10:37 +0200)]
avfilter/vf_v360: refactor dimensions and offsets calculations
Paul B Mahol [Sat, 14 Sep 2019 17:50:47 +0000 (19:50 +0200)]
doc/filters: add another v360 example
Paul B Mahol [Sat, 14 Sep 2019 16:16:02 +0000 (18:16 +0200)]
avfilter/vf_v360: implement stereo 3D support
Paul B Mahol [Sat, 14 Sep 2019 15:40:46 +0000 (17:40 +0200)]
avfilter/vf_v360: reduce by one cosf call less
Paul B Mahol [Sat, 14 Sep 2019 15:31:58 +0000 (17:31 +0200)]
avfilter/vf_v360: define variables in for loops consistently
Paul B Mahol [Sat, 14 Sep 2019 11:33:24 +0000 (13:33 +0200)]
avfilter/vf_v360: call tanf() once
Paul B Mahol [Sat, 14 Sep 2019 08:47:01 +0000 (10:47 +0200)]
avfilter/vf_v360: implement diagonal field of view
Steven Liu [Sat, 14 Sep 2019 05:09:16 +0000 (13:09 +0800)]
avformat/hlsenc: make fix code style of hls_write_trailer
change vs->avf to oc
Steven Liu [Sat, 14 Sep 2019 04:54:21 +0000 (12:54 +0800)]
avformat/dashdec: reindent code at parse_manifest
Jun Zhao [Fri, 13 Sep 2019 11:53:37 +0000 (19:53 +0800)]
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>
Jun Zhao [Fri, 13 Sep 2019 11:53:36 +0000 (19:53 +0800)]
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>
Jun Zhao [Fri, 13 Sep 2019 11:53:35 +0000 (19:53 +0800)]
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>
Jun Zhao [Fri, 13 Sep 2019 11:53:34 +0000 (19:53 +0800)]
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>
Andreas Rheinhardt [Wed, 11 Sep 2019 12:36:36 +0000 (14:36 +0200)]
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>
Daniel Oberhoff [Sat, 14 Sep 2019 01:53:22 +0000 (09:53 +0800)]
hlsenc: flush segments to guarantuee atomic single file hls
Michael Niedermayer [Thu, 12 Sep 2019 19:13:11 +0000 (21:13 +0200)]
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>
Michael Niedermayer [Thu, 12 Sep 2019 19:02:17 +0000 (21:02 +0200)]
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>
Paul B Mahol [Fri, 13 Sep 2019 17:47:03 +0000 (19:47 +0200)]
avformat/sccdec: remove not needed code
Paul B Mahol [Fri, 13 Sep 2019 10:32:35 +0000 (12:32 +0200)]
avfilter/vf_v360: use always float version instead of double floating-point function
Paul B Mahol [Fri, 13 Sep 2019 09:31:11 +0000 (11:31 +0200)]
avfilter/vf_v360: fix flat projection field of view calculation
Gyan Doshi [Mon, 9 Sep 2019 18:07:08 +0000 (23:37 +0530)]
cmdutils: promote report level if loglevel is higher
Paul B Mahol [Thu, 12 Sep 2019 15:54:59 +0000 (17:54 +0200)]
avfilter/vf_v360: add dfisheye output
Paul B Mahol [Thu, 12 Sep 2019 16:36:10 +0000 (18:36 +0200)]
avfilter/vf_v360: fix setting default height for stereographic
Paul B Mahol [Thu, 12 Sep 2019 16:19:59 +0000 (18:19 +0200)]
avfilter/vf_v360: fix errors is comments
Paul B Mahol [Thu, 12 Sep 2019 16:16:13 +0000 (18:16 +0200)]
avfilter/vf_v360: fix M_PI_4 usage consistency
Steven Liu [Tue, 10 Sep 2019 02:31:32 +0000 (10:31 +0800)]
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>
Steven Liu [Mon, 9 Sep 2019 06:15:21 +0000 (14:15 +0800)]
avformat/hlsenc: fix memleak at hls_write_trailer
Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Steven Liu [Sat, 7 Sep 2019 12:39:28 +0000 (20:39 +0800)]
avformat/hlsenc: print warning at the end when upload the last segment failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Steven Liu [Fri, 6 Sep 2019 07:39:02 +0000 (15:39 +0800)]
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>
James Almer [Wed, 11 Sep 2019 23:50:45 +0000 (20:50 -0300)]
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>
James Almer [Wed, 11 Sep 2019 23:22:17 +0000 (20:22 -0300)]
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>
Michael Niedermayer [Wed, 28 Aug 2019 19:56:35 +0000 (21:56 +0200)]
avcodec/htmlsubtitles: Avoid locale dependant isdigit()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 27 Aug 2019 15:21:00 +0000 (17:21 +0200)]
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>
Michael Niedermayer [Sun, 25 Aug 2019 16:22:50 +0000 (18:22 +0200)]
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>
Michael Niedermayer [Sun, 25 Aug 2019 15:49:15 +0000 (17:49 +0200)]
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>
Michael Niedermayer [Fri, 23 Aug 2019 22:11:02 +0000 (00:11 +0200)]
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>
Michael Niedermayer [Thu, 22 Aug 2019 22:23:52 +0000 (00:23 +0200)]
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>
Michael Niedermayer [Tue, 20 Aug 2019 07:16:40 +0000 (09:16 +0200)]
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
1afd246960202917e244c844c534e9c1e3c323f5)
Fixes: simple_dump_cut.webm
Fixes: regression of
1afd246960202917e244c844c534e9c1e3c323f5
fate-vp5 changes because the last frame is truncated and now handled
differently.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Maxime Jourdan [Fri, 30 Aug 2019 21:19:12 +0000 (14:19 -0700)]
avcodec/v4l2_context: set frame SAR using VIDIOC_CROPCAP
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Wed, 11 Sep 2019 18:21:20 +0000 (11:21 -0700)]
avcodec/v4l2_buffers: use correct timebase for encoder/decoder
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Wed, 11 Sep 2019 18:29:38 +0000 (11:29 -0700)]
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>
Maxime Jourdan [Fri, 30 Aug 2019 18:34:52 +0000 (11:34 -0700)]
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>
Aman Gupta [Sat, 24 Aug 2019 19:02:30 +0000 (12:02 -0700)]
avcodec/v4l2_context: expose timeout for dequeue_frame
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Fri, 30 Aug 2019 22:42:00 +0000 (15:42 -0700)]
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>
Aman Gupta [Fri, 30 Aug 2019 21:02:48 +0000 (14:02 -0700)]
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>
Paul B Mahol [Wed, 11 Sep 2019 14:43:10 +0000 (16:43 +0200)]
avfilter/vf_v360: remove pointless special case when allocating stuff
Paul B Mahol [Wed, 11 Sep 2019 14:21:25 +0000 (16:21 +0200)]
avfilter/vf_v360: refactor FoV calculation for stereographic
Move in out of loop.
Andriy Gelman [Sat, 7 Sep 2019 19:55:51 +0000 (15:55 -0400)]
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>
Paul B Mahol [Wed, 11 Sep 2019 13:03:43 +0000 (15:03 +0200)]
avfilter/vf_v360: extend max limit to vertical fov
Paul B Mahol [Wed, 11 Sep 2019 13:00:12 +0000 (15:00 +0200)]
avfilter/vf_v360: really fix FoV selection
Big thanks to Michael Koch for providing actual formula.
Jun Zhao [Tue, 10 Sep 2019 10:50:11 +0000 (18:50 +0800)]
lavfi/sinc: fix memory leak in error handling path
free work&pi_wraps in error handling path to avoid memory leak.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Jun Zhao [Tue, 10 Sep 2019 10:24:08 +0000 (18:24 +0800)]
lavfi/anequalizer: fix memory leak in error handling path
free the pad.name in error handling path to avoid memory leak.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Lynne [Thu, 15 Aug 2019 10:42:19 +0000 (11:42 +0100)]
checkasm: add opusdsp tests
Lynne [Thu, 15 Aug 2019 10:13:35 +0000 (11:13 +0100)]
opusdsp: adjust and optimize C function to match assembly
The C and asm versions behaved differently _outside_ of the codec.
The C version returned pre-multiplied 'state' for the next execution
to use right away, while the assembly version outputted non-multiplied
'state' for the next execution to multiply to save instructions.
Since the initial state when initialized or seeking is always 0,
and since C and asm versions were never mixed, there was no issue.
However, comparing outputs directly in checkasm doesn't work without
dividing the initial state by CELT_EMPH_COEFF and multiplying the
returned state by CELT_EMPH_COEFF for the assembly function.
Since its actually faster to do this in C as well, copy the behavior the
asm versions use. As a reminder, the initial state 0 is divided by
CELT_EMPH_COEFF on seek and init (just in case in the future this is
changed, its technically more correct to init with CELT_EMPH_COEFF than 0,
however when seeking this will result in more audiable pops, unlike with 0
where the output gets in sync over a few samples).
Lukas Rusak [Wed, 28 Aug 2019 21:56:47 +0000 (14:56 -0700)]
avcodec/v4l2_buffers: split out v4l2_buf_increase_ref helper
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Tue, 27 Aug 2019 01:53:05 +0000 (18:53 -0700)]
avcodec/v4l2_buffers: split out V4L2Buffer generation into helper method
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Tue, 27 Aug 2019 00:59:00 +0000 (17:59 -0700)]
avcodec/v4l2_buffers: split out AVFrame generation into helper method
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 20:57:27 +0000 (13:57 -0700)]
avcodec/v4l2_buffers: teach ff_v4l2_buffer_avframe_to_buf about contiguous planar formats
This fixes h264_v4l2m2m encoding on the Raspberry Pi
Signed-off-by: Aman Gupta <aman@tmm1.net>
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>
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>
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>
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>
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>
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>
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>
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.
Paul B Mahol [Tue, 10 Sep 2019 22:32:43 +0000 (00:32 +0200)]
avfilter/vf_v360: increase h_fov max limit
Paul B Mahol [Tue, 10 Sep 2019 21:34:53 +0000 (23:34 +0200)]
avfilter/vf_v360: fix fov calculation for stereographic output
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>
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>
Paul B Mahol [Tue, 10 Sep 2019 18:29:43 +0000 (20:29 +0200)]
doc/filters: extend flip options in v360 filter