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
2020-08-31avcodec/sheervideo: use cached bitstream reader except for x32Paul B Mahol
2020-08-31avcodec/magicyuv: change bits used by 12bit tablesPaul B Mahol
Higher number slows decoder.
2020-08-31avcodec/magicyuv: use cached bitstream reader except for x32Paul B Mahol
2020-08-31avcodec/magicyuv: invert symbols when building vlcPaul B Mahol
Instead at every decoded symbol.
2020-08-31avcodec/roqvideodec: Remove set-but-unused frame statsAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-31avcodec/roqvideodec: Move transient GetByteContext to the stackAndreas Rheinhardt
This avoids keeping potentially dangling pointers in the context, beautifies the code (by replacing "&ri->gb" by gb for every access to the GetByteContext) and also highlights the GetByteContext's short-lived nature better. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-31avcodec/cdxl: also mark decoded frame as keyframePaul B Mahol
2020-08-31avcodec/qpeg: reduce unnecessary size of tablesPaul B Mahol
2020-08-30libavcodec/jpeg2000: fix tag tree resetGautam Ramakrishnan
The implementation of the tag tree did not set the correct reset value for the encoder. This lead to inefficent tag tree being encoded. This patch fixes the implementation of the ff_tag_tree_zero() function. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30libavcodec/j2kenc: Support for multiple layersGautam Ramakrishnan
This patch allows setting a compression ratio and to set multiple layers. The user has to input a compression ratio for each layer. The per layer compression ration can be set as follows: -layer_rates "r1,r2,...rn" for to create 'n' layers. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30libavcodec/j2kenc: Fix tag tree codingGautam Ramakrishnan
The implementation of tag tree encoding was incorrect. However, this error was not visible as the current j2k encoder encodes only 1 layer. This patch fixes tag tree coding for JPEG2000 such tag tree coding would work for multi layer encoding. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30libavcodec/jpeg2000: Make tag tree functions non staticGautam Ramakrishnan
This patch makes the tag_tree_zero() and tag_tree_size() functions non static and callable from other files. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30avcodec/cfhd: Check transform typeMichael Niedermayer
Fixes: out of array access Fixes: 24823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4855119863349248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30avcodec/aacdec_template: Initialize `layout_map` on declarationXiaohan Wang
Without this change, it'll cause use-of-uninitialized-variable error. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30avcodec/mpegvideo_enc: Replace some s->avctx by avctxMichael Niedermayer
Fixes issue reported by: Xu Guangxin <guangxin.xu@intel.com> Original report: Steps to reproduce: 1. ./configure --enable-debug=3 --disable-libx264 && make install 2. ffmpeg -i input.mp4 -profile:v baseline output.mp4 -y you will see a crash like this: [mpeg4 @ 0x5555575854c0] [Eval @ 0x7fffffffbf80] Undefined constant or missing '(' in 'baseline' [mpeg4 @ 0x5555575854c0] Unable to parse option value "baseline" [mpeg4 @ 0x5555575854c0] Error setting option profile to value baseline. Thread 1 "ffmpeg" received signal SIGSEGV, Segmentation fault. root cause: If the codec has FF_CODEC_CAP_INIT_CLEANUP flag, and avcodec_open2 got an error before avctx->codec->init, the ff_mpv_encode_end will face a null s->avctx. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30avcodec/cfhd: Replace a few literal numbers by named constantsMichael Niedermayer
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30avcodec/truemotion1: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/y41penc: Remove empty close functionAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/yuv4enc: Remove empty functionsAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/wnv1: Move temporary variables from context to stackAndreas Rheinhardt
Here it even leads to the complete removal of the context. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/wnv1: Use LE bitstream reader, avoid copying packet, fix memleakAndreas Rheinhardt
The Winnov WNV1 format is designed for a little-endian bitstream reader; yet our decoder reversed every byte bitwise (in a buffer only allocated for this purpose) to use a big-endian bitstream reader. This commit stops this. Two things needed to be done to achieve this: The codes in the table used to initialize a VLC reader needed to be reversed bitwise (when initializing a VLC in LE mode, it is expected that the first bit to be read is in the least significant bit; with BE codes the first bit to be read is the most significant bit of the code) and the following expression needed to be adapted: ff_reverse[get_bits(&w->gb, 8 - w->shift)] But this is easy: When only the bits read are reversed, they coincide with what a little-endian bitstream reader reads that reads the original, not-reversed data. But ff_reverse always reverses the full eight bits and this also performs a shift by (8 - (8 - w->shift)) on top of reversing the bits read. So the above line needs to be changed to get_bits(&w->gb, 8 - w->shift) << w->shift and this also shows why the variable shift is named the way it is. Finally, this also fixes a hypothetical memleak: For gigantic packets, initializing a GetBitContext can fail and in this case, the buffer containing the reversed data would leak. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/roqvideoenc: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/roqvideodec: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/mss3: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/mss3: Remove unnecessary free of unallocated frameAndreas Rheinhardt
The frame will only be allocated a few lines below. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/interplayvideo: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/eacmv: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/cinepakenc: Cleanup generically after init failureAndreas Rheinhardt
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-29avcodec/truemotion2: Avoid duplicating array, fix memleakAndreas Rheinhardt
TrueMotion 2.0 uses Huffmann trees. To parse them, the decoder allocates arrays for the codes, their lengths and their value; afterwards a VLC table is initialized using these values. If everything up to this point succeeds, a new buffer of the same size as the already allocated arrays for the values is allocated and upon success the values are copied into the new array; all the old arrays are then freed. Yet if allocating the new array fails, the old arrays get freed, but the VLC table doesn't. This leak is fixed by not allocating a new array at all; instead the old array is simply reused, ensuring that nothing can fail after the creation of the VLC table. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-29x86/cfhddsp: zero extend int argumentsJames Almer
if taken from stack, they may have garbage in the upper bits otherwise. Also, there are only 8 arguments, so don't attempt to load 11. Fixes SIGSEV crashes in some targets. Reviewed-by: durandal_1707 Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-28avcodec/flacdec: use designated initializers for AVClassPaul B Mahol
2020-08-28avcodec/cfhd: Remove unused-but-set variableAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-27avcodec/x86/cfhddsp: try to fix build on x32Paul B Mahol
2020-08-26avcodec/cfhd: add x86 SIMDPaul B Mahol
Overall speed changes for 1920x1080, yuv422p10le, 60fps from: 0.19x to 0.343x
2020-08-26avcodec/tiff: Check jpeg context against jpeg frame parametersMichael Niedermayer
Fixes: out of array access Fixes: 24825/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6326925027704832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-26avcodec/tiff: Restrict tag order based on specificationMichael Niedermayer
"The entries in an IFD must be sorted in ascending order by Tag. Note that this is not the order in which the fields are described in this document." This way various dimensions, sample and bit sizes cannot be changed at arbitrary times which reduces the potential for bugs. The tag reading code also on various places assumes that numerically previous tags have already been parsed, so this needs to be enforced one way or another. If this commit causes problems with real world files which are not easy to fix then some other form of checks are needed to ensure the various dependencies in the tag reading are not violated. Fixes: out of array access Fixes: 24825/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6326925027704832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-26avcodec/tiff: Avoid abort with DNG RAW TIFF with YA8Michael Niedermayer
Fixes: Assertion failure Fixes: 24707/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5179910197608448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-26avcodec/tiff: Check the linearization table sizeMichael Niedermayer
Fixes: out of array access Fixes: 24604/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4843529818603520 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-26avcodec/libdav1d: Call ff_set_sar in addition to setting the frame SARDerek Buitenhuis
Similar to what we do in libaomdec.c. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2020-08-26avcodec/cbs_av1: fix setting FrameWidth in frame_size_with_refs()James Almer
Section 5.9.7 of the spec states UpscaledWidth = RefUpscaledWidth[ ref_frame_idx[ i ] ] FrameWidth = UpscaledWidth FrameHeight = RefFrameHeight[ ref_frame_idx[ i ] ] RenderWidth = RefRenderWidth[ ref_frame_idx[ i ] ] RenderHeight = RefRenderHeight[ ref_frame_idx[ i ] ] Meaning FrameWidth must not be set to RefFrameWidth[ ref_frame_idx[ i ] ] like we're currently doing. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/av1_parser: fix parsing show_existing_frame headersJames Almer
Regression since c8716b5029 Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: use a more appropiate AV1ReferenceFrameState pointer ↵James Almer
variable name frame is more commonly used for AV1RawFrameHeader and AV1RawFrame. Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: fix handling reference frames on show_existing_frame framesJames Almer
Implement Section 7.21 "Reference frame loading process" and Section 7.20 "Reference frame update process" for show_existing_frame frames, as required by the definition in Section 7.4 "Decode frame wrapup process". Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: infer frame_type in show_existing_frame frames earlierJames Almer
This follows the spec and will come in handy in the next commit. Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: add OrderHint to CodedBitstreamAV1ContextJames Almer
This follows the spec and will come in handy in a following commit. Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/aacdec_template: add more checks to make sure only 22.2 gets to 22.2Jan Ekström
Validates the set channel layout as well as verifies that the received layout to the function matches the reference layout, so that it matches the implemented re-ordering logic. Fixes #8845
2020-08-25avcodec/aacdec_template: keep tabs on layout in sniff_channel_orderJan Ekström
This way the layout set at various points can be checked instead of only having the layout at the end.
2020-08-24avcodec/av1_parser: read frame properties directly from AV1RawFrameHeaderJames Almer
Simplifies code Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-24avcodec/cbs_av1: infer frame_type when parsing a show_existing_frame frameJames Almer
Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-24avcodec/cbs_av1: infer frame sizes when not coded in the bitstreamJames Almer
This makes them available for all frames within a Temporal Unit. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>