summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/hevc_cabac: Pass HEVCLocalContext when slice-threadingAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This commit stops doing this for lavc/hevc_cabac.c; it also constifies everything that is possible in order to ensure that no slice thread accidentally modifies the main HEVCContext state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Add stat_coeffs to HEVCABACStateAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides with the main HEVCContext except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This led to confusion in the first version of what eventually became commit c8bc0f66a875bc3708d8dc11b757f2198606ffd7: Before said commit, the initialization of the Rice parameter derivation state was incorrect; the fix for single-threaded as well as frame-threaded decoding was to add backup stats to HEVCContext that are used when the cabac state is updated*, see https://ffmpeg.org/pipermail/ffmpeg-devel/2020-August/268861.html Yet due to what has been said above, this does not work for slice-threading, because the each HEVCLocalContext has its own HEVCContext, so the Rice parameter state would not be transferred between threads. This is fixed in c8bc0f66a875bc3708d8dc11b757f2198606ffd7 by a hack: It rederives what the previous thread was and accesses the corresponding HEVCContext. Fix this by treating the Rice parameter state the same way the ordinary CABAC parameters are shared between threads: Make them part of the same struct that is shared between slice threads. This does not cause races, because the parts of the code that access these Rice parameters are a subset of the parts of code that access the CABAC parameters. *: And if the persistent_rice_adaptation_enabled_flag is set. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc_filter: Pass HEVCLocalContext when slice-threadingAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides with the main HEVCContext except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This commit stops doing this for lavc/hevc_filter.c; it also constifies everything that is possible in order to ensure that no slice thread accidentally modifies the main HEVCContext state. There are places where this was not possible, namely with the SAOParams in sao_filter_CTB() or with sao_pixels_buffer_h in copy_CTB_to_hv(). Both of these instances lead to data races, see https://fate.ffmpeg.org/report.cgi?time=20220629145651&slot=x86_64-archlinux-gcc-tsan-slices Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc_mvs: Pass HEVCLocalContext when slice-threadingAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | | | | The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This commit stops doing this for lavc/hevc_mvs.c; it also constifies everything that is possible in order to ensure that no slice thread accidentally modifies the main HEVCContext state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Add pointers to logctx and parent ctx to HEVCLocalCtxAndreas Rheinhardt2022-07-25
| | | | | | | | | | | | | | | | It is safe for a slice thread to read the main context and therefore it is safe to add a pointer to const HEVCContext (namely the parent context) to each HEVCLocalContext. It is also safe (and actually redundant) to add a pointer to a logcontext to HEVCLocalContext. Doing so allows to pass the HEVCLocalContext as context in the parts of the code that is run slice-threaded when slice-threading is in use (currently these parts of the code use ordinary HEVCContext*). This way one is not tempted to modify the main context from the slice contexts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Don't initialize HEVCContexts twiceAndreas Rheinhardt2022-07-25
| | | | | | | | | | The slicethread contexts need to be initialized for every frame, not only the first one, so one can remove the initialization when allocating these contexts, because the ordinary per-frame initialization will initialize them again just a few lines below. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()Andreas Rheinhardt2022-07-25
| | | | | | | It is overridden by ff_add_bytes_l2_sse2() on any non-ancient CPU. Reviewed-by: Henrik Gramner <henrik@gramner.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Output MD5-message in one pieceAndreas Rheinhardt2022-07-24
| | | | | | | | | | | | | | | | Otherwise, there is no guarantee that the various av_log-messages are not interrupted by another log statement. The latter may originate from anywhere else, even the HEVC decoder itself, as happens when one uses frame-threading to decode the BUMPING_A_ericsson_1.bit sample from the FATE-suite. Furthermore, the earlier approach suffered from the fact that various parts of the logmsg were output with different loglevels and that checking stopped after having encountered the first plane with MD5 mismatch, although it is probably interesting to know whether other planes are incorrect, too. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/svq1enc: Use unsigned for parameter >= 0 to workaround GCC bugAndreas Rheinhardt2022-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encode_block() in svq1enc.c looks like the following: static int encode_block(int block[7][256], int level) { int best_score = 0; for (unsigned x = 0; x < level; x++) { int v = block[1][x]; block[level][x] = 0; best_score += v * v; } if (level > 0 && best_score > 64) { int score = 0; score += encode_block(block, level - 1); score += encode_block(block, level - 1); if (score < best_score) { best_score = score; } } return best_score; } When called from outside of encode_block(), it is always called with level == 5. This triggers a bug [1] in GCC: On -O3, it creates eight clones of encode_block with different values of level inlined into it. The clones with negative values are of course useless*, but they also lead to -Warray-bounds warnings, because they access block[-1]. This has been mitigated in GCC 12: It no longer creates clones for parameters that it knows are impossible. Somehow switching levels to unsigned makes GCC know this. Therefore this commit does this. (For GCC 11, this changes the warning to "array subscript 4294967295 is above array bounds" from "array subscript -1 is below array bounds".) [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102513 *: These clones can actually be discarded when compiling with -ffunction-sections. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_loopfilter: Fix incorrect function parameter array sizeAndreas Rheinhardt2022-07-23
| | | | | | | | | | | | | | | filter_mb_mbaff_edgev() and filter_mb_mbaff_edgecv() have a function parameter whose expected size depends upon another parameter: It is 2 * bsi + 1 (with bsi always being 1 or 2). This array is declared as const int16_t[7], yet some of the callers with bsi == 1 call it with only an const int16_t[4] available. This leads to -Wstringop-overread warnings from GCC 12.1. This commit fixes these by replacing [7] with [/* 2 * bsi + 1 */], so that the expected range and its dependence on bsi is immediately visible. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/snowenc: Don't pass int[2] as parameter declared as int[3]Andreas Rheinhardt2022-07-23
| | | | | | | | | | | | | | | | | | | | check_block_inter() currently does this when calling check_block(). This leads to a -Wstringop-overflow= warning when compiling with GCC 12.1. Given that the main part of the body of check_block() consists of an "if (intra) { ... } else { ... }" which is true iff check_block() is not called from check_block_inter(), it makes sense to fix this by just inlining check_block() check_block_inter() and turning check_block() into a new check_block_intra() (with the inter parts removed, of course). This should also not make much of a difference for the generated code given that both check_block() as well as check_block_inter() are already marked as av_always_inline, so this commit follows this route to fix the issue. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc_filter: copy_CTB() only within width&heightMichael Niedermayer2022-07-22
| | | | | | | | Fixes: out of array access Fixes: 49271/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5424984922652672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Check tile_length and tile_widthMichael Niedermayer2022-07-22
| | | | | | | | Fixes: Division by 0 Fixes: 49235/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5495613847896064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec: remove skip samples multiplierJames Almer2022-07-22
| | | | | | | | | The amount of padding samples reported by containers take into account the extended samplerate in HE-AAC. Fixes ticket #9671. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mss4: Check image size with av_image_check_size2()Michael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 48418/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MTS2_fuzzer-4834851466903552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check x/ysizeMichael Niedermayer2022-07-21
| | | | | | | | Fixes: OOM Fixes: 48911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6352002510094336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Fix AC_GOLOMB_RICE min size checkMichael Niedermayer2022-07-21
| | | | | | Found-by: mkver Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: consider run increase in minimal golomb frame sizeMichael Niedermayer2022-07-20
| | | | | | | | | Fixes: Timeout Fixes: 49160/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5672826144686080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videoenc: fix encoding long framesMichael Niedermayer2022-07-20
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hdrdec: lines can be emptyMichael Niedermayer2022-07-20
| | | | | | | | | Fixes: infinite loop Fixes: 49223/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HDR_fuzzer-6603308596330496 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>
* libavcodec/qsvenc: Use parameter from AVCodecContext to reset qsv codecWenbin Chen2022-07-20
| | | | | | | | | | | | | | | Using parameter from AVCodecContext to reset qsv codec is more suitable for MFXVideoENCODE_Reset()'s usage. Per-frame metadata is more suitable for the usage of mfxEncodeCtrl being passed to MFXVideoENCODE_EncodeFrameAsync(). Now change it to use the value from AVCodecContext. Because q->param is passed to both "in" and "out" parameters when call MFXVideoENCODE_Query(), the value in q->param may be changed. New variables are added to store old configuration, so that we can detect real parameter change. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Change the parameter log to be thread safeWenbin Chen2022-07-20
| | | | | | | | Dividing one line log into several av_log() call is not thread safe. Now merge these strings into one av_log() call. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* avcodec/wrapped_avframe: Don't presume AVPacket to be writableAndreas Rheinhardt2022-07-18
| | | | | | | | | | It need not be writable; in fact, it is often not writable even if the packet sent to the decoder was writable, because the generic code calls av_packet_ref() on it. It is never writable if a user drains the decoder after every packet, because in this case the decode callback is called from avcodec_send_packet(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wrapped_avframe: Don't leak frame metadata, side-dataAndreas Rheinhardt2022-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapped_avframe_decode() uses an AVFrame as dst in av_frame_move_ref() after having called ff_decode_frame_props() to attach side-date to this very frame. This leaks all the side-data and metadata that ff_decode_frame_props() has attached. This happens in various fate-filter-metadata tests since 6ca43a9675d651d7ea47c7ba2fafb1bf831c4d0b. These particular leaks (which affect metadata-only) could be fixed by not adding metadata side-data to AVPackets in libavdevice if they are also available from the AVFrames. Yet this would break users that extract the metadata from AVPackets. The changes to FATE happen because of the way av_dict_set() works when it overwrites an already existing entry: It overwrites the entry to be overwritten with the last entry and adds the new entry at the end. The end result is that the first entry of the dict is the second-to-last-entry of the original dict, the last entry of the dict is the last entry of the old dict and the first count - 2 entries of the original dict are at positions 1..count - 2 in their original order. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Make init-threadsafety the defaultAndreas Rheinhardt2022-07-18
| | | | | | | | | | | and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFEAndreas Rheinhardt2022-07-18
| | | | | | | This is in preparation of switching the default init-thread-safety to a codec being init-thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pnmdec: Mark PHM decoder as init-threadsafeAndreas Rheinhardt2022-07-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libjxlenc: avoid hard failure with unspecified primariesLeo Izen2022-07-17
| | | | | | | | This patch prevents the libjxl encoder wrapper from failing to encode images when the input video has untagged primaries. It will instead assume BT.709/sRGB primaries and print a warning. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec: add Radiance HDR image format supportPaul B Mahol2022-07-16
|
* aarch64: me_cmp: Don't do uaddlv once per iterationMartin Storsjö2022-07-16
| | | | | | | | | | | | | | | | | | | | The max height is currently documented as 16; the max difference per pixel is 255, and a .8h element can easily contain 16*255, thus keep accumulating in two .8h vectors, and just do the final accumulationat the end. This should work for heights up to 256. This requires a minor register renumbering in ff_pix_abs16_xy2_neon. Before: Cortex A53 A72 A73 Graviton 3 pix_abs_0_0_neon: 97.7 47.0 37.5 22.7 pix_abs_0_1_neon: 154.0 59.0 52.0 25.0 pix_abs_0_3_neon: 179.7 96.7 87.5 41.2 After: pix_abs_0_0_neon: 96.0 39.2 31.2 22.0 pix_abs_0_1_neon: 150.7 59.7 46.2 23.7 pix_abs_0_3_neon: 175.7 83.7 81.7 38.2 Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: me_cmp: Switch from uabd to uabal in ff_pix_abs16_xy2_neonMartin Storsjö2022-07-16
| | | | | | | | | | | | | | | | | | Using absolute-difference-accumulate does use twice the amount of absolute-difference instructions, but avoids the need for the uaddl and add instructions, reducing the total number of instructions by 3. These can be interleaved in the rest of the calculation, to avoid tight dependencies at the end. Unfortunately, this is marginally slower on Cortex A53, but faster on A72 and A73. Before: Cortex A53 A72 A73 Graviton 3 pix_abs_0_3_neon: 175.7 109.2 92.0 41.2 After: pix_abs_0_3_neon: 179.7 96.7 87.5 41.2 Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: me_cmp: Interleave some of the loads in ff_pix_abs16_xy2_neonMartin Storsjö2022-07-16
| | | | | | | | | Before: Cortex A53 A72 A73 Graviton 3 pix_abs_0_3_neon: 183.7 112.7 97.5 41.2 After: pix_abs_0_3_neon: 175.7 109.2 92.0 41.2 Signed-off-by: Martin Storsjö <martin@martin.st>
* libavcodec: aarch64: Don't clobber v8 in the h%4 case in ff_pix_abs16_xy2_neonMartin Storsjö2022-07-16
| | | | | | Checkasm doesn't currently test this codepath. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/lagarith: Check dst/src in zero run codeMichael Niedermayer2022-07-14
| | | | | | | | | Fixes: out of array access Fixes: 48799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-4764457825337344 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>
* lavc/aarch64: Add pix_abs16_x2 neon implementationHubert Mazur2022-07-13
| | | | | | | | | | | | | Provide neon implementation for pix_abs16_x2 function. Performance tests of implementation are below. - pix_abs_0_1_c: 283.5 - pix_abs_0_1_neon: 39.0 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur <hum@semihalf.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* Bump versions after 5.1 branchMichael Niedermayer2022-07-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump Versions for 5.1 branchMichael Niedermayer2022-07-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264dec: Skip late SEIMichael Niedermayer2022-07-12
| | | | | | | | | Fixes: Race condition Fixes: clusterfuzz-testcase-minimized-mediasource_MP2T_AVC_pipeline_integration_fuzzer-6282675434094592 Found-by: google ClusterFuzz Tested-by: Dan Sanders <sandersd@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sbrdsp_fixed: Fix integer overflows in sbr_qmf_deint_neg_c()Michael Niedermayer2022-07-12
| | | | | | | | Fixes: signed integer overflow: 2147483645 + 16 cannot be represented in type 'int' Fixes: 46993/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-4759025234870272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pixlet: consider minimum plane header in the minimal packet sizeMichael Niedermayer2022-07-12
| | | | | | | | Fixes: Timeout Fixes: 46956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PIXLET_fuzzer-5698161106092032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevcdsp_template: stay within tables in sao_band_filter()Michael Niedermayer2022-07-12
| | | | | | | | Fixes: out of array read Fixes: 47875/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5719393113341952 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Check pixel format types for dngMichael Niedermayer2022-07-12
| | | | | | | | Fixes: out of array access Fixes: 48271/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6149705769287680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qpeldsp: copy less for the mc0x casesMichael Niedermayer2022-07-12
| | | | | | | | Fixes: out of array access Fixes: 47936/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5745039940124672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Check for min packet sizeMichael Niedermayer2022-07-12
| | | | | | | | Fixes: Timeout Fixes: 48619/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5793597923917824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Limit golomb rice coded slices to width 8MMichael Niedermayer2022-07-12
| | | | | | | This limit is possibly not reachable due to other restrictions on buffers but the decoder run table is too small beyond this, so explicitly check for it. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wnv1: Check for width =1Michael Niedermayer2022-07-12
| | | | | | | | | | The decoder only outputs pixels for width >1 images, fail early Fixes: Timeout Fixes: 48298/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WNV1_fuzzer-6198626319204352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: fix indentionMichael Niedermayer2022-07-12
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/aarch64: Hook up the existing ff_pix_abs16_neon to the sad[0] function ↵Hubert Mazur2022-07-11
| | | | | | | pointer Signed-off-by: Hubert Mazur <hum@semihalf.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/pcm-dvdenc: Fix encoding 24bit samplesAndreas Rheinhardt2022-07-10
| | | | | | | | The earlier code ignored the lower 16 bits and instead used the highest 8 bits twice. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>