Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-21avcodec/utils: Check channels fully earlierMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-21avcodec/ac3enc: Fix invalid shiftAndreas Rheinhardt
Fixes the FATE-tests unknown_layout-ac3, ac3-fixed-encode, ac3-encode and eac3-encode. It furthermore fixes the ac3-encoder bugs mentioned in tickets #7994, #8144 and #8159. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-21avcodec/g723_1dec: Fix invalid shiftAndreas Rheinhardt
Fixes the FATE-tests g723_1-dec-1, g723_1-dec-2 and g723_1-dec-4. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-21avcodec/tdsc: Fix undefined shiftsAndreas Rheinhardt
Fixes the tdsc FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-20Delete unused branch in libaomencelliottk
this branch is leftover from libvpxenc+vp8 Signed-off-by: James Zern <jzern@google.com>
2019-09-20avcodec/libvpxenc: add ROI-based encoding support for VP8/VP9Guo, Yejun
example command line to verify it: ./ffmpeg -i input.stream -vf addroi=0:0:iw/3:ih/3:-0.8 -c:v libvpx -b:v 2M tmp.webm Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: James Zern <jzern@google.com>
2019-09-20lavc/cook: Remove an incorrect comment.Carl Eugen Hoyos
Multichannel cook was implemented in 67da3182.
2019-09-19avcodec: add EPG codec IDAnthony Delannoy
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-18avcodec/v210enc: move v210_enc_8/10 function to template fileLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-18avcodec/v210enc: make 8bit and 10bit process consistentLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-18avcodec/v210enc: add depth parameter for WRITE_PIXELS and CLIPLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-18avcodec/avpacket: Improve allocating packetsAndreas Rheinhardt
av_mallocz + av_init_packet leads to the same result as av_mallocz + av_packet_unref, but faster. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-18avcodec/mjpegdec: Unify switch statementsAndreas Rheinhardt
This has been forgotten in d5a3a20d. Found via PVS-Studio (see ticket #8156). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-16avcodec/hevcdec: Fix memleak of a53_captionMichael Niedermayer
Fixes: 15295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5675655187922944 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-16avcodec/ttaenc: Fix undefined shiftAndreas Rheinhardt
ttaenc contained (1 << unary) - 1 as an argument for a function expecting an unsigned int. unary can be as big as 31 in this case. The type of the shift and the whole expression is int, because 1 fits into an integer, so that the behaviour is undefined if unary == 31 as the result of the shift can't be represented in an int §. Subtraction by 1 (which makes the result of the whole expression representable in an int) doesn't change that this is undefined (it usually leads to signed integer overflow which is undefined, too). The solution is simple: Make 1 unsigned to change the type of the whole expression to unsigned int (as the function expects anyway). Fixes ticket #8153. §: This of course presupposes the common int range of -2^31..2^31-1 Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-16lavc/g729dec: Support decoding Sipro ACELP.KELVIN.Carl Eugen Hoyos
Fixes ticket #4799. Analyzed-by: Aleksandr Ustinov
2019-09-16avcodec/allcodecs: make libdav1d the preferred AV1 decoderJames Almer
It's considerably faster than libaom in most systems. Reviewed-by: BBB Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-16avcodec/videotoolboxenc: warn user when output will use a different ↵Rick Kern
profile/level than requested. Signed-off-by: Rick Kern <kernrj@gmail.com>
2019-09-16avcodec/videotoolboxenc: add H264 Extended profile and levelLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Rick Kern <kernrj@gmail.com>
2019-09-16avcodec/videotoolboxenc: fix encoding frame crash on iOS 11sharpbai
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>
2019-09-16avcodec/cfhd: Check that cropped size is smaller than fullMichael Niedermayer
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
2019-09-16avcodec/hevcdec: repeat character in skipedMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-16repeat an even number of characters in occuredMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-16avcodec/gdv: Replace assert() checking bitstream by if()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-16libavcodec/utils: Free threads on init failureMichael Niedermayer
Fixes: Multiple memleaks Fixes: ffmpeg-memory-leak Found-by: Francis Provencher <francis@protekresearchlab.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-16avutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros.gxw
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>
2019-09-15lavc/videotoolboxdec: fix crop handling when multithreadedRodger Combs
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>
2019-09-15avcodec/v4l2: fix compile with older videodev2.hAman Gupta
Some of these symbols are only defined in newer kernel releases. Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-15avcodec/libdav1d: use the library default for the filmgrain optionJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-13avcodec/mjpegdec: Restore non bayer checks in ljpeg_decode_rgb_scan()Michael Niedermayer
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-13avcodec/mjpegdec: Only allow 0x11110000 pix_fmt_id for bayer modeMichael Niedermayer
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-12x85/opusdsp: enable the functions on all FMA3 CPUsJames Almer
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-12x86/opusdps: clear the high bits from some gprsJames Almer
Fixes checkasm on systems like win64. Reviewed-by: Lynne Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-11avcodec/htmlsubtitles: Avoid locale dependant isdigit()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11avcodec/mpeg12enc: Add FF_CODEC_CAP_INIT_CLEANUPMichael Niedermayer
Fixes: Multiple memleaks Fixes: ffmpeg-memory-leak Found-by: Francis Provencher <francis@protekresearchlab.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11avcodec/alsdec: Check k from being outside what our implementation can handleMichael Niedermayer
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-11avcodec/takdec: Fix integer overflow in decorrelate()Michael Niedermayer
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-11avcodec/aacps: Fix integer overflows in hybrid_synthesis()Michael Niedermayer
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-11avcodec/mpeg4videodec: Fix integer overflow in mpeg4_decode_studio_block()Michael Niedermayer
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-11avcodec/vp56rac: delay signaling an error on truncated inputMichael Niedermayer
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>
2019-09-11avcodec/v4l2_context: set frame SAR using VIDIOC_CROPCAPMaxime Jourdan
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11avcodec/v4l2_buffers: use correct timebase for encoder/decoderAman Gupta
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11avcodec/v4l2_m2m_dec: fix compileAman Gupta
internal.h header required for FF_CODEC_CAP_SETS_PKT_DTS Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11avcodec/v4l2_m2m_dec: fix dropped packets while decodingMaxime Jourdan
* 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-11avcodec/v4l2_context: expose timeout for dequeue_frameAman Gupta
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-11avcodec/v4l2_m2m_dec: set pkt_dts on decoded frames to NOPTSAman Gupta
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-11avcodec/v4l2_buffers: read height/width from the proper contextAman Gupta
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-11avcodec/h2645_parse: simplify memset callAndriy Gelman
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-11opusdsp: adjust and optimize C function to match assemblyLynne
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).
2019-09-11avcodec/v4l2_buffers: split out v4l2_buf_increase_ref helperLukas Rusak
Signed-off-by: Aman Gupta <aman@tmm1.net>