Projects
home:Fisiu:Slowroll
A_slowroll-ffmpeg-6
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
ffmpeg-6.changes
Changed
@@ -1,14 +1,4 @@ ------------------------------------------------------------------- -Wed Jan 1 11:13:35 UTC 2025 - Dave Plater <davejplater@gmail.com> - -- Update to version 6.1.2 and fix Factory build. -- Remove incorporated patches: - 0001-avcodec-tests-rename-the-bundled-Mesa-AV1-vulkan-vid.patch, - ffmpeg-6-CVE-2024-7055.patch and ffmpeg-6-CVE-2024-32230.patch - Upstream changes: - See /usr/shar/doc/packages/ffmpeg-6/Changelog - -------------------------------------------------------------------- Mon Sep 30 12:34:56 UTC 2024 - olaf@aepfle.de - Fix assertion due to missing priv_data cleanup on failed VAAPI
View file
ffmpeg-6.spec
Changed
@@ -16,7 +16,6 @@ # -%define vers 6.1.2 %define flavor @BUILD_FLAVOR@%nil %if "%flavor" != "ffmpeg-6-mini" @@ -84,7 +83,7 @@ %define _major_expected 7 Name: ffmpeg-6 -Version: 6.1.2 +Version: 6.1.1 Release: 0 Summary: Set of libraries for working with various multimedia formats License: GPL-3.0-or-later @@ -108,6 +107,7 @@ Patch3: ffmpeg-codec-choice.diff Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch5: work-around-abi-break.patch +Patch6: 0001-avcodec-tests-rename-the-bundled-Mesa-AV1-vulkan-vid.patch Patch7: 0001-avfilter-asrc_afirsrc-fix-by-one-smaller-allocation-.patch Patch8: 0001-avfilter-bwdif-account-for-chroma-sub-sampling-in-mi.patch Patch9: 0001-avfilter-af_dialoguenhance-fix-overreads.patch @@ -123,7 +123,9 @@ Patch93: ffmpeg-CVE-2023-50008.patch Patch94: ffmpeg-6-CVE-2024-32228-shim-1535d338.patch Patch95: ffmpeg-6-CVE-2024-32228-shim-f50382cb.patch +Patch96: ffmpeg-6-CVE-2024-32230.patch Patch97: ffmpeg-c99.patch +Patch98: ffmpeg-6-CVE-2024-7055.patch # # preamble is present twice, watch out # @@ -815,7 +817,7 @@ %else %define _name ffmpeg Name: ffmpeg-6-mini -Version: %{vers} +Version: 6.1.1 Release: 0 Summary: Set of libraries for working with various multimedia formats License: GPL-3.0-or-later @@ -829,6 +831,7 @@ Patch3: ffmpeg-codec-choice.diff Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch5: work-around-abi-break.patch +Patch6: 0001-avcodec-tests-rename-the-bundled-Mesa-AV1-vulkan-vid.patch Patch7: 0001-avfilter-asrc_afirsrc-fix-by-one-smaller-allocation-.patch Patch8: 0001-avfilter-bwdif-account-for-chroma-sub-sampling-in-mi.patch Patch9: 0001-avfilter-af_dialoguenhance-fix-overreads.patch @@ -844,6 +847,7 @@ Patch93: ffmpeg-CVE-2023-50008.patch Patch94: ffmpeg-6-CVE-2024-32228-shim-1535d338.patch Patch95: ffmpeg-6-CVE-2024-32228-shim-f50382cb.patch +Patch96: ffmpeg-6-CVE-2024-32230.patch Patch97: ffmpeg-c99.patch BuildRequires: c_compiler Requires: this-is-only-for-build-envs
View file
0001-avcodec-tests-rename-the-bundled-Mesa-AV1-vulkan-vid.patch
Added
@@ -0,0 +1,992 @@ +From e06ce6d2b45edac4a2df04f304e18d4727417d24 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= <jeebjp@gmail.com> +Date: Wed, 14 Feb 2024 22:40:54 +0200 +Subject: PATCH {avcodec,tests}: rename the bundled Mesa AV1 vulkan video + headers + +This together with adjusting the inclusion define allows for the +build to not fail with latest Vulkan-Headers that contain the +stabilized Vulkan AV1 decoding definitions. + +Compilation fails currently as the AV1 header is getting included +via hwcontext_vulkan.h -> <vulkan/vulkan.h> -> vulkan_core.h, which +finally includes vk_video/vulkan_video_codec_av1std.h and the decode +header, leading to the bundled header to never defining anything +due to the inclusion define being the same. + +This fix is imperfect, as it leads to additional re-definition +warnings for things such as +VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is +not clear how to otherwise have the bundled version trump the +actually standardized one for a short-term compilation fix. +--- + libavcodec/Makefile | 4 +- + libavcodec/vulkan_video.h | 4 +- + libavcodec/vulkan_video_codec_av1std.h | 403 ------------------ + libavcodec/vulkan_video_codec_av1std_decode.h | 36 -- + .../vulkan_video_codec_av1std_decode_mesa.h | 36 ++ + libavcodec/vulkan_video_codec_av1std_mesa.h | 403 ++++++++++++++++++ + tests/ref/fate/source | 4 +- + 7 files changed, 445 insertions(+), 445 deletions(-) + delete mode 100644 libavcodec/vulkan_video_codec_av1std.h + delete mode 100644 libavcodec/vulkan_video_codec_av1std_decode.h + create mode 100644 libavcodec/vulkan_video_codec_av1std_decode_mesa.h + create mode 100644 libavcodec/vulkan_video_codec_av1std_mesa.h + +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index 470d7cb9b1..09ae5270b3 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1262,7 +1262,7 @@ SKIPHEADERS += %_tablegen.h \ + aacenc_quantization.h \ + aacenc_quantization_misc.h \ + bitstream_template.h \ +- vulkan_video_codec_av1std.h \ ++ vulkan_video_codec_av1std_mesa.h \ + $(ARCH)/vpx_arith.h \ + + SKIPHEADERS-$(CONFIG_AMF) += amfenc.h +@@ -1285,7 +1285,7 @@ SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h + SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h + SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h + SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h +-SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h ++SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h + SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h + SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h + +diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h +index b28e3fe0bd..51f44dd543 100644 +--- a/libavcodec/vulkan_video.h ++++ b/libavcodec/vulkan_video.h +@@ -23,8 +23,8 @@ + #include "vulkan.h" + + #include <vk_video/vulkan_video_codecs_common.h> +-#include "vulkan_video_codec_av1std.h" +-#include "vulkan_video_codec_av1std_decode.h" ++#include "vulkan_video_codec_av1std_mesa.h" ++#include "vulkan_video_codec_av1std_decode_mesa.h" + + #define CODEC_VER_MAJ(ver) (ver >> 22) + #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1)) +diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std.h +deleted file mode 100644 +index c46236c457..0000000000 +--- a/libavcodec/vulkan_video_codec_av1std.h ++++ /dev/null +@@ -1,403 +0,0 @@ +-/* Copyright 2023 Lynne +- * Copyright 2023 Dave Airlie +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ +-#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 +- +-/* +-** This header is NOT YET generated from the Khronos Vulkan XML API Registry. +-** +-*/ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +-#define vulkan_video_codec_av1std 1 +- +-#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ +- ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) +-#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 VK_MAKE_VIDEO_STD_VERSION(0, 1, 0) +-#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 +-#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode" +- +-typedef enum StdVideoAV1MESAProfile { +- STD_VIDEO_AV1_MESA_PROFILE_MAIN = 0, +- STD_VIDEO_AV1_MESA_PROFILE_HIGH = 1, +- STD_VIDEO_AV1_MESA_PROFILE_PROFESSIONAL = 2, +-} StdVideoAV1MESAProfile; +- +-typedef enum StdVideoAV1MESALevel { +- STD_VIDEO_AV1_MESA_LEVEL_2_0 = 0, +- STD_VIDEO_AV1_MESA_LEVEL_2_1 = 1, +- STD_VIDEO_AV1_MESA_LEVEL_2_2 = 2, +- STD_VIDEO_AV1_MESA_LEVEL_2_3 = 3, +- STD_VIDEO_AV1_MESA_LEVEL_3_0 = 4, +- STD_VIDEO_AV1_MESA_LEVEL_3_1 = 5, +- STD_VIDEO_AV1_MESA_LEVEL_3_2 = 6, +- STD_VIDEO_AV1_MESA_LEVEL_3_3 = 7, +- STD_VIDEO_AV1_MESA_LEVEL_4_0 = 8, +- STD_VIDEO_AV1_MESA_LEVEL_4_1 = 9, +- STD_VIDEO_AV1_MESA_LEVEL_4_2 = 10, +- STD_VIDEO_AV1_MESA_LEVEL_4_3 = 11, +- STD_VIDEO_AV1_MESA_LEVEL_5_0 = 12, +- STD_VIDEO_AV1_MESA_LEVEL_5_1 = 13, +- STD_VIDEO_AV1_MESA_LEVEL_5_2 = 14, +- STD_VIDEO_AV1_MESA_LEVEL_5_3 = 15, +- STD_VIDEO_AV1_MESA_LEVEL_6_0 = 16, +- STD_VIDEO_AV1_MESA_LEVEL_6_1 = 17, +- STD_VIDEO_AV1_MESA_LEVEL_6_2 = 18, +- STD_VIDEO_AV1_MESA_LEVEL_6_3 = 19, +- STD_VIDEO_AV1_MESA_LEVEL_7_0 = 20, +- STD_VIDEO_AV1_MESA_LEVEL_7_1 = 21, +- STD_VIDEO_AV1_MESA_LEVEL_7_2 = 22, +- STD_VIDEO_AV1_MESA_LEVEL_7_3 = 23, +- STD_VIDEO_AV1_MESA_LEVEL_MAX = 31, +-} StdVideoAV1MESALevel; +- +-typedef struct StdVideoAV1MESAFilmGrainFlags { +- uint8_t apply_grain; +- uint8_t chroma_scaling_from_luma; +- uint8_t overlap_flag; +- uint8_t clip_to_restricted_range; +-} StdVideoAV1MESAFilmGrainFlags; +- +-typedef struct StdVideoAV1MESAFilmGrainParameters { +- StdVideoAV1MESAFilmGrainFlags flags; +- uint32_t grain_scaling_minus_8; +- uint32_t ar_coeff_lag; +- uint32_t ar_coeff_shift_minus_6; +- uint32_t grain_scale_shift; +- +- uint16_t grain_seed; +- uint8_t num_y_points; +- uint8_t point_y_value14; +- uint8_t point_y_scaling14; +- +- uint8_t num_cb_points; +- uint8_t point_cb_value10; +- uint8_t point_cb_scaling10; +- +- uint8_t num_cr_points; +- uint8_t point_cr_value10; +- uint8_t point_cr_scaling10; +- +- int8_t ar_coeffs_y_plus_12824; +- int8_t ar_coeffs_cb_plus_12825; +- int8_t ar_coeffs_cr_plus_12825; +- uint8_t cb_mult; +- uint8_t cb_luma_mult; +- uint16_t cb_offset; +- uint8_t cr_mult; +- uint8_t cr_luma_mult; +- uint16_t cr_offset; +-} StdVideoAV1MESAFilmGrainParameters; +- +-typedef struct StdVideoAV1MESAGlobalMotionFlags { +- uint8_t gm_invalid; +-} StdVideoAV1MESAGlobalMotionFlags; +- +-typedef struct StdVideoAV1MESAGlobalMotion { +- StdVideoAV1MESAGlobalMotionFlags flags; +- uint8_t gm_type; +- uint32_t gm_params6; +-} StdVideoAV1MESAGlobalMotion; +- +-typedef struct StdVideoAV1MESALoopRestoration { +- uint8_t lr_type3; +- uint8_t lr_unit_shift; +- uint8_t lr_uv_shift;
View file
ffmpeg-6-CVE-2024-32230.patch
Added
@@ -0,0 +1,25 @@ +From 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1 +Author: Michael Niedermayer <michael@niedermayer.cc> +Date: Mon Apr 8 18:38:42 2024 +0200 +Subject: avcodec/mpegvideo_enc: Fix 1 line and one column images +References: CVE-2024-32230 +References: bsc#1227296 +Upstream: Backport from upstream + +Fixes: Ticket10952 +Fixes: poc21ffmpeg +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + +--- ffmpeg-6.1.1/libavcodec/mpegvideo_enc.c 2023-12-31 08:07:26.000000000 +0800 ++++ ffmpeg-6.1.1_new/libavcodec/mpegvideo_enc.c 2024-07-05 18:08:49.827035281 +0800 +@@ -1198,8 +1198,8 @@ + int dst_stride = i ? s->uvlinesize : s->linesize; + int h_shift = i ? s->chroma_x_shift : 0; + int v_shift = i ? s->chroma_y_shift : 0; +- int w = s->width >> h_shift; +- int h = s->height >> v_shift; ++ int w = AV_CEIL_RSHIFT(s->width , h_shift); ++ int h = AV_CEIL_RSHIFT(s->height, v_shift); + const uint8_t *src = pic_arg->datai; + uint8_t *dst = pic->f->datai; + int vpad = 16;
View file
ffmpeg-6-CVE-2024-7055.patch
Added
@@ -0,0 +1,29 @@ +From 3faadbe2a27e74ff5bb5f7904ec27bb1f5287dc8 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Thu, 18 Jul 2024 21:12:54 +0200 +Subject: PATCH avcodec/pnmdec: Use 64bit for input size check +References: CVE-2024-7055 +References: bsc#1229026 +Upstream: Backport from upstream + +Fixes: out of array read +Fixes: poc3 + +Reported-by: VulDB CNA Team +Found-by: CookedMelon +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> +--- + libavcodec/pnmdec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- ffmpeg-6.1.1/libavcodec/pnmdec.c ++++ ffmpeg-6.1.1_new/libavcodec/pnmdec.c +@@ -264,7 +264,7 @@ + break; + case AV_PIX_FMT_GBRPF32: + if (!s->half) { +- if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream) ++ if (avctx->width * avctx->height * 12LL > s->bytestream_end - s->bytestream) + return AVERROR_INVALIDDATA; + scale = 1.f / s->scale; + if (s->endian) {
View file
_scmsync.obsinfo
Added
@@ -0,0 +1,4 @@ +mtime: 1727699696 +commit: 75e90aafe03b304ab0873033d2ae513d0f4e21876f83265dc34260908f90052f +url: https://src.opensuse.org/jengelh/ffmpeg-6 +revision: master
View file
ffmpeg-6.1.1.tar.xz.asc
Added
@@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmWQvW4YHGZmbXBlZy1k +ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYWJgH+wVyt5Var56jG1YL+2cr9XCQ +E1pfyKEX4j23y4MtRhk/Oks1apqHZ3MtP+u/K+Z2nwqdUh8kMdczWBRqcSl/qxdr +Ak2uFVwIIg4eF03XplWjIbOdMJACaWTz2vOyX9GjwTe6rckcGHBZXd41IzYnJHLh +3pvxMp4TBxmiAjfrvzzMBFqgmD+WlmrYDqTsw1B1eq2OSNNjQzfd7VEy0+B/eQ13 +T0kIC2vh/N1OcJloYW5I1Cb8zUmLRFztoVL5JXR41jFYgPxjpjG1hjS/bEB47qXb +7Kte43eesFaGWKBFYp8lU5IoIxuB9utXjPunZV8WVgVpslhptPLwe4EgBKeU1to= +=BdLd +-----END PGP SIGNATURE-----
View file
ffmpeg-6.1.2.tar.xz/Changelog -> ffmpeg-6.1.1.tar.xz/Changelog
Changed
@@ -1,341 +1,6 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version 6.1.2 - avcodec/snow: Fix off by 1 error in run_buffer - avcodec/utils: apply the same alignment to YUV410 as we do to YUV420 for snow - swscale: loongarch Fix checkasm-sw_yuv2rgb failure. - avcodec/pngenc: fix sBIT writing for indexed-color PNGs - avcodec/pngdec: use 8-bit sBIT cap for indexed PNGs per spec - avcodec/videotoolboxenc: Fix bitrate doesn't work as expected - Changelog: update - avdevice/dshow: Don't skip audio devices if no video device is present - avcodec/hdrenc: Allocate more space - avcodec/cfhdenc: Height of 16 is not supported - avcodec/cfhdenc: Allocate more space - avcodec/osq: fix integer overflow when applying factor - avcodec/osq: avoid using too large numbers for shifts and integers in update_residue_parameter() - avcodec/vaapi_encode: Check hwctx - avcodec/proresdec: Consider negative bits left - avcodec/alsdec: Clear shift_value - avcodec/hevc/hevcdec: Do not allow slices to depend on failed slices - avfilter/vf_xfade: Check ff_inlink_consume_frame() for failure - avutil/slicethread: Check pthread_*_init() for failure - avutil/frame: Check log2_crop_align - avutil/buffer: Check ff_mutex_init() for failure - avformat/xmv: Check this_packet_size - avformat/ty: rec_size seems to only need 32bit - avformat/tty: Check avio_size() - avformat/siff: Basic pkt_size check - avformat/sauce: Check avio_size() for failure - avformat/sapdec: Check ffurl_get_file_handle() for error - avformat/nsvdec: Check asize for PCM - avformat/mp3dec: Check header_filesize - avformat/mp3dec; Check for avio_size() failure - avformat/mov: Use 64bit for str_size - avformat/mm: Check length - avformat/hnm: Check *chunk_size - avformat/hlsenc: Check ret - avformat/bintext: Check avio_size() return - avformat/asfdec_o: Check size of index object - avfilter/vf_scale: Check ff_scale_adjust_dimensions() for failure - avfilter/scale_eval: Use 64bit, check values in ff_scale_adjust_dimensions() - avfilter/vf_lut3d: Check av_scanf() - avfilter/vf_elbg: Use unsigned for shifting into the top bit - avfilter/vf_deshake_opencl: Ensure that the first iteration initializes the best variables - swscale/output: Fix integer overflows in yuv2rgba64_X_c_template - avformat/mxfdec: Reorder elements of expression in bisect loop - avutil/timecode: Use a 64bit framenum internally - avcodec/pnmdec: Use 64bit for input size check - avcodec/mpeg12enc: Use av_rescale() in vbv_buffer_size computation - avcodec/utvideoenc: Use unsigned shift to build flags - avcodec/j2kenc: Merge dwt_norm into lambda - avcodec/vc2enc: Fix overflows with storing large values - avcodec/mpegvideo_enc: Do not duplicate pictures on shifting - avdevice/dshow_capture: Fix error handling in ff_dshow_##prefix##_Create() - avcodec/tiff: Check value on positive signed targets - avfilter/vf_convolution_opencl: Assert that the filter name is one of the filters - avfilter/vf_bm3d: Dont round MSE2SSE to an integer - avdevice/dshow: Remove NULL check on pin - avdevice/dshow: check ff_dshow_pin_ConnectionMediaType() for failure - avdevice/dshow: Check device_filter_unique_name before use - avdevice/dshow: Cleanup also on av_log case - avdevice/dshow_filter: Use wcscpy_s() - avcodec/flac_parser: Assert that we do not overrun the link_penalty array - avcodec/osq: avoid signed overflow in downsample path - avcodec/pixlet: Simplify pfx computation - avcodec/motion_est: Fix score squaring overflow - avcodec/mlpenc: Use 64 for ml, mr - avcodec/loco: Check loco_get_rice() for failure - avcodec/loco: check get_ur_golomb_jpegls() for failure - avcodec/imm4: check cbphi for error - avcodec/iff: Use signed count - avcodec/golomb: Assert that k is in the supported range for get_ur/sr_golomb() - avcodec/golomb: Document return for get_ur_golomb_jpegls() and get_sr_golomb_flac() - avcodec/dxv: Fix type in get_opcodes() - avcodec/cri: Check length - avcodec/xsubdec: Check parse_timecode() - avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit - doc/examples/mux: remove nop - avcodec/proresenc_kostya: use unsigned alpha for rotation - avformat/rtpenc_rfc4175: Use 64bit in computation if copy_offset - avformat/rtmppkt: Simplify and deobfuscate amf_tag_skip() slightly - avformat/rmdec: use 64bit for audio_framesize checks - avutil/wchar_filename: Correct sizeof - avutil/hwcontext_d3d11va: correct sizeof IDirect3DSurface9 - avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor on error - avutil/hwcontext_d3d11va: correct sizeof AVD3D11FrameDescriptor - doc/examples/vaapi_encode: Try to check fwrite() for failure - avformat/usmdec: Initialize value - avformat/tls_schannel: Initialize ret - avformat/subfile: Assert that whence is a known case - avformat/subfile: Merge if into switch() - avformat/rtsp: Check that lower transport is handled in one of the if() - avformat/rtsp: initialize reply1 - avformat/rtsp: use < 0 for error check - avformat/rtpenc_vc2hq: Check sizes - avfilter/af_aderivative: Free out on error - swscale/swscale: Use ptrdiff_t for linesize computations - avfilter/af_afir: Assert format - avfilter/af_afftdn: Assert format - avfilter/af_pan: check nb_output_channels before use - cbs_av1: Reject thirty-two zero bits in uvlc code - avfilter/af_mcompand: compute half frequency in double - avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds - avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure - tools/coverity: Phase 1 study of anti-halicogenic for coverity av_rescale() - avfilter/vf_avgblur: Check plane instead of AVFrame - avfilter/drawutils: Fix depthb computation - avfilter/avf_showcwt: Check av_parse_video_rate() for failure - avformat/rdt: Check pkt_len - avformat/mpeg: Check len in mpegps_probe() - avformat/mxfenc: resurrects the error print - avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure - avcodec/mfenc: check IMFSample_ConvertToContiguousBuffer() for failure - avcodec/vc1_loopfilter: Factor duplicate code in vc1_b_h_intfi_loop_filter() - avformat/img2dec: assert no pipe on ts_from_file - avcodec/cbs_jpeg: Try to move the read entity to one side in a test - fftools/ffmpeg_enc: Initialize fd - fftools/ffmpeg_enc: simplify opaque_ref check - avformat/mov: Check edit list for overflow - fftools/ffmpeg: Check read() for failure - MAINTAINERS: Add Timo Rothenpieler to server admins - swscale/output: Avoid undefined overflow in yuv2rgb_write_full() - swscale/output: alpha can become negative after scaling, use multiply - avcodec/targaenc: Allocate space for the palette - avcodec/r210enc: Use av_rescale for bitrate - avcodec/jfdctint_template: Fewer integer anomalies - avcodec/snowenc: MV limits due to mv_penalty table size - tools/target_dec_fuzzer: Adjust threshold for MV30 - tools/target_dec_fuzzer: Adjust threshold for jpeg2000 - avformat/mxfdec: Check container_ul->desc before use - avcodec/libvpxenc: Cleanup on error - MAINTAINERS: Update the entries for the release maintainer for FFmpeg - configure: update copyright year - doc/developer: Provide information about git send-email and gmail - avfilter/vf_rotate: Check ff_draw_init2() return value - avformat/mov: Use int64_t in intermediate for corrected_dts - avformat/mov: Use 64bit in intermediate for current_dts - avformat/matroskadec: Assert that num_levels is non negative - avformat/libzmq: Check av_strstart() - avformat/img2dec: Little JFIF / Exif cleanup - avformat/img2dec: Move DQT after unrelated if() - avformat/imfdec: Simplify get_next_track_with_minimum_timestamp() - avdevice/xcbgrab: Check sscanf() return - fftools/cmdutils: Add protective () to FLAGS - avformat/sdp: Check before appending "," - avcodec/ilbcdec: Remove dead code - avcodec/vp8: Check cond init - avcodec/vp8: Check mutex init - avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced - avcodec/pcm-dvdenc: 64bit pkt-size - avcodec/notchlc: Check init_get_bits8() for failure - avcodec/tests/dct: Use 64bit in intermediate for error computation - avcodec/scpr3: Check add_dec() for failure - avcodec/rv34: assert that size is not 0 in rv34_gen_vlc_ext() - avcodec/wavpackenc: Use unsigned for potential 31bit shift - avcodec/tests/jpeg2000dwt: Use 64bit in comparission - avcodec/tests/jpeg2000dwt: Use 64bit in err2 computation - avformat/fwse: Remove always false expression - avcodec/sga: Make it clear that the return is intentionally not checked - avformat/asfdec_f: Use 64bit for preroll computation - avformat/argo_asf: Use 64bit in offset intermediate - avformat/ape: Use 64bit for final frame size - avformat/ac4dec: Check remaining space in ac4_probe() - avdevice/pulse_audio_enc: Use av_rescale() to avoid integer overflow - avcodec/vlc: Cleanup on multi table alloc failure in ff_vlc_init_multi_from_lengths() - avcodec/tiff: Assert init_get_bits8() success in unpack_gray() - avcodec/tiff: Assert init_get_bits8() success in horizontal_fill() - tools/decode_simple: Check avcodec_send_packet() for errors on flushing - swscale/yuv2rgb: Use 64bit for brightness computation - swscale/x86/swscale: use a clearer name for INPUT_PLANER_RGB_A_FUNC_CASE - avutil/tests/opt: Check av_set_options_string() for failure - avutil/tests/dict: Check av_dict_set() before get for failure - avdevice/dshow: fix badly indented line - avformat/demux: resurrect dead stores - avcodec/tests/bitstream_template: Assert bits_init8() return - tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds - fftools/ffmpeg: prefer real errors over EOF in err_merge() - avcodec/png: more informative error message for invalid sBIT size - avcodec/pngdec: avoid erroring with sBIT on indexed-color images - avcodec/nvenc: fix segfault in intra-only mode - aarch64: Add OpenBSD runtime detection of dotprod and i8mm using sysctl - qsv: Initialize impl_value - avutil/hwcontext_qsv: fix GCC 14.1 warnings - lavc/vp9: reset segmentation fields when segmentation isn't enabled - configure: enable ffnvcodec, nvenc, nvdec for FreeBSD - avcodec/mscc & mwsc: Check loop counts before use - avcodec/mpegvideo_enc: Fix potential overflow in RD - avcodec/mpeg4videodec: assert impossible wrap points - avcodec/mpeg12dec: Use 64bit in bit computation - avcodec/vqcdec: Check init_get_bits8() for failure - avcodec/vble: Check av_image_get_buffer_size() for failure - avcodec/vp3: Replace check by assert - avcodec/vp8: Forward return of ff_vpx_init_range_decoder() - avcodec/jpeg2000dec: remove ST=3 case - avcodec/qsvdec: Check av_image_get_buffer_size() for failure - avcodec/exr: Fix preview overflow - avcodec/decode: decode_simple_internal() only implements audio and video - avcodec/fmvc: remove dead assignment
View file
ffmpeg-6.1.2.tar.xz/MAINTAINERS -> ffmpeg-6.1.1.tar.xz/MAINTAINERS
Changed
@@ -34,8 +34,8 @@ =================== documentation Stefano Sabatini, Mike Melanson, Timothy Gu, Gyan Doshi -project server day to day operations Árpád Gereöffy, Michael Niedermayer, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov, Timo Rothenpieler -project server emergencies Árpád Gereöffy, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov, Timo Rothenpieler +project server day to day operations Árpád Gereöffy, Michael Niedermayer, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov +project server emergencies Árpád Gereöffy, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov presets Robert Swain metadata subsystem Aurelien Jacobs release management Michael Niedermayer @@ -588,12 +588,10 @@ Releases ======== -7.0 Michael Niedermayer -6.1 Michael Niedermayer -5.1 Michael Niedermayer -4.4 Michael Niedermayer -3.4 Michael Niedermayer 2.8 Michael Niedermayer +2.7 Michael Niedermayer +2.6 Michael Niedermayer +2.5 Michael Niedermayer If you want to maintain an older release, please contact us
View file
ffmpeg-6.1.2.tar.xz/RELEASE -> ffmpeg-6.1.1.tar.xz/RELEASE
Changed
@@ -1,1 +1,1 @@ -6.1.2 +6.1.1
View file
ffmpeg-6.1.2.tar.xz/VERSION -> ffmpeg-6.1.1.tar.xz/VERSION
Changed
@@ -1,1 +1,1 @@ -6.1.2 +6.1.1
View file
ffmpeg-6.1.2.tar.xz/configure -> ffmpeg-6.1.1.tar.xz/configure
Changed
@@ -2227,7 +2227,6 @@ opencv2_core_core_c_h OpenGL_gl3_h poll_h - pthread_np_h sys_param_h sys_resource_h sys_select_h @@ -2330,8 +2329,6 @@ posix_memalign prctl pthread_cancel - pthread_set_name_np - pthread_setname_np sched_getaffinity SecItemImport SetConsoleTextAttribute @@ -6463,7 +6460,6 @@ check_headers mftransform.h check_headers net/udplite.h check_headers poll.h -check_headers pthread_np.h check_headers sys/param.h check_headers sys/resource.h check_headers sys/select.h @@ -6629,12 +6625,6 @@ if enabled pthreads; then check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs check_func pthread_cancel $pthreads_extralibs - hdrs=pthread.h - if enabled pthread_np_h; then - hdrs="$hdrs pthread_np.h" - fi - check_lib pthread_set_name_np "$hdrs" pthread_set_name_np -lpthread - check_lib pthread_setname_np "$hdrs" pthread_setname_np -lpthread fi fi @@ -7170,7 +7160,7 @@ if enabled x86; then case $target_os in - freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*) + mingw32*|mingw64*|win32|win64|linux|cygwin*) ;; *) disable ffnvcodec cuvid nvdec nvenc @@ -7996,7 +7986,7 @@ #define FFMPEG_CONFIG_H #define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)" #define FFMPEG_LICENSE "$(c_escape $license)" -#define CONFIG_THIS_YEAR 2024 +#define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "$(eval c_escape $datadir)" #define AVCONV_DATADIR "$(eval c_escape $datadir)" #define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
View file
ffmpeg-6.1.2.tar.xz/doc/Doxyfile -> ffmpeg-6.1.1.tar.xz/doc/Doxyfile
Changed
@@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 6.1.2 +PROJECT_NUMBER = 6.1.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a
View file
ffmpeg-6.1.2.tar.xz/doc/developer.texi -> ffmpeg-6.1.1.tar.xz/doc/developer.texi
Changed
@@ -396,10 +396,6 @@ answer to ffmpeg-devel (or wherever you got the patch from) saying that you applied the patch. -@subheading Credit any researchers -If a commit/patch fixes an issues found by some researcher, always credit the -researcher in the commit message for finding/reporting the issue. - @subheading Always wait long enough before pushing changes Do NOT commit to code actively maintained by others without permission. Send a patch to ffmpeg-devel. If no one answers within a reasonable @@ -644,11 +640,6 @@ You can check @url{https://patchwork.ffmpeg.org}, if your patch does not show up, its mime type likely was wrong. -@subheading How to setup git send-email? - -Please see @url{https://git-send-email.io/}. -For gmail additionally see @url{https://shallowsky.com/blog/tech/email/gmail-app-passwds.html}. - @subheading Sending patches from email clients Using @code{git send-email} might not be desirable for everyone. The following trick allows to send patches via email clients in a safe
View file
ffmpeg-6.1.2.tar.xz/doc/examples/demux_decode.c -> ffmpeg-6.1.1.tar.xz/doc/examples/demux_decode.c
Changed
@@ -138,9 +138,11 @@ ret = output_audio_frame(frame); av_frame_unref(frame); + if (ret < 0) + return ret; } - return ret; + return 0; } static int open_codec_context(int *stream_idx,
View file
ffmpeg-6.1.2.tar.xz/doc/examples/mux.c -> ffmpeg-6.1.1.tar.xz/doc/examples/mux.c
Changed
@@ -347,7 +347,8 @@ if (frame) { /* convert samples from native format to destination codec format, using the resampler */ /* compute destination number of samples */ - dst_nb_samples = swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples; + dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples, + c->sample_rate, c->sample_rate, AV_ROUND_UP); av_assert0(dst_nb_samples == frame->nb_samples); /* when we pass a frame to the encoder, it may keep a reference to it
View file
ffmpeg-6.1.2.tar.xz/doc/examples/qsv_transcode.c -> ffmpeg-6.1.1.tar.xz/doc/examples/qsv_transcode.c
Changed
@@ -75,7 +75,8 @@ if (value == NULL) return AVERROR(ENAVAIL); av_dict_set(opt, key, value, 0); - } while(1); + } while(key != NULL); + return 0; } static int dynamic_set_parameter(AVCodecContext *avctx) @@ -333,15 +334,17 @@ fail: av_frame_free(&frame); + if (ret < 0) + return ret; } - return ret; + return 0; } int main(int argc, char **argv) { const AVCodec *enc_codec; int ret = 0; - AVPacket *dec_pkt = NULL; + AVPacket *dec_pkt; if (argc < 5 || (argc - 5) % 2) { av_log(NULL, AV_LOG_ERROR, "Usage: %s <input file> <encoder> <output file>"
View file
ffmpeg-6.1.2.tar.xz/doc/examples/vaapi_encode.c -> ffmpeg-6.1.1.tar.xz/doc/examples/vaapi_encode.c
Changed
@@ -88,10 +88,6 @@ enc_pkt->stream_index = 0; ret = fwrite(enc_pkt->data, enc_pkt->size, 1, fout); av_packet_unref(enc_pkt); - if (ret != enc_pkt->size) { - ret = AVERROR(errno); - break; - } } end:
View file
ffmpeg-6.1.2.tar.xz/doc/examples/vaapi_transcode.c -> ffmpeg-6.1.1.tar.xz/doc/examples/vaapi_transcode.c
Changed
@@ -215,8 +215,10 @@ fail: av_frame_free(&frame); + if (ret < 0) + return ret; } - return ret; + return 0; } int main(int argc, char **argv)
View file
ffmpeg-6.1.2.tar.xz/fftools/cmdutils.c -> ffmpeg-6.1.1.tar.xz/fftools/cmdutils.c
Changed
@@ -512,7 +512,7 @@ return o; } -#define FLAGS ((o->type == AV_OPT_TYPE_FLAGS && (arg0=='-' || arg0=='+')) ? AV_DICT_APPEND : 0) +#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg0=='-' || arg0=='+')) ? AV_DICT_APPEND : 0 int opt_default(void *optctx, const char *opt, const char *arg) { const AVOption *o;
View file
ffmpeg-6.1.2.tar.xz/fftools/ffmpeg.c -> ffmpeg-6.1.1.tar.xz/fftools/ffmpeg.c
Changed
@@ -325,9 +325,8 @@ } //Read it if(nchars != 0) { - if (read(0, &ch, 1) == 1) - return ch; - return 0; + read(0, &ch, 1); + return ch; }else{ return -1; }
View file
ffmpeg-6.1.2.tar.xz/fftools/ffmpeg.h -> ffmpeg-6.1.1.tar.xz/fftools/ffmpeg.h
Changed
@@ -883,12 +883,11 @@ /** * Merge two return codes - return one of the error codes if at least one of * them was negative, 0 otherwise. + * Currently just picks the first one, eventually we might want to do something + * more sophisticated, like sorting them by priority. */ static inline int err_merge(int err0, int err1) { - // prefer "real" errors over EOF - if ((err0 >= 0 || err0 == AVERROR_EOF) && err1 < 0) - return err1; return (err0 < 0) ? err0 : FFMIN(err1, 0); }
View file
ffmpeg-6.1.2.tar.xz/fftools/ffmpeg_enc.c -> ffmpeg-6.1.1.tar.xz/fftools/ffmpeg_enc.c
Changed
@@ -490,9 +490,9 @@ AVRational tbi = (AVRational){ 0, 1}; int64_t ptsi = INT64_MAX; - const FrameData *fd = NULL; + const FrameData *fd; - if (frame ? frame->opaque_ref : pkt->opaque_ref) { + if ((frame && frame->opaque_ref) || (pkt && pkt->opaque_ref)) { fd = (const FrameData*)(frame ? frame->opaque_ref->data : pkt->opaque_ref->data); tbi = fd->dec.tb; ptsi = fd->dec.pts;
View file
ffmpeg-6.1.2.tar.xz/fftools/ffplay.c -> ffmpeg-6.1.1.tar.xz/fftools/ffplay.c
Changed
@@ -1999,8 +1999,6 @@ goto end; if (force_output_format) { - av_bprint_clear(&bp); - av_channel_layout_describe_bprint(&is->audio_tgt.ch_layout, &bp); sample_rates 0 = is->audio_tgt.freq; if ((ret = av_opt_set_int(filt_asink, "all_channel_counts", 0, AV_OPT_SEARCH_CHILDREN)) < 0) goto end; @@ -2353,13 +2351,12 @@ av_channel_layout_compare(&af->frame->ch_layout, &is->audio_src.ch_layout) || af->frame->sample_rate != is->audio_src.freq || (wanted_nb_samples != af->frame->nb_samples && !is->swr_ctx)) { - int ret; swr_free(&is->swr_ctx); - ret = swr_alloc_set_opts2(&is->swr_ctx, + swr_alloc_set_opts2(&is->swr_ctx, &is->audio_tgt.ch_layout, is->audio_tgt.fmt, is->audio_tgt.freq, &af->frame->ch_layout, af->frame->format, af->frame->sample_rate, 0, NULL); - if (ret < 0 || swr_init(is->swr_ctx) < 0) { + if (!is->swr_ctx || swr_init(is->swr_ctx) < 0) { av_log(NULL, AV_LOG_ERROR, "Cannot create sample rate converter for conversion of %d Hz %s %d channels to %d Hz %s %d channels!\n", af->frame->sample_rate, av_get_sample_fmt_name(af->frame->format), af->frame->ch_layout.nb_channels,
View file
ffmpeg-6.1.2.tar.xz/fftools/opt_common.c -> ffmpeg-6.1.1.tar.xz/fftools/opt_common.c
Changed
@@ -724,13 +724,10 @@ return 0; } -static int print_codecs(int encoder) +static void print_codecs(int encoder) { const AVCodecDescriptor **codecs; - int i, nb_codecs = get_codecs_sorted(&codecs); - - if (nb_codecs < 0) - return nb_codecs; + unsigned i, nb_codecs = get_codecs_sorted(&codecs); printf("%s:\n" " V..... = Video\n" @@ -765,17 +762,18 @@ } } av_free(codecs); - return 0; } int show_decoders(void *optctx, const char *opt, const char *arg) { - return print_codecs(0); + print_codecs(0); + return 0; } int show_encoders(void *optctx, const char *opt, const char *arg) { - return print_codecs(1); + print_codecs(1); + return 0; } int show_bsfs(void *optctx, const char *opt, const char *arg)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/8bps.c -> ffmpeg-6.1.1.tar.xz/libavcodec/8bps.c
Changed
@@ -61,7 +61,7 @@ unsigned int planes = c->planes; int ret; - if (buf_size < planes * height * (2 + 2*((avctx->width+128)/129))) + if (buf_size < planes * height * 2) return AVERROR_INVALIDDATA; if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/Makefile -> ffmpeg-6.1.1.tar.xz/libavcodec/Makefile
Changed
@@ -1284,7 +1284,7 @@ aacenc_quantization.h \ aacenc_quantization_misc.h \ bitstream_template.h \ - vulkan_video_codec_av1std_mesa.h \ + vulkan_video_codec_av1std.h \ $(ARCH)/vpx_arith.h \ SKIPHEADERS-$(CONFIG_AMF) += amfenc.h @@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h -SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h +SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h
View file
ffmpeg-6.1.2.tar.xz/libavcodec/ac3_parser.c -> ffmpeg-6.1.1.tar.xz/libavcodec/ac3_parser.c
Changed
@@ -204,9 +204,7 @@ AC3HeaderInfo hdr; int err; - err = init_get_bits8(&gb, buf, size); - if (err < 0) - return AVERROR_INVALIDDATA; + init_get_bits8(&gb, buf, size); err = ff_ac3_parse_header(&gb, &hdr); if (err < 0) return AVERROR_INVALIDDATA;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/alsdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/alsdec.c
Changed
@@ -2110,8 +2110,8 @@ if (sconf->floating) { ctx->acf = av_malloc_array(channels, sizeof(*ctx->acf)); - ctx->shift_value = av_calloc(channels, sizeof(*ctx->shift_value)); - ctx->last_shift_value = av_calloc(channels, sizeof(*ctx->last_shift_value)); + ctx->shift_value = av_malloc_array(channels, sizeof(*ctx->shift_value)); + ctx->last_shift_value = av_malloc_array(channels, sizeof(*ctx->last_shift_value)); ctx->last_acf_mantissa = av_malloc_array(channels, sizeof(*ctx->last_acf_mantissa)); ctx->raw_mantissa = av_calloc(channels, sizeof(*ctx->raw_mantissa));
View file
ffmpeg-6.1.2.tar.xz/libavcodec/amrwbdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/amrwbdec.c
Changed
@@ -26,7 +26,6 @@ #include "config.h" -#include "libavutil/avassert.h" #include "libavutil/channel_layout.h" #include "libavutil/common.h" #include "libavutil/lfg.h" @@ -555,8 +554,6 @@ decode_6p_track(sig_posi, (int) pulse_loi + ((int) pulse_hii << 11), 4, 1); break; - default: - av_assert2(0); } memset(fixed_vector, 0, sizeof(float) * AMRWB_SFR_SIZE);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/apedec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/apedec.c
Changed
@@ -1286,7 +1286,7 @@ int32_t left = a1 - (unsigned)(a0 / 2); int32_t right = left + (unsigned)a0; - if (FFMIN(FFNABS(left), FFNABS(right)) < -(1<<23)) { + if (FFMAX(FFABS(left), FFABS(right)) > (1<<23)) { ctx->interim_mode = !interim_mode; av_log(ctx->avctx, AV_LOG_VERBOSE, "Interim mode: %d\n", ctx->interim_mode); break;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/atrac9dec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/atrac9dec.c
Changed
@@ -801,9 +801,7 @@ if (ret < 0) return ret; - ret = init_get_bits8(&gb, avpkt->data, avpkt->size); - if (ret < 0) - return ret; + init_get_bits8(&gb, avpkt->data, avpkt->size); for (int i = 0; i < frames; i++) { for (int j = 0; j < s->block_config->count; j++) { @@ -925,9 +923,7 @@ return AVERROR_INVALIDDATA; } - err = init_get_bits8(&gb, avctx->extradata + 4, avctx->extradata_size); - if (err < 0) - return err; + init_get_bits8(&gb, avctx->extradata + 4, avctx->extradata_size); if (get_bits(&gb, 8) != 0xFE) { av_log(avctx, AV_LOG_ERROR, "Incorrect magic byte!\n");
View file
ffmpeg-6.1.2.tar.xz/libavcodec/av1dec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/av1dec.c
Changed
@@ -443,7 +443,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx, const AV1RawSequenceHeader *seq) { - int bit_depth; + uint8_t bit_depth; enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE; if (seq->seq_profile == 2 && seq->color_config.high_bitdepth) @@ -467,7 +467,7 @@ else if (bit_depth == 12) pix_fmt = AV_PIX_FMT_YUV444P12; else - av_assert0(0); + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); } else if (seq->color_config.subsampling_x == 1 && seq->color_config.subsampling_y == 0) { if (bit_depth == 8) @@ -477,7 +477,7 @@ else if (bit_depth == 12) pix_fmt = AV_PIX_FMT_YUV422P12; else - av_assert0(0); + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); } else if (seq->color_config.subsampling_x == 1 && seq->color_config.subsampling_y == 1) { if (bit_depth == 8) @@ -487,7 +487,7 @@ else if (bit_depth == 12) pix_fmt = AV_PIX_FMT_YUV420P12; else - av_assert0(0); + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); } } else { if (bit_depth == 8) @@ -497,7 +497,7 @@ else if (bit_depth == 12) pix_fmt = AV_PIX_FMT_GRAY12; else - av_assert0(0); + av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); } return pix_fmt; @@ -736,7 +736,7 @@ avctx->color_range = seq->color_config.color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; avctx->color_primaries = seq->color_config.color_primaries; - avctx->colorspace = seq->color_config.matrix_coefficients; + avctx->colorspace = seq->color_config.color_primaries; avctx->color_trc = seq->color_config.transfer_characteristics; switch (seq->color_config.chroma_sample_position) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/avfft.c -> ffmpeg-6.1.1.tar.xz/libavcodec/avfft.c
Changed
@@ -152,7 +152,7 @@ return NULL; ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_RDFT, trans == IDFT_C2R, - 1 << nbits, &scale, 0x0); + 1 << nbits, &scale, AV_TX_INPLACE); if (ret < 0) { av_free(s); return NULL; @@ -162,35 +162,17 @@ s->len = 1 << nbits; s->inv = trans == IDFT_C2R; - s->tmp = av_malloc((s->len + 2)*sizeof(float)); - if (!s->tmp) { - av_tx_uninit(&s->ctx); - av_free(s); - return NULL; - } - return (RDFTContext *)s; } void av_rdft_calc(RDFTContext *s, FFTSample *data) { AVTXWrapper *w = (AVTXWrapper *)s; - float *src = w->inv ? w->tmp : (float *)data; - float *dst = w->inv ? (float *)data : w->tmp; - - if (w->inv) { - memcpy(src, data, w->len*sizeof(float)); - - srcw->len = src1; - src1 = 0.0f; - } - - w->fn(w->ctx, dst, (void *)src, w->stride); - - if (!w->inv) { - dst1 = dstw->len; - memcpy(data, dst, w->len*sizeof(float)); - } + if (w->inv) + FFSWAP(float, data1, dataw->len); + w->fn(w->ctx, data, (void *)data, w->stride); + if (!w->inv) + FFSWAP(float, data1, dataw->len); } av_cold void av_rdft_end(RDFTContext *s) @@ -198,7 +180,6 @@ if (s) { AVTXWrapper *w = (AVTXWrapper *)s; av_tx_uninit(&w->ctx); - av_free(w->tmp); av_free(w); } }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/avs2_parser.c -> ffmpeg-6.1.1.tar.xz/libavcodec/avs2_parser.c
Changed
@@ -72,15 +72,13 @@ unsigned aspect_ratio; unsigned frame_rate_code; int low_delay; - av_unused int ret; // update buf_size_min if parse more deeper const int buf_size_min = 15; if (buf_size < buf_size_min) return; - ret = init_get_bits8(&gb, buf, buf_size_min); - av_assert1(ret >= 0); + init_get_bits8(&gb, buf, buf_size_min); s->key_frame = 1; s->pict_type = AV_PICTURE_TYPE_I;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/avs3_parser.c -> ffmpeg-6.1.1.tar.xz/libavcodec/avs3_parser.c
Changed
@@ -73,8 +73,7 @@ GetBitContext gb; int profile, ratecode, low_delay; - av_unused int ret = init_get_bits(&gb, buf + 4, 100); - av_assert1(ret >= 0); + init_get_bits8(&gb, buf + 4, buf_size - 4); s->key_frame = 1; s->pict_type = AV_PICTURE_TYPE_I;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_av1.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_av1.c
Changed
@@ -36,7 +36,7 @@ CBS_TRACE_READ_START(); zeroes = 0; - while (zeroes < 32) { + while (1) { if (get_bits_left(gbc) < 1) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid uvlc code at " "%s: bitstream ended.\n", name); @@ -49,18 +49,10 @@ } if (zeroes >= 32) { - // The spec allows at least thirty-two zero bits followed by a - // one to mean 2^32-1, with no constraint on the number of - // zeroes. The libaom reference decoder does not match this, - // instead reading thirty-two zeroes but not the following one - // to mean 2^32-1. These two interpretations are incompatible - // and other implementations may follow one or the other. - // Therefore we reject thirty-two zeroes because the intended - // behaviour is not clear. - av_log(ctx->log_ctx, AV_LOG_ERROR, "Thirty-two zero bits in " - "%s uvlc code: considered invalid due to conflicting " - "standard and reference decoder behaviour.\n", name); - return AVERROR_INVALIDDATA; + // Note that the spec allows an arbitrarily large number of + // zero bits followed by a one bit in this case, but the + // libaom implementation does not support it. + value = MAX_UINT_BITS(32); } else { if (get_bits_left(gbc) < zeroes) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid uvlc code at " @@ -309,7 +301,7 @@ return AVERROR(ENOSPC); if (len > 0) - put_bits(pbc, len, (1U << len) - 1 - (value != range_max)); + put_bits(pbc, len, (1 << len) - 1 - (value != range_max)); CBS_TRACE_WRITE_END_NO_SUBSCRIPTS();
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_h2645.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_h2645.c
Changed
@@ -235,16 +235,6 @@ #define FUNC_H266(name) FUNC_NAME1(READWRITE, h266, name) #define FUNC_SEI(name) FUNC_NAME1(READWRITE, sei, name) -#define SEI_FUNC(name, args) \ -static int FUNC(name) args; \ -static int FUNC(name ## _internal)(CodedBitstreamContext *ctx, \ - RWContext *rw, void *cur, \ - SEIMessageState *state) \ -{ \ - return FUNC(name)(ctx, rw, cur, state); \ -} \ -static int FUNC(name) args - #define SUBSCRIPTS(subs, ...) (subs > 0 ? ((intsubs + 1){ subs, __VA_ARGS__ }) : NULL) #define u(width, name, range_min, range_max) \ @@ -708,11 +698,7 @@ start = bytestream2_tell(&gbc); for(i = 0; i < num_nalus; i++) { - if (bytestream2_get_bytes_left(&gbc) < 2) - return AVERROR_INVALIDDATA; size = bytestream2_get_be16(&gbc); - if (bytestream2_get_bytes_left(&gbc) < size) - return AVERROR_INVALIDDATA; bytestream2_skip(&gbc, size); } end = bytestream2_tell(&gbc); @@ -2083,11 +2069,6 @@ .close = &cbs_h266_close, }; -// Macro for the read/write pair. -#define SEI_MESSAGE_RW(codec, name) \ - .read = cbs_ ## codec ## _read_ ## name ## _internal, \ - .write = cbs_ ## codec ## _write_ ## name ## _internal - static const SEIMessageTypeDescriptor cbs_sei_common_types = { { SEI_TYPE_FILLER_PAYLOAD,
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_h264_syntax_template.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_h264_syntax_template.c
Changed
@@ -510,9 +510,9 @@ return 0; } -SEI_FUNC(sei_buffering_period, (CodedBitstreamContext *ctx, RWContext *rw, - H264RawSEIBufferingPeriod *current, - SEIMessageState *sei)) +static int FUNC(sei_buffering_period)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawSEIBufferingPeriod *current, + SEIMessageState *sei) { CodedBitstreamH264Context *h264 = ctx->priv_data; const H264RawSPS *sps; @@ -604,8 +604,9 @@ return 0; } -SEI_FUNC(sei_pic_timing, (CodedBitstreamContext *ctx, RWContext *rw, - H264RawSEIPicTiming *current, SEIMessageState *sei)) +static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawSEIPicTiming *current, + SEIMessageState *sei) { CodedBitstreamH264Context *h264 = ctx->priv_data; const H264RawSPS *sps; @@ -675,9 +676,9 @@ return 0; } -SEI_FUNC(sei_pan_scan_rect, (CodedBitstreamContext *ctx, RWContext *rw, - H264RawSEIPanScanRect *current, - SEIMessageState *sei)) +static int FUNC(sei_pan_scan_rect)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawSEIPanScanRect *current, + SEIMessageState *sei) { int err, i; @@ -702,9 +703,9 @@ return 0; } -SEI_FUNC(sei_recovery_point, (CodedBitstreamContext *ctx, RWContext *rw, - H264RawSEIRecoveryPoint *current, - SEIMessageState *sei)) +static int FUNC(sei_recovery_point)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawSEIRecoveryPoint *current, + SEIMessageState *sei) { int err; @@ -718,9 +719,9 @@ return 0; } -SEI_FUNC(film_grain_characteristics, (CodedBitstreamContext *ctx, RWContext *rw, - H264RawFilmGrainCharacteristics *current, - SEIMessageState *state)) +static int FUNC(film_grain_characteristics)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawFilmGrainCharacteristics *current, + SEIMessageState *state) { CodedBitstreamH264Context *h264 = ctx->priv_data; const H264RawSPS *sps; @@ -801,9 +802,9 @@ return 0; } -SEI_FUNC(sei_display_orientation, (CodedBitstreamContext *ctx, RWContext *rw, - H264RawSEIDisplayOrientation *current, - SEIMessageState *sei)) +static int FUNC(sei_display_orientation)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawSEIDisplayOrientation *current, + SEIMessageState *sei) { int err;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_h265_syntax_template.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_h265_syntax_template.c
Changed
@@ -1618,9 +1618,9 @@ return 0; } -SEI_FUNC(sei_buffering_period, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIBufferingPeriod *current, - SEIMessageState *sei)) +static int FUNC(sei_buffering_period) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIBufferingPeriod *current, SEIMessageState *sei) { CodedBitstreamH265Context *h265 = ctx->priv_data; const H265RawSPS *sps; @@ -1728,8 +1728,9 @@ return 0; } -SEI_FUNC(sei_pic_timing, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIPicTiming *current, SEIMessageState *sei)) +static int FUNC(sei_pic_timing) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIPicTiming *current, SEIMessageState *sei) { CodedBitstreamH265Context *h265 = ctx->priv_data; const H265RawSPS *sps; @@ -1803,9 +1804,9 @@ return 0; } -SEI_FUNC(sei_pan_scan_rect, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIPanScanRect *current, - SEIMessageState *sei)) +static int FUNC(sei_pan_scan_rect) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIPanScanRect *current, SEIMessageState *sei) { int err, i; @@ -1830,9 +1831,9 @@ return 0; } -SEI_FUNC(sei_recovery_point, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIRecoveryPoint *current, - SEIMessageState *sei)) +static int FUNC(sei_recovery_point) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIRecoveryPoint *current, SEIMessageState *sei) { int err; @@ -1846,9 +1847,9 @@ return 0; } -SEI_FUNC(film_grain_characteristics, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawFilmGrainCharacteristics *current, - SEIMessageState *state)) +static int FUNC(film_grain_characteristics)(CodedBitstreamContext *ctx, RWContext *rw, + H265RawFilmGrainCharacteristics *current, + SEIMessageState *state) { CodedBitstreamH265Context *h265 = ctx->priv_data; const H265RawSPS *sps = h265->active_sps; @@ -1911,9 +1912,9 @@ return 0; } -SEI_FUNC(sei_display_orientation, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIDisplayOrientation *current, - SEIMessageState *sei)) +static int FUNC(sei_display_orientation) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIDisplayOrientation *current, SEIMessageState *sei) { int err; @@ -1930,9 +1931,9 @@ return 0; } -SEI_FUNC(sei_active_parameter_sets, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIActiveParameterSets *current, - SEIMessageState *sei)) +static int FUNC(sei_active_parameter_sets) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIActiveParameterSets *current, SEIMessageState *sei) { CodedBitstreamH265Context *h265 = ctx->priv_data; const H265RawVPS *vps; @@ -1967,9 +1968,9 @@ return 0; } -SEI_FUNC(sei_decoded_picture_hash, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIDecodedPictureHash *current, - SEIMessageState *sei)) +static int FUNC(sei_decoded_picture_hash) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIDecodedPictureHash *current, SEIMessageState *sei) { CodedBitstreamH265Context *h265 = ctx->priv_data; const H265RawSPS *sps = h265->active_sps; @@ -1999,8 +2000,9 @@ return 0; } -SEI_FUNC(sei_time_code, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEITimeCode *current, SEIMessageState *sei)) +static int FUNC(sei_time_code) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEITimeCode *current, SEIMessageState *sei) { int err, i; @@ -2049,9 +2051,9 @@ return 0; } -SEI_FUNC(sei_alpha_channel_info, (CodedBitstreamContext *ctx, RWContext *rw, - H265RawSEIAlphaChannelInfo *current, - SEIMessageState *sei)) +static int FUNC(sei_alpha_channel_info) + (CodedBitstreamContext *ctx, RWContext *rw, + H265RawSEIAlphaChannelInfo *current, SEIMessageState *sei) { int err, length;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_h266_syntax_template.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_h266_syntax_template.c
Changed
@@ -902,17 +902,16 @@ current->vps_ols_mode_idc == 1) { num_layers_in_ols = i + 1; } else if (current->vps_ols_mode_idc == 2) { - for (k = 0, j = 0; k <= current->vps_max_layers_minus1; k++) + for (k = 0, j = 0; k <= current->vps_max_layers_minus1; k++) { if (layer_included_in_ols_flagik) j++; - num_layers_in_ols = j; + num_layers_in_ols = j; + } } if (num_layers_in_ols > 1) { num_multi_layer_olss++; } } - if (!current->vps_each_layer_is_an_ols_flag && num_multi_layer_olss == 0) - return AVERROR_INVALIDDATA; } for (i = 0; i <= current->vps_num_ptls_minus1; i++) { @@ -1130,7 +1129,7 @@ flag(sps_subpic_info_present_flag); if (current->sps_subpic_info_present_flag) { - ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1); + ue(sps_num_subpics_minus1, 1, VVC_MAX_SLICES - 1); if (current->sps_num_subpics_minus1 > 0) { flag(sps_independent_subpics_flag); flag(sps_subpic_same_size_flag); @@ -1213,30 +1212,30 @@ infer(sps_loop_filter_across_subpic_enabled_flagi, 0); } } + ue(sps_subpic_id_len_minus1, 0, 15); + if ((1 << (current->sps_subpic_id_len_minus1 + 1)) < + current->sps_num_subpics_minus1 + 1) { + av_log(ctx->log_ctx, AV_LOG_ERROR, + "sps_subpic_id_len_minus1(%d) is too small\n", + current->sps_subpic_id_len_minus1); + return AVERROR_INVALIDDATA; + } + flag(sps_subpic_id_mapping_explicitly_signalled_flag); + if (current->sps_subpic_id_mapping_explicitly_signalled_flag) { + flag(sps_subpic_id_mapping_present_flag); + if (current->sps_subpic_id_mapping_present_flag) { + for (i = 0; i <= current->sps_num_subpics_minus1; i++) { + ubs(current->sps_subpic_id_len_minus1 + 1, + sps_subpic_idi, 1, i); + } + } + } } else { infer(sps_subpic_ctu_top_left_x0, 0); infer(sps_subpic_ctu_top_left_y0, 0); infer(sps_subpic_width_minus10, tmp_width_val - 1); infer(sps_subpic_height_minus10, tmp_height_val - 1); } - ue(sps_subpic_id_len_minus1, 0, 15); - if ((1 << (current->sps_subpic_id_len_minus1 + 1)) < - current->sps_num_subpics_minus1 + 1) { - av_log(ctx->log_ctx, AV_LOG_ERROR, - "sps_subpic_id_len_minus1(%d) is too small\n", - current->sps_subpic_id_len_minus1); - return AVERROR_INVALIDDATA; - } - flag(sps_subpic_id_mapping_explicitly_signalled_flag); - if (current->sps_subpic_id_mapping_explicitly_signalled_flag) { - flag(sps_subpic_id_mapping_present_flag); - if (current->sps_subpic_id_mapping_present_flag) { - for (i = 0; i <= current->sps_num_subpics_minus1; i++) { - ubs(current->sps_subpic_id_len_minus1 + 1, - sps_subpic_idi, 1, i); - } - } - } } else { infer(sps_num_subpics_minus1, 0); infer(sps_independent_subpics_flag, 1); @@ -2072,8 +2071,6 @@ tile_x = tile_idx % current->num_tile_columns; tile_y = tile_idx / current->num_tile_columns; - if (tile_y >= current->num_tile_rows) - return AVERROR_INVALIDDATA; ctu_x = 0, ctu_y = 0; for (j = 0; j < tile_x; j++) { @@ -2458,7 +2455,6 @@ static int FUNC(aps)(CodedBitstreamContext *ctx, RWContext *rw, H266RawAPS *current, int prefix) { - int aps_id_max = MAX_UINT_BITS(5); int err; if (prefix) @@ -2471,12 +2467,7 @@ : VVC_SUFFIX_APS_NUT)); ub(3, aps_params_type); - if (current->aps_params_type == VVC_ASP_TYPE_ALF || - current->aps_params_type == VVC_ASP_TYPE_SCALING) - aps_id_max = 7; - else if (current->aps_params_type == VVC_ASP_TYPE_LMCS) - aps_id_max = 3; - u(5, aps_adaptation_parameter_set_id, 0, aps_id_max); + ub(5, aps_adaptation_parameter_set_id); flag(aps_chroma_present_flag); if (current->aps_params_type == VVC_ASP_TYPE_ALF) CHECK(FUNC(alf_data)(ctx, rw, current)); @@ -3430,10 +3421,10 @@ return 0; } -SEI_FUNC(sei_decoded_picture_hash, (CodedBitstreamContext *ctx, - RWContext *rw, - H266RawSEIDecodedPictureHash *current, - SEIMessageState *unused)) +static int FUNC(sei_decoded_picture_hash) (CodedBitstreamContext *ctx, + RWContext *rw, + H266RawSEIDecodedPictureHash * + current) { int err, c_idx, i;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_jpeg.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_jpeg.c
Changed
@@ -145,13 +145,13 @@ } } else { i = start; - if (i > frag->data_size - 2) { + if (i + 2 > frag->data_size) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid JPEG image: " "truncated at %02x marker.\n", marker); return AVERROR_INVALIDDATA; } length = AV_RB16(frag->data + i); - if (length > frag->data_size - i) { + if (i + length > frag->data_size) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid JPEG image: " "truncated at %02x marker segment.\n", marker); return AVERROR_INVALIDDATA;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_sei.h -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_sei.h
Changed
@@ -126,6 +126,13 @@ SEIMessageWriteFunction write; } SEIMessageTypeDescriptor; +// Macro for the read/write pair. The clumsy cast is needed because the +// current pointer is typed in all of the read/write functions but has to +// be void here to fit all cases. +#define SEI_MESSAGE_RW(codec, name) \ + .read = (SEIMessageReadFunction) cbs_ ## codec ## _read_ ## name, \ + .write = (SEIMessageWriteFunction)cbs_ ## codec ## _write_ ## name + // End-of-list sentinel element. #define SEI_MESSAGE_TYPE_END { .type = -1 }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cbs_sei_syntax_template.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cbs_sei_syntax_template.c
Changed
@@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -SEI_FUNC(filler_payload, (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawFillerPayload *current, - SEIMessageState *state)) +static int FUNC(filler_payload) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawFillerPayload *current, SEIMessageState *state) { int err, i; @@ -34,9 +34,9 @@ return 0; } -SEI_FUNC(user_data_registered, (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawUserDataRegistered *current, - SEIMessageState *state)) +static int FUNC(user_data_registered) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawUserDataRegistered *current, SEIMessageState *state) { int err, i, j; @@ -66,9 +66,9 @@ return 0; } -SEI_FUNC(user_data_unregistered, (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawUserDataUnregistered *current, - SEIMessageState *state)) +static int FUNC(user_data_unregistered) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawUserDataUnregistered *current, SEIMessageState *state) { int err, i; @@ -94,10 +94,9 @@ return 0; } -SEI_FUNC(mastering_display_colour_volume, - (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawMasteringDisplayColourVolume *current, - SEIMessageState *state)) +static int FUNC(mastering_display_colour_volume) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawMasteringDisplayColourVolume *current, SEIMessageState *state) { int err, c; @@ -117,9 +116,9 @@ return 0; } -SEI_FUNC(content_light_level_info, (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawContentLightLevelInfo *current, - SEIMessageState *state)) +static int FUNC(content_light_level_info) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawContentLightLevelInfo *current, SEIMessageState *state) { int err; @@ -131,10 +130,10 @@ return 0; } -SEI_FUNC(alternative_transfer_characteristics, - (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawAlternativeTransferCharacteristics *current, - SEIMessageState *state)) +static int FUNC(alternative_transfer_characteristics) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawAlternativeTransferCharacteristics *current, + SEIMessageState *state) { int err; @@ -145,10 +144,10 @@ return 0; } -SEI_FUNC(ambient_viewing_environment, - (CodedBitstreamContext *ctx, RWContext *rw, - SEIRawAmbientViewingEnvironment *current, - SEIMessageState *state)) +static int FUNC(ambient_viewing_environment) + (CodedBitstreamContext *ctx, RWContext *rw, + SEIRawAmbientViewingEnvironment *current, + SEIMessageState *state) { static const uint16_t max_ambient_light_value = 50000; int err;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cfhdenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cfhdenc.c
Changed
@@ -258,8 +258,8 @@ if (ret < 0) return ret; - if (avctx->height < 32) { - av_log(avctx, AV_LOG_ERROR, "Height must be >= 32.\n"); + if (avctx->height < 4) { + av_log(avctx, AV_LOG_ERROR, "Height must be >= 4.\n"); return AVERROR_INVALIDDATA; } @@ -553,7 +553,7 @@ width, height * 2); } - ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (4LL * avctx->width * (avctx->height + 15) + 2048LL)); + ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (2LL * avctx->width * (avctx->height + 15) + 2048LL)); if (ret < 0) return ret; @@ -761,6 +761,7 @@ } else if (count > 0) { count = put_runcode(pb, count, rb); } + put_bits(pb, cbindex.size, cbindex.bits); }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/cri.c -> ffmpeg-6.1.1.tar.xz/libavcodec/cri.c
Changed
@@ -235,14 +235,10 @@ s->data_size = length; goto skip; case 105: - if (length <= 0) - return AVERROR_INVALIDDATA; hflip = bytestream2_get_byte(gb) != 0; length--; goto skip; case 106: - if (length <= 0) - return AVERROR_INVALIDDATA; vflip = bytestream2_get_byte(gb) != 0; length--; goto skip;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/decode.c -> ffmpeg-6.1.1.tar.xz/libavcodec/decode.c
Changed
@@ -449,8 +449,7 @@ } else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { ret = !got_frame ? AVERROR(EAGAIN) : discard_samples(avctx, frame, discarded_samples); - } else - av_assert0(0); + } if (ret == AVERROR(EAGAIN)) av_frame_unref(frame);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/dxv.c -> ffmpeg-6.1.1.tar.xz/libavcodec/dxv.c
Changed
@@ -440,7 +440,7 @@ size_in_bits = bytestream2_get_le32(gb); endoffset = ((size_in_bits + 7) >> 3) - 4; - if ((int)endoffset <= 0 || bytestream2_get_bytes_left(gb) < endoffset) + if (endoffset <= 0 || bytestream2_get_bytes_left(gb) < endoffset) return AVERROR_INVALIDDATA; offset = endoffset;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/exr.c -> ffmpeg-6.1.1.tar.xz/libavcodec/exr.c
Changed
@@ -334,10 +334,7 @@ return ret; for (; im <= iM; im++) { - int l; - if (get_bits_left(&gbit) < 6) - return AVERROR_INVALIDDATA; - l = freqim = get_bits(&gbit, 6); + uint64_t l = freqim = get_bits(&gbit, 6); if (l == LONG_ZEROCODE_RUN) { int zerun = get_bits(&gbit, 8) + SHORTEST_LONG_RUN; @@ -1942,7 +1939,7 @@ "preview", 16)) >= 0) { uint32_t pw = bytestream2_get_le32(gb); uint32_t ph = bytestream2_get_le32(gb); - uint64_t psize = pw * (uint64_t)ph; + uint64_t psize = pw * ph; if (psize > INT64_MAX / 4) { ret = AVERROR_INVALIDDATA; goto fail;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/flac_parser.c -> ffmpeg-6.1.1.tar.xz/libavcodec/flac_parser.c
Changed
@@ -519,8 +519,6 @@ for (i = 0; i < FLAC_MAX_SEQUENTIAL_HEADERS && curr != child; i++) curr = curr->next; - av_assert0(i < FLAC_MAX_SEQUENTIAL_HEADERS); - if (header->link_penaltyi < FLAC_HEADER_CRC_FAIL_PENALTY || header->link_penaltyi == FLAC_HEADER_NOT_PENALIZED_YET) { FLACHeaderMarker *start, *end;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/fmvc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/fmvc.c
Changed
@@ -100,6 +100,7 @@ continue; } } + repeat = 0; } repeat = 1; }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/golomb.h -> ffmpeg-6.1.1.tar.xz/libavcodec/golomb.h
Changed
@@ -402,7 +402,6 @@ log = av_log2(buf); if (log > 31 - limit) { - av_assert2(log >= k); buf >>= log - k; buf += (30U - log) << k; LAST_SKIP_BITS(re, gb, 32 + k - log); @@ -425,8 +424,6 @@ /** * read unsigned golomb rice code (jpegls). - * - * @returns -1 on error */ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int esc_len) @@ -538,8 +535,6 @@ /** * read signed golomb rice code (flac). - * - * @returns INT_MIN on error */ static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, int esc_len)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/h2645_sei.c -> ffmpeg-6.1.1.tar.xz/libavcodec/h2645_sei.c
Changed
@@ -599,7 +599,8 @@ if (!sd) av_buffer_unref(&a53->buf_ref); a53->buf_ref = NULL; - avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; + if (avctx) + avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; } for (unsigned i = 0; i < sei->unregistered.nb_buf_ref; i++) { @@ -685,7 +686,8 @@ else fgc->present = fgc->persistence_flag; - avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; + if (avctx) + avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; } if (sei->ambient_viewing_environment.present) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/h264_slice.c -> ffmpeg-6.1.1.tar.xz/libavcodec/h264_slice.c
Changed
@@ -1398,7 +1398,7 @@ sps = h->ps.sps; - if (sps->bitstream_restriction_flag && + if (sps && sps->bitstream_restriction_flag && h->avctx->has_b_frames < sps->num_reorder_frames) { h->avctx->has_b_frames = sps->num_reorder_frames; }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/hcadec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/hcadec.c
Changed
@@ -212,7 +212,6 @@ int8_t r16 = { 0 }; unsigned b, chunk; int version, ret; - unsigned hfr_group_count; init_flush(avctx); @@ -337,12 +336,11 @@ if (c->total_band_count < c->base_band_count) return AVERROR_INVALIDDATA; - hfr_group_count = ceil2(c->total_band_count - (c->base_band_count + c->stereo_band_count), + c->hfr_group_count = ceil2(c->total_band_count - (c->base_band_count + c->stereo_band_count), c->bands_per_hfr_group); - if (c->base_band_count + c->stereo_band_count + (uint64_t)hfr_group_count > 128ULL) + if (c->base_band_count + c->stereo_band_count + (unsigned long)c->hfr_group_count > 128ULL) return AVERROR_INVALIDDATA; - c->hfr_group_count = hfr_group_count; for (int i = 0; i < avctx->ch_layout.nb_channels; i++) { c->chi.chan_type = ri; @@ -538,10 +536,8 @@ return AVERROR_INVALIDDATA; } else if (AV_RB16(avpkt->data + 6) <= avpkt->size) { ret = init_hca(avctx, avpkt->data, AV_RB16(avpkt->data + 6)); - if (ret < 0) { - c->crc_table = NULL; // signal that init has not finished + if (ret < 0) return ret; - } offset = AV_RB16(avpkt->data + 6); if (offset == avpkt->size) return avpkt->size;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/hdrenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/hdrenc.c
Changed
@@ -124,7 +124,7 @@ uint8_t *buf; int ret; - packet_size = avctx->height * 4LL + avctx->width * avctx->height * 8LL + 1024LL; + packet_size = avctx->width * avctx->height * 4LL + 1024LL; if ((ret = ff_get_encode_buffer(avctx, pkt, packet_size, 0)) < 0) return ret;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/hevcdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/hevcdec.c
Changed
@@ -651,10 +651,6 @@ if (s->ps.pps->dependent_slice_segments_enabled_flag) sh->dependent_slice_segment_flag = get_bits1(gb); - if (sh->dependent_slice_segment_flag && !s->slice_initialized) { - av_log(s->avctx, AV_LOG_ERROR, "Independent slice segment missing.\n"); - return AVERROR_INVALIDDATA; - } slice_address_length = av_ceil_log2(s->ps.sps->ctb_width * s->ps.sps->ctb_height); @@ -943,6 +939,9 @@ } else { sh->slice_loop_filter_across_slices_enabled_flag = s->ps.pps->seq_loop_filter_across_slices_enabled_flag; } + } else if (!s->slice_initialized) { + av_log(s->avctx, AV_LOG_ERROR, "Independent slice segment missing.\n"); + return AVERROR_INVALIDDATA; } sh->num_entry_point_offsets = 0; @@ -1962,13 +1961,13 @@ if (current_mv.pred_flag & PF_L0) { ref0 = refPicList0.refcurrent_mv.ref_idx0; - if (!ref0 || !ref0->frame) + if (!ref0 || !ref0->frame->data0) return; hevc_await_progress(s, ref0, ¤t_mv.mv0, y0, nPbH); } if (current_mv.pred_flag & PF_L1) { ref1 = refPicList1.refcurrent_mv.ref_idx1; - if (!ref1 || !ref1->frame) + if (!ref1 || !ref1->frame->data0) return; hevc_await_progress(s, ref1, ¤t_mv.mv1, y0, nPbH); } @@ -3016,11 +3015,8 @@ case HEVC_NAL_RASL_N: case HEVC_NAL_RASL_R: ret = hls_slice_header(s); - if (ret < 0) { - // hls_slice_header() does not cleanup on failure thus the state now is inconsistant so we cannot use it on depandant slices - s->slice_initialized = 0; + if (ret < 0) return ret; - } if (ret == 1) { ret = AVERROR_INVALIDDATA; goto fail;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/iff.c -> ffmpeg-6.1.1.tar.xz/libavcodec/iff.c
Changed
@@ -522,7 +522,7 @@ GetByteContext *gb) { GetByteContext cmds; - int count; + unsigned count; int i, y_pos = 0, x_pos = 0; if (bytestream2_get_be32(gb) != MKBETAG('V', 'D', 'A', 'T')) @@ -530,7 +530,7 @@ bytestream2_skip(gb, 4); count = bytestream2_get_be16(gb) - 2; - if (count < 0 || bytestream2_get_bytes_left(gb) < count) + if (bytestream2_get_bytes_left(gb) < count) return 0; bytestream2_init(&cmds, gb->buffer, count);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/ilbcdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/ilbcdec.c
Changed
@@ -1095,6 +1095,12 @@ if (s->consPLICount * s->block_samples > 320) { use_gain = 29491; /* 0.9 in Q15 */ + } else if (s->consPLICount * s->block_samples > 640) { + use_gain = 22938; /* 0.7 in Q15 */ + } else if (s->consPLICount * s->block_samples > 960) { + use_gain = 16384; /* 0.5 in Q15 */ + } else if (s->consPLICount * s->block_samples > 1280) { + use_gain = 0; /* 0.0 in Q15 */ } /* Compute mixing factor of picth repeatition and noise:
View file
ffmpeg-6.1.2.tar.xz/libavcodec/imm4.c -> ffmpeg-6.1.1.tar.xz/libavcodec/imm4.c
Changed
@@ -219,15 +219,12 @@ for (y = 0; y < avctx->height; y += 16) { for (x = 0; x < avctx->width; x += 16) { - unsigned flag, cbplo; - int cbphi; + unsigned flag, cbphi, cbplo; cbplo = get_vlc2(gb, cbplo_tab.table, CBPLO_VLC_BITS, 1); flag = get_bits1(gb); cbphi = get_cbphi(gb, 1); - if (cbphi < 0) - return cbphi; ret = decode_blocks(avctx, gb, cbplo | (cbphi << 2), 0, offset, flag); if (ret < 0) @@ -275,8 +272,7 @@ for (y = 0; y < avctx->height; y += 16) { for (x = 0; x < avctx->width; x += 16) { int reverse, intra_block, value; - unsigned cbplo, flag2 = 0; - int cbphi; + unsigned cbphi, cbplo, flag2 = 0; if (get_bits1(gb)) { copy_block16(frame->data0 + y * frame->linesize0 + x, @@ -302,9 +298,6 @@ cbplo = value >> 4; cbphi = get_cbphi(gb, reverse); - if (cbphi < 0) - return cbphi; - if (intra_block) { ret = decode_blocks(avctx, gb, cbplo | (cbphi << 2), 0, offset, flag2); if (ret < 0)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/indeo3.c -> ffmpeg-6.1.1.tar.xz/libavcodec/indeo3.c
Changed
@@ -171,9 +171,6 @@ int luma_size, chroma_size; ptrdiff_t luma_pitch, chroma_pitch; - luma_width = FFALIGN(luma_width , 2); - luma_height = FFALIGN(luma_height, 2); - if (luma_width < 16 || luma_width > 640 || luma_height < 16 || luma_height > 480 || luma_width & 1 || luma_height & 1) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/j2kenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/j2kenc.c
Changed
@@ -1348,7 +1348,7 @@ } } -static int getcut(Jpeg2000Cblk *cblk, uint64_t lambda) +static int getcut(Jpeg2000Cblk *cblk, uint64_t lambda, int dwt_norm) { int passno, res = 0; for (passno = 0; passno < cblk->npasses; passno++){ @@ -1360,7 +1360,7 @@ dd = cblk->passespassno.disto - (res ? cblk->passesres-1.disto : 0); - if (dd >= dr * lambda) + if (((dd * dwt_norm) >> WMSEDEC_SHIFT) * dwt_norm >= dr * lambda) res = passno+1; } return res; @@ -1383,12 +1383,11 @@ Jpeg2000Band *band = reslevel->band + bandno; Jpeg2000Prec *prec = band->prec + precno; - int64_t dwt_norm = dwt_normscodsty->transform == FF_DWT53bandposlev * (int64_t)band->i_stepsize >> 15; - int64_t lambda_prime = av_rescale(s->lambda, 1 << WMSEDEC_SHIFT, dwt_norm * dwt_norm); for (cblkno = 0; cblkno < prec->nb_codeblocks_height * prec->nb_codeblocks_width; cblkno++){ Jpeg2000Cblk *cblk = prec->cblk + cblkno; - cblk->ninclpasses = getcut(cblk, lambda_prime); + cblk->ninclpasses = getcut(cblk, s->lambda, + (int64_t)dwt_normscodsty->transform == FF_DWT53bandposlev * (int64_t)band->i_stepsize >> 15); cblk->layers0.data_start = cblk->data; cblk->layers0.cum_passes = cblk->ninclpasses; cblk->layers0.npasses = cblk->ninclpasses;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/jfdctint_template.c -> ffmpeg-6.1.1.tar.xz/libavcodec/jfdctint_template.c
Changed
@@ -69,7 +69,7 @@ #define GLOBAL(x) x #define RIGHT_SHIFT(x, n) ((x) >> (n)) #define MULTIPLY16C16(var,const) ((var)*(const)) -#define DESCALE(x,n) RIGHT_SHIFT((int)(x) + (1 << ((n) - 1)), n) +#define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n) - 1)), n) /* @@ -175,7 +175,7 @@ #if BITS_IN_JSAMPLE == 8 && CONST_BITS<=13 && PASS1_BITS<=2 #define MULTIPLY(var,const) MULTIPLY16C16(var,const) #else -#define MULTIPLY(var,const) (int)((var) * (unsigned)(const)) +#define MULTIPLY(var,const) ((var) * (const)) #endif @@ -261,7 +261,7 @@ { int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; int tmp10, tmp11, tmp12, tmp13; - unsigned z1, z2, z3, z4, z5; + int z1, z2, z3, z4, z5; int16_t *dataptr; int ctr;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/jpeg2000dec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/jpeg2000dec.c
Changed
@@ -834,6 +834,9 @@ case 2: bytestream2_get_be16(&s->g); break; + case 3: + bytestream2_get_be32(&s->g); + break; } if (SP == 0) { bytestream2_get_be16(&s->g); @@ -1884,7 +1887,7 @@ } } -static inline int tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) +static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) { Jpeg2000T1Context t1; @@ -1909,8 +1912,6 @@ int nb_precincts, precno; Jpeg2000Band *band = rlevel->band + bandno; int cblkno = 0, bandpos; - /* See Rec. ITU-T T.800, Equation E-2 */ - int magp = quantsty->expnsubbandno + quantsty->nguardbits - 1; bandpos = bandno + (reslevelno > 0); @@ -1918,11 +1919,6 @@ band->coord10 == band->coord11) continue; - if ((codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F) && magp >= 31) { - avpriv_request_sample(s->avctx, "JPEG2000_CTSY_HTJ2K_F and magp >= 31"); - return AVERROR_PATCHWELCOME; - } - nb_precincts = rlevel->num_precincts_x * rlevel->num_precincts_y; /* Loop on precincts */ for (precno = 0; precno < nb_precincts; precno++) { @@ -1933,6 +1929,8 @@ cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height; cblkno++) { int x, y, ret; + /* See Rec. ITU-T T.800, Equation E-2 */ + int magp = quantsty->expnsubbandno + quantsty->nguardbits - 1; Jpeg2000Cblk *cblk = prec->cblk + cblkno; @@ -1972,7 +1970,6 @@ ff_dwt_decode(&comp->dwt, codsty->transform == FF_DWT97 ? (void*)comp->f_data : (void*)comp->i_data); } /*end comp */ - return 0; } #define WRITE_FRAME(D, PIXEL) \ @@ -2049,9 +2046,7 @@ AVFrame *picture = td; Jpeg2000Tile *tile = s->tile + jobnr; - int ret = tile_codeblocks(s, tile); - if (ret < 0) - return ret; + tile_codeblocks(s, tile); /* inverse MCT transformation */ if (tile->codsty0.mct)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/jpeg2000htdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/jpeg2000htdec.c
Changed
@@ -1198,9 +1198,6 @@ av_assert0(width * height <= 4096); av_assert0(width * height > 0); - if (roi_shift) - avpriv_report_missing_feature(s->avctx, "ROI shift"); - memset(t1->data, 0, t1->stride * height * sizeof(*t1->data)); memset(t1->flags, 0, t1->stride * (height + 2) * sizeof(*t1->flags));
View file
ffmpeg-6.1.2.tar.xz/libavcodec/libsvtav1.c -> ffmpeg-6.1.1.tar.xz/libavcodec/libsvtav1.c
Changed
@@ -250,7 +250,6 @@ if (avctx->gop_size > 1) param->intra_period_length = avctx->gop_size - 1; -#if SVT_AV1_CHECK_VERSION(1, 1, 0) // In order for SVT-AV1 to force keyframes by setting pic_type to // EB_AV1_KEY_PICTURE on any frame, force_key_frames has to be set. Note // that this does not force all frames to be keyframes (it only forces a @@ -261,7 +260,6 @@ // to be updated to set force_key_frames accordingly. if (avctx->gop_size == 1) param->force_key_frames = 1; -#endif if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param->frame_rate_numerator = avctx->framerate.num; @@ -539,14 +537,6 @@ if (svt_ret == EB_NoErrorEmptyQueue) return AVERROR(EAGAIN); -#if SVT_AV1_CHECK_VERSION(2, 0, 0) - if (headerPtr->flags & EB_BUFFERFLAG_EOS) { - svt_enc->eos_flag = EOS_RECEIVED; - svt_av1_enc_release_out_buffer(&headerPtr); - return AVERROR_EOF; - } -#endif - ref = get_output_ref(avctx, svt_enc, headerPtr->n_filled_len); if (!ref) { av_log(avctx, AV_LOG_ERROR, "Failed to allocate output packet.\n"); @@ -581,10 +571,8 @@ if (headerPtr->pic_type == EB_AV1_NON_REF_PICTURE) pkt->flags |= AV_PKT_FLAG_DISPOSABLE; -#if !(SVT_AV1_CHECK_VERSION(2, 0, 0)) if (headerPtr->flags & EB_BUFFERFLAG_EOS) svt_enc->eos_flag = EOS_RECEIVED; -#endif ff_side_data_set_encoder_stats(pkt, headerPtr->qp * FF_QP2LAMBDA, NULL, 0, pict_type);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/libvpxenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/libvpxenc.c
Changed
@@ -2041,7 +2041,6 @@ FF_CODEC_ENCODE_CB(vpx_encode), .close = vpx_free, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | - FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .p.pix_fmts = (const enum AVPixelFormat){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }, .p.priv_class = &class_vp8, @@ -2118,7 +2117,6 @@ FF_CODEC_ENCODE_CB(vpx_encode), .close = vpx_free, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | - FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .defaults = defaults, .init_static_data = vp9_init_static,
View file
ffmpeg-6.1.2.tar.xz/libavcodec/loco.c -> ffmpeg-6.1.1.tar.xz/libavcodec/loco.c
Changed
@@ -92,15 +92,10 @@ if (get_bits_left(&r->gb) < 1) return INT_MIN; v = get_ur_golomb_jpegls(&r->gb, loco_get_rice_param(r), INT_MAX, 0); - if (v == -1) - return INT_MIN; loco_update_rice_param(r, (v + 1) >> 1); if (!v) { if (r->save >= 0) { - int run = get_ur_golomb_jpegls(&r->gb, 2, INT_MAX, 0); - if (run == -1) - return INT_MIN; - r->run = run; + r->run = get_ur_golomb_jpegls(&r->gb, 2, INT_MAX, 0); if (r->run > 1) r->save += r->run + 1; else @@ -157,8 +152,6 @@ /* restore top left pixel */ val = loco_get_rice(&rc); - if (val == INT_MIN) - return AVERROR_INVALIDDATA; data0 = 128 + val; /* restore top line */ for (i = 1; i < width; i++) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/lpc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/lpc.c
Changed
@@ -250,10 +250,8 @@ double av_uninit(weight); memset(var, 0, FFALIGN(MAX_LPC_ORDER+1,4)*sizeof(*var)); - /* Avoids initializing with an unused value when lpc_passes == 1 */ - if (lpc_passes > 1) - for(j=0; j<max_order; j++) - m0.coeffmax_order-1j = -lpcmax_order-1j; + for(j=0; j<max_order; j++) + m0.coeffmax_order-1j = -lpcmax_order-1j; for(; pass<lpc_passes; pass++){ avpriv_init_lls(&mpass&1, max_order);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mediacodecdec_common.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mediacodecdec_common.c
Changed
@@ -804,8 +804,6 @@ return AVERROR_EXTERNAL; } - if (s->draining && s->eos) - return AVERROR_EOF; return AVERROR(EAGAIN); }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mediacodecenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mediacodecenc.c
Changed
@@ -268,11 +268,8 @@ if (avctx->bit_rate) ff_AMediaFormat_setInt32(format, "bitrate", avctx->bit_rate); - if (s->bitrate_mode >= 0) { + if (s->bitrate_mode >= 0) ff_AMediaFormat_setInt32(format, "bitrate-mode", s->bitrate_mode); - if (s->bitrate_mode == BITRATE_MODE_CQ && avctx->global_quality > 0) - ff_AMediaFormat_setInt32(format, "quality", avctx->global_quality); - } // frame-rate and i-frame-interval are required to configure codec if (avctx->framerate.num >= avctx->framerate.den && avctx->framerate.den > 0) { s->fps = avctx->framerate.num / avctx->framerate.den;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mfenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mfenc.c
Changed
@@ -248,7 +248,7 @@ if ((ret = ff_get_encode_buffer(avctx, avpkt, len, 0)) < 0) return ret; - hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer); + IMFSample_ConvertToContiguousBuffer(sample, &buffer); if (FAILED(hr)) return AVERROR_EXTERNAL;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mlpenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mlpenc.c
Changed
@@ -1414,8 +1414,7 @@ int32_t maxl = INT32_MIN, maxr = INT32_MIN, minl = INT32_MAX, minr = INT32_MAX; int64_t summ = 0, sums = 0, suml = 0, sumr = 0, enl = 0, enr = 0; const int shift = 14 - ctx->rematrix_precision; - int32_t cf0, cf1, e4, d4; - int64_t ml, mr; + int32_t cf0, cf1, e4, d4, ml, mr; int i, count = 0; for (int j = 0; j <= ctx->cur_restart_interval; j++) { @@ -1448,8 +1447,8 @@ summ -= FFABS(suml + sumr); sums -= FFABS(suml - sumr); - ml = maxl - (int64_t)minl; - mr = maxr - (int64_t)minr; + ml = maxl - minl; + mr = maxr - minr; if (!summ && !sums) return 0;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/motion_est.c -> ffmpeg-6.1.1.tar.xz/libavcodec/motion_est.c
Changed
@@ -1446,7 +1446,7 @@ s->b_direct_mv_tablemot_xy0= 0; s->b_direct_mv_tablemot_xy1= 0; - return 256*256*256*64-1; + return 256*256*256*64; } c->xmin= xmin;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mpeg12dec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mpeg12dec.c
Changed
@@ -2934,7 +2934,7 @@ int ret; // Check for minimal intra MB size (considering mb header, luma & chroma dc VLC, ac EOB VLC) - if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2LL + 3*4 + 2*2 + 2*6)) + if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2 + 3*4 + 2*2 + 2*6)) return AVERROR_INVALIDDATA; ret = ff_get_buffer(avctx, frame, 0);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mpeg12enc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mpeg12enc.c
Changed
@@ -333,7 +333,7 @@ else /* VBV calculation: Scaled so that a VCD has the proper * VBV size of 40 kilobytes */ - vbv_buffer_size = av_rescale_rnd(s->bit_rate, 20, 1151929 / 2, AV_ROUND_ZERO) * 8 * 1024; + vbv_buffer_size = ((20 * s->bit_rate) / (1151929 / 2)) * 8 * 1024; vbv_buffer_size = (vbv_buffer_size + 16383) / 16384; put_sbits(&s->pb, 18, v);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mpeg4videodec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mpeg4videodec.c
Changed
@@ -597,8 +597,6 @@ ctx->sprite_shift0 = alpha + beta + rho - min_ab; ctx->sprite_shift1 = alpha + beta + rho - min_ab + 2; break; - default: - av_assert0(0); } /* try to simplify the situation */ if (sprite_delta00 == a << ctx->sprite_shift0 &&
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mpegvideo_enc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mpegvideo_enc.c
Changed
@@ -1194,12 +1194,12 @@ } for (int i = 0; i < 3; i++) { - ptrdiff_t src_stride = pic_arg->linesizei; - ptrdiff_t dst_stride = i ? s->uvlinesize : s->linesize; + int src_stride = pic_arg->linesizei; + int dst_stride = i ? s->uvlinesize : s->linesize; int h_shift = i ? s->chroma_x_shift : 0; int v_shift = i ? s->chroma_y_shift : 0; - int w = AV_CEIL_RSHIFT(s->width , h_shift); - int h = AV_CEIL_RSHIFT(s->height, v_shift); + int w = s->width >> h_shift; + int h = s->height >> v_shift; const uint8_t *src = pic_arg->datai; uint8_t *dst = pic->f->datai; int vpad = 16; @@ -1252,8 +1252,6 @@ /* shift buffer entries */ for (int i = flush_offset; i <= MAX_B_FRAMES; i++) s->input_picturei - flush_offset = s->input_picturei; - for (int i = MAX_B_FRAMES + 1 - flush_offset; i <= MAX_B_FRAMES; i++) - s->input_picturei = NULL; s->input_pictureencoding_delay = pic; @@ -1435,7 +1433,7 @@ goto fail; } - rd += (out_size * (uint64_t)lambda2) >> (FF_LAMBDA_SHIFT - 3); + rd += (out_size * lambda2) >> (FF_LAMBDA_SHIFT - 3); } /* get the delayed frames */ @@ -1444,7 +1442,7 @@ ret = out_size; goto fail; } - rd += (out_size * (uint64_t)lambda2) >> (FF_LAMBDA_SHIFT - 3); + rd += (out_size * lambda2) >> (FF_LAMBDA_SHIFT - 3); rd += c->error0 + c->error1 + c->error2;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mscc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mscc.c
Changed
@@ -53,9 +53,6 @@ unsigned run = bytestream2_get_byte(gb); if (run) { - if (bytestream2_get_bytes_left_p(pb) < run * s->bpp) - return AVERROR_INVALIDDATA; - switch (avctx->bits_per_coded_sample) { case 8: fill = bytestream2_get_byte(gb); @@ -104,9 +101,6 @@ bytestream2_seek_p(pb, y * avctx->width * s->bpp + x * s->bpp, SEEK_SET); } else { - if (bytestream2_get_bytes_left_p(pb) < copy * s->bpp) - return AVERROR_INVALIDDATA; - for (j = 0; j < copy; j++) { switch (avctx->bits_per_coded_sample) { case 8:
View file
ffmpeg-6.1.2.tar.xz/libavcodec/mwsc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/mwsc.c
Changed
@@ -50,10 +50,6 @@ if (run == 0) { run = bytestream2_get_le32(gb); - - if (bytestream2_tell_p(pb) + width - w < run) - return AVERROR_INVALIDDATA; - for (int j = 0; j < run; j++, w++) { if (w == width) { w = 0; @@ -65,10 +61,6 @@ int pos = bytestream2_tell_p(pb); bytestream2_seek(gbp, pos, SEEK_SET); - - if (pos + width - w < fill) - return AVERROR_INVALIDDATA; - for (int j = 0; j < fill; j++, w++) { if (w == width) { w = 0; @@ -80,9 +72,6 @@ intra = 0; } else { - if (bytestream2_tell_p(pb) + width - w < run) - return AVERROR_INVALIDDATA; - for (int j = 0; j < run; j++, w++) { if (w == width) { w = 0;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/notchlc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/notchlc.c
Changed
@@ -242,9 +242,7 @@ bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET); - ret = init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb)); - if (ret < 0) - return ret; + init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb)); for (int x = 0; x < avctx->width; x += 4) { unsigned item = bytestream2_get_le32(gb); unsigned y_min = item & 4095;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/nvdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/nvdec.c
Changed
@@ -258,8 +258,8 @@ { NVDECContext *ctx = avctx->internal->hwaccel_priv_data; + av_freep(&ctx->bitstream); av_freep(&ctx->bitstream_internal); - ctx->bitstream = NULL; ctx->bitstream_len = 0; ctx->bitstream_allocated = 0; @@ -665,8 +665,6 @@ NVDECContext *ctx = avctx->internal->hwaccel_priv_data; int ret = ff_nvdec_end_frame(avctx); ctx->bitstream = NULL; - ctx->bitstream_len = 0; - ctx->nb_slices = 0; return ret; }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/nvdec_h264.c -> ffmpeg-6.1.1.tar.xz/libavcodec/nvdec_h264.c
Changed
@@ -138,11 +138,11 @@ const H264SliceContext *sl = &h->slice_ctx0; void *tmp; - tmp = av_fast_realloc(ctx->bitstream_internal, &ctx->bitstream_allocated, + tmp = av_fast_realloc(ctx->bitstream, &ctx->bitstream_allocated, ctx->bitstream_len + size + 3); if (!tmp) return AVERROR(ENOMEM); - ctx->bitstream = ctx->bitstream_internal = tmp; + ctx->bitstream = tmp; tmp = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated, (ctx->nb_slices + 1) * sizeof(*ctx->slice_offsets));
View file
ffmpeg-6.1.2.tar.xz/libavcodec/nvdec_hevc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/nvdec_hevc.c
Changed
@@ -274,11 +274,11 @@ NVDECContext *ctx = avctx->internal->hwaccel_priv_data; void *tmp; - tmp = av_fast_realloc(ctx->bitstream_internal, &ctx->bitstream_allocated, + tmp = av_fast_realloc(ctx->bitstream, &ctx->bitstream_allocated, ctx->bitstream_len + size + 3); if (!tmp) return AVERROR(ENOMEM); - ctx->bitstream = ctx->bitstream_internal = tmp; + ctx->bitstream = tmp; tmp = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated, (ctx->nb_slices + 1) * sizeof(*ctx->slice_offsets));
View file
ffmpeg-6.1.2.tar.xz/libavcodec/nvenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/nvenc.c
Changed
@@ -982,7 +982,7 @@ // Output in the worst case will only start when the surface buffer is completely full. // Hence we need to keep at least the max amount of surfaces plus the max reorder delay around. - ctx->frame_data_array_nb = FFMAX(ctx->nb_surfaces, ctx->nb_surfaces + ctx->encode_config.frameIntervalP - 1); + ctx->frame_data_array_nb = ctx->nb_surfaces + ctx->encode_config.frameIntervalP - 1; return 0; } @@ -1255,11 +1255,6 @@ h264->level = ctx->level; -#ifdef NVENC_HAVE_NEW_BIT_DEPTH_API - h264->inputBitDepth = h264->outputBitDepth = - IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8; -#endif - if (ctx->coder >= 0) h264->entropyCodingMode = ctx->coder; @@ -1375,12 +1370,7 @@ hevc->chromaFormatIDC = IS_YUV444(ctx->data_pix_fmt) ? 3 : 1; -#ifdef NVENC_HAVE_NEW_BIT_DEPTH_API - hevc->inputBitDepth = hevc->outputBitDepth = - IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8; -#else hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0; -#endif hevc->level = ctx->level; @@ -1465,13 +1455,8 @@ av1->chromaFormatIDC = IS_YUV444(ctx->data_pix_fmt) ? 3 : 1; -#ifdef NVENC_HAVE_NEW_BIT_DEPTH_API - av1->inputBitDepth = IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8; - av1->outputBitDepth = (IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8; -#else av1->inputPixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0; av1->pixelBitDepthMinus8 = (IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) ? 2 : 0; -#endif if (ctx->b_ref_mode >= 0) av1->useBFramesAsRef = ctx->b_ref_mode; @@ -1704,15 +1689,15 @@ { switch (pix_fmt) { case AV_PIX_FMT_YUV420P: - return NV_ENC_BUFFER_FORMAT_YV12; + return NV_ENC_BUFFER_FORMAT_YV12_PL; case AV_PIX_FMT_NV12: - return NV_ENC_BUFFER_FORMAT_NV12; + return NV_ENC_BUFFER_FORMAT_NV12_PL; case AV_PIX_FMT_P010: case AV_PIX_FMT_P016: return NV_ENC_BUFFER_FORMAT_YUV420_10BIT; case AV_PIX_FMT_GBRP: case AV_PIX_FMT_YUV444P: - return NV_ENC_BUFFER_FORMAT_YUV444; + return NV_ENC_BUFFER_FORMAT_YUV444_PL; case AV_PIX_FMT_GBRP16: case AV_PIX_FMT_YUV444P16: return NV_ENC_BUFFER_FORMAT_YUV444_10BIT; @@ -1891,7 +1876,7 @@ av_fifo_freep2(&ctx->unused_surface_queue); if (ctx->frame_data_array) { - for (i = 0; i < ctx->frame_data_array_nb; i++) + for (i = 0; i < ctx->nb_surfaces; i++) av_buffer_unref(&ctx->frame_data_arrayi.frame_opaque_ref); av_freep(&ctx->frame_data_array); }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/nvenc.h -> ffmpeg-6.1.1.tar.xz/libavcodec/nvenc.h
Changed
@@ -83,11 +83,6 @@ #define NVENC_NO_DEPRECATED_RC #endif -// SDK 12.2 compile time feature checks -#if NVENCAPI_CHECK_VERSION(12, 2) -#define NVENC_HAVE_NEW_BIT_DEPTH_API -#endif - typedef struct NvencSurface { NV_ENC_INPUT_PTR input_surface;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/osq.c -> ffmpeg-6.1.1.tar.xz/libavcodec/osq.c
Changed
@@ -160,15 +160,11 @@ sum = cb->sum; x = sum / cb->count; - rice_k = ceil(log2(x)); + rice_k = av_ceil_log2(x); if (rice_k >= 30) { - double f = floor(sum / 1.4426952 + 0.5); - if (f <= 1) { + rice_k = floor(sum / 1.4426952 + 0.5); + if (rice_k < 1) rice_k = 1; - } else if (f >= 31) { - rice_k = 31; - } else - rice_k = f; } return rice_k; @@ -225,8 +221,8 @@ #define C (-3) #define D (-4) #define E (-5) -#define P2 (((unsigned)dstA + dstA) - dstB) -#define P3 (((unsigned)dstA - dstB) * 3 + dstC) +#define P2 ((dstA + dstA) - dstB) +#define P3 ((dstA - dstB) * 3 + dstC) static int do_decode(AVCodecContext *avctx, AVFrame *frame, int decorrelate, int downsample) { @@ -276,10 +272,10 @@ case 0: break; case 1: - dstn += (unsigned)dstA; + dstn += dstA; break; case 2: - dstn += (unsigned)dstA + p; + dstn += dstA + p; break; case 3: dstn += P2; @@ -294,28 +290,28 @@ dstn += P3 + p; break; case 7: - dstn += (int)(P2 + P3) / 2 + (unsigned)p; + dstn += (P2 + P3) / 2 + p; break; case 8: - dstn += (int)(P2 + P3) / 2; + dstn += (P2 + P3) / 2; break; case 9: - dstn += (int)(P2 * 2 + P3) / 3 + (unsigned)p; + dstn += (P2 * 2 + P3) / 3 + p; break; case 10: - dstn += (int)(P2 + P3 * 2) / 3 + (unsigned)p; + dstn += (P2 + P3 * 2) / 3 + p; break; case 11: - dstn += (int)((unsigned)dstA + dstB) / 2; + dstn += (dstA + dstB) / 2; break; case 12: - dstn += (unsigned)dstB; + dstn += dstB; break; case 13: - dstn += (int)(unsigned)(dstD + dstB) / 2; + dstn += (dstD + dstB) / 2; break; case 14: - dstn += (int)((unsigned)P2 + dstA) / 2 + (unsigned)p; + dstn += (P2 + dstA) / 2 + p; break; default: return AVERROR_INVALIDDATA; @@ -324,7 +320,7 @@ cb->prev = prev; if (downsample) - dstn *= 256U; + dstn *= 256; dstE = dstD; dstD = dstC; @@ -355,7 +351,7 @@ const int nb_channels = avctx->ch_layout.nb_channels; const int nb_samples = frame->nb_samples; OSQContext *s = avctx->priv_data; - const unsigned factor = s->factor; + const int factor = s->factor; int ret, decorrelate, downsample; GetBitContext *gb = &s->gb;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/pcm-dvdenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/pcm-dvdenc.c
Changed
@@ -116,7 +116,7 @@ { PCMDVDContext *s = avctx->priv_data; int samples = frame->nb_samples * avctx->ch_layout.nb_channels; - int64_t pkt_size = (int64_t)(frame->nb_samples / s->samples_per_block) * s->block_size + 3; + int64_t pkt_size = (frame->nb_samples / s->samples_per_block) * s->block_size + 3; int blocks = (pkt_size - 3) / s->block_size; const int16_t *src16; const int32_t *src32;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/pixlet.c -> ffmpeg-6.1.1.tar.xz/libavcodec/pixlet.c
Changed
@@ -230,8 +230,8 @@ if (cnt1 >= length) { cnt1 = get_bits(bc, nbits); } else { - pfx = FFMIN(value, 14); - if (pfx < 1) + pfx = 14 + ((((uint64_t)(value - 14)) >> 32) & (value - 14)); + if (pfx < 1 || pfx > 25) return AVERROR_INVALIDDATA; cnt1 *= (1 << pfx) - 1; shbits = show_bits(bc, pfx);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/pngdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/pngdec.c
Changed
@@ -1023,20 +1023,17 @@ return AVERROR_INVALIDDATA; } - channels = s->color_type & PNG_COLOR_MASK_PALETTE ? 3 : ff_png_get_nb_channels(s->color_type); + channels = ff_png_get_nb_channels(s->color_type); - if (bytestream2_get_bytes_left(gb) != channels) { - av_log(avctx, AV_LOG_ERROR, "Invalid sBIT size: %d, expected: %d\n", - bytestream2_get_bytes_left(gb), channels); + if (bytestream2_get_bytes_left(gb) != channels) return AVERROR_INVALIDDATA; - } for (int i = 0; i < channels; i++) { int b = bytestream2_get_byteu(gb); bits = FFMAX(b, bits); } - if (bits <= 0 || bits > (s->color_type & PNG_COLOR_MASK_PALETTE ? 8 : s->bit_depth)) { + if (bits < 0 || bits > s->bit_depth) { av_log(avctx, AV_LOG_ERROR, "Invalid significant bits: %d\n", bits); return AVERROR_INVALIDDATA; } @@ -1161,7 +1158,7 @@ return AVERROR_INVALIDDATA; } - if ((sequence_number == 0 || !s->last_picture.f) && + if ((sequence_number == 0 || !s->last_picture.f->data0) && dispose_op == APNG_DISPOSE_OP_PREVIOUS) { // No previous frame to revert to for the first frame // Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND
View file
ffmpeg-6.1.2.tar.xz/libavcodec/pngenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/pngenc.c
Changed
@@ -442,9 +442,8 @@ if (png_get_gama(pict->color_trc, s->buf)) png_write_chunk(&s->bytestream, MKTAG('g', 'A', 'M', 'A'), s->buf, 4); - if (avctx->bits_per_raw_sample > 0 && - avctx->bits_per_raw_sample < (s->color_type & PNG_COLOR_MASK_PALETTE ? 8 : s->bit_depth)) { - int len = s->color_type & PNG_COLOR_MASK_PALETTE ? 3 : ff_png_get_nb_channels(s->color_type); + if (avctx->bits_per_raw_sample > 0 && avctx->bits_per_raw_sample < s->bit_depth) { + int len = ff_png_get_nb_channels(s->color_type); memset(s->buf, avctx->bits_per_raw_sample, len); png_write_chunk(&s->bytestream, MKTAG('s', 'B', 'I', 'T'), s->buf, len); }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/pnmdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/pnmdec.c
Changed
@@ -264,7 +264,7 @@ break; case AV_PIX_FMT_GBRPF32: if (!s->half) { - if (avctx->width * avctx->height * 12LL > s->bytestream_end - s->bytestream) + if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream) return AVERROR_INVALIDDATA; scale = 1.f / s->scale; if (s->endian) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/proresdec2.c -> ffmpeg-6.1.1.tar.xz/libavcodec/proresdec2.c
Changed
@@ -510,7 +510,7 @@ for (pos = block_mask;;) { bits_left = gb->size_in_bits - re_index; - if (bits_left <= 0 || (bits_left < 32 && !SHOW_UBITS(re, gb, bits_left))) + if (!bits_left || (bits_left < 32 && !SHOW_UBITS(re, gb, bits_left))) break; DECODE_CODEWORD(run, run_to_cbFFMIN(run, 15), LAST_SKIP_BITS);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/proresenc_anatoliy.c -> ffmpeg-6.1.1.tar.xz/libavcodec/proresenc_anatoliy.c
Changed
@@ -884,8 +884,7 @@ avctx->profile = AV_PROFILE_PRORES_4444; av_log(avctx, AV_LOG_INFO, "encoding with ProRes 4444+ (ap4h) profile\n"); - } else - av_assert0(0); + } } else if (avctx->profile < AV_PROFILE_PRORES_PROXY || avctx->profile > AV_PROFILE_PRORES_XQ) { av_log(
View file
ffmpeg-6.1.2.tar.xz/libavcodec/proresenc_kostya.c -> ffmpeg-6.1.1.tar.xz/libavcodec/proresenc_kostya.c
Changed
@@ -3,6 +3,9 @@ * * Copyright (c) 2012 Konstantin Shishkov * + * This encoder appears to be based on Anatoliy Wassermans considering + * similarities in the bugs. + * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or @@ -367,7 +370,7 @@ static void get_alpha_data(ProresContext *ctx, const uint16_t *src, ptrdiff_t linesize, int x, int y, int w, int h, - uint16_t *blocks, int mbs_per_slice, int abits) + int16_t *blocks, int mbs_per_slice, int abits) { const int slice_width = 16 * mbs_per_slice; int i, j, copy_w, copy_h;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/qsv.c -> ffmpeg-6.1.1.tar.xz/libavcodec/qsv.c
Changed
@@ -496,7 +496,7 @@ mfxStatus sts; mfxLoader loader = NULL; mfxConfig cfg; - mfxVariant impl_value = {0}; + mfxVariant impl_value; loader = MFXLoad(); if (!loader) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/qsvdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/qsvdec.c
Changed
@@ -378,12 +378,9 @@ q->frame_info = param->mfx.FrameInfo; - if (!avctx->hw_frames_ctx) { - ret = av_image_get_buffer_size(avctx->pix_fmt, FFALIGN(avctx->width, 128), FFALIGN(avctx->height, 64), 1); - if (ret < 0) - return ret; - q->pool = av_buffer_pool_init(ret, av_buffer_allocz); - } + if (!avctx->hw_frames_ctx) + q->pool = av_buffer_pool_init(av_image_get_buffer_size(avctx->pix_fmt, + FFALIGN(avctx->width, 128), FFALIGN(avctx->height, 64), 1), av_buffer_allocz); return 0; }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/r210enc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/r210enc.c
Changed
@@ -35,7 +35,7 @@ avctx->bits_per_coded_sample = 32; if (avctx->width > 0) - avctx->bit_rate = av_rescale(ff_guess_coded_bitrate(avctx), aligned_width, avctx->width); + avctx->bit_rate = ff_guess_coded_bitrate(avctx) * aligned_width / avctx->width; return 0; }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/rtv1.c -> ffmpeg-6.1.1.tar.xz/libavcodec/rtv1.c
Changed
@@ -113,8 +113,6 @@ width = bytestream2_get_le32(&gb); height = bytestream2_get_le32(&gb); - if (width > INT_MAX-4U || height > INT_MAX-4U) - return AVERROR_INVALIDDATA; ret = ff_set_dimensions(avctx, FFALIGN(width, 4), FFALIGN(height, 4)); if (ret < 0) return ret;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/rv34.c -> ffmpeg-6.1.1.tar.xz/libavcodec/rv34.c
Changed
@@ -97,8 +97,6 @@ uint16_t cwMAX_VLC_SIZE; int maxbits; - av_assert1(size > 0); - for (int i = 0; i < size; i++) countsbitsi++;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/scpr3.c -> ffmpeg-6.1.1.tar.xz/libavcodec/scpr3.c
Changed
@@ -465,8 +465,6 @@ return 0; grow_dec(m); c = add_dec(m, q, g, f); - if (c < 0) - return AVERROR_INVALIDDATA; } incr_cntdec(m, c); @@ -870,11 +868,11 @@ sync_code3(gb, rc); break; case 6: - ret = decode_adaptive6(m, code, value, &a, &b); - if (!ret) + if (!decode_adaptive6(m, code, value, &a, &b)) { ret = update_model6_to_7(m); - if (ret < 0) - return ret; + if (ret < 0) + return AVERROR_INVALIDDATA; + } decode3(gb, rc, a, b); sync_code3(gb, rc); break;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/sga.c -> ffmpeg-6.1.1.tar.xz/libavcodec/sga.c
Changed
@@ -72,7 +72,7 @@ return AVERROR_INVALIDDATA; memset(pal, 0, 16 * sizeof(*pal)); - (void)init_get_bits8(&gbit, gb->buffer, 18); + init_get_bits8(&gbit, gb->buffer, 18); for (int RGBIndex = 0; RGBIndex < 3; RGBIndex++) { for (int index = 0; index < 16; index++) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/snow.c -> ffmpeg-6.1.1.tar.xz/libavcodec/snow.c
Changed
@@ -427,7 +427,7 @@ !FF_ALLOCZ_TYPED_ARRAY(s->spatial_dwt_buffer, width * height) || //FIXME this does not belong here !FF_ALLOCZ_TYPED_ARRAY(s->temp_dwt_buffer, width) || !FF_ALLOCZ_TYPED_ARRAY(s->temp_idwt_buffer, width) || - !FF_ALLOCZ_TYPED_ARRAY(s->run_buffer, ((width + 1) >> 1) * ((height + 1) >> 1) + 1)) + !FF_ALLOCZ_TYPED_ARRAY(s->run_buffer, ((width + 1) >> 1) * ((height + 1) >> 1))) return AVERROR(ENOMEM); for(i=0; i<MAX_REF_FRAMES; i++) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/snowenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/snowenc.c
Changed
@@ -411,7 +411,6 @@ int my_context= av_log2(2*FFABS(left->my - top->my)); int s_context= 2*left->level + 2*top->level + tl->level + tr->level; int ref, best_ref, ref_score, ref_mx, ref_my; - int range = MAX_MV >> (1 + qpel); av_assert0(sizeof(s->block_state) >= 256); if(s->keyframe){ @@ -453,11 +452,6 @@ c->xmax = - (x+1)*block_w + (w<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3; c->ymax = - (y+1)*block_w + (h<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3; - c->xmin = FFMAX(c->xmin,-range); - c->xmax = FFMIN(c->xmax, range); - c->ymin = FFMAX(c->ymin,-range); - c->ymax = FFMIN(c->ymax, range); - if(P_LEFT0 > (c->xmax<<shift)) P_LEFT0 = (c->xmax<<shift); if(P_LEFT1 > (c->ymax<<shift)) P_LEFT1 = (c->ymax<<shift); if(P_TOP0 > (c->xmax<<shift)) P_TOP0 = (c->xmax<<shift);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/targaenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/targaenc.c
Changed
@@ -21,7 +21,6 @@ #include <string.h> -#include "libavutil/avassert.h" #include "libavutil/imgutils.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" @@ -90,11 +89,10 @@ TargaContext *s = avctx->priv_data; int bpp, picsize, datasize = -1, ret, i; uint8_t *out; - int maxpal = 32*32; picsize = av_image_get_buffer_size(avctx->pix_fmt, avctx->width, avctx->height, 1); - if ((ret = ff_alloc_packet(avctx, pkt, picsize + 45 + maxpal)) < 0) + if ((ret = ff_alloc_packet(avctx, pkt, picsize + 45)) < 0) return ret; /* zero out the header and only set applicable fields */ @@ -127,7 +125,6 @@ AV_WL24(pkt->data + 18 + 3 * i, *(uint32_t *)(p->data1 + i * 4)); } out += 32 * pal_bpp; /* skip past the palette we just output */ - av_assert0(32 * pal_bpp <= maxpal); break; } case AV_PIX_FMT_GRAY8:
View file
ffmpeg-6.1.2.tar.xz/libavcodec/tests/bitstream_template.c -> ffmpeg-6.1.1.tar.xz/libavcodec/tests/bitstream_template.c
Changed
@@ -61,7 +61,6 @@ uint64_t val, val1; int32_t sval, sval1; unsigned count; - int ret; /* generate random input, using a given or random seed */ if (argc > 1) @@ -75,8 +74,7 @@ for (unsigned i = 0; i < SIZE; i++) bufi = av_lfg_get(&lfg); - ret = bits_init8 (&bc, buf, SIZE); - av_assert0(ret >= 0); + bits_init8 (&bc, buf, SIZE); init_put_bits(&pb, dst, SIZE); /* use a random sequence of bitreading operations to transfer data
View file
ffmpeg-6.1.2.tar.xz/libavcodec/tests/dct.c -> ffmpeg-6.1.1.tar.xz/libavcodec/tests/dct.c
Changed
@@ -226,8 +226,8 @@ v = abs(err); if (v > err_inf) err_inf = v; - err2_matrixi += v * (int64_t)v; - err2 += v * (int64_t)v; + err2_matrixi += v * v; + err2 += v * v; sysErri += blocki - block1i; blockSumErr += v; if (abs(blocki) > maxout)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/tests/jpeg2000dwt.c -> ffmpeg-6.1.1.tar.xz/libavcodec/tests/jpeg2000dwt.c
Changed
@@ -52,12 +52,12 @@ return 1; } for (j = 0; j<MAX_W * MAX_W; j++) { - if (FFABS(arrayj - (int64_t)refj) > max_diff) { + if (FFABS(arrayj - refj) > max_diff) { fprintf(stderr, "missmatch at %d (%d != %d) decomp:%d border %d %d %d %d\n", j, arrayj, refj,decomp_levels, border00, border01, border10, border11); return 2; } - err2 += (arrayj - refj) * (int64_t)(arrayj - refj); + err2 += (arrayj - refj) * (arrayj - refj); arrayj = refj; } ff_dwt_destroy(s);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/tiff.c -> ffmpeg-6.1.1.tar.xz/libavcodec/tiff.c
Changed
@@ -427,8 +427,7 @@ uint8_t shift = is_dng ? 0 : 16 - bpp; GetBitContext gb; - int ret = init_get_bits8(&gb, src, width); - av_assert1(ret >= 0); + init_get_bits8(&gb, src, width); for (int i = 0; i < s->width; i++) { dst16i = get_bits(&gb, bpp) << shift; } @@ -462,8 +461,7 @@ GetBitContext gb; uint16_t *dst = (uint16_t *)(p->data0 + lnum * p->linesize0); - int ret = init_get_bits8(&gb, src, width); - av_assert1(ret >= 0); + init_get_bits8(&gb, src, width); for (int i = 0; i < s->width; i++) { dsti = get_bits(&gb, bpp); @@ -1303,13 +1301,9 @@ s->is_thumbnail = (value != 0); break; case TIFF_WIDTH: - if (value > INT_MAX) - return AVERROR_INVALIDDATA; s->width = value; break; case TIFF_HEIGHT: - if (value > INT_MAX) - return AVERROR_INVALIDDATA; s->height = value; break; case TIFF_BPP: @@ -1441,18 +1435,12 @@ s->tile_byte_counts_offset = off; break; case TIFF_TILE_LENGTH: - if (value > INT_MAX) - return AVERROR_INVALIDDATA; s->tile_length = value; break; case TIFF_TILE_WIDTH: - if (value > INT_MAX) - return AVERROR_INVALIDDATA; s->tile_width = value; break; case TIFF_PREDICTOR: - if (value > INT_MAX) - return AVERROR_INVALIDDATA; s->predictor = value; break; case TIFF_SUB_IFDS: @@ -1597,18 +1585,12 @@ } break; case TIFF_T4OPTIONS: - if (s->compr == TIFF_G3) { - if (value > INT_MAX) - return AVERROR_INVALIDDATA; + if (s->compr == TIFF_G3) s->fax_opts = value; - } break; case TIFF_T6OPTIONS: - if (s->compr == TIFF_G4) { - if (value > INT_MAX) - return AVERROR_INVALIDDATA; + if (s->compr == TIFF_G4) s->fax_opts = value; - } break; #define ADD_METADATA(count, name, sep)\ if ((ret = add_metadata(count, type, name, sep, s, frame)) < 0) {\
View file
ffmpeg-6.1.2.tar.xz/libavcodec/truemotion1.c -> ffmpeg-6.1.1.tar.xz/libavcodec/truemotion1.c
Changed
@@ -408,11 +408,6 @@ return AVERROR_PATCHWELCOME; } - if (s->h & 3) { - avpriv_request_sample(s->avctx, "Frame with height not being a multiple of 4"); - return AVERROR_PATCHWELCOME; - } - if (s->w != s->avctx->width || s->h != s->avctx->height || new_pix_fmt != s->avctx->pix_fmt) { av_frame_unref(s->frame);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/utils.c -> ffmpeg-6.1.1.tar.xz/libavcodec/utils.c
Changed
@@ -259,9 +259,6 @@ if (s->codec_id == AV_CODEC_ID_SVQ1) { w_align = 64; h_align = 64; - } else if (s->codec_id == AV_CODEC_ID_SNOW) { - w_align = 16; - h_align = 16; } break; case AV_PIX_FMT_RGB555:
View file
ffmpeg-6.1.2.tar.xz/libavcodec/utvideoenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/utvideoenc.c
Changed
@@ -239,7 +239,7 @@ * - Compression mode (none/huff) * And write the flags. */ - c->flags = (c->slices - 1U) << 24; + c->flags = (c->slices - 1) << 24; c->flags |= 0 << 11; // bit field to signal interlaced encoding mode c->flags |= c->compression;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vaapi_encode.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vaapi_encode.c
Changed
@@ -2982,14 +2982,12 @@ av_buffer_pool_uninit(&ctx->output_buffer_pool); if (ctx->va_context != VA_INVALID_ID) { - if (ctx->hwctx) - vaDestroyContext(ctx->hwctx->display, ctx->va_context); + vaDestroyContext(ctx->hwctx->display, ctx->va_context); ctx->va_context = VA_INVALID_ID; } if (ctx->va_config != VA_INVALID_ID) { - if (ctx->hwctx) - vaDestroyConfig(ctx->hwctx->display, ctx->va_config); + vaDestroyConfig(ctx->hwctx->display, ctx->va_config); ctx->va_config = VA_INVALID_ID; }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vble.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vble.c
Changed
@@ -191,9 +191,6 @@ ctx->size = av_image_get_buffer_size(avctx->pix_fmt, avctx->width, avctx->height, 1); - if (ctx->size < 0) - return ctx->size; - ctx->val = av_malloc_array(ctx->size, sizeof(*ctx->val)); if (!ctx->val) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vc1_loopfilter.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vc1_loopfilter.c
Changed
@@ -1125,7 +1125,10 @@ dst = dest + (block_num & 2) * 4 * s->linesize + (block_num & 1) * 8; if (!(flags & RIGHT_EDGE) || !(block_num & 5)) { - v->vc1dsp.vc1_h_loop_filter8(dst + 8, linesize, pq); + if (block_num > 3) + v->vc1dsp.vc1_h_loop_filter8(dst + 8, linesize, pq); + else + v->vc1dsp.vc1_h_loop_filter8(dst + 8, linesize, pq); } tt = ttblk0 >> (block_num * 4) & 0xf;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vc2enc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vc2enc.c
Changed
@@ -185,9 +185,7 @@ static av_always_inline void put_vc2_ue_uint(PutBitContext *pb, uint32_t val) { int i; - int bits = 0; - unsigned topbit = 1, maxval = 1; - uint64_t pbits = 0; + int pbits = 0, bits = 0, topbit = 1, maxval = 1; if (!val++) { put_bits(pb, 1, 1); @@ -204,13 +202,12 @@ for (i = 0; i < bits; i++) { topbit >>= 1; - av_assert2(pbits <= UINT64_MAX>>3); pbits <<= 2; if (val & topbit) pbits |= 0x1; } - put_bits64(pb, bits*2 + 1, (pbits << 1) | 1); + put_bits(pb, bits*2 + 1, (pbits << 1) | 1); } static av_always_inline int count_vc2_ue_uint(uint32_t val)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/videotoolboxenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/videotoolboxenc.c
Changed
@@ -2890,12 +2890,6 @@ { NULL }, }; -static const FFCodecDefault vt_defaults = { - {"qmin", "-1"}, - {"qmax", "-1"}, - {NULL}, -}; - static const AVClass h264_videotoolbox_class = { .class_name = "h264_videotoolbox", .item_name = av_default_item_name, @@ -2911,7 +2905,6 @@ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .priv_data_size = sizeof(VTEncContext), .p.pix_fmts = avc_pix_fmts, - .defaults = vt_defaults, .init = vtenc_init, FF_CODEC_ENCODE_CB(vtenc_frame), .close = vtenc_close, @@ -2949,7 +2942,6 @@ AV_CODEC_CAP_HARDWARE, .priv_data_size = sizeof(VTEncContext), .p.pix_fmts = hevc_pix_fmts, - .defaults = vt_defaults, .init = vtenc_init, FF_CODEC_ENCODE_CB(vtenc_frame), .close = vtenc_close, @@ -2989,7 +2981,6 @@ AV_CODEC_CAP_HARDWARE, .priv_data_size = sizeof(VTEncContext), .p.pix_fmts = prores_pix_fmts, - .defaults = vt_defaults, .init = vtenc_init, FF_CODEC_ENCODE_CB(vtenc_frame), .close = vtenc_close,
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vlc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vlc.c
Changed
@@ -458,7 +458,7 @@ multi->table = av_malloc(sizeof(*multi->table) << nb_bits); if (!multi->table) - goto fail; + return AVERROR(ENOMEM); j = code = 0; for (int i = 0; i < nb_codes; i++, lens += lens_wrap) {
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vmixdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vmixdec.c
Changed
@@ -235,9 +235,6 @@ else if (offset != 3) return AVERROR_INVALIDDATA; - if (s->lshift > 31) - return AVERROR_INVALIDDATA; - q = qualityFFMIN(avpkt->dataoffset - 2, FF_ARRAY_ELEMS(quality)-1); for (int n = 0; n < 64; n++) s->factorsn = quantn * q;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vorbisdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vorbisdec.c
Changed
@@ -1468,9 +1468,6 @@ unsigned step = FASTDIV(vr->partition_size << 1, dim << 1); vorbis_codebook codebook = vc->codebooksvqbook; - if (get_bits_left(gb) <= 0) - return AVERROR_INVALIDDATA; - if (vr_type == 0) { voffs = voffset+j*vlen;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vp3.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vp3.c
Changed
@@ -1999,7 +1999,8 @@ x_offset = (-(x + 2) & 7) + 2; y_offset = (-(y + 2) & 7) + 2; - av_assert1(!(x_offset > 8 + x_subpel && y_offset > 8 + y_subpel)); + if (x_offset > 8 + x_subpel && y_offset > 8 + y_subpel) + return 0; s->vdsp.emulated_edge_mc(loop, motion_source - stride - 1, loop_stride, stride,
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vp8.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vp8.c
Changed
@@ -260,16 +260,8 @@ return AVERROR(ENOMEM); } #if HAVE_THREADS - ret = pthread_mutex_init(&s->thread_datai.lock, NULL); - if (ret) { - free_buffers(s); - return AVERROR(ret); - } - ret = pthread_cond_init(&s->thread_datai.cond, NULL); - if (ret) { - free_buffers(s); - return AVERROR(ret); - } + pthread_mutex_init(&s->thread_datai.lock, NULL); + pthread_cond_init(&s->thread_datai.cond, NULL); #endif } @@ -362,8 +354,9 @@ } s->coeff_partition_sizei = buf_size; + ff_vpx_init_range_decoder(&s->coeff_partitioni, buf, buf_size); - return ff_vpx_init_range_decoder(&s->coeff_partitioni, buf, buf_size); + return 0; } static void vp7_get_quants(VP8Context *s)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vp9.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vp9.c
Changed
@@ -719,12 +719,6 @@ s->s.h.segmentation.feati.skip_enabled = get_bits1(&s->gb); } } - } else { - // Reset fields under segmentation switch if segmentation is disabled. - // This is necessary because some hwaccels don't ignore these fields - // if segmentation is disabled. - s->s.h.segmentation.temporal = 0; - s->s.h.segmentation.update_map = 0; } // set qmul based on Y/UV, AC/DC and segmentation Q idx deltas
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vqcdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/vqcdec.c
Changed
@@ -145,13 +145,10 @@ GetBitContext gb; uint8_t * vectors = s->vectors; uint8_t * vectors_end = s->vectors + (width * height * 3) / 2; - int ret; memset(vectors, 0, 3 * width * height / 2); - ret = init_get_bits8(&gb, buf, size); - if (ret < 0) - return ret; + init_get_bits8(&gb, buf, size); for (int i = 0; i < 3 * width * height / 2 / 32; i++) { uint8_t * dst = vectors;
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vulkan_video.h -> ffmpeg-6.1.1.tar.xz/libavcodec/vulkan_video.h
Changed
@@ -23,8 +23,8 @@ #include "vulkan.h" #include <vk_video/vulkan_video_codecs_common.h> -#include "vulkan_video_codec_av1std_mesa.h" -#include "vulkan_video_codec_av1std_decode_mesa.h" +#include "vulkan_video_codec_av1std.h" +#include "vulkan_video_codec_av1std_decode.h" #define CODEC_VER_MAJ(ver) (ver >> 22) #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1))
View file
ffmpeg-6.1.1.tar.xz/libavcodec/vulkan_video_codec_av1std.h
Added
@@ -0,0 +1,403 @@ +/* Copyright 2023 Lynne + * Copyright 2023 Dave Airlie + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ +#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 + +/* +** This header is NOT YET generated from the Khronos Vulkan XML API Registry. +** +*/ + +#ifdef __cplusplus +extern "C" { +#endif +#define vulkan_video_codec_av1std 1 + +#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ + ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 VK_MAKE_VIDEO_STD_VERSION(0, 1, 0) +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode" + +typedef enum StdVideoAV1MESAProfile { + STD_VIDEO_AV1_MESA_PROFILE_MAIN = 0, + STD_VIDEO_AV1_MESA_PROFILE_HIGH = 1, + STD_VIDEO_AV1_MESA_PROFILE_PROFESSIONAL = 2, +} StdVideoAV1MESAProfile; + +typedef enum StdVideoAV1MESALevel { + STD_VIDEO_AV1_MESA_LEVEL_2_0 = 0, + STD_VIDEO_AV1_MESA_LEVEL_2_1 = 1, + STD_VIDEO_AV1_MESA_LEVEL_2_2 = 2, + STD_VIDEO_AV1_MESA_LEVEL_2_3 = 3, + STD_VIDEO_AV1_MESA_LEVEL_3_0 = 4, + STD_VIDEO_AV1_MESA_LEVEL_3_1 = 5, + STD_VIDEO_AV1_MESA_LEVEL_3_2 = 6, + STD_VIDEO_AV1_MESA_LEVEL_3_3 = 7, + STD_VIDEO_AV1_MESA_LEVEL_4_0 = 8, + STD_VIDEO_AV1_MESA_LEVEL_4_1 = 9, + STD_VIDEO_AV1_MESA_LEVEL_4_2 = 10, + STD_VIDEO_AV1_MESA_LEVEL_4_3 = 11, + STD_VIDEO_AV1_MESA_LEVEL_5_0 = 12, + STD_VIDEO_AV1_MESA_LEVEL_5_1 = 13, + STD_VIDEO_AV1_MESA_LEVEL_5_2 = 14, + STD_VIDEO_AV1_MESA_LEVEL_5_3 = 15, + STD_VIDEO_AV1_MESA_LEVEL_6_0 = 16, + STD_VIDEO_AV1_MESA_LEVEL_6_1 = 17, + STD_VIDEO_AV1_MESA_LEVEL_6_2 = 18, + STD_VIDEO_AV1_MESA_LEVEL_6_3 = 19, + STD_VIDEO_AV1_MESA_LEVEL_7_0 = 20, + STD_VIDEO_AV1_MESA_LEVEL_7_1 = 21, + STD_VIDEO_AV1_MESA_LEVEL_7_2 = 22, + STD_VIDEO_AV1_MESA_LEVEL_7_3 = 23, + STD_VIDEO_AV1_MESA_LEVEL_MAX = 31, +} StdVideoAV1MESALevel; + +typedef struct StdVideoAV1MESAFilmGrainFlags { + uint8_t apply_grain; + uint8_t chroma_scaling_from_luma; + uint8_t overlap_flag; + uint8_t clip_to_restricted_range; +} StdVideoAV1MESAFilmGrainFlags; + +typedef struct StdVideoAV1MESAFilmGrainParameters { + StdVideoAV1MESAFilmGrainFlags flags; + uint32_t grain_scaling_minus_8; + uint32_t ar_coeff_lag; + uint32_t ar_coeff_shift_minus_6; + uint32_t grain_scale_shift; + + uint16_t grain_seed; + uint8_t num_y_points; + uint8_t point_y_value14; + uint8_t point_y_scaling14; + + uint8_t num_cb_points; + uint8_t point_cb_value10; + uint8_t point_cb_scaling10; + + uint8_t num_cr_points; + uint8_t point_cr_value10; + uint8_t point_cr_scaling10; + + int8_t ar_coeffs_y_plus_12824; + int8_t ar_coeffs_cb_plus_12825; + int8_t ar_coeffs_cr_plus_12825; + uint8_t cb_mult; + uint8_t cb_luma_mult; + uint16_t cb_offset; + uint8_t cr_mult; + uint8_t cr_luma_mult; + uint16_t cr_offset; +} StdVideoAV1MESAFilmGrainParameters; + +typedef struct StdVideoAV1MESAGlobalMotionFlags { + uint8_t gm_invalid; +} StdVideoAV1MESAGlobalMotionFlags; + +typedef struct StdVideoAV1MESAGlobalMotion { + StdVideoAV1MESAGlobalMotionFlags flags; + uint8_t gm_type; + uint32_t gm_params6; +} StdVideoAV1MESAGlobalMotion; + +typedef struct StdVideoAV1MESALoopRestoration { + uint8_t lr_type3; + uint8_t lr_unit_shift; + uint8_t lr_uv_shift; +} StdVideoAV1MESALoopRestoration; + +typedef struct StdVideoAV1MESATileInfoFlags { + uint8_t uniform_tile_spacing_flag; +} StdVideoAV1MESATileInfoFlags; + +typedef struct StdVideoAV1MESATileInfo { + StdVideoAV1MESATileInfoFlags flags; + uint8_t tile_cols; + uint8_t tile_rows; + uint8_t tile_start_col_sb64; + uint8_t tile_start_row_sb64; + uint8_t width_in_sbs_minus_164; + uint8_t height_in_sbs_minus_164; + uint16_t context_update_tile_id; + uint8_t tile_size_bytes_minus1; +} StdVideoAV1MESATileInfo; + +typedef struct StdVideoAV1MESAQuantizationFlags { + uint8_t using_qmatrix; +} StdVideoAV1MESAQuantizationFlags; + +typedef struct StdVideoAV1MESAQuantization { + StdVideoAV1MESAQuantizationFlags flags; + uint8_t base_q_idx; + int8_t delta_q_y_dc; + uint8_t diff_uv_delta; + int8_t delta_q_u_dc; + int8_t delta_q_u_ac; + int8_t delta_q_v_dc; + int8_t delta_q_v_ac; + uint8_t qm_y; + uint8_t qm_u; + uint8_t qm_v; +} StdVideoAV1MESAQuantization; + +typedef struct StdVideoAV1MESACDEF { + uint8_t damping_minus_3; + uint8_t bits; + uint8_t y_pri_strength8; + uint8_t y_sec_strength8; + uint8_t uv_pri_strength8; + uint8_t uv_sec_strength8; +} StdVideoAV1MESACDEF; + +typedef struct StdVideoAV1MESADeltaQFlags { + uint8_t delta_lf_present; + uint8_t delta_lf_multi; +} StdVideoAV1MESADeltaQFlags; + +typedef struct StdVideoAV1MESADeltaQ { + StdVideoAV1MESADeltaQFlags flags; + uint8_t delta_q_res; + uint8_t delta_lf_res; +} StdVideoAV1MESADeltaQ; + +typedef struct StdVideoAV1MESASegmentationFlags { + uint8_t enabled; + uint8_t update_map; + uint8_t temporal_update; + uint8_t update_data; +} StdVideoAV1MESASegmentationFlags; + +typedef struct StdVideoAV1MESASegmentation { + StdVideoAV1MESASegmentationFlags flags; + uint8_t feature_enabled_bits8; + int16_t feature_data88; +} StdVideoAV1MESASegmentation; + +typedef struct StdVideoAV1MESALoopFilterFlags { + uint8_t delta_enabled; + uint8_t delta_update; +} StdVideoAV1MESALoopFilterFlags; + +typedef struct StdVideoAV1MESALoopFilter { + StdVideoAV1MESALoopFilterFlags flags; + uint8_t level4; + uint8_t sharpness;
View file
ffmpeg-6.1.1.tar.xz/libavcodec/vulkan_video_codec_av1std_decode.h
Added
@@ -0,0 +1,36 @@ +/* Copyright 2023 Lynne + * Copyright 2023 Dave Airlie + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ +#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 + +/* +** This header is NOT YET generated from the Khronos Vulkan XML API Registry. +** +*/ + +#ifdef __cplusplus +extern "C" { +#endif +#define vulkan_video_codec_av1std_decode 1 + + + +#ifdef __cplusplus +} +#endif + +#endif
View file
ffmpeg-6.1.2.tar.xz/libavcodec/wavarc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/wavarc.c
Changed
@@ -374,7 +374,7 @@ for (int o = 0; o < order; o++) sum += s->filtercho * (unsigned)samplesn + 70 - o - 1; - samplesn + 70 = get_srice(gb, k) + (unsigned)(sum >> 4); + samplesn + 70 = get_srice(gb, k) + (sum >> 4); } finished = 1; break; @@ -414,7 +414,7 @@ static uint16_t ac_get_prob(WavArcContext *s) { - return ((s->freq_range - 1) + (s->ac_value - s->ac_low) * (unsigned)s->freq_range) / + return ((s->freq_range - 1) + (s->ac_value - s->ac_low) * s->freq_range) / ((s->ac_high - s->ac_low) + 1U); } @@ -439,8 +439,8 @@ goto fail; range = (s->ac_high - s->ac_low) + 1; - s->ac_high = (range * (unsigned)s->range_high) / s->freq_range + s->ac_low - 1; - s->ac_low += (range * (unsigned)s->range_low) / s->freq_range; + s->ac_high = (range * s->range_high) / s->freq_range + s->ac_low - 1; + s->ac_low += (range * s->range_low) / s->freq_range; if (s->ac_high < s->ac_low) goto fail; @@ -648,7 +648,7 @@ for (int o = 0; o < order; o++) sum += s->filtercho * (unsigned)samplesn + 70 - o - 1; - samplesn + 70 += ac_outn + (unsigned)(sum >> 4); + samplesn + 70 += ac_outn + (sum >> 4); } for (int n = 0; n < 70; n++) @@ -690,7 +690,7 @@ for (int o = 0; o < order; o++) sum += s->filtercho * (unsigned)samplesn + 70 - o - 1; - samplesn + 70 += ac_outn + (unsigned)(sum >> 4); + samplesn + 70 += ac_outn + (sum >> 4); } for (int n = 0; n < 70; n++)
View file
ffmpeg-6.1.2.tar.xz/libavcodec/wavpackenc.c -> ffmpeg-6.1.1.tar.xz/libavcodec/wavpackenc.c
Changed
@@ -1978,7 +1978,7 @@ put_bits(pb, 31, 0x7FFFFFFF); cbits -= 31; } else { - put_bits(pb, cbits, (1U << cbits) - 1); + put_bits(pb, cbits, (1 << cbits) - 1); cbits = 0; } } while (cbits); @@ -2007,7 +2007,7 @@ put_bits(pb, 31, 0x7FFFFFFF); cbits -= 31; } else { - put_bits(pb, cbits, (1U << cbits) - 1); + put_bits(pb, cbits, (1 << cbits) - 1); cbits = 0; } } while (cbits);
View file
ffmpeg-6.1.2.tar.xz/libavcodec/x86/vp3dsp_init.c -> ffmpeg-6.1.1.tar.xz/libavcodec/x86/vp3dsp_init.c
Changed
@@ -53,7 +53,7 @@ if (!(flags & AV_CODEC_FLAG_BITEXACT)) { c->v_loop_filter = c->v_loop_filter_unaligned = ff_vp3_v_loop_filter_mmxext; - c->h_loop_filter = c->h_loop_filter_unaligned = ff_vp3_h_loop_filter_mmxext; + c->h_loop_filter = c->v_loop_filter_unaligned = ff_vp3_h_loop_filter_mmxext; } }
View file
ffmpeg-6.1.2.tar.xz/libavcodec/xsubdec.c -> ffmpeg-6.1.1.tar.xz/libavcodec/xsubdec.c
Changed
@@ -59,7 +59,6 @@ int64_t packet_time = 0; GetBitContext gb; int has_alpha = avctx->codec_tag == MKTAG('D','X','S','A'); - int64_t start_display_time, end_display_time; // check that at least header fits if (buf_size < 27 + 7 * 2 + 4 * (3 + has_alpha)) { @@ -74,14 +73,8 @@ } if (avpkt->pts != AV_NOPTS_VALUE) packet_time = av_rescale_q(avpkt->pts, AV_TIME_BASE_Q, (AVRational){1, 1000}); - - sub->start_display_time = start_display_time = parse_timecode(buf + 1, packet_time); - sub->end_display_time = end_display_time = parse_timecode(buf + 14, packet_time); - if (sub->start_display_time != start_display_time || - sub-> end_display_time != end_display_time) { - av_log(avctx, AV_LOG_ERROR, "time code not representable in 32bit\n"); - return -1; - } + sub->start_display_time = parse_timecode(buf + 1, packet_time); + sub->end_display_time = parse_timecode(buf + 14, packet_time); buf += 27; // read header
View file
ffmpeg-6.1.2.tar.xz/libavdevice/dshow.c -> ffmpeg-6.1.1.tar.xz/libavdevice/dshow.c
Changed
@@ -431,8 +431,8 @@ IEnumMediaTypes_Release(types); if (p) IKsPropertySet_Release(p); - - IPin_Release(pin); + if (pin) + IPin_Release(pin); } IEnumPins_Release(pins); @@ -644,7 +644,7 @@ } ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list); - if (ret < S_OK && ret != AVERROR(EIO)) + if (ret < S_OK) goto error; ret = dshow_cycle_devices(avctx, devenum, AudioDevice, AudioSourceDevice, NULL, NULL, &device_list); @@ -1000,7 +1000,7 @@ " ch=%2u, bits=%2u, rate=%6lu\n", fx->nChannels, fx->wBitsPerSample, fx->nSamplesPerSec ); - goto next; + continue; } if ( (requested_sample_rate && requested_sample_rate != fx->nSamplesPerSec) || @@ -1369,10 +1369,10 @@ goto error; } } - if (ctx->device_filterotherDevType) { + if (ctx->device_filterotherDevType) { // avoid adding add two instances of the same device to the graph, one for video, one for audio // a few devices don't support this (could also do this check earlier to avoid double crossbars, etc. but they seem OK) - if (!device_filter_unique_name || strcmp(device_filter_unique_name, ctx->device_unique_nameotherDevType) == 0) { + if (strcmp(device_filter_unique_name, ctx->device_unique_nameotherDevType) == 0) { av_log(avctx, AV_LOG_DEBUG, "reusing previous graph capture filter... %s\n", device_filter_unique_name); IBaseFilter_Release(device_filter); device_filter = ctx->device_filterotherDevType; @@ -1464,7 +1464,7 @@ av_log(avctx, AV_LOG_ERROR, "Could not create CaptureGraphBuilder2\n"); goto error; } - r = ICaptureGraphBuilder2_SetFiltergraph(graph_builder2, graph); + ICaptureGraphBuilder2_SetFiltergraph(graph_builder2, graph); if (r != S_OK) { av_log(avctx, AV_LOG_ERROR, "Could not set graph for CaptureGraphBuilder2\n"); goto error; @@ -1545,10 +1545,7 @@ ctx->capture_filterdevtype->stream_index = st->index; - if (ff_dshow_pin_ConnectionMediaType(ctx->capture_pindevtype, &type) != S_OK) { - ret = AVERROR(EIO); - goto error; - } + ff_dshow_pin_ConnectionMediaType(ctx->capture_pindevtype, &type); fmt_info = dshow_get_format_info(&type); if (!fmt_info) { ret = AVERROR(EIO);
View file
ffmpeg-6.1.2.tar.xz/libavdevice/dshow_capture.h -> ffmpeg-6.1.1.tar.xz/libavdevice/dshow_capture.h
Changed
@@ -124,15 +124,14 @@ class *ff_dshow_##prefix##_Create(__VA_ARGS__) \ { \ class *this = CoTaskMemAlloc(sizeof(class)); \ + void *vtbl = CoTaskMemAlloc(sizeof(*this->vtbl)); \ dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Create(%p)\n", this); \ - if (!this) \ + if (!this || !vtbl) \ goto fail; \ ZeroMemory(this, sizeof(class)); \ - this->vtbl = CoTaskMemAlloc(sizeof(*this->vtbl)); \ - if (!this->vtbl) \ - goto fail; \ - ZeroMemory(this->vtbl, sizeof(*this->vtbl)); \ + ZeroMemory(vtbl, sizeof(*this->vtbl)); \ this->ref = 1; \ + this->vtbl = vtbl; \ if (!setup) \ goto fail; \ dshowdebug("created ff_dshow_"AV_STRINGIFY(prefix)" %p\n", this); \
View file
ffmpeg-6.1.2.tar.xz/libavdevice/dshow_filter.c -> ffmpeg-6.1.1.tar.xz/libavdevice/dshow_filter.c
Changed
@@ -135,7 +135,7 @@ this->info.pGraph = graph; if (name) - wcscpy_s(this->info.achName, sizeof(this->info.achName) / sizeof(wchar_t), name); + wcscpy(this->info.achName, name); return S_OK; }
View file
ffmpeg-6.1.2.tar.xz/libavdevice/pulse_audio_enc.c -> ffmpeg-6.1.1.tar.xz/libavdevice/pulse_audio_enc.c
Changed
@@ -471,11 +471,10 @@ s->nonblocking = (h->flags & AVFMT_FLAG_NONBLOCK); if (s->buffer_duration) { - int64_t bytes = av_rescale(s->buffer_duration, - st->codecpar->ch_layout.nb_channels * - (int64_t)st->codecpar->sample_rate * - av_get_bytes_per_sample(st->codecpar->format), - 1000); + int64_t bytes = s->buffer_duration; + bytes *= st->codecpar->ch_layout.nb_channels * st->codecpar->sample_rate * + av_get_bytes_per_sample(st->codecpar->format); + bytes /= 1000; buffer_attributes.tlength = FFMAX(s->buffer_size, av_clip64(bytes, 0, UINT32_MAX - 1)); av_log(s, AV_LOG_DEBUG, "Buffer duration: %ums recalculated into %"PRId64" bytes buffer.\n",
View file
ffmpeg-6.1.2.tar.xz/libavdevice/v4l2.c -> ffmpeg-6.1.1.tar.xz/libavdevice/v4l2.c
Changed
@@ -107,10 +107,10 @@ int (*open_f)(const char *file, int oflag, ...); int (*close_f)(int fd); int (*dup_f)(int fd); -#if defined(__sun) || defined(__BIONIC__) || defined(__musl__) /* POSIX-like */ - int (*ioctl_f)(int fd, int request, ...); -#else +#ifdef __GLIBC__ int (*ioctl_f)(int fd, unsigned long int request, ...); +#else + int (*ioctl_f)(int fd, int request, ...); #endif ssize_t (*read_f)(int fd, void *buffer, size_t n); void *(*mmap_f)(void *start, size_t length, int prot, int flags, int fd, int64_t offset);
View file
ffmpeg-6.1.2.tar.xz/libavdevice/xcbgrab.c -> ffmpeg-6.1.1.tar.xz/libavdevice/xcbgrab.c
Changed
@@ -826,10 +826,7 @@ if (!sscanf(s->url, "%^++%d,%d", display_name, &c->x, &c->y)) { *display_name = 0; - if(sscanf(s->url, "+%d,%d", &c->x, &c->y) != 2) { - if (*s->url) - av_log(s, AV_LOG_WARNING, "Ambigous URL: %s\n", s->url); - } + sscanf(s->url, "+%d,%d", &c->x, &c->y); } c->conn = xcb_connect(display_name0 ? display_name : NULL, &screen_num);
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_aderivative.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_aderivative.c
Changed
@@ -126,7 +126,6 @@ s->prev = ff_get_audio_buffer(inlink, 1); if (!s->prev) { av_frame_free(&in); - av_frame_free(&out); return AVERROR(ENOMEM); } }
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_afftdn.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_afftdn.c
Changed
@@ -20,7 +20,6 @@ #include <float.h> -#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/channel_layout.h" #include "libavutil/opt.h" @@ -376,8 +375,6 @@ case AV_SAMPLE_FMT_DBLP: noisy_datai = mag = hypot(fft_data_dbli.re, fft_data_dbli.im); break; - default: - av_assert2(0); } power = mag * mag; @@ -972,8 +969,6 @@ mag2 = fft_out_dbln.re * fft_out_dbln.re + fft_out_dbln.im * fft_out_dbln.im; break; - default: - av_assert2(0); } mag2 = fmax(mag2, s->sample_floor);
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_afir.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_afir.c
Changed
@@ -25,7 +25,6 @@ #include <float.h> -#include "libavutil/avassert.h" #include "libavutil/cpu.h" #include "libavutil/tx.h" #include "libavutil/avstring.h" @@ -248,8 +247,6 @@ iscale.d = 1.0 / sqrt(2.0 * part_size); tx_type = AV_TX_DOUBLE_RDFT; break; - default: - av_assert1(0); } for (int ch = 0; ch < ctx->inputs0->ch_layout.nb_channels && part_size >= 1; ch++) {
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_aresample.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_aresample.c
Changed
@@ -201,11 +201,8 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif ret = av_channel_layout_copy(&outsamplesref->ch_layout, &outlink->ch_layout); - if (ret < 0) { - av_frame_free(&outsamplesref); - av_frame_free(&insamplesref); + if (ret < 0) return ret; - } outsamplesref->sample_rate = outlink->sample_rate; if(insamplesref->pts != AV_NOPTS_VALUE) {
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_channelmap.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_channelmap.c
Changed
@@ -85,7 +85,7 @@ return next; } -static int get_channel_idx(char **map, int *ch, char delim, int max_nb_channels) +static int get_channel_idx(char **map, int *ch, char delim, int max_ch) { char *next; int len; @@ -99,7 +99,7 @@ sscanf(*map, "%d%n", ch, &n); if (n != len) return AVERROR(EINVAL); - if (*ch < 0 || *ch >= max_nb_channels) + if (*ch < 0 || *ch > max_ch) return AVERROR(EINVAL); *map = next; return 0; @@ -167,7 +167,7 @@ for (i = 0; i < map_entries; i++) { int in_ch_idx = -1, out_ch_idx = -1; - int in_ch = -1, out_ch = -1; + int in_ch = 0, out_ch = 0; static const char err = "Failed to parse channel map\n"; switch (mode) { case MAP_ONE_INT: @@ -375,14 +375,14 @@ for (i = 0; i < s->nch; i++) { struct ChannelMap *m = &s->mapi; - if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR || s->mode == MAP_ONE_STR) { + if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) { m->in_channel_idx = av_channel_layout_index_from_channel( &inlink->ch_layout, m->in_channel); } if (m->in_channel_idx < 0 || m->in_channel_idx >= nb_channels) { av_channel_layout_describe(&inlink->ch_layout, layout_name, sizeof(layout_name)); - if (m->in_channel >= 0) { + if (m->in_channel) { av_channel_name(channel_name, sizeof(channel_name), m->in_channel); av_log(ctx, AV_LOG_ERROR, "input channel '%s' not available from input layout '%s'\n",
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_channelsplit.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_channelsplit.c
Changed
@@ -22,7 +22,7 @@ * * Split an audio stream into per-channel streams. */ -#include "libavutil/avassert.h" + #include "libavutil/attributes.h" #include "libavutil/channel_layout.h" #include "libavutil/internal.h" @@ -162,8 +162,6 @@ enum AVChannel channel = av_channel_layout_channel_from_index(&buf->ch_layout, s->mapi); int ret; - av_assert1(channel >= 0); - AVFrame *buf_out = av_frame_clone(buf); if (!buf_out) return AVERROR(ENOMEM);
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_mcompand.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_mcompand.c
Changed
@@ -417,8 +417,8 @@ } new_nb_items += sscanf(tstr2, "%lf", &s->bandsi.topfreq) == 1; - if (s->bandsi.topfreq < 0 || s->bandsi.topfreq >= outlink->sample_rate / 2.0) { - av_log(ctx, AV_LOG_ERROR, "crossover_frequency: %f, should be >=0 and lower than half of sample rate: %f.\n", s->bandsi.topfreq, outlink->sample_rate / 2.0); + if (s->bandsi.topfreq < 0 || s->bandsi.topfreq >= outlink->sample_rate / 2) { + av_log(ctx, AV_LOG_ERROR, "crossover_frequency: %f, should be >=0 and lower than half of sample rate: %d.\n", s->bandsi.topfreq, outlink->sample_rate / 2); return AVERROR(EINVAL); }
View file
ffmpeg-6.1.2.tar.xz/libavfilter/af_pan.c -> ffmpeg-6.1.1.tar.xz/libavfilter/af_pan.c
Changed
@@ -118,14 +118,6 @@ if (ret < 0) goto fail; - if (pan->nb_output_channels > MAX_CHANNELS) { - av_log(ctx, AV_LOG_ERROR, - "af_pan supports a maximum of %d channels. " - "Feel free to ask for a higher limit.\n", MAX_CHANNELS); - ret = AVERROR_PATCHWELCOME; - goto fail; - } - /* parse channel specifications */ while ((arg = arg0 = av_strtok(NULL, "|", &tokenizer))) { int used_in_chMAX_CHANNELS = {0};
View file
ffmpeg-6.1.2.tar.xz/libavfilter/avf_showcwt.c -> ffmpeg-6.1.1.tar.xz/libavfilter/avf_showcwt.c
Changed
@@ -1000,8 +1000,6 @@ s->auto_frame_rate = av_make_q(inlink->sample_rate, s->hop_size); if (strcmp(s->rate_str, "auto")) { ret = av_parse_video_rate(&s->frame_rate, s->rate_str); - if (ret < 0) - return ret; } else { s->frame_rate = s->auto_frame_rate; }
View file
ffmpeg-6.1.2.tar.xz/libavfilter/avfilter.c -> ffmpeg-6.1.1.tar.xz/libavfilter/avfilter.c
Changed
@@ -1167,16 +1167,6 @@ { unsigned i; - for (i = 0; i < filter->nb_outputs; i++) { - int ret = filter->outputsi->status_in; - - if (ret) { - for (int j = 0; j < filter->nb_inputs; j++) - ff_inlink_set_status(filter->inputsj, ret); - return 0; - } - } - for (i = 0; i < filter->nb_inputs; i++) { if (samples_ready(filter->inputsi, filter->inputsi->min_samples)) { return ff_filter_frame_to_filter(filter->inputsi);
View file
ffmpeg-6.1.2.tar.xz/libavfilter/buffersrc.c -> ffmpeg-6.1.1.tar.xz/libavfilter/buffersrc.c
Changed
@@ -36,7 +36,6 @@ #include "audio.h" #include "avfilter.h" #include "buffersrc.h" -#include "filters.h" #include "formats.h" #include "internal.h" #include "video.h" @@ -195,7 +194,7 @@ if (!frame) return av_buffersrc_close(ctx, s->last_pts, flags); if (s->eof) - return AVERROR_EOF; + return AVERROR(EINVAL); s->last_pts = frame->pts + frame->duration; @@ -470,7 +469,7 @@ } break; case AVMEDIA_TYPE_AUDIO: - if (!c->ch_layout.nb_channels || c->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) { + if (!c->ch_layout.nb_channels) { int ret = av_channel_layout_copy(&c->ch_layout, &link->ch_layout); if (ret < 0) return ret; @@ -485,28 +484,21 @@ return 0; } -static int activate(AVFilterContext *ctx) +static int request_frame(AVFilterLink *link) { - AVFilterLink *outlink = ctx->outputs0; - BufferSourceContext *c = ctx->priv; - - if (!c->eof && ff_outlink_get_status(outlink)) { - c->eof = 1; - return 0; - } + BufferSourceContext *c = link->src->priv; - if (c->eof) { - ff_outlink_set_status(outlink, AVERROR_EOF, c->last_pts); - return 0; - } + if (c->eof) + return AVERROR_EOF; c->nb_failed_requests++; - return FFERROR_NOT_READY; + return AVERROR(EAGAIN); } static const AVFilterPad avfilter_vsrc_buffer_outputs = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, + .request_frame = request_frame, .config_props = config_props, }, }; @@ -515,7 +507,7 @@ .name = "buffer", .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), .priv_size = sizeof(BufferSourceContext), - .activate = activate, + .init = init_video, .uninit = uninit, @@ -529,6 +521,7 @@ { .name = "default", .type = AVMEDIA_TYPE_AUDIO, + .request_frame = request_frame, .config_props = config_props, }, }; @@ -537,7 +530,7 @@ .name = "abuffer", .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), .priv_size = sizeof(BufferSourceContext), - .activate = activate, + .init = init_audio, .uninit = uninit,
View file
ffmpeg-6.1.2.tar.xz/libavfilter/convolution.h -> ffmpeg-6.1.1.tar.xz/libavfilter/convolution.h
Changed
@@ -34,14 +34,13 @@ const AVClass *class; char *matrix_str4; - float user_rdiv4; + float rdiv4; float bias4; int mode4; float scale; float delta; int planes; - float rdiv4; int size4; int depth; int max;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/drawutils.c -> ffmpeg-6.1.1.tar.xz/libavfilter/drawutils.c
Changed
@@ -61,7 +61,6 @@ had0 |= pos == 0; rgba_mapi = pos; - depthb = db; } if (desc->nb_components == 3)
View file
ffmpeg-6.1.2.tar.xz/libavfilter/scale_eval.c -> ffmpeg-6.1.1.tar.xz/libavfilter/scale_eval.c
Changed
@@ -114,7 +114,7 @@ int *ret_w, int *ret_h, int force_original_aspect_ratio, int force_divisible_by) { - int64_t w, h; + int w, h; int factor_w, factor_h; w = *ret_w; @@ -149,9 +149,9 @@ * unless force_divisible_by is defined as well */ if (force_original_aspect_ratio) { // Including force_divisible_by here rounds to the nearest multiple of it. - int64_t tmp_w = av_rescale(h, inlink->w, inlink->h * (int64_t)force_divisible_by) + int tmp_w = av_rescale(h, inlink->w, inlink->h * (int64_t)force_divisible_by) * force_divisible_by; - int64_t tmp_h = av_rescale(w, inlink->h, inlink->w * (int64_t)force_divisible_by) + int tmp_h = av_rescale(w, inlink->h, inlink->w * (int64_t)force_divisible_by) * force_divisible_by; if (force_original_aspect_ratio == 1) { @@ -173,9 +173,6 @@ } } - if ((int32_t)w != w || (int32_t)h != h) - return AVERROR(EINVAL); - *ret_w = w; *ret_h = h;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/scale_eval.h -> ffmpeg-6.1.1.tar.xz/libavfilter/scale_eval.h
Changed
@@ -41,7 +41,7 @@ * force_original_aspect_ratio is set. force_divisible_by is used only when * force_original_aspect_ratio is set and must be at least 1. * - * Returns negative error code on error or non negative on success + * Returns 0. */ int ff_scale_adjust_dimensions(AVFilterLink *inlink, int *ret_w, int *ret_h,
View file
ffmpeg-6.1.2.tar.xz/libavfilter/signature_lookup.c -> ffmpeg-6.1.1.tar.xz/libavfilter/signature_lookup.c
Changed
@@ -37,16 +37,6 @@ #define STATUS_END_REACHED 1 #define STATUS_BEGIN_REACHED 2 -static void sll_free(MatchingInfo **sll) -{ - while (*sll) { - MatchingInfo *tmp = *sll; - *sll = tmp->next; - tmp->next = NULL; - av_free(tmp); - } -} - static void fill_l1distlut(uint8_t lut) { int i, j, tmp_i, tmp_j,count; @@ -299,11 +289,6 @@ if (!c->next) av_log(ctx, AV_LOG_FATAL, "Could not allocate memory"); c = c->next; - - } - if (!c) { - sll_free(&cands); - goto error; } c->framerateratio = (i+1.0) / 30; c->score = hspaceij.score; @@ -320,7 +305,6 @@ } } } - error: for (i = 0; i < MAX_FRAMERATE; i++) { av_freep(&hspacei); } @@ -453,14 +437,14 @@ } if (tolerancecount > 2) { + a = aprev; + b = bprev; if (dir == DIR_NEXT) { /* turn around */ a = infos->first; b = infos->second; dir = DIR_PREV; } else { - a = aprev; - b = bprev; break; } } @@ -501,10 +485,10 @@ continue; /* matching sequence is too short */ if ((double) goodfcount / (double) fcount < sc->thit) continue; - if ((double) goodfcount*0.5 <= FFMAX(gooda, goodb)) + if ((double) goodfcount*0.5 < FFMAX(gooda, goodb)) continue; - meandist = (double) distsum / (double) goodfcount; + meandist = (double) goodfcount / (double) distsum; if (meandist < minmeandist || status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) || @@ -536,6 +520,16 @@ return bestmatch; } +static void sll_free(MatchingInfo *sll) +{ + void *tmp; + while (sll) { + tmp = sll; + sll = sll->next; + av_freep(&tmp); + } +} + static MatchingInfo lookup_signatures(AVFilterContext *ctx, SignatureContext *sc, StreamContext *first, StreamContext *second, int mode) { CoarseSignature *cs, *cs2; @@ -578,7 +572,7 @@ "ratio %f, offset %d, score %d, %d frames matching\n", bestmatch.first->index, bestmatch.second->index, bestmatch.framerateratio, bestmatch.offset, bestmatch.score, bestmatch.matchframes); - sll_free(&infos); + sll_free(infos); } } while (find_next_coarsecandidate(sc, second->coarsesiglist, &cs, &cs2, 0) && !bestmatch.whole); return bestmatch;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_avgblur.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_avgblur.c
Changed
@@ -287,7 +287,7 @@ const int width = s->planewidthplane; if (!(s->planes & (1 << plane))) { - if (out->dataplane != in->dataplane) + if (out != in) av_image_copy_plane(out->dataplane, out->linesizeplane, in->dataplane, in->linesizeplane, width * ((s->depth + 7) / 8), height);
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_bm3d.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_bm3d.c
Changed
@@ -273,7 +273,7 @@ int r_y, int r_x, int plane, int jobnr) { SliceContext *sc = &s->slicesjobnr; - double MSE2SSE = s->group_size * s->block_size * s->block_size * src_range * src_range / (double)(s->max * s->max); + double MSE2SSE = s->group_size * s->block_size * s->block_size * src_range * src_range / (s->max * s->max); double distMul = 1. / MSE2SSE; double th_sse = th_mse * MSE2SSE; int index = sc->nb_match_blocks;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_convolution.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_convolution.c
Changed
@@ -40,10 +40,10 @@ { "1m", "set matrix for 2nd plane", OFFSET(matrix_str1), AV_OPT_TYPE_STRING, {.str="0 0 0 0 1 0 0 0 0"}, 0, 0, FLAGS }, { "2m", "set matrix for 3rd plane", OFFSET(matrix_str2), AV_OPT_TYPE_STRING, {.str="0 0 0 0 1 0 0 0 0"}, 0, 0, FLAGS }, { "3m", "set matrix for 4th plane", OFFSET(matrix_str3), AV_OPT_TYPE_STRING, {.str="0 0 0 0 1 0 0 0 0"}, 0, 0, FLAGS }, - { "0rdiv", "set rdiv for 1st plane", OFFSET(user_rdiv0), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, - { "1rdiv", "set rdiv for 2nd plane", OFFSET(user_rdiv1), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, - { "2rdiv", "set rdiv for 3rd plane", OFFSET(user_rdiv2), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, - { "3rdiv", "set rdiv for 4th plane", OFFSET(user_rdiv3), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, + { "0rdiv", "set rdiv for 1st plane", OFFSET(rdiv0), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, + { "1rdiv", "set rdiv for 2nd plane", OFFSET(rdiv1), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, + { "2rdiv", "set rdiv for 3rd plane", OFFSET(rdiv2), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, + { "3rdiv", "set rdiv for 4th plane", OFFSET(rdiv3), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, { "0bias", "set bias for 1st plane", OFFSET(bias0), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, { "1bias", "set bias for 2nd plane", OFFSET(bias1), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, { "2bias", "set bias for 3rd plane", OFFSET(bias2), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, INT_MAX, FLAGS}, @@ -674,7 +674,7 @@ p = orig = av_strdup(s->matrix_stri); if (p) { s->matrix_lengthi = 0; - s->rdivi = s->user_rdivi; + s->rdivi = 0.f; sum = 0.f; while (s->matrix_lengthi < 49) {
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_convolution_opencl.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_convolution_opencl.c
Changed
@@ -20,7 +20,6 @@ #include "config_components.h" -#include "libavutil/avassert.h" #include "libavutil/common.h" #include "libavutil/imgutils.h" #include "libavutil/mem.h" @@ -81,8 +80,6 @@ kernel_name = "prewitt_global"; } else if (!strcmp(avctx->filter->name, "roberts_opencl")){ kernel_name = "roberts_global"; - } else { - av_assert0(0); } ctx->kernel = clCreateKernel(ctx->ocf.program, kernel_name, &cle); CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create "
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_deshake_opencl.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_deshake_opencl.c
Changed
@@ -703,7 +703,7 @@ total_err += deshake_ctx->ransac_errj; } - if (i == 0 || total_err < best_err) { + if (total_err < best_err) { for (int mi = 0; mi < 6; ++mi) { best_modelmi = modelmi; }
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_elbg.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_elbg.c
Changed
@@ -194,7 +194,7 @@ p0 = (uint8_t *)out->data0; for (i = 0; i < elbg->codebook_length; i++) { - const unsigned al = elbg->use_alpha ? elbg->codebooki*4+3 : 0xff; + const int al = elbg->use_alpha ? elbg->codebooki*4+3 : 0xff; pali = al << 24 | (elbg->codebooki*4+2 << 16) | (elbg->codebooki*4+1 << 8) |
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_lut3d.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_lut3d.c
Changed
@@ -702,8 +702,7 @@ else if (!strncmp(line + 7, "MAX ", 4)) vals = max; if (!vals) return AVERROR_INVALIDDATA; - if (av_sscanf(line + 11, "%f %f %f", vals, vals + 1, vals + 2) != 3) - return AVERROR_INVALIDDATA; + av_sscanf(line + 11, "%f %f %f", vals, vals + 1, vals + 2); av_log(ctx, AV_LOG_DEBUG, "min: %f %f %f | max: %f %f %f\n", min0, min1, min2, max0, max1, max2); goto try_again; @@ -1734,14 +1733,12 @@ else if (!strncmp(line + 7, "MAX ", 4)) vals = max; if (!vals) return AVERROR_INVALIDDATA; - if (av_sscanf(line + 11, "%f %f %f", vals, vals + 1, vals + 2) != 3) - return AVERROR_INVALIDDATA; + av_sscanf(line + 11, "%f %f %f", vals, vals + 1, vals + 2); av_log(ctx, AV_LOG_DEBUG, "min: %f %f %f | max: %f %f %f\n", min0, min1, min2, max0, max1, max2); goto try_again; } else if (!strncmp(line, "LUT_1D_INPUT_RANGE ", 19)) { - if (av_sscanf(line + 19, "%f %f", min, max) != 2) - return AVERROR_INVALIDDATA; + av_sscanf(line + 19, "%f %f", min, max); min1 = min2 = min0; max1 = max2 = max0; goto try_again;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_rotate.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_rotate.c
Changed
@@ -288,9 +288,7 @@ double res; char *expr; - ret = ff_draw_init(&rot->draw, inlink->format, 0); - if (ret < 0) - return ret; + ff_draw_init(&rot->draw, inlink->format, 0); ff_draw_color(&rot->draw, &rot->color, rot->fillcolor); rot->hsub = pixdesc->log2_chroma_w;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_scale.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_scale.c
Changed
@@ -529,13 +529,10 @@ outlink->w = scale->w; outlink->h = scale->h; - ret = ff_scale_adjust_dimensions(inlink, &outlink->w, &outlink->h, + ff_scale_adjust_dimensions(inlink, &outlink->w, &outlink->h, scale->force_original_aspect_ratio, scale->force_divisible_by); - if (ret < 0) - goto fail; - if (outlink->w > INT_MAX || outlink->h > INT_MAX || (outlink->h * inlink->w) > INT_MAX ||
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_signature.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_signature.c
Changed
@@ -384,9 +384,6 @@ FILE* f; unsigned int pot35 = { 3*3*3*3, 3*3*3, 3*3, 3, 1 }; - if (!sc->coarseend->last) - return AVERROR(EINVAL); // No frames ? - f = avpriv_fopen_utf8(filename, "w"); if (!f) { int err = AVERROR(EINVAL);
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_thumbnail_cuda.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_thumbnail_cuda.c
Changed
@@ -290,7 +290,7 @@ histi = 4 * histi; } - ret = CHECK_CU(cu->cuCtxPopCurrent(&dummy)); + CHECK_CU(cu->cuCtxPopCurrent(&dummy)); if (ret < 0) return ret;
View file
ffmpeg-6.1.2.tar.xz/libavfilter/vf_xfade.c -> ffmpeg-6.1.1.tar.xz/libavfilter/vf_xfade.c
Changed
@@ -2288,11 +2288,8 @@ // Check if we are not yet transitioning, in which case // just request and forward the input frame. if (s->start_pts > s->pts) { - int ret; s->passthrough = 1; - ret = ff_inlink_consume_frame(in_a, &s->xf0); - if (ret < 0) - return ret; + ff_inlink_consume_frame(in_a, &s->xf0); return ff_filter_frame(outlink, s->xf0); } s->passthrough = 0; @@ -2300,14 +2297,8 @@ // We are transitioning, so we need a frame from second input if (ff_inlink_check_available_frame(in_b)) { int ret; - ret = ff_inlink_consume_frame(avctx->inputs0, &s->xf0); - if (ret < 0) - return ret; - ret = ff_inlink_consume_frame(avctx->inputs1, &s->xf1); - if (ret < 0) { - av_frame_free(&s->xf0); - return ret; - } + ff_inlink_consume_frame(avctx->inputs0, &s->xf0); + ff_inlink_consume_frame(avctx->inputs1, &s->xf1); // Calculate PTS offset to first input if (s->inputs_offset_pts == AV_NOPTS_VALUE)
View file
ffmpeg-6.1.2.tar.xz/libavformat/ac4dec.c -> ffmpeg-6.1.1.tar.xz/libavformat/ac4dec.c
Changed
@@ -42,8 +42,6 @@ size += 4; if (buf1 == 0x41) size += 2; - if (left < size) - break; max_frames++; left -= size; buf += size;
View file
ffmpeg-6.1.2.tar.xz/libavformat/aiffdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/aiffdec.c
Changed
@@ -106,8 +106,6 @@ size++; par->codec_type = AVMEDIA_TYPE_AUDIO; channels = avio_rb16(pb); - if (par->ch_layout.nb_channels && par->ch_layout.nb_channels != channels) - return AVERROR_INVALIDDATA; par->ch_layout.nb_channels = channels; num_frames = avio_rb32(pb); par->bits_per_coded_sample = avio_rb16(pb);
View file
ffmpeg-6.1.2.tar.xz/libavformat/ape.c -> ffmpeg-6.1.1.tar.xz/libavformat/ape.c
Changed
@@ -290,7 +290,7 @@ final_size -= final_size & 3; } if (file_size <= 0 || final_size <= 0) - final_size = ape->finalframeblocks * 8LL; + final_size = ape->finalframeblocks * 8; ape->framesape->totalframes - 1.size = final_size; for (i = 0; i < ape->totalframes; i++) {
View file
ffmpeg-6.1.2.tar.xz/libavformat/argo_asf.c -> ffmpeg-6.1.1.tar.xz/libavformat/argo_asf.c
Changed
@@ -258,7 +258,7 @@ return -1; offset = asf->fhdr.chunk_offset + ASF_CHUNK_HEADER_SIZE + - block * (int64_t)st->codecpar->block_align; + (block * st->codecpar->block_align); if ((offset = avio_seek(s->pb, offset, SEEK_SET)) < 0) return offset;
View file
ffmpeg-6.1.2.tar.xz/libavformat/asfdec_f.c -> ffmpeg-6.1.1.tar.xz/libavformat/asfdec_f.c
Changed
@@ -674,7 +674,7 @@ avio_rl64(pb); // offset, 8 bytes pres_time = avio_rl64(pb); // presentation time - pres_time = av_sat_sub64(pres_time, asf->hdr.preroll * 10000LL); + pres_time = av_sat_sub64(pres_time, asf->hdr.preroll * 10000); avio_rl16(pb); // entry length avio_rl32(pb); // send time avio_rl32(pb); // flags
View file
ffmpeg-6.1.2.tar.xz/libavformat/asfdec_o.c -> ffmpeg-6.1.1.tar.xz/libavformat/asfdec_o.c
Changed
@@ -866,9 +866,6 @@ int64_t offset; uint64_t size = avio_rl64(pb); - if (size < 24) - return AVERROR_INVALIDDATA; - // simple index objects should be ordered by stream number, this loop tries to find // the first not indexed video stream for (i = 0; i < asf->nb_streams; i++) {
View file
ffmpeg-6.1.2.tar.xz/libavformat/bintext.c -> ffmpeg-6.1.1.tar.xz/libavformat/bintext.c
Changed
@@ -92,12 +92,9 @@ AVIOContext *pb = avctx->pb; char buf36; int len; - int64_t start_pos = avio_size(pb); + uint64_t start_pos = avio_size(pb) - 256; - if (start_pos < 256) - return AVERROR_INVALIDDATA; - - avio_seek(pb, start_pos - 256, SEEK_SET); + avio_seek(pb, start_pos, SEEK_SET); if (avio_read(pb, buf, sizeof(next_magic)) != sizeof(next_magic)) return -1; if (memcmp(buf, next_magic, sizeof(next_magic))) @@ -247,10 +244,7 @@ return AVERROR(EIO); if (pb->seekable & AVIO_SEEKABLE_NORMAL) { - int64_t fsize = avio_size(pb); - if (fsize < 9 + st->codecpar->extradata_size) - return 0; - bin->fsize = fsize - 9 - st->codecpar->extradata_size; + bin->fsize = avio_size(pb) - 9 - st->codecpar->extradata_size; ff_sauce_read(s, &bin->fsize, NULL, 0); avio_seek(pb, 9 + st->codecpar->extradata_size, SEEK_SET); } @@ -290,10 +284,7 @@ if (pb->seekable & AVIO_SEEKABLE_NORMAL) { int got_width = 0; - int64_t fsize = avio_size(pb); - if (fsize < 1 + 192 + 4096) - return 0; - bin->fsize = fsize - 1 - 192 - 4096; + bin->fsize = avio_size(pb) - 1 - 192 - 4096; st->codecpar->width = 80<<3; ff_sauce_read(s, &bin->fsize, &got_width, 0); if (st->codecpar->width < 8) @@ -326,7 +317,6 @@ AVIOContext *pb = s->pb; AVStream *st; int got_width = 0, ret; - int64_t fsize; if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) return AVERROR(EIO); @@ -341,18 +331,14 @@ st->codecpar->extradata0 = 16; st->codecpar->extradata1 = BINTEXT_PALETTE|BINTEXT_FONT; - fsize = avio_size(pb); - if (fsize < 12 + 4096 + 48) - return AVERROR_INVALIDDATA; - bin->fsize = fsize - 12 - 4096 - 48; - - avio_seek(pb, bin->fsize + 12, SEEK_SET); + avio_seek(pb, avio_size(pb) - 4096 - 48, SEEK_SET); if (avio_read(pb, st->codecpar->extradata + 2 + 48, 4096) < 0) return AVERROR(EIO); if (avio_read(pb, st->codecpar->extradata + 2, 48) < 0) return AVERROR(EIO); + bin->fsize = avio_size(pb) - 12 - 4096 - 48; ff_sauce_read(s, &bin->fsize, &got_width, 0); if (st->codecpar->width < 8) return AVERROR_INVALIDDATA;
View file
ffmpeg-6.1.2.tar.xz/libavformat/cafdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/cafdec.c
Changed
@@ -271,7 +271,7 @@ } } - if (avio_tell(pb) - ccount > size || size > INT64_MAX - ccount) { + if (avio_tell(pb) - ccount > size) { av_log(s, AV_LOG_ERROR, "error reading packet table\n"); return AVERROR_INVALIDDATA; } @@ -343,9 +343,6 @@ avio_skip(pb, 4); /* edit count */ caf->data_start = avio_tell(pb); caf->data_size = size < 0 ? -1 : size - 4; - if (caf->data_start < 0 || caf->data_size > INT64_MAX - caf->data_start) - return AVERROR_INVALIDDATA; - if (caf->data_size > 0 && (pb->seekable & AVIO_SEEKABLE_NORMAL)) avio_skip(pb, caf->data_size); found_data = 1;
View file
ffmpeg-6.1.2.tar.xz/libavformat/concatdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/concatdec.c
Changed
@@ -323,7 +323,7 @@ if (file->user_duration != AV_NOPTS_VALUE) return file->user_duration; if (file->outpoint != AV_NOPTS_VALUE) - return av_sat_sub64(file->outpoint, file->file_inpoint); + return file->outpoint - file->file_inpoint; if (avf->duration > 0) return avf->duration - (file->file_inpoint - file->file_start_time); if (file->next_dts != AV_NOPTS_VALUE) @@ -638,17 +638,6 @@ } } - if (!file) { - ret = AVERROR_INVALIDDATA; - goto fail; - } - - if (file->inpoint != AV_NOPTS_VALUE && file->outpoint != AV_NOPTS_VALUE) { - if (file->inpoint > file->outpoint || - file->outpoint - (uint64_t)file->inpoint > INT64_MAX) - ret = AVERROR_INVALIDDATA; - } - fail: for (arg = 0; arg < MAX_ARGS; arg++) av_freep(&arg_strarg); @@ -684,8 +673,6 @@ cat->filesi.user_duration = cat->filesi.outpoint - cat->filesi.inpoint; } cat->filesi.duration = cat->filesi.user_duration; - if (time + (uint64_t)cat->filesi.user_duration > INT64_MAX) - return AVERROR_INVALIDDATA; time += cat->filesi.user_duration; } if (i == cat->nb_files) {
View file
ffmpeg-6.1.2.tar.xz/libavformat/demux.c -> ffmpeg-6.1.1.tar.xz/libavformat/demux.c
Changed
@@ -2436,7 +2436,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) { FFFormatContext *const si = ffformatcontext(ic); - int count = 0, ret = 0, err; + int count = 0, ret = 0; int64_t read_size; AVPacket *pkt1 = si->pkt; int64_t old_offset = avio_tell(ic->pb); @@ -2947,11 +2947,9 @@ } } - err = compute_chapters_end(ic); - if (err < 0) { - ret = err; + ret = compute_chapters_end(ic); + if (ret < 0) goto find_stream_info_err; - } /* update the stream parameters from the internal codec contexts */ for (unsigned i = 0; i < ic->nb_streams; i++) {
View file
ffmpeg-6.1.2.tar.xz/libavformat/dxa.c -> ffmpeg-6.1.1.tar.xz/libavformat/dxa.c
Changed
@@ -122,7 +122,7 @@ if(ast->codecpar->block_align) { if (c->bpc > INT_MAX - ast->codecpar->block_align + 1) return AVERROR_INVALIDDATA; - c->bpc = ((c->bpc - 1 + ast->codecpar->block_align) / ast->codecpar->block_align) * ast->codecpar->block_align; + c->bpc = ((c->bpc + ast->codecpar->block_align - 1) / ast->codecpar->block_align) * ast->codecpar->block_align; } c->bytes_left = fsize; c->wavpos = avio_tell(pb);
View file
ffmpeg-6.1.2.tar.xz/libavformat/fwse.c -> ffmpeg-6.1.1.tar.xz/libavformat/fwse.c
Changed
@@ -66,7 +66,7 @@ av_channel_layout_default(&par->ch_layout, channels); st->duration = avio_rl32(pb); par->sample_rate = avio_rl32(pb); - if (par->sample_rate <= 0) + if (par->sample_rate <= 0 || par->sample_rate > INT_MAX) return AVERROR_INVALIDDATA; par->block_align = 1;
View file
ffmpeg-6.1.2.tar.xz/libavformat/hlsenc.c -> ffmpeg-6.1.1.tar.xz/libavformat/hlsenc.c
Changed
@@ -418,11 +418,8 @@ } else if (st->codecpar->codec_id == AV_CODEC_ID_MP3) { snprintf(attr, sizeof(attr), "mp4a.40.34"); } else if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { - if (st->codecpar->profile != AV_PROFILE_UNKNOWN) - snprintf(attr, sizeof(attr), "mp4a.40.%d", st->codecpar->profile+1); - else - // This is for backward compatibility with the previous implementation. - snprintf(attr, sizeof(attr), "mp4a.40.2"); + /* TODO : For HE-AAC, HE-AACv2, the last digit needs to be set to 5 and 29 respectively */ + snprintf(attr, sizeof(attr), "mp4a.40.2"); } else if (st->codecpar->codec_id == AV_CODEC_ID_AC3) { snprintf(attr, sizeof(attr), "ac-3"); } else if (st->codecpar->codec_id == AV_CODEC_ID_EAC3) { @@ -2590,10 +2587,8 @@ " will retry with a new http session.\n"); ff_format_io_close(s, &vs->out); ret = hlsenc_io_open(s, &vs->out, filename, &options); - if (ret >= 0) { - reflush_dynbuf(vs, &range_length); - ret = hlsenc_io_close(s, &vs->out, filename); - } + reflush_dynbuf(vs, &range_length); + ret = hlsenc_io_close(s, &vs->out, filename); } av_dict_free(&options); av_freep(&vs->temp_buffer); @@ -2604,9 +2599,6 @@ hls_rename_temp_file(s, oc); } - if (ret < 0) - return ret; - old_filename = av_strdup(oc->url); if (!old_filename) { return AVERROR(ENOMEM);
View file
ffmpeg-6.1.2.tar.xz/libavformat/hnm.c -> ffmpeg-6.1.1.tar.xz/libavformat/hnm.c
Changed
@@ -113,8 +113,6 @@ if (hnm->superchunk_remaining == 0) { /* parse next superchunk */ superchunk_size = avio_rl24(pb); - if (superchunk_size < 4) - return AVERROR_INVALIDDATA; avio_skip(pb, 1); hnm->superchunk_remaining = superchunk_size - 4; @@ -125,7 +123,7 @@ chunk_id = avio_rl16(pb); avio_skip(pb, 2); - if (chunk_size > hnm->superchunk_remaining || chunk_size < 8) { + if (chunk_size > hnm->superchunk_remaining || !chunk_size) { av_log(s, AV_LOG_ERROR, "invalid chunk size: %"PRIu32", offset: %"PRId64"\n", chunk_size, avio_tell(pb));
View file
ffmpeg-6.1.2.tar.xz/libavformat/id3v2.c -> ffmpeg-6.1.1.tar.xz/libavformat/id3v2.c
Changed
@@ -370,7 +370,7 @@ int encoding; int ok = 0; - if (taglen < 4) + if (taglen < 1) goto error; encoding = avio_r8(pb);
View file
ffmpeg-6.1.2.tar.xz/libavformat/iff.c -> ffmpeg-6.1.1.tar.xz/libavformat/iff.c
Changed
@@ -217,7 +217,7 @@ { AVIOContext *pb = s->pb; - while (av_sat_add64(avio_tell(pb), 12) <= eof && !avio_feof(pb)) { + while (avio_tell(pb) + 12 <= eof && !avio_feof(pb)) { uint32_t tag = avio_rl32(pb); uint64_t size = avio_rb64(pb); uint64_t orig_pos = avio_tell(pb); @@ -254,7 +254,7 @@ int dsd_layout6; ID3v2ExtraMeta *id3v2_extra_meta; - while (av_sat_add64(avio_tell(pb), 12) <= eof && !avio_feof(pb)) { + while (avio_tell(pb) + 12 <= eof && !avio_feof(pb)) { uint32_t tag = avio_rl32(pb); uint64_t size = avio_rb64(pb); uint64_t orig_pos = avio_tell(pb);
View file
ffmpeg-6.1.2.tar.xz/libavformat/imfdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/imfdec.c
Changed
@@ -700,9 +700,12 @@ static IMFVirtualTrackPlaybackCtx *get_next_track_with_minimum_timestamp(AVFormatContext *s) { IMFContext *c = s->priv_data; - IMFVirtualTrackPlaybackCtx *track = NULL; + IMFVirtualTrackPlaybackCtx *track; AVRational minimum_timestamp = av_make_q(INT32_MAX, 1); + if (!c->track_count) + return NULL; + for (uint32_t i = c->track_count; i > 0; i--) { av_log(s, AV_LOG_TRACE, "Compare track %d timestamp " AVRATIONAL_FORMAT " to minimum " AVRATIONAL_FORMAT
View file
ffmpeg-6.1.2.tar.xz/libavformat/img2dec.c -> ffmpeg-6.1.1.tar.xz/libavformat/img2dec.c
Changed
@@ -25,7 +25,6 @@ #define _DEFAULT_SOURCE #define _BSD_SOURCE #include <sys/stat.h> -#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/log.h" #include "libavutil/opt.h" @@ -503,7 +502,6 @@ pkt->flags |= AV_PKT_FLAG_KEY; if (s->ts_from_file) { struct stat img_stat; - av_assert0(!s->is_pipe); // The ts_from_file option is not supported by piped input demuxers if (stat(filename, &img_stat)) { res = AVERROR(EIO); goto fail; @@ -794,14 +792,13 @@ return 0; state = EOI; break; + case DQT: case APP0: - if (c == APP0 && AV_RL32(&bi + 4) == MKTAG('J','F','I','F')) + if (AV_RL32(&bi + 4) == MKTAG('J','F','I','F')) got_header = 1; - /* fallthrough */ case APP1: - if (c == APP1 && AV_RL32(&bi + 4) == MKTAG('E','x','i','f')) + if (AV_RL32(&bi + 4) == MKTAG('E','x','i','f')) got_header = 1; - /* fallthrough */ case APP2: case APP3: case APP4: @@ -816,7 +813,6 @@ case APP13: case APP14: case APP15: - case DQT: /* fallthrough */ case COM: i += AV_RB16(&bi + 2) + 1; break;
View file
ffmpeg-6.1.2.tar.xz/libavformat/isom.c -> ffmpeg-6.1.1.tar.xz/libavformat/isom.c
Changed
@@ -358,7 +358,6 @@ st->codecpar->extradata_size, 1, fc); if (ret < 0) return ret; - av_channel_layout_uninit(&st->codecpar->ch_layout); st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; st->codecpar->ch_layout.nb_channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4
View file
ffmpeg-6.1.2.tar.xz/libavformat/jacosubdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/jacosubdec.c
Changed
@@ -127,29 +127,29 @@ static int get_shift(unsigned timeres, const char *buf) { int sign = 1; - int h = 0, m = 0, s = 0, d = 0; + int a = 0, b = 0, c = 0, d = 0; int64_t ret; #define SSEP "%*1.:" - int n = sscanf(buf, "%d"SSEP"%d"SSEP"%d"SSEP"%d", &h, &m, &s, &d); + int n = sscanf(buf, "%d"SSEP"%d"SSEP"%d"SSEP"%d", &a, &b, &c, &d); #undef SSEP - if (h == INT_MIN) + if (a == INT_MIN) return 0; - if (*buf == '-' || h < 0) { + if (*buf == '-' || a < 0) { sign = -1; - h = FFABS(h); + a = FFABS(a); } ret = 0; switch (n) { - case 1: h = 0; //clear all in case of a single parameter - case 2: s = m; m = h; h = 0; //shift into second subsecondd - case 3: d = s; s = m; m = h; h = 0; //shift into minute second subsecond + case 1: a = 0; + case 2: c = b; b = a; a = 0; + case 3: d = c; c = b; b = a; a = 0; } - ret = (int64_t)h*3600 + (int64_t)m*60 + s; - if (FFABS(ret) > (INT64_MAX - FFABS((int64_t)d)) / timeres) + ret = (int64_t)a*3600 + (int64_t)b*60 + c; + if (FFABS(ret) > (INT64_MAX - FFABS(d)) / timeres) return 0; ret = sign * (ret * timeres + d);
View file
ffmpeg-6.1.2.tar.xz/libavformat/kvag.c -> ffmpeg-6.1.1.tar.xz/libavformat/kvag.c
Changed
@@ -37,7 +37,7 @@ typedef struct KVAGHeader { uint32_t magic; uint32_t data_size; - int sample_rate; + uint32_t sample_rate; uint16_t stereo; } KVAGHeader; @@ -69,9 +69,6 @@ hdr.sample_rate = AV_RL32(buf + 8); hdr.stereo = AV_RL16(buf + 12); - if (hdr.sample_rate <= 0) - return AVERROR_INVALIDDATA; - par = st->codecpar; par->codec_type = AVMEDIA_TYPE_AUDIO; par->codec_id = AV_CODEC_ID_ADPCM_IMA_SSI;
View file
ffmpeg-6.1.2.tar.xz/libavformat/libsrt.c -> ffmpeg-6.1.1.tar.xz/libavformat/libsrt.c
Changed
@@ -249,7 +249,7 @@ if (srt_listen(fd, 1)) return libsrt_neterrno(h); - ret = libsrt_network_wait_fd_timeout(h, eid, 0, timeout, &h->interrupt_callback); + ret = libsrt_network_wait_fd_timeout(h, eid, 1, timeout, &h->interrupt_callback); if (ret < 0) return ret; @@ -390,7 +390,7 @@ char hostname1024,proto1024,path1024; char portstr10; int64_t open_timeout = 0; - int eid; + int eid, write_eid; av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, path, sizeof(path), uri); @@ -454,21 +454,18 @@ if (libsrt_socket_nonblock(fd, 1) < 0) av_log(h, AV_LOG_DEBUG, "libsrt_socket_nonblock failed\n"); + ret = write_eid = libsrt_epoll_create(h, fd, 1); + if (ret < 0) + goto fail1; if (s->mode == SRT_MODE_LISTENER) { - int read_eid = ret = libsrt_epoll_create(h, fd, 0); - if (ret < 0) - goto fail1; // multi-client - ret = libsrt_listen(read_eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, h, s->listen_timeout); - srt_epoll_release(read_eid); + ret = libsrt_listen(write_eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, h, s->listen_timeout); + srt_epoll_release(write_eid); if (ret < 0) goto fail1; srt_close(fd); fd = ret; } else { - int write_eid = ret = libsrt_epoll_create(h, fd, 1); - if (ret < 0) - goto fail1; if (s->mode == SRT_MODE_RENDEZVOUS) { if (srt_bind(fd, cur_ai->ai_addr, cur_ai->ai_addrlen)) { ret = libsrt_neterrno(h);
View file
ffmpeg-6.1.2.tar.xz/libavformat/libzmq.c -> ffmpeg-6.1.1.tar.xz/libavformat/libzmq.c
Changed
@@ -94,10 +94,7 @@ return AVERROR_EXTERNAL; } - if (av_strstart(uri, "zmq:", &uri)) { - av_log(h, AV_LOG_ERROR, "URL %s lacks prefix\n", uri); - return AVERROR(EINVAL); - } + av_strstart(uri, "zmq:", &uri); /*publish during write*/ if (h->flags & AVIO_FLAG_WRITE) {
View file
ffmpeg-6.1.2.tar.xz/libavformat/matroskadec.c -> ffmpeg-6.1.1.tar.xz/libavformat/matroskadec.c
Changed
@@ -3186,10 +3186,6 @@ track->time_scale); track->time_scale = 1.0; } - - if (matroska->time_scale * track->time_scale > UINT_MAX) - return AVERROR_INVALIDDATA; - avpriv_set_pts_info(st, 64, matroska->time_scale * track->time_scale, 1000 * 1000 * 1000); /* 64 bit pts in ns */ @@ -4197,7 +4193,7 @@ MatroskaBlock *block = &cluster->block; int res; - av_assert0(matroska->num_levels <= 2U); + av_assert0(matroska->num_levels <= 2); if (matroska->num_levels == 1) { res = ebml_parse(matroska, matroska_segment, NULL);
View file
ffmpeg-6.1.2.tar.xz/libavformat/mm.c -> ffmpeg-6.1.1.tar.xz/libavformat/mm.c
Changed
@@ -94,7 +94,7 @@ type = avio_rl16(pb); length = avio_rl32(pb); - if (type != MM_TYPE_HEADER || length < 10) + if (type != MM_TYPE_HEADER) return AVERROR_INVALIDDATA; /* read header */
View file
ffmpeg-6.1.2.tar.xz/libavformat/mov.c -> ffmpeg-6.1.1.tar.xz/libavformat/mov.c
Changed
@@ -303,8 +303,7 @@ char *str = NULL; const char *key = NULL; uint16_t langcode = 0; - uint32_t data_type = 0, str_size_alloc; - uint64_t str_size; + uint32_t data_type = 0, str_size, str_size_alloc; int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL; int raw = 0; int num = 0; @@ -3210,15 +3209,15 @@ sc->stts_datai.duration = 1; corrected_dts += (delta_magnitude < 0 ? (int64_t)delta_magnitude : 1) * sample_count; } else { - corrected_dts += sample_duration * (int64_t)sample_count; + corrected_dts += sample_duration * sample_count; } - current_dts += sc->stts_datai.duration * (int64_t)sample_count; + current_dts += sc->stts_datai.duration * sample_count; if (current_dts > corrected_dts) { int64_t drift = (current_dts - corrected_dts)/FFMAX(sample_count, 1); uint32_t correction = (sc->stts_datai.duration > drift) ? drift : sc->stts_datai.duration - 1; - current_dts -= correction * (uint64_t)sample_count; + current_dts -= correction * sample_count; sc->stts_datai.duration -= correction; } @@ -3510,10 +3509,6 @@ } *edit_list_duration = av_rescale(*edit_list_duration, msc->time_scale, global_timescale); - - if (*edit_list_duration + (uint64_t)*edit_list_media_time > INT64_MAX) - *edit_list_duration = 0; - return 1; } @@ -4820,13 +4815,12 @@ for (i = 1; i <= count; ++i) { uint32_t key_size = avio_rb32(pb); uint32_t type = avio_rl32(pb); - if (key_size < 8 || key_size > atom.size) { + if (key_size < 8) { av_log(c->fc, AV_LOG_ERROR, "The key# %"PRIu32" in meta has invalid size:" "%"PRIu32"\n", i, key_size); return AVERROR_INVALIDDATA; } - atom.size -= key_size; key_size -= 8; if (type != MKTAG('m','d','t','a')) { avio_skip(pb, key_size); @@ -5922,10 +5916,8 @@ av_log(c->fc, AV_LOG_WARNING, "Unsupported Mastering Display Metadata box version %d\n", version); return 0; } - if (sc->mastering) { - av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicate Mastering Display Metadata\n"); - return 0; - } + if (sc->mastering) + return AVERROR_INVALIDDATA; avio_skip(pb, 3); /* flags */ @@ -5962,16 +5954,11 @@ sc = c->fc->streamsc->fc->nb_streams - 1->priv_data; - if (atom.size < 24) { + if (atom.size < 24 || sc->mastering) { av_log(c->fc, AV_LOG_ERROR, "Invalid Mastering Display Color Volume box\n"); return AVERROR_INVALIDDATA; } - if (sc->mastering) { - av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicate Mastering Display Color Volume\n"); - return 0; - } - sc->mastering = av_mastering_display_metadata_alloc(); if (!sc->mastering) return AVERROR(ENOMEM); @@ -6759,9 +6746,6 @@ sample_count = avio_rb32(pb); if (encryption_index->auxiliary_info_default_size == 0) { - if (sample_count == 0) - return AVERROR_INVALIDDATA; - encryption_index->auxiliary_info_sizes = av_malloc(sample_count); if (!encryption_index->auxiliary_info_sizes) return AVERROR(ENOMEM); @@ -8371,7 +8355,7 @@ /* 60 fps content have tmcd_nb_frames set to 30 but tc_rate set to 60, so * we multiply the frame number with the quotient. * See tickets #9492, #9710. */ - rounded_tc_rate = (tc_rate.num + tc_rate.den / 2LL) / tc_rate.den; + rounded_tc_rate = (tc_rate.num + tc_rate.den / 2) / tc_rate.den; /* Work around files where tmcd_nb_frames is rounded down from frame rate * instead of up. See ticket #5978. */ if (tmcd_nb_frames == tc_rate.num / tc_rate.den &&
View file
ffmpeg-6.1.2.tar.xz/libavformat/mov_chan.c -> ffmpeg-6.1.1.tar.xz/libavformat/mov_chan.c
Changed
@@ -530,7 +530,7 @@ size -= 20; if (layout_tag == 0) { uint64_t mask_incr = mov_get_channel_mask(label); - if (mask_incr == 0 || mask_incr <= label_mask) { + if (mask_incr == 0) { label_mask = 0; break; } @@ -544,13 +544,8 @@ mask = mov_get_channel_layout(layout_tag, bitmap); if (mask) { - if (!st->codecpar->ch_layout.nb_channels || av_popcount64(mask) == st->codecpar->ch_layout.nb_channels) { - av_channel_layout_uninit(&st->codecpar->ch_layout); - av_channel_layout_from_mask(&st->codecpar->ch_layout, mask); - } else { - av_log(s, AV_LOG_WARNING, "ignoring channel layout with %d channels because the real number of channels is %d\n", - av_popcount64(mask), st->codecpar->ch_layout.nb_channels); - } + av_channel_layout_uninit(&st->codecpar->ch_layout); + av_channel_layout_from_mask(&st->codecpar->ch_layout, mask); } avio_skip(pb, size - 12);
View file
ffmpeg-6.1.2.tar.xz/libavformat/movenc.c -> ffmpeg-6.1.1.tar.xz/libavformat/movenc.c
Changed
@@ -6102,12 +6102,6 @@ if (ret < 0) return ret; - if (pkt->pts != AV_NOPTS_VALUE && - (uint64_t)pkt->dts - pkt->pts != (int32_t)((uint64_t)pkt->dts - pkt->pts)) { - av_log(s, AV_LOG_WARNING, "pts/dts pair unsupported\n"); - return AVERROR_PATCHWELCOME; - } - if (mov->flags & FF_MOV_FLAG_FRAGMENT || mov->mode == MODE_AVIF) { int ret; if (mov->moov_written || mov->flags & FF_MOV_FLAG_EMPTY_MOOV) {
View file
ffmpeg-6.1.2.tar.xz/libavformat/mp3dec.c -> ffmpeg-6.1.1.tar.xz/libavformat/mp3dec.c
Changed
@@ -32,7 +32,6 @@ #include "replaygain.h" #include "libavcodec/codec_id.h" -#include "libavcodec/mpegaudio.h" #include "libavcodec/mpegaudiodecheader.h" #define XING_FLAG_FRAMES 0x01 @@ -137,10 +136,9 @@ int fill_index = (mp3->usetoc || fast_seek) && duration > 0; if (!filesize && - (filesize = avio_size(s->pb)) <= 0) { + !(filesize = avio_size(s->pb))) { av_log(s, AV_LOG_WARNING, "Cannot determine file size, skipping TOC table.\n"); fill_index = 0; - filesize = 0; } for (i = 0; i < XING_TOC_COUNT; i++) { @@ -402,22 +400,27 @@ if (ret < 0) return ret; - ret = ffio_ensure_seekback(s->pb, 64 * 1024 + MPA_MAX_CODED_FRAME_SIZE + 4); - if (ret < 0) - return ret; - off = avio_tell(s->pb); for (i = 0; i < 64 * 1024; i++) { uint32_t header, header2; int frame_size; + if (!(i&1023)) + ffio_ensure_seekback(s->pb, i + 1024 + 4); frame_size = check(s->pb, off + i, &header); if (frame_size > 0) { + ffio_ensure_seekback(s->pb, i + 1024 + frame_size + 4); ret = check(s->pb, off + i + frame_size, &header2); - if (ret >= 0 && (header & MP3_MASK) == (header2 & MP3_MASK)) + if (ret >= 0 && + (header & MP3_MASK) == (header2 & MP3_MASK)) + { break; + } else if (ret == CHECK_SEEK_FAILED) { + av_log(s, AV_LOG_ERROR, "Invalid frame size (%d): Could not seek to %"PRId64".\n", frame_size, off + i + frame_size); + return AVERROR(EINVAL); + } } else if (frame_size == CHECK_SEEK_FAILED) { - av_log(s, AV_LOG_ERROR, "Failed to find two consecutive MPEG audio frames.\n"); - return AVERROR_INVALIDDATA; + av_log(s, AV_LOG_ERROR, "Failed to read frame size: Could not seek to %"PRId64".\n", (int64_t) (i + 1024 + frame_size + 4)); + return AVERROR(EINVAL); } } if (i == 64 * 1024) { @@ -585,7 +588,7 @@ if (best_pos < 0) return best_pos; - if (mp3->is_cbr && ie == &ie1 && mp3->frames && mp3->header_filesize > 0) { + if (mp3->is_cbr && ie == &ie1 && mp3->frames) { int frame_duration = av_rescale(st->duration, 1, mp3->frames); ie1.timestamp = frame_duration * av_rescale(best_pos - si->data_offset, mp3->frames, mp3->header_filesize); }
View file
ffmpeg-6.1.2.tar.xz/libavformat/mpeg.c -> ffmpeg-6.1.1.tar.xz/libavformat/mpeg.c
Changed
@@ -75,9 +75,6 @@ int pes = endpes <= i && check_pes(p->buf + i, p->buf + p->buf_size); int pack = check_pack_header(p->buf + i); - if (len > INT_MAX - i) - break; - if (code == SYSTEM_HEADER_START_CODE) sys++; else if (code == PACK_START_CODE && pack)
View file
ffmpeg-6.1.2.tar.xz/libavformat/mpegts.c -> ffmpeg-6.1.1.tar.xz/libavformat/mpegts.c
Changed
@@ -1306,11 +1306,8 @@ p += sl_header_bytes; buf_size -= sl_header_bytes; } - if (pes->stream_type == STREAM_TYPE_METADATA && - pes->stream_id == STREAM_ID_METADATA_STREAM && - pes->st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV && - buf_size >= 5) { - /* skip metadata access unit header - see MISB ST 1402 */ + if (pes->st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV && buf_size >= 5) { + /* skip metadata access unit header */ pes->pes_header_size += 5; p += 5; buf_size -= 5; @@ -2604,8 +2601,7 @@ FFSWAP(struct Program, ts->prgnb_prg, ts->prgprg_idx); if (prg_idx >= nb_prg) nb_prg++; - } else - nb_prg = 0; + } } } ts->nb_prg = nb_prg;
View file
ffmpeg-6.1.2.tar.xz/libavformat/mxf.h -> ffmpeg-6.1.1.tar.xz/libavformat/mxf.h
Changed
@@ -30,7 +30,8 @@ typedef AVUUID UID; enum MXFMetadataSetType { - MaterialPackage = 1, + AnyType, + MaterialPackage, SourcePackage, SourceClip, TimecodeComponent,
View file
ffmpeg-6.1.2.tar.xz/libavformat/mxfdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/mxfdec.c
Changed
@@ -248,7 +248,7 @@ typedef struct MXFIndexTableSegment { MXFMetadataSet meta; - unsigned edit_unit_byte_count; + int edit_unit_byte_count; int index_sid; int body_sid; AVRational index_edit_rate; @@ -266,6 +266,7 @@ UID package_ul; UID *tracks_refs; int tracks_count; + MXFDescriptor *descriptor; /* only one */ UID descriptor_ref; char *name; UID *comment_refs; @@ -791,9 +792,6 @@ partition->index_sid = avio_rb32(pb); partition->body_offset = avio_rb64(pb); partition->body_sid = avio_rb32(pb); - if (partition->body_offset < 0) - return AVERROR_INVALIDDATA; - if (avio_read(pb, op, sizeof(UID)) != sizeof(UID)) { av_log(mxf->fc, AV_LOG_ERROR, "Failed reading UID\n"); return AVERROR_INVALIDDATA; @@ -1269,9 +1267,6 @@ case 0x3F0B: segment->index_edit_rate.num = avio_rb32(pb); segment->index_edit_rate.den = avio_rb32(pb); - if (segment->index_edit_rate.num <= 0 || - segment->index_edit_rate.den <= 0) - return AVERROR_INVALIDDATA; av_log(NULL, AV_LOG_TRACE, "IndexEditRate %d/%d\n", segment->index_edit_rate.num, segment->index_edit_rate.den); break; @@ -1588,7 +1583,7 @@ return NULL; for (i = mxf->metadata_sets_count - 1; i >= 0; i--) { if (!memcmp(*strong_ref, mxf->metadata_setsi->uid, 16) && - (mxf->metadata_setsi->type == type)) { + (type == AnyType || mxf->metadata_setsi->type == type)) { return mxf->metadata_setsi; } } @@ -1906,13 +1901,9 @@ if (edit_unit < s->index_start_position + s->index_duration) { int64_t index = edit_unit - s->index_start_position; - if (s->edit_unit_byte_count) { - if (index > INT64_MAX / s->edit_unit_byte_count || - s->edit_unit_byte_count * index > INT64_MAX - offset_temp) - return AVERROR_INVALIDDATA; - + if (s->edit_unit_byte_count) offset_temp += s->edit_unit_byte_count * index; - } else { + else { if (s->nb_index_entries == 2 * s->index_duration + 1) index *= 2; /* Avid index */ @@ -2231,17 +2222,22 @@ static MXFTimecodeComponent* mxf_resolve_timecode_component(MXFContext *mxf, UID *strong_ref) { - MXFTimecodeComponent *timecode; - MXFPulldownComponent *pulldown; + MXFStructuralComponent *component = NULL; + MXFPulldownComponent *pulldown = NULL; - timecode = mxf_resolve_strong_ref(mxf, strong_ref, TimecodeComponent); - if (timecode) - return timecode; + component = mxf_resolve_strong_ref(mxf, strong_ref, AnyType); + if (!component) + return NULL; - pulldown = mxf_resolve_strong_ref(mxf, strong_ref, PulldownComponent); - if (pulldown) + switch (component->meta.type) { + case TimecodeComponent: + return (MXFTimecodeComponent*)component; + case PulldownComponent: /* timcode component may be located on a pulldown component */ + pulldown = (MXFPulldownComponent*)component; return mxf_resolve_strong_ref(mxf, &pulldown->input_segment_ref, TimecodeComponent); - + default: + break; + } return NULL; } @@ -2261,16 +2257,17 @@ return NULL; } -static MXFDescriptor* mxf_resolve_descriptor(MXFContext *mxf, UID *strong_ref, int track_id) +static MXFDescriptor* mxf_resolve_multidescriptor(MXFContext *mxf, MXFDescriptor *descriptor, int track_id) { - MXFDescriptor *descriptor = mxf_resolve_strong_ref(mxf, strong_ref, Descriptor); - if (descriptor) - return descriptor; + MXFDescriptor *file_descriptor = NULL; + int i; + + if (!descriptor) + return NULL; - descriptor = mxf_resolve_strong_ref(mxf, strong_ref, MultipleDescriptor); - if (descriptor) { - for (int i = 0; i < descriptor->file_descriptors_count; i++) { - MXFDescriptor *file_descriptor = mxf_resolve_strong_ref(mxf, &descriptor->file_descriptors_refsi, Descriptor); + if (descriptor->meta.type == MultipleDescriptor) { + for (i = 0; i < descriptor->file_descriptors_count; i++) { + file_descriptor = mxf_resolve_strong_ref(mxf, &descriptor->file_descriptors_refsi, Descriptor); if (!file_descriptor) { av_log(mxf->fc, AV_LOG_ERROR, "could not resolve file descriptor strong ref\n"); @@ -2280,25 +2277,20 @@ return file_descriptor; } } - } + } else if (descriptor->meta.type == Descriptor) + return descriptor; return NULL; } -static MXFStructuralComponent* mxf_resolve_sourceclip(MXFContext *mxf, UID *strong_ref) +static MXFStructuralComponent* mxf_resolve_essence_group_choice(MXFContext *mxf, MXFEssenceGroup *essence_group) { MXFStructuralComponent *component = NULL; MXFPackage *package = NULL; MXFDescriptor *descriptor = NULL; - MXFEssenceGroup *essence_group; int i; - component = mxf_resolve_strong_ref(mxf, strong_ref, SourceClip); - if (component) - return component; - - essence_group = mxf_resolve_strong_ref(mxf, strong_ref, EssenceGroup); - if (!essence_group) + if (!essence_group || !essence_group->structural_components_count) return NULL; /* essence groups contains multiple representations of the same media, @@ -2315,7 +2307,24 @@ if (descriptor) return component; } + return NULL; +} +static MXFStructuralComponent* mxf_resolve_sourceclip(MXFContext *mxf, UID *strong_ref) +{ + MXFStructuralComponent *component = NULL; + + component = mxf_resolve_strong_ref(mxf, strong_ref, AnyType); + if (!component) + return NULL; + switch (component->meta.type) { + case SourceClip: + return component; + case EssenceGroup: + return mxf_resolve_essence_group_choice(mxf, (MXFEssenceGroup*) component); + default: + break; + } return NULL; } @@ -2773,7 +2782,8 @@ st->id = material_track->track_id; st->priv_data = source_track; - descriptor = mxf_resolve_descriptor(mxf, &source_package->descriptor_ref, source_track->track_id); + source_package->descriptor = mxf_resolve_strong_ref(mxf, &source_package->descriptor_ref, AnyType); + descriptor = mxf_resolve_multidescriptor(mxf, source_package->descriptor, source_track->track_id); /* A SourceClip from a EssenceGroup may only be a single frame of essence data. The clips duration is then how many * frames its suppose to repeat for. Descriptor->duration, if present, contains the real duration of the essence data */ @@ -3064,7 +3074,6 @@ if (container_ul->desc) av_dict_set(&st->metadata, "data_type", container_ul->desc, 0); if (mxf->eia608_extract && - container_ul->desc && !strcmp(container_ul->desc, "vbi_vanc_smpte_436M")) { st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; st->codecpar->codec_id = AV_CODEC_ID_EIA_608; @@ -3238,7 +3247,7 @@ { { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x04,0x04,0x00 }, mxf_read_partition_pack }, { { 0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x2f,0x00 }, mxf_read_preface_metadata }, { { 0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x30,0x00 }, mxf_read_identification_metadata }, - { { 0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x18,0x00 }, mxf_read_content_storage }, + { { 0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x18,0x00 }, mxf_read_content_storage, 0, AnyType }, { { 0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x37,0x00 }, mxf_read_package, sizeof(MXFPackage), SourcePackage }, { { 0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x36,0x00 }, mxf_read_package, sizeof(MXFPackage), MaterialPackage },
View file
ffmpeg-6.1.2.tar.xz/libavformat/mxfenc.c -> ffmpeg-6.1.1.tar.xz/libavformat/mxfenc.c
Changed
@@ -2495,6 +2495,9 @@ v = get_ffv1_unsigned_symbol(&c, state); av_assert0(v >= 2); if (v > 4) { + return 0; + } + if (v > 4) { av_log(s, AV_LOG_ERROR, "unsupported ffv1 version %d\n", v); return 0; }
View file
ffmpeg-6.1.2.tar.xz/libavformat/nsvdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/nsvdec.c
Changed
@@ -615,7 +615,7 @@ pkt = &nsv->aheadNSV_ST_AUDIO; /* read raw audio specific header on the first audio chunk... */ /* on ALL audio chunks ?? seems so! */ - if (asize >= 4 && stNSV_ST_AUDIO->codecpar->codec_tag == MKTAG('P', 'C', 'M', ' ')/* && fill_header*/) { + if (asize && stNSV_ST_AUDIO->codecpar->codec_tag == MKTAG('P', 'C', 'M', ' ')/* && fill_header*/) { uint8_t bps; uint8_t channels; uint16_t samplerate;
View file
ffmpeg-6.1.2.tar.xz/libavformat/rdt.c -> ffmpeg-6.1.1.tar.xz/libavformat/rdt.c
Changed
@@ -204,8 +204,6 @@ return -1; /* not followed by a data packet */ pkt_len = AV_RB16(buf+3); - if (pkt_len > len) - return AVERROR_INVALIDDATA; buf += pkt_len; len -= pkt_len; consumed += pkt_len;
View file
ffmpeg-6.1.2.tar.xz/libavformat/rmdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/rmdec.c
Changed
@@ -267,9 +267,9 @@ case DEINT_ID_INT4: if (ast->coded_framesize > ast->audio_framesize || sub_packet_h <= 1 || - ast->coded_framesize * (uint64_t)sub_packet_h > (2LL + (sub_packet_h & 1)) * ast->audio_framesize) + ast->coded_framesize * (uint64_t)sub_packet_h > (2 + (sub_packet_h & 1)) * ast->audio_framesize) return AVERROR_INVALIDDATA; - if (ast->coded_framesize * (uint64_t)sub_packet_h != 2LL*ast->audio_framesize) { + if (ast->coded_framesize * (uint64_t)sub_packet_h != 2*ast->audio_framesize) { avpriv_request_sample(s, "mismatching interleaver parameters"); return AVERROR_INVALIDDATA; }
View file
ffmpeg-6.1.2.tar.xz/libavformat/rpl.c -> ffmpeg-6.1.1.tar.xz/libavformat/rpl.c
Changed
@@ -117,7 +117,7 @@ AVIOContext *pb = s->pb; RPLContext *rpl = s->priv_data; AVStream *vst = NULL, *ast = NULL; - int64_t total_audio_size; + int total_audio_size; int error = 0; const char *endptr; char audio_typeRPL_LINE_LENGTH; @@ -302,8 +302,6 @@ if (ast) av_add_index_entry(ast, offset + video_size, total_audio_size, audio_size, audio_size * 8, 0); - if (total_audio_size/8 + (uint64_t)audio_size >= INT64_MAX/8) - return AVERROR_INVALIDDATA; total_audio_size += audio_size * 8; }
View file
ffmpeg-6.1.2.tar.xz/libavformat/rtmppkt.c -> ffmpeg-6.1.1.tar.xz/libavformat/rtmppkt.c
Changed
@@ -441,6 +441,7 @@ { AMFDataType type; unsigned nb = -1; + int parse_key = 1; if (bytestream2_get_bytes_left(gb) < 1) return -1; @@ -465,12 +466,13 @@ bytestream2_skip(gb, 10); return 0; case AMF_DATA_TYPE_ARRAY: + parse_key = 0; case AMF_DATA_TYPE_MIXEDARRAY: nb = bytestream2_get_be32(gb); case AMF_DATA_TYPE_OBJECT: - while (type != AMF_DATA_TYPE_ARRAY || nb-- > 0) { + while (nb-- > 0 || type != AMF_DATA_TYPE_ARRAY) { int t; - if (type != AMF_DATA_TYPE_ARRAY) { + if (parse_key) { int size = bytestream2_get_be16(gb); if (!size) { bytestream2_get_byte(gb);
View file
ffmpeg-6.1.2.tar.xz/libavformat/rtpenc_rfc4175.c -> ffmpeg-6.1.1.tar.xz/libavformat/rtpenc_rfc4175.c
Changed
@@ -116,7 +116,7 @@ int l_field; int l_line; int l_off; - int64_t copy_offset; + int copy_offset; length = (headers0 << 8) | headers1; l_field = (headers2 & 0x80) >> 7; @@ -127,7 +127,7 @@ if (interlaced) l_line = 2 * l_line + l_field; - copy_offset = (l_line * (int64_t)width + l_off) * pgroup / xinc; + copy_offset = (l_line * width + l_off) * pgroup / xinc; if (copy_offset + length > size) break; memcpy (dest, buf + copy_offset, length);
View file
ffmpeg-6.1.2.tar.xz/libavformat/rtpenc_vc2hq.c -> ffmpeg-6.1.1.tar.xz/libavformat/rtpenc_vc2hq.c
Changed
@@ -45,7 +45,7 @@ ff_rtp_send_data(ctx, rtp_ctx->buf, RTP_VC2HQ_PL_HEADER_SIZE + info_hdr_size + size, rtp_m); } -static int send_picture(AVFormatContext *ctx, const uint8_t *buf, int size, int interlaced) +static void send_picture(AVFormatContext *ctx, const uint8_t *buf, int size, int interlaced) { RTPMuxContext *rtp_ctx = ctx->priv_data; GetBitContext gc; @@ -54,9 +54,6 @@ uint16_t frag_len; char *info_hdr = &rtp_ctx->buf4; - if (size < DIRAC_PIC_NR_SIZE) - return AVERROR(EINVAL); - pic_nr = AV_RB32(&buf0); buf += DIRAC_PIC_NR_SIZE; size -= DIRAC_PIC_NR_SIZE; @@ -100,7 +97,6 @@ send_packet(ctx, DIRAC_RTP_PCODE_HQ_PIC_FRAGMENT, 16, buf, frag_len, interlaced, second_field, size > 0 ? 0 : 1); buf += frag_len; } - return 0; } void ff_rtp_send_vc2hq(AVFormatContext *ctx, const uint8_t *frame_buf, int frame_size, int interlaced) @@ -114,21 +110,16 @@ parse_code = unit4; unit_size = AV_RB32(&unit5); - if (unit_size > end - unit) - break; - switch (parse_code) { /* sequence header */ /* end of sequence */ case DIRAC_PCODE_SEQ_HEADER: case DIRAC_PCODE_END_SEQ: - if (unit_size >= DIRAC_DATA_UNIT_HEADER_SIZE) - send_packet(ctx, parse_code, 0, unit + DIRAC_DATA_UNIT_HEADER_SIZE, unit_size - DIRAC_DATA_UNIT_HEADER_SIZE, 0, 0, 0); + send_packet(ctx, parse_code, 0, unit + DIRAC_DATA_UNIT_HEADER_SIZE, unit_size - DIRAC_DATA_UNIT_HEADER_SIZE, 0, 0, 0); break; /* HQ picture */ case DIRAC_PCODE_PICTURE_HQ: - if (unit_size >= DIRAC_DATA_UNIT_HEADER_SIZE) - send_picture(ctx, unit + DIRAC_DATA_UNIT_HEADER_SIZE, unit_size - DIRAC_DATA_UNIT_HEADER_SIZE, interlaced); + send_picture(ctx, unit + DIRAC_DATA_UNIT_HEADER_SIZE, unit_size - DIRAC_DATA_UNIT_HEADER_SIZE, interlaced); break; /* parse codes without specification */ case DIRAC_PCODE_AUX:
View file
ffmpeg-6.1.2.tar.xz/libavformat/rtsp.c -> ffmpeg-6.1.1.tar.xz/libavformat/rtsp.c
Changed
@@ -1427,7 +1427,7 @@ cur_auth_type = rt->auth_state.auth_type; if ((ret = rtsp_send_cmd_with_content_async(s, method, url, header, send_content, - send_content_length)) < 0) + send_content_length))) return ret; if ((ret = ff_rtsp_read_reply(s, reply, content_ptr, 0, method) ) < 0) @@ -1460,8 +1460,6 @@ char cmdMAX_URL_SIZE; const char *trans_pref; - memset(&reply1, 0, sizeof(reply1)); - if (rt->transport == RTSP_TRANSPORT_RDT) trans_pref = "x-pn-tng"; else if (rt->transport == RTSP_TRANSPORT_RAW) @@ -1576,11 +1574,7 @@ else if (lower_transport == RTSP_LOWER_TRANSPORT_UDP_MULTICAST) { snprintf(transport, sizeof(transport) - 1, "%s/UDP;multicast", trans_pref); - } else { - err = AVERROR(EINVAL); - goto fail; // transport would be uninitialized } - if (s->oformat) { av_strlcat(transport, ";mode=record", sizeof(transport)); } else if (rt->server_type == RTSP_SERVER_REAL ||
View file
ffmpeg-6.1.2.tar.xz/libavformat/sapdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/sapdec.c
Changed
@@ -196,9 +196,6 @@ struct pollfd p = {fd, POLLIN, 0}; uint8_t recvbufRTP_MAX_PACKET_LENGTH; - if (fd < 0) - return fd; - if (sap->eof) return AVERROR_EOF;
View file
ffmpeg-6.1.2.tar.xz/libavformat/sauce.c -> ffmpeg-6.1.1.tar.xz/libavformat/sauce.c
Changed
@@ -34,12 +34,7 @@ AVIOContext *pb = avctx->pb; char buf36; int datatype, filetype, t1, t2, nb_comments; - int64_t start_pos = avio_size(pb); - - if (start_pos < 128) - return AVERROR_INVALIDDATA; - - start_pos -= 128; + uint64_t start_pos = avio_size(pb) - 128; avio_seek(pb, start_pos, SEEK_SET); if (avio_read(pb, buf, 7) != 7)
View file
ffmpeg-6.1.2.tar.xz/libavformat/sbgdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/sbgdec.c
Changed
@@ -386,7 +386,7 @@ case 'L': FORWARD_ERROR(parse_optarg(p, opt, &oarg)); r = str_to_time(oarg.s, &p->scs.opt_duration); - if (oarg.e != oarg.s + r || p->scs.opt_duration < 0) { + if (oarg.e != oarg.s + r) { snprintf(p->err_msg, sizeof(p->err_msg), "syntax error for option -L"); return AVERROR_INVALIDDATA;
View file
ffmpeg-6.1.2.tar.xz/libavformat/sdp.c -> ffmpeg-6.1.1.tar.xz/libavformat/sdp.c
Changed
@@ -202,8 +202,6 @@ continue; } if (p != (psets + strlen(pset_string))) { - if (p - psets >= MAX_PSET_SIZE) - goto fail_in_loop; *p = ','; p++; } @@ -214,7 +212,6 @@ if (!av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r)) { av_log(s, AV_LOG_ERROR, "Cannot Base64-encode %"PTRDIFF_SPECIFIER" %"PTRDIFF_SPECIFIER"!\n", MAX_PSET_SIZE - (p - psets), r1 - r); -fail_in_loop: av_free(psets); av_free(tmpbuf);
View file
ffmpeg-6.1.2.tar.xz/libavformat/siff.c -> ffmpeg-6.1.1.tar.xz/libavformat/siff.c
Changed
@@ -198,10 +198,7 @@ if (c->cur_frame >= c->frames) return AVERROR_EOF; if (c->curstrm == -1) { - unsigned pktsize = avio_rl32(s->pb); - if (pktsize < 4) - return AVERROR_INVALIDDATA; - c->pktsize = pktsize - 4; + c->pktsize = avio_rl32(s->pb) - 4; c->flags = avio_rl16(s->pb); if (c->flags & VB_HAS_AUDIO && !c->has_audio) return AVERROR_INVALIDDATA;
View file
ffmpeg-6.1.2.tar.xz/libavformat/subfile.c -> ffmpeg-6.1.1.tar.xz/libavformat/subfile.c
Changed
@@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/opt.h" #include "url.h" @@ -124,9 +123,9 @@ return end; } - switch (whence) { - case AVSEEK_SIZE: + if (whence == AVSEEK_SIZE) return end - c->start; + switch (whence) { case SEEK_SET: new_pos = c->start + pos; break; @@ -136,8 +135,6 @@ case SEEK_END: new_pos = end + pos; break; - default: - av_assert0(0); } if (new_pos < c->start) return AVERROR(EINVAL);
View file
ffmpeg-6.1.2.tar.xz/libavformat/tls_schannel.c -> ffmpeg-6.1.1.tar.xz/libavformat/tls_schannel.c
Changed
@@ -388,7 +388,7 @@ SECURITY_STATUS sspi_ret = SEC_E_OK; SecBuffer inbuf4; SecBufferDesc inbuf_desc; - int size, ret = 0; + int size, ret; int min_enc_buf_size = len + SCHANNEL_FREE_BUFFER_SIZE; /* If we have some left-over data from previous network activity,
View file
ffmpeg-6.1.2.tar.xz/libavformat/tty.c -> ffmpeg-6.1.1.tar.xz/libavformat/tty.c
Changed
@@ -122,16 +122,13 @@ s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1); if (avctx->pb->seekable & AVIO_SEEKABLE_NORMAL) { - int64_t fsize = avio_size(avctx->pb); - if (fsize > 0) { - s->fsize = fsize; - st->duration = (s->fsize + s->chars_per_frame - 1) / s->chars_per_frame; + s->fsize = avio_size(avctx->pb); + st->duration = (s->fsize + s->chars_per_frame - 1) / s->chars_per_frame; - if (ff_sauce_read(avctx, &s->fsize, 0, 0) < 0) - efi_read(avctx, s->fsize - 51); + if (ff_sauce_read(avctx, &s->fsize, 0, 0) < 0) + efi_read(avctx, s->fsize - 51); - avio_seek(avctx->pb, 0, SEEK_SET); - } + avio_seek(avctx->pb, 0, SEEK_SET); } fail:
View file
ffmpeg-6.1.2.tar.xz/libavformat/ty.c -> ffmpeg-6.1.1.tar.xz/libavformat/ty.c
Changed
@@ -47,7 +47,7 @@ #define CHUNK_PEEK_COUNT 3 /* number of chunks to probe */ typedef struct TyRecHdr { - int32_t rec_size; + int64_t rec_size; uint8_t ex2; uint8_t rec_type; uint8_t subrec_type;
View file
ffmpeg-6.1.2.tar.xz/libavformat/usmdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/usmdec.c
Changed
@@ -119,7 +119,7 @@ for (int i = 0; i < nb_items; i++) { GetByteContext *xgb; uint8_t key256; - int64_t value = -1; + int64_t value; int n = 0; type = bytestream2_get_byte(&gb);
View file
ffmpeg-6.1.2.tar.xz/libavformat/wady.c -> ffmpeg-6.1.1.tar.xz/libavformat/wady.c
Changed
@@ -32,8 +32,7 @@ return 0; if (p->buf4 != 0 || p->buf5 == 0 || AV_RL16(p->buf+6) == 0 || - AV_RL16(p->buf+6) > 2 || - (int32_t)AV_RL32(p->buf+8) <= 0) + AV_RL32(p->buf+8) == 0) return 0; return AVPROBE_SCORE_MAX / 3 * 2;
View file
ffmpeg-6.1.2.tar.xz/libavformat/wavdec.c -> ffmpeg-6.1.1.tar.xz/libavformat/wavdec.c
Changed
@@ -34,7 +34,6 @@ #include "libavutil/log.h" #include "libavutil/mathematics.h" #include "libavutil/opt.h" -#include "libavcodec/internal.h" #include "avformat.h" #include "avio.h" #include "avio_internal.h" @@ -445,7 +444,7 @@ } if (rf64 || bw64) { - next_tag_ofs = wav->data_end = av_sat_add64(avio_tell(pb), data_size); + next_tag_ofs = wav->data_end = avio_tell(pb) + data_size; } else if (size != 0xFFFFFFFF) { data_size = size; next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX; @@ -900,9 +899,7 @@ if (ret < 0) return ret; avio_skip(pb, FFALIGN(size, INT64_C(8)) - size); - if (st->codecpar->block_align && - st->codecpar->ch_layout.nb_channels < FF_SANE_NB_CHANNELS && - st->codecpar->bits_per_coded_sample < 128) { + if (st->codecpar->block_align) { int block_align = st->codecpar->block_align; block_align = FFMAX(block_align,
View file
ffmpeg-6.1.2.tar.xz/libavformat/westwood_vqa.c -> ffmpeg-6.1.1.tar.xz/libavformat/westwood_vqa.c
Changed
@@ -262,7 +262,7 @@ break; case SND2_TAG: /* 2 samples/byte, 1 or 2 samples per frame depending on stereo */ - pkt->duration = (chunk_size * 2LL) / wsvqa->channels; + pkt->duration = (chunk_size * 2) / wsvqa->channels; break; } break;
View file
ffmpeg-6.1.2.tar.xz/libavformat/xmv.c -> ffmpeg-6.1.1.tar.xz/libavformat/xmv.c
Changed
@@ -219,8 +219,6 @@ /* Initialize the packet context */ xmv->next_packet_offset = avio_tell(pb); - if (this_packet_size < xmv->next_packet_offset) - return AVERROR_INVALIDDATA; xmv->next_packet_size = this_packet_size - xmv->next_packet_offset; xmv->stream_count = xmv->audio_track_count + 1;
View file
ffmpeg-6.1.2.tar.xz/libavutil/aarch64/cpu.c -> ffmpeg-6.1.1.tar.xz/libavutil/aarch64/cpu.c
Changed
@@ -82,44 +82,6 @@ return flags; } -#elif defined(__OpenBSD__) -#include <machine/armreg.h> -#include <machine/cpu.h> -#include <sys/types.h> -#include <sys/sysctl.h> - -static int detect_flags(void) -{ - int flags = 0; - -#ifdef CPU_ID_AA64ISAR0 - int mib2; - uint64_t isar0; - uint64_t isar1; - size_t len; - - mib0 = CTL_MACHDEP; - mib1 = CPU_ID_AA64ISAR0; - len = sizeof(isar0); - if (sysctl(mib, 2, &isar0, &len, NULL, 0) != -1) { - if (ID_AA64ISAR0_DP(isar0) >= ID_AA64ISAR0_DP_IMPL) - flags |= AV_CPU_FLAG_DOTPROD; - } - - mib0 = CTL_MACHDEP; - mib1 = CPU_ID_AA64ISAR1; - len = sizeof(isar1); - if (sysctl(mib, 2, &isar1, &len, NULL, 0) != -1) { -#ifdef ID_AA64ISAR1_I8MM_IMPL - if (ID_AA64ISAR1_I8MM(isar1) >= ID_AA64ISAR1_I8MM_IMPL) - flags |= AV_CPU_FLAG_I8MM; -#endif - } -#endif - - return flags; -} - #elif defined(_WIN32) #include <windows.h>
View file
ffmpeg-6.1.2.tar.xz/libavutil/base64.c -> ffmpeg-6.1.1.tar.xz/libavutil/base64.c
Changed
@@ -127,12 +127,10 @@ } out3: - if (end - dst) - *dst++ = v >> 10; + *dst++ = v >> 10; v <<= 2; out2: - if (end - dst) - *dst++ = v >> 4; + *dst++ = v >> 4; out1: out0: return bits & 1 ? AVERROR_INVALIDDATA : out ? dst - out : 0;
View file
ffmpeg-6.1.2.tar.xz/libavutil/buffer.c -> ffmpeg-6.1.1.tar.xz/libavutil/buffer.c
Changed
@@ -264,10 +264,7 @@ if (!pool) return NULL; - if (ff_mutex_init(&pool->mutex, NULL)) { - av_free(pool); - return NULL; - } + ff_mutex_init(&pool->mutex, NULL); pool->size = size; pool->opaque = opaque; @@ -286,10 +283,7 @@ if (!pool) return NULL; - if (ff_mutex_init(&pool->mutex, NULL)) { - av_free(pool); - return NULL; - } + ff_mutex_init(&pool->mutex, NULL); pool->size = size; pool->alloc = alloc ? alloc : av_buffer_alloc;
View file
ffmpeg-6.1.2.tar.xz/libavutil/frame.c -> ffmpeg-6.1.1.tar.xz/libavutil/frame.c
Changed
@@ -1040,7 +1040,7 @@ if (log2_crop_align < min_log2_align) return AVERROR_BUG; - if (min_log2_align < 5 && log2_crop_align != INT_MAX) { + if (min_log2_align < 5) { frame->crop_left &= ~((1 << (5 + log2_crop_align - min_log2_align)) - 1); calc_cropping_offsets(offsets, frame, desc); }
View file
ffmpeg-6.1.2.tar.xz/libavutil/hwcontext_d3d11va.c -> ffmpeg-6.1.1.tar.xz/libavutil/hwcontext_d3d11va.c
Changed
@@ -62,9 +62,7 @@ return; mD3D11CreateDevice = (PFN_D3D11_CREATE_DEVICE) GetProcAddress(d3dlib, "D3D11CreateDevice"); - mCreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY) GetProcAddress(dxgilib, "CreateDXGIFactory1"); - if (!mCreateDXGIFactory) - mCreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY) GetProcAddress(dxgilib, "CreateDXGIFactory"); + mCreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY) GetProcAddress(dxgilib, "CreateDXGIFactory"); #else // In UWP (which lacks LoadLibrary), CreateDXGIFactory isn't available, // only CreateDXGIFactory1 @@ -184,7 +182,6 @@ sizeof(*frames_hwctx->texture_infos)); if (!frames_hwctx->texture_infos) { ID3D11Texture2D_Release(tex); - av_free(desc); return NULL; } s->nb_surfaces = s->nb_surfaces_used + 1; @@ -197,7 +194,7 @@ desc->texture = tex; desc->index = index; - buf = av_buffer_create((uint8_t *)desc, sizeof(*desc), free_texture, tex, 0); + buf = av_buffer_create((uint8_t *)desc, sizeof(desc), free_texture, tex, 0); if (!buf) { ID3D11Texture2D_Release(tex); av_free(desc);
View file
ffmpeg-6.1.2.tar.xz/libavutil/hwcontext_dxva2.c -> ffmpeg-6.1.1.tar.xz/libavutil/hwcontext_dxva2.c
Changed
@@ -141,7 +141,7 @@ if (s->nb_surfaces_used < hwctx->nb_surfaces) { s->nb_surfaces_used++; return av_buffer_create((uint8_t*)s->surfaces_internals->nb_surfaces_used - 1, - sizeof(**hwctx->surfaces), dxva2_pool_release_dummy, 0, 0); + sizeof(*hwctx->surfaces), dxva2_pool_release_dummy, 0, 0); } return NULL;
View file
ffmpeg-6.1.2.tar.xz/libavutil/hwcontext_qsv.c -> ffmpeg-6.1.1.tar.xz/libavutil/hwcontext_qsv.c
Changed
@@ -36,7 +36,6 @@ #include "hwcontext_d3d11va.h" #endif #if CONFIG_DXVA2 -#include <initguid.h> #include "hwcontext_dxva2.h" #endif @@ -674,7 +673,7 @@ IDXGIDevice *pDXGIDevice = NULL; HRESULT hr; ID3D11Device *device = handle; - mfxVariant impl_value = {0}; + mfxVariant impl_value; hr = ID3D11Device_QueryInterface(device, &IID_IDXGIDevice, (void**)&pDXGIDevice); if (SUCCEEDED(hr)) { @@ -740,15 +739,13 @@ #if CONFIG_DXVA2 mfxStatus sts; IDirect3DDeviceManager9* devmgr = handle; - IDirect3DDevice9 *device = NULL; - IDirect3DDevice9Ex *device_ex = NULL; + IDirect3DDevice9Ex *device = NULL; HANDLE device_handle = 0; IDirect3D9Ex *d3d9ex = NULL; - IDirect3D9 *d3d9 = NULL; LUID luid; D3DDEVICE_CREATION_PARAMETERS params; HRESULT hr; - mfxVariant impl_value = {0}; + mfxVariant impl_value; hr = IDirect3DDeviceManager9_OpenDeviceHandle(devmgr, &device_handle); if (FAILED(hr)) { @@ -762,31 +759,18 @@ IDirect3DDeviceManager9_CloseDeviceHandle(devmgr, device_handle); goto fail; } - hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9Ex, (void **)&device_ex); - IDirect3DDevice9_Release(device); - if (FAILED(hr)) { - av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9_QueryInterface %d\n", hr); - goto unlock; - } - hr = IDirect3DDevice9Ex_GetCreationParameters(device_ex, ¶ms); + hr = IDirect3DDevice9Ex_GetCreationParameters(device, ¶ms); if (FAILED(hr)) { av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9_GetCreationParameters %d\n", hr); - IDirect3DDevice9Ex_Release(device_ex); + IDirect3DDevice9Ex_Release(device); goto unlock; } - hr = IDirect3DDevice9Ex_GetDirect3D(device_ex, &d3d9); + hr = IDirect3DDevice9Ex_GetDirect3D(device, &d3d9ex); if (FAILED(hr)) { - av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9Ex_GetDirect3D %d\n", hr); - IDirect3DDevice9Ex_Release(device_ex); - goto unlock; - } - hr = IDirect3D9_QueryInterface(d3d9, &IID_IDirect3D9Ex, (void **)&d3d9ex); - IDirect3D9_Release(d3d9); - if (FAILED(hr)) { - av_log(ctx, AV_LOG_ERROR, "Error IDirect3D9_QueryInterface3D %d\n", hr); - IDirect3DDevice9Ex_Release(device_ex); + av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9Ex_GetAdapterLUID %d\n", hr); + IDirect3DDevice9Ex_Release(device); goto unlock; } @@ -810,7 +794,7 @@ release: IDirect3D9Ex_Release(d3d9ex); - IDirect3DDevice9Ex_Release(device_ex); + IDirect3DDevice9Ex_Release(device); unlock: IDirect3DDeviceManager9_UnlockDevice(devmgr, device_handle, FALSE); @@ -830,7 +814,7 @@ VADisplayAttribute attr = { .type = VADisplayPCIID, }; - mfxVariant impl_value = {0}; + mfxVariant impl_value; vas = vaGetDisplayAttributes(dpy, &attr, 1); if (vas == VA_STATUS_SUCCESS && attr.flags != VA_DISPLAY_ATTRIB_NOT_SUPPORTED) { @@ -871,7 +855,7 @@ mfxStatus sts; mfxLoader loader = NULL; mfxConfig cfg; - mfxVariant impl_value = {0}; + mfxVariant impl_value; *ploader = NULL; loader = MFXLoad(); @@ -1350,9 +1334,8 @@ case AV_HWDEVICE_TYPE_D3D11VA: { D3D11_TEXTURE2D_DESC texDesc; - AVD3D11VAFramesContext *dst_hwctx; dst_ctx->initial_pool_size = src_ctx->initial_pool_size; - dst_hwctx = dst_ctx->hwctx; + AVD3D11VAFramesContext *dst_hwctx = dst_ctx->hwctx; dst_hwctx->texture_infos = av_calloc(src_hwctx->nb_surfaces, sizeof(*dst_hwctx->texture_infos)); if (!dst_hwctx->texture_infos)
View file
ffmpeg-6.1.2.tar.xz/libavutil/imgutils.c -> ffmpeg-6.1.1.tar.xz/libavutil/imgutils.c
Changed
@@ -298,7 +298,7 @@ stride = 8LL*w; stride += 128*8; - if (w==0 || h==0 || w > INT32_MAX || h > INT32_MAX || stride >= INT_MAX || stride*(h + 128ULL) >= INT_MAX) { + if ((int)w<=0 || (int)h<=0 || stride >= INT_MAX || stride*(uint64_t)(h+128) >= INT_MAX) { av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h); return AVERROR(EINVAL); }
View file
ffmpeg-6.1.2.tar.xz/libavutil/ppc/cpu.c -> ffmpeg-6.1.1.tar.xz/libavutil/ppc/cpu.c
Changed
@@ -27,7 +27,7 @@ #if HAVE_UNISTD_H #include <unistd.h> #endif -#elif defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__OpenBSD__) #include <sys/types.h> #include <sys/sysctl.h> #include <machine/cpu.h> @@ -56,8 +56,8 @@ if (result == VECTORTYPE_ALTIVEC) return AV_CPU_FLAG_ALTIVEC; return 0; -#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) -#if defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__APPLE__) || defined(__OpenBSD__) +#ifdef __OpenBSD__ int sels2 = {CTL_MACHDEP, CPU_ALTIVEC}; #else int sels2 = {CTL_HW, HW_VECTORUNIT};
View file
ffmpeg-6.1.2.tar.xz/libavutil/rational.h -> ffmpeg-6.1.1.tar.xz/libavutil/rational.h
Changed
@@ -168,10 +168,6 @@ * In case of infinity, the returned value is expressed as `{1, 0}` or * `{-1, 0}` depending on the sign. * - * In general rational numbers with |num| <= 1<<26 && |den| <= 1<<26 - * can be recovered exactly from their double representation. - * (no exceptions were found within 1B random ones) - * * @param d `double` to convert * @param max Maximum allowed numerator and denominator * @return `d` in AVRational form
View file
ffmpeg-6.1.2.tar.xz/libavutil/slicethread.c -> ffmpeg-6.1.1.tar.xz/libavutil/slicethread.c
Changed
@@ -102,7 +102,6 @@ { AVSliceThread *ctx; int nb_workers, i; - int ret; av_assert0(nb_threads >= 0); if (!nb_threads) { @@ -136,37 +135,16 @@ atomic_init(&ctx->first_job, 0); atomic_init(&ctx->current_job, 0); - ret = pthread_mutex_init(&ctx->done_mutex, NULL); - if (ret) { - av_freep(&ctx->workers); - av_freep(pctx); - return AVERROR(ret); - } - ret = pthread_cond_init(&ctx->done_cond, NULL); - if (ret) { - ctx->nb_threads = main_func ? 0 : 1; - avpriv_slicethread_free(pctx); - return AVERROR(ret); - } + pthread_mutex_init(&ctx->done_mutex, NULL); + pthread_cond_init(&ctx->done_cond, NULL); ctx->done = 0; for (i = 0; i < nb_workers; i++) { WorkerContext *w = &ctx->workersi; int ret; w->ctx = ctx; - ret = pthread_mutex_init(&w->mutex, NULL); - if (ret) { - ctx->nb_threads = main_func ? i : i + 1; - avpriv_slicethread_free(pctx); - return AVERROR(ret); - } - ret = pthread_cond_init(&w->cond, NULL); - if (ret) { - pthread_mutex_destroy(&w->mutex); - ctx->nb_threads = main_func ? i : i + 1; - avpriv_slicethread_free(pctx); - return AVERROR(ret); - } + pthread_mutex_init(&w->mutex, NULL); + pthread_cond_init(&w->cond, NULL); pthread_mutex_lock(&w->mutex); w->done = 0;
View file
ffmpeg-6.1.2.tar.xz/libavutil/tests/base64.c -> ffmpeg-6.1.1.tar.xz/libavutil/tests/base64.c
Changed
@@ -64,16 +64,6 @@ printf("Failed: decode to NULL buffer\n"); return 1; } - if (data_size > 0 && (data2_size = av_base64_decode(data2, encoded, data_size - 1)) != data_size - 1) { - printf("Failed: out of array write\n" - "Encoded:\n%s\n", encoded); - return 1; - } - if (data_size > 1 && (data2_size = av_base64_decode(data2, encoded, data_size - 2)) != data_size - 2) { - printf("Failed: out of array write\n" - "Encoded:\n%s\n", encoded); - return 1; - } if (strlen(encoded)) { char *end = strchr(encoded, '='); if (!end)
View file
ffmpeg-6.1.2.tar.xz/libavutil/tests/dict.c -> ffmpeg-6.1.1.tar.xz/libavutil/tests/dict.c
Changed
@@ -148,15 +148,12 @@ //valgrind sensible test printf("\nTesting av_dict_set() with existing AVDictionaryEntry.key as key\n"); - if (av_dict_set(&dict, "key", "old", 0) < 0) - return 1; + av_dict_set(&dict, "key", "old", 0); e = av_dict_get(dict, "key", NULL, 0); - if (av_dict_set(&dict, e->key, "new val OK", 0) < 0) - return 1; + av_dict_set(&dict, e->key, "new val OK", 0); e = av_dict_get(dict, "key", NULL, 0); printf("%s\n", e->value); - if (av_dict_set(&dict, e->key, e->value, 0) < 0) - return 1; + av_dict_set(&dict, e->key, e->value, 0); e = av_dict_get(dict, "key", NULL, 0); printf("%s\n", e->value); av_dict_free(&dict);
View file
ffmpeg-6.1.2.tar.xz/libavutil/tests/opt.c -> ffmpeg-6.1.1.tar.xz/libavutil/tests/opt.c
Changed
@@ -217,7 +217,6 @@ { TestContext test_ctx = { 0 }; char *buf; - int ret; test_ctx.class = &test_class; av_log_set_level(AV_LOG_QUIET); @@ -228,10 +227,8 @@ av_opt_free(&test_ctx); memset(&test_ctx, 0, sizeof(test_ctx)); test_ctx.class = &test_class; - ret = av_set_options_string(&test_ctx, buf, "=", ","); + av_set_options_string(&test_ctx, buf, "=", ","); av_free(buf); - if (ret < 0) - printf("Error ret '%d'\n", ret); if (av_opt_serialize(&test_ctx, 0, 0, &buf, '=', ',') >= 0) { printf("%s\n", buf); av_free(buf);
View file
ffmpeg-6.1.2.tar.xz/libavutil/thread.h -> ffmpeg-6.1.1.tar.xz/libavutil/thread.h
Changed
@@ -26,8 +26,6 @@ #if HAVE_PRCTL #include <sys/prctl.h> -#elif (HAVE_PTHREAD_SETNAME_NP || HAVE_PTHREAD_SET_NAME_NP) && HAVE_PTHREAD_NP_H -#include <pthread_np.h> #endif #include "error.h" @@ -215,25 +213,11 @@ static inline int ff_thread_setname(const char *name) { - int ret = 0; - #if HAVE_PRCTL - ret = AVERROR(prctl(PR_SET_NAME, name)); -#elif HAVE_PTHREAD_SETNAME_NP -#if defined(__APPLE__) - ret = AVERROR(pthread_setname_np(name)); -#elif defined(__NetBSD__) - ret = AVERROR(pthread_setname_np(pthread_self(), "%s", name)); -#else - ret = AVERROR(pthread_setname_np(pthread_self(), name)); -#endif -#elif HAVE_PTHREAD_SET_NAME_NP - pthread_set_name_np(pthread_self(), name); -#else - ret = AVERROR(ENOSYS); + return AVERROR(prctl(PR_SET_NAME, name)); #endif - return ret; + return AVERROR(ENOSYS); } #endif /* AVUTIL_THREAD_H */
View file
ffmpeg-6.1.2.tar.xz/libavutil/timecode.c -> ffmpeg-6.1.1.tar.xz/libavutil/timecode.c
Changed
@@ -100,12 +100,11 @@ return tc; } -char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum_arg) +char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum) { int fps = tc->fps; int drop = tc->flags & AV_TIMECODE_FLAG_DROPFRAME; int hh, mm, ss, ff, ff_len, neg = 0; - int64_t framenum = framenum_arg; framenum += tc->start; if (drop) @@ -211,7 +210,7 @@ { if (!rate.den || !rate.num) return -1; - return (rate.num + rate.den/2LL) / rate.den; + return (rate.num + rate.den/2) / rate.den; } int av_timecode_check_frame_rate(AVRational rate)
View file
ffmpeg-6.1.2.tar.xz/libavutil/wchar_filename.h -> ffmpeg-6.1.1.tar.xz/libavutil/wchar_filename.h
Changed
@@ -57,7 +57,7 @@ errno = EINVAL; return -1; } - *filename = av_malloc_array(num_chars, sizeof **filename); + *filename = (char*)av_malloc_array(num_chars, sizeof *filename); if (!*filename) { errno = ENOMEM; return -1;
View file
ffmpeg-6.1.2.tar.xz/libswresample/resample.c -> ffmpeg-6.1.1.tar.xz/libswresample/resample.c
Changed
@@ -357,8 +357,8 @@ *consumed = 0; if (c->filter_length == 1 && c->phase_count == 1) { - int64_t index2= (1LL<<32)*c->frac/c->src_incr + (1LL<<32)*c->index + 1; - int64_t incr= (1LL<<32) * c->dst_incr / c->src_incr + 1; + int64_t index2= (1LL<<32)*c->frac/c->src_incr + (1LL<<32)*c->index; + int64_t incr= (1LL<<32) * c->dst_incr / c->src_incr; int new_size = (src_size * (int64_t)c->src_incr - c->frac + c->dst_incr - 1) / c->dst_incr; dst_size = FFMAX(FFMIN(dst_size, new_size), 0);
View file
ffmpeg-6.1.2.tar.xz/libswscale/loongarch/swscale_init_loongarch.c -> ffmpeg-6.1.1.tar.xz/libswscale/loongarch/swscale_init_loongarch.c
Changed
@@ -93,64 +93,60 @@ int cpu_flags = av_get_cpu_flags(); #if HAVE_LASX if (have_lasx(cpu_flags)) { - if (c->srcFormat == AV_PIX_FMT_YUV420P) { - switch (c->dstFormat) { - case AV_PIX_FMT_RGB24: - return yuv420_rgb24_lasx; - case AV_PIX_FMT_BGR24: - return yuv420_bgr24_lasx; - case AV_PIX_FMT_RGBA: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_rgba32_lasx; - case AV_PIX_FMT_ARGB: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_argb32_lasx; - case AV_PIX_FMT_BGRA: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_bgra32_lasx; - case AV_PIX_FMT_ABGR: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_abgr32_lasx; - } + switch (c->dstFormat) { + case AV_PIX_FMT_RGB24: + return yuv420_rgb24_lasx; + case AV_PIX_FMT_BGR24: + return yuv420_bgr24_lasx; + case AV_PIX_FMT_RGBA: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_rgba32_lasx; + case AV_PIX_FMT_ARGB: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_argb32_lasx; + case AV_PIX_FMT_BGRA: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_bgra32_lasx; + case AV_PIX_FMT_ABGR: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_abgr32_lasx; } } #endif // #if HAVE_LASX if (have_lsx(cpu_flags)) { - if (c->srcFormat == AV_PIX_FMT_YUV420P) { - switch (c->dstFormat) { - case AV_PIX_FMT_RGB24: - return yuv420_rgb24_lsx; - case AV_PIX_FMT_BGR24: - return yuv420_bgr24_lsx; - case AV_PIX_FMT_RGBA: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_rgba32_lsx; - case AV_PIX_FMT_ARGB: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_argb32_lsx; - case AV_PIX_FMT_BGRA: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_bgra32_lsx; - case AV_PIX_FMT_ABGR: - if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { - break; - } else - return yuv420_abgr32_lsx; - } + switch (c->dstFormat) { + case AV_PIX_FMT_RGB24: + return yuv420_rgb24_lsx; + case AV_PIX_FMT_BGR24: + return yuv420_bgr24_lsx; + case AV_PIX_FMT_RGBA: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_rgba32_lsx; + case AV_PIX_FMT_ARGB: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_argb32_lsx; + case AV_PIX_FMT_BGRA: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_bgra32_lsx; + case AV_PIX_FMT_ABGR: + if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) { + break; + } else + return yuv420_abgr32_lsx; } } return NULL;
View file
ffmpeg-6.1.2.tar.xz/libswscale/loongarch/yuv2rgb_lasx.c -> ffmpeg-6.1.1.tar.xz/libswscale/loongarch/yuv2rgb_lasx.c
Changed
@@ -82,8 +82,8 @@ #define YUV2RGB_RES \ m_y1 = __lasx_xvldrepl_d(py_1, 0); \ m_y2 = __lasx_xvldrepl_d(py_2, 0); \ - m_u = __lasx_xvldrepl_w(pu, 0); \ - m_v = __lasx_xvldrepl_w(pv, 0); \ + m_u = __lasx_xvldrepl_d(pu, 0); \ + m_v = __lasx_xvldrepl_d(pv, 0); \ m_y1 = __lasx_xvilvl_d(m_y2, m_y1); \ m_u = __lasx_xvilvl_b(m_u, m_u); \ m_v = __lasx_xvilvl_b(m_v, m_v); \
View file
ffmpeg-6.1.2.tar.xz/libswscale/output.c -> ffmpeg-6.1.1.tar.xz/libswscale/output.c
Changed
@@ -1059,8 +1059,8 @@ for (i = 0; i < ((dstW + 1) >> 1); i++) { int j; - unsigned Y1 = -0x40000000; - unsigned Y2 = -0x40000000; + int Y1 = -0x40000000; + int Y2 = -0x40000000; int U = -(128 << 23); // 19 int V = -(128 << 23); int R, G, B; @@ -1088,9 +1088,9 @@ } // 8 bits: 12+15=27; 16 bits: 12+19=31 - Y1 = (int)Y1 >> 14; // 10 + Y1 >>= 14; // 10 Y1 += 0x10000; - Y2 = (int)Y2 >> 14; + Y2 >>= 14; Y2 += 0x10000; U >>= 14; V >>= 14; @@ -1109,20 +1109,20 @@ B = U * c->yuv2rgb_u2b_coeff; // 8 bits: 30 - 22 = 8 bits, 16 bits: 30 bits - 14 = 16 bits - output_pixel(&dest0, av_clip_uintp2(((int)(R_B + Y1) >> 14) + (1<<15), 16)); - output_pixel(&dest1, av_clip_uintp2(((int)( G + Y1) >> 14) + (1<<15), 16)); - output_pixel(&dest2, av_clip_uintp2(((int)(B_R + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest0, av_clip_uintp2(((R_B + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest1, av_clip_uintp2((( G + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest2, av_clip_uintp2(((B_R + Y1) >> 14) + (1<<15), 16)); if (eightbytes) { output_pixel(&dest3, av_clip_uintp2(A1 , 30) >> 14); - output_pixel(&dest4, av_clip_uintp2(((int)(R_B + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest5, av_clip_uintp2(((int)( G + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest6, av_clip_uintp2(((int)(B_R + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest4, av_clip_uintp2(((R_B + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest5, av_clip_uintp2((( G + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest6, av_clip_uintp2(((B_R + Y2) >> 14) + (1<<15), 16)); output_pixel(&dest7, av_clip_uintp2(A2 , 30) >> 14); dest += 8; } else { - output_pixel(&dest3, av_clip_uintp2(((int)(R_B + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest4, av_clip_uintp2(((int)( G + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest5, av_clip_uintp2(((int)(B_R + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest3, av_clip_uintp2(((R_B + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest4, av_clip_uintp2((( G + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest5, av_clip_uintp2(((B_R + Y2) >> 14) + (1<<15), 16)); dest += 6; } } @@ -1207,8 +1207,8 @@ if (uvalpha < 2048) { for (i = 0; i < ((dstW + 1) >> 1); i++) { - SUINT Y1 = (buf0i * 2 ) >> 2; - SUINT Y2 = (buf0i * 2 + 1) >> 2; + int Y1 = (buf0i * 2 ) >> 2; + int Y2 = (buf0i * 2 + 1) >> 2; int U = (ubuf0i - (128 << 11)) >> 2; int V = (vbuf0i - (128 << 11)) >> 2; int R, G, B; @@ -1221,8 +1221,8 @@ Y2 += (1 << 13) - (1 << 29); if (hasAlpha) { - A1 = abuf0i * 2 * (1 << 11); - A2 = abuf0i * 2 + 1 * (1 << 11); + A1 = abuf0i * 2 << 11; + A2 = abuf0i * 2 + 1 << 11; A1 += 1 << 13; A2 += 1 << 13; @@ -1232,20 +1232,20 @@ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; B = U * c->yuv2rgb_u2b_coeff; - output_pixel(&dest0, av_clip_uintp2(((int)(R_B + Y1) >> 14) + (1<<15), 16)); - output_pixel(&dest1, av_clip_uintp2(((int)( G + Y1) >> 14) + (1<<15), 16)); - output_pixel(&dest2, av_clip_uintp2(((int)(B_R + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest0, av_clip_uintp2(((R_B + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest1, av_clip_uintp2((( G + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest2, av_clip_uintp2(((B_R + Y1) >> 14) + (1<<15), 16)); if (eightbytes) { output_pixel(&dest3, av_clip_uintp2(A1 , 30) >> 14); - output_pixel(&dest4, av_clip_uintp2(((int)(R_B + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest5, av_clip_uintp2(((int)( G + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest6, av_clip_uintp2(((int)(B_R + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest4, av_clip_uintp2(((R_B + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest5, av_clip_uintp2((( G + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest6, av_clip_uintp2(((B_R + Y2) >> 14) + (1<<15), 16)); output_pixel(&dest7, av_clip_uintp2(A2 , 30) >> 14); dest += 8; } else { - output_pixel(&dest3, av_clip_uintp2(((int)(R_B + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest4, av_clip_uintp2(((int)( G + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest5, av_clip_uintp2(((int)(B_R + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest3, av_clip_uintp2(((R_B + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest4, av_clip_uintp2((( G + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest5, av_clip_uintp2(((B_R + Y2) >> 14) + (1<<15), 16)); dest += 6; } } @@ -1253,8 +1253,8 @@ const int32_t *ubuf1 = ubuf1, *vbuf1 = vbuf1; int A1 = 0xffff<<14, A2 = 0xffff<<14; for (i = 0; i < ((dstW + 1) >> 1); i++) { - SUINT Y1 = (buf0i * 2 ) >> 2; - SUINT Y2 = (buf0i * 2 + 1) >> 2; + int Y1 = (buf0i * 2 ) >> 2; + int Y2 = (buf0i * 2 + 1) >> 2; int U = (ubuf0i + ubuf1i - (128 << 12)) >> 3; int V = (vbuf0i + vbuf1i - (128 << 12)) >> 3; int R, G, B; @@ -1267,8 +1267,8 @@ Y2 += (1 << 13) - (1 << 29); if (hasAlpha) { - A1 = abuf0i * 2 * (1 << 11); - A2 = abuf0i * 2 + 1 * (1 << 11); + A1 = abuf0i * 2 << 11; + A2 = abuf0i * 2 + 1 << 11; A1 += 1 << 13; A2 += 1 << 13; @@ -1278,20 +1278,20 @@ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; B = U * c->yuv2rgb_u2b_coeff; - output_pixel(&dest0, av_clip_uintp2(((int)(R_B + Y1) >> 14) + (1<<15), 16)); - output_pixel(&dest1, av_clip_uintp2(((int)( G + Y1) >> 14) + (1<<15), 16)); - output_pixel(&dest2, av_clip_uintp2(((int)(B_R + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest0, av_clip_uintp2(((R_B + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest1, av_clip_uintp2((( G + Y1) >> 14) + (1<<15), 16)); + output_pixel(&dest2, av_clip_uintp2(((B_R + Y1) >> 14) + (1<<15), 16)); if (eightbytes) { output_pixel(&dest3, av_clip_uintp2(A1 , 30) >> 14); - output_pixel(&dest4, av_clip_uintp2(((int)(R_B + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest5, av_clip_uintp2(((int)( G + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest6, av_clip_uintp2(((int)(B_R + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest4, av_clip_uintp2(((R_B + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest5, av_clip_uintp2((( G + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest6, av_clip_uintp2(((B_R + Y2) >> 14) + (1<<15), 16)); output_pixel(&dest7, av_clip_uintp2(A2 , 30) >> 14); dest += 8; } else { - output_pixel(&dest3, av_clip_uintp2(((int)(R_B + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest4, av_clip_uintp2(((int)( G + Y2) >> 14) + (1<<15), 16)); - output_pixel(&dest5, av_clip_uintp2(((int)(B_R + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest3, av_clip_uintp2(((R_B + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest4, av_clip_uintp2((( G + Y2) >> 14) + (1<<15), 16)); + output_pixel(&dest5, av_clip_uintp2(((B_R + Y2) >> 14) + (1<<15), 16)); dest += 6; } } @@ -1429,7 +1429,7 @@ if (uvalpha < 2048) { for (i = 0; i < dstW; i++) { - SUINT Y = (buf0i) >> 2; + int Y = (buf0i) >> 2; int U = (ubuf0i - (128 << 11)) >> 2; int V = (vbuf0i - (128 << 11)) >> 2; int R, G, B; @@ -1439,7 +1439,7 @@ Y += (1 << 13) - (1 << 29); if (hasAlpha) { - A = abuf0i * (1 << 11); + A = abuf0i << 11; A += 1 << 13; } @@ -1448,9 +1448,9 @@ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; B = U * c->yuv2rgb_u2b_coeff; - output_pixel(&dest0, av_clip_uintp2(((int)(R_B + Y) >> 14) + (1<<15), 16)); - output_pixel(&dest1, av_clip_uintp2(((int)( G + Y) >> 14) + (1<<15), 16)); - output_pixel(&dest2, av_clip_uintp2(((int)(B_R + Y) >> 14) + (1<<15), 16)); + output_pixel(&dest0, av_clip_uintp2(((R_B + Y) >> 14) + (1<<15), 16)); + output_pixel(&dest1, av_clip_uintp2((( G + Y) >> 14) + (1<<15), 16)); + output_pixel(&dest2, av_clip_uintp2(((B_R + Y) >> 14) + (1<<15), 16)); if (eightbytes) { output_pixel(&dest3, av_clip_uintp2(A, 30) >> 14); dest += 4; @@ -1462,7 +1462,7 @@ const int32_t *ubuf1 = ubuf1, *vbuf1 = vbuf1; int A = 0xffff<<14; for (i = 0; i < dstW; i++) { - SUINT Y = (buf0i ) >> 2; + int Y = (buf0i ) >> 2; int U = (ubuf0i + ubuf1i - (128 << 12)) >> 3; int V = (vbuf0i + vbuf1i - (128 << 12)) >> 3; int R, G, B; @@ -1472,7 +1472,7 @@ Y += (1 << 13) - (1 << 29);
View file
ffmpeg-6.1.2.tar.xz/libswscale/swscale.c -> ffmpeg-6.1.1.tar.xz/libswscale/swscale.c
Changed
@@ -904,8 +904,7 @@ if ((srcSliceY & (macro_height_src - 1)) || ((srcSliceH & (macro_height_src - 1)) && srcSliceY + srcSliceH != c->srcH) || - srcSliceY + srcSliceH > c->srcH || - (isBayer(c->srcFormat) && srcSliceH <= 1)) { + srcSliceY + srcSliceH > c->srcH) { av_log(c, AV_LOG_ERROR, "Slice parameters %d, %d are invalid\n", srcSliceY, srcSliceH); return AVERROR(EINVAL); } @@ -1172,7 +1171,7 @@ } for (int i = 0; i < FF_ARRAY_ELEMS(dst); i++) { - ptrdiff_t offset = c->frame_dst->linesizei * (ptrdiff_t)(slice_start >> c->chrDstVSubSample); + ptrdiff_t offset = c->frame_dst->linesizei * (slice_start >> c->chrDstVSubSample); dsti = FF_PTR_ADD(c->frame_dst->datai, offset); } @@ -1233,7 +1232,7 @@ for (int i = 0; i < FF_ARRAY_ELEMS(dst) && parent->frame_dst->datai; i++) { const int vshift = (i == 1 || i == 2) ? c->chrDstVSubSample : 0; const ptrdiff_t offset = parent->frame_dst->linesizei * - (ptrdiff_t)((slice_start + parent->dst_slice_start) >> vshift); + ((slice_start + parent->dst_slice_start) >> vshift); dsti = parent->frame_dst->datai + offset; }
View file
ffmpeg-6.1.2.tar.xz/libswscale/utils.c -> ffmpeg-6.1.1.tar.xz/libswscale/utils.c
Changed
@@ -564,7 +564,7 @@ filteri * filterSize + j = coeff; xx++; } - xDstInSrc += 2LL * xInc; + xDstInSrc += 2 * xInc; } } @@ -1730,8 +1730,7 @@ /* unscaled special cases */ if (unscaled && !usesHFilter && !usesVFilter && (c->srcRange == c->dstRange || isAnyRGB(dstFormat) || - isFloat(srcFormat) || isFloat(dstFormat) || isBayer(srcFormat))){ - + isFloat(srcFormat) || isFloat(dstFormat))){ ff_get_unscaled_swscale(c); if (c->convert_unscaled) { @@ -1892,7 +1891,7 @@ } for (i = 0; i < 4; i++) - if (!FF_ALLOCZ_TYPED_ARRAY(c->dither_errori, c->dstW + 3)) + if (!FF_ALLOCZ_TYPED_ARRAY(c->dither_errori, c->dstW + 2)) goto nomem; c->needAlpha = (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat) && isALPHA(c->dstFormat)) ? 1 : 0;
View file
ffmpeg-6.1.2.tar.xz/libswscale/x86/swscale.c -> ffmpeg-6.1.1.tar.xz/libswscale/x86/swscale.c
Changed
@@ -649,7 +649,7 @@ } -#define INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(fmt, name, opt) \ +#define INPUT_PLANER_RGB_A_FUNC_CASE(fmt, name, opt) \ case fmt: \ c->readAlpPlanar = ff_planar_##name##_to_a_##opt; @@ -672,15 +672,15 @@ break; #define INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##LE, name##le, opt) \ INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##BE, name##be, opt) \ INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##BE, name##be, opt) #define INPUT_PLANER_RGBAXX_UVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##LE, name##le, opt) \ INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##BE, name##be, opt) \ INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt) #define INPUT_PLANER_RGBAXX_YUV_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ @@ -696,7 +696,7 @@ INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt) #define INPUT_PLANER_RGB_YUVA_ALL_CASES(opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(AV_PIX_FMT_GBRAP, rgb, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE( AV_PIX_FMT_GBRAP, rgb, opt) \ INPUT_PLANER_RGB_YUV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, opt) \ INPUT_PLANER_RGBXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, opt) \ INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, opt) \ @@ -708,7 +708,7 @@ if (EXTERNAL_SSE2(cpu_flags)) { switch (c->srcFormat) { - INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(AV_PIX_FMT_GBRAP, rgb, sse2); + INPUT_PLANER_RGB_A_FUNC_CASE( AV_PIX_FMT_GBRAP, rgb, sse2); INPUT_PLANER_RGB_UV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, sse2); INPUT_PLANER_RGBXX_UV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, sse2); INPUT_PLANER_RGBAXX_UVA_FUNC_CASE( AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, sse2);
View file
ffmpeg-6.1.2.tar.xz/libswscale/yuv2rgb.c -> ffmpeg-6.1.1.tar.xz/libswscale/yuv2rgb.c
Changed
@@ -831,7 +831,7 @@ cbu = (cbu * contrast * saturation) >> 32; cgu = (cgu * contrast * saturation) >> 32; cgv = (cgv * contrast * saturation) >> 32; - oy -= 256LL * brightness; + oy -= 256 * brightness; c->uOffset = 0x0400040004000400LL; c->vOffset = 0x0400040004000400LL;
View file
ffmpeg-6.1.2.tar.xz/tests/fate/filter-audio.mak -> ffmpeg-6.1.1.tar.xz/tests/fate/filter-audio.mak
Changed
@@ -285,7 +285,7 @@ fate-filter-channelmap-one-str: tests/data/asynth-44100-2.wav fate-filter-channelmap-one-str: CMD = md5 -auto_conversion_filters -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/channelmap_one_str -f wav -fflags +bitexact fate-filter-channelmap-one-str: CMP = oneline -fate-filter-channelmap-one-str: REF = e18791f65ce5861e130b2c3e472ab90a +fate-filter-channelmap-one-str: REF = 0ea3052e482c95d5d3bd9da6dac1b5fa FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHANNELMAP, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_FILTER_CHANNELMAP)
View file
ffmpeg-6.1.2.tar.xz/tests/fate/libswresample.mak -> ffmpeg-6.1.1.tar.xz/tests/fate/libswresample.mak
Changed
@@ -347,13 +347,13 @@ fate-swr-resample_nn-fltp-44100-8000: CMP_TARGET = 591.03 fate-swr-resample_nn-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20486 -fate-swr-resample_nn-fltp-8000-44100: CMP_TARGET = 3156.61 +fate-swr-resample_nn-fltp-8000-44100: CMP_TARGET = 3163.32 fate-swr-resample_nn-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20480 fate-swr-resample_nn-s16p-44100-8000: CMP_TARGET = 590.98 fate-swr-resample_nn-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20486 -fate-swr-resample_nn-s16p-8000-44100: CMP_TARGET = 3156.61 +fate-swr-resample_nn-s16p-8000-44100: CMP_TARGET = 3163.39 fate-swr-resample_nn-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480 define ARESAMPLE_ASYNC
View file
ffmpeg-6.1.2.tar.xz/tests/fate/subtitles.mak -> ffmpeg-6.1.1.tar.xz/tests/fate/subtitles.mak
Changed
@@ -114,7 +114,6 @@ FATE_SUBTITLES-$(call DEMDEC, SCC, CCAPTION) += fate-sub-scc fate-sub-scc: CMD = fmtstdout ass -ss 57 -i $(TARGET_SAMPLES)/sub/witch.scc -fate-sub-scc: CMP = diff FATE_SUBTITLES-$(call DEMMUX, SCC, SCC) += fate-sub-scc-remux fate-sub-scc-remux: CMD = fmtstdout scc -i $(TARGET_SAMPLES)/sub/witch.scc -ss 4:00 -map 0 -c copy
View file
ffmpeg-6.1.2.tar.xz/tests/ref/fate/source -> ffmpeg-6.1.1.tar.xz/tests/ref/fate/source
Changed
@@ -23,8 +23,8 @@ compat/float/float.h compat/float/limits.h libavcodec/bitstream_template.h -libavcodec/vulkan_video_codec_av1std_decode_mesa.h -libavcodec/vulkan_video_codec_av1std_mesa.h +libavcodec/vulkan_video_codec_av1std.h +libavcodec/vulkan_video_codec_av1std_decode.h tools/decode_simple.h Use of av_clip() where av_clip_uintp2() could be used: Use of av_clip() where av_clip_intp2() could be used:
View file
ffmpeg-6.1.2.tar.xz/tools/coverity.c -> ffmpeg-6.1.1.tar.xz/tools/coverity.c
Changed
@@ -31,17 +31,6 @@ #define NULL (void *)0 -typedef long long int64_t; - -enum AVRounding { - AV_ROUND_ZERO = 0, - AV_ROUND_INF = 1, - AV_ROUND_DOWN = 2, - AV_ROUND_UP = 3, - AV_ROUND_NEAR_INF = 5, - AV_ROUND_PASS_MINMAX = 8192, -}; - // Based on https://scan.coverity.com/models void *av_malloc(size_t size) { int has_memory; @@ -88,10 +77,3 @@ __coverity_mark_as_afm_freed__(ptr, "av_free"); } - -int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) { - __coverity_negative_sink__(b); - __coverity_negative_sink__(c); - - return (double)a * (double)b / (double)c; -}
View file
ffmpeg-6.1.2.tar.xz/tools/decode_simple.c -> ffmpeg-6.1.1.tar.xz/tools/decode_simple.c
Changed
@@ -94,9 +94,8 @@ goto finish; } - ret = avcodec_send_packet(dc->decoder, NULL); - if (ret >= 0) - ret = decode_read(dc, 1); + avcodec_send_packet(dc->decoder, NULL); + ret = decode_read(dc, 1); if (ret < 0) { fprintf(stderr, "Error flushing: %d\n", ret); return ret;
View file
ffmpeg-6.1.2.tar.xz/tools/enc_recon_frame_test.c -> ffmpeg-6.1.1.tar.xz/tools/enc_recon_frame_test.c
Changed
@@ -28,7 +28,6 @@ #include "decode_simple.h" #include "libavutil/adler32.h" -#include "libavutil/avassert.h" #include "libavutil/common.h" #include "libavutil/error.h" #include "libavutil/frame.h" @@ -89,8 +88,6 @@ int linesize = av_image_get_linesize(frame->format, frame->width, p); uint32_t checksum = 0; - av_assert0(linesize >= 0); - for (int j = 0; j < frame->height >> shift_vp; j++) { checksum = av_adler32_update(checksum, data, linesize); data += frame->linesizep;
View file
ffmpeg-6.1.2.tar.xz/tools/target_dec_fuzzer.c -> ffmpeg-6.1.1.tar.xz/tools/target_dec_fuzzer.c
Changed
@@ -248,7 +248,7 @@ case AV_CODEC_ID_IFF_ILBM: maxpixels /= 128; break; case AV_CODEC_ID_INDEO4: maxpixels /= 128; break; case AV_CODEC_ID_INTERPLAY_ACM: maxsamples /= 16384; break; - case AV_CODEC_ID_JPEG2000: maxpixels /= 16384; break; + case AV_CODEC_ID_JPEG2000: maxpixels /= 4096; break; case AV_CODEC_ID_LAGARITH: maxpixels /= 1024; break; case AV_CODEC_ID_LOCO: maxpixels /= 1024; break; case AV_CODEC_ID_VORBIS: maxsamples /= 1024; break; @@ -261,7 +261,6 @@ case AV_CODEC_ID_MSS2: maxpixels /= 16384; break; case AV_CODEC_ID_MSZH: maxpixels /= 128; break; case AV_CODEC_ID_MTS2: maxpixels /= 4096; break; - case AV_CODEC_ID_MV30: maxpixels /= 128; break; case AV_CODEC_ID_MVC2: maxpixels /= 128; break; case AV_CODEC_ID_MVHA: maxpixels /= 16384; break; case AV_CODEC_ID_MVDV: maxpixels /= 1024; break;
View file
ffmpeg-6.1.2.tar.xz.asc
Deleted
@@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQFMBAABCgA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmasGfAYHGZmbXBlZy1k -ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYVNIIAJCu/Rkjme60byzLy95eLyH2 -3T5wptC9g8fuGCEDDt3D4bh958Cb4FZmQKMVZdwxWzaoFEkQ/3NavCNzFpHINrpz -/gZxqytv7YEyKBXdvvS54FDK9TITj2PabKn2fhSv9NIU6IYPObjTG7wjt+ycVn32 -lVaxNFjKVm3C+8vzj5hUGK68MoMmXD5ltiUILAbSmtoCyUjhmo6gXiBmMnMn3QN1 -Ulpp8TGS0oQ+FDVC7vMAZcIVQ1dV1K4LlacppqvoxcJRAMuQWHGbI+3om+d50ZR0 -5VO3sS/lIXeVMNx5qoY4nM3q+HJS/AA0Ki3n8L+DUfusJNeHUOq2I9oNZiWE+AQ= -=2l0q ------END PGP SIGNATURE-----
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vulkan_video_codec_av1std_decode_mesa.h
Deleted
@@ -1,36 +0,0 @@ -/* Copyright 2023 Lynne - * Copyright 2023 Dave Airlie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ -#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1 - -/* -** This header is NOT YET generated from the Khronos Vulkan XML API Registry. -** -*/ - -#ifdef __cplusplus -extern "C" { -#endif -#define vulkan_video_codec_av1std_decode 1 - - - -#ifdef __cplusplus -} -#endif - -#endif
View file
ffmpeg-6.1.2.tar.xz/libavcodec/vulkan_video_codec_av1std_mesa.h
Deleted
@@ -1,403 +0,0 @@ -/* Copyright 2023 Lynne - * Copyright 2023 Dave Airlie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ -#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1 - -/* -** This header is NOT YET generated from the Khronos Vulkan XML API Registry. -** -*/ - -#ifdef __cplusplus -extern "C" { -#endif -#define vulkan_video_codec_av1std 1 - -#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ - ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) -#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 VK_MAKE_VIDEO_STD_VERSION(0, 1, 0) -#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 -#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode" - -typedef enum StdVideoAV1MESAProfile { - STD_VIDEO_AV1_MESA_PROFILE_MAIN = 0, - STD_VIDEO_AV1_MESA_PROFILE_HIGH = 1, - STD_VIDEO_AV1_MESA_PROFILE_PROFESSIONAL = 2, -} StdVideoAV1MESAProfile; - -typedef enum StdVideoAV1MESALevel { - STD_VIDEO_AV1_MESA_LEVEL_2_0 = 0, - STD_VIDEO_AV1_MESA_LEVEL_2_1 = 1, - STD_VIDEO_AV1_MESA_LEVEL_2_2 = 2, - STD_VIDEO_AV1_MESA_LEVEL_2_3 = 3, - STD_VIDEO_AV1_MESA_LEVEL_3_0 = 4, - STD_VIDEO_AV1_MESA_LEVEL_3_1 = 5, - STD_VIDEO_AV1_MESA_LEVEL_3_2 = 6, - STD_VIDEO_AV1_MESA_LEVEL_3_3 = 7, - STD_VIDEO_AV1_MESA_LEVEL_4_0 = 8, - STD_VIDEO_AV1_MESA_LEVEL_4_1 = 9, - STD_VIDEO_AV1_MESA_LEVEL_4_2 = 10, - STD_VIDEO_AV1_MESA_LEVEL_4_3 = 11, - STD_VIDEO_AV1_MESA_LEVEL_5_0 = 12, - STD_VIDEO_AV1_MESA_LEVEL_5_1 = 13, - STD_VIDEO_AV1_MESA_LEVEL_5_2 = 14, - STD_VIDEO_AV1_MESA_LEVEL_5_3 = 15, - STD_VIDEO_AV1_MESA_LEVEL_6_0 = 16, - STD_VIDEO_AV1_MESA_LEVEL_6_1 = 17, - STD_VIDEO_AV1_MESA_LEVEL_6_2 = 18, - STD_VIDEO_AV1_MESA_LEVEL_6_3 = 19, - STD_VIDEO_AV1_MESA_LEVEL_7_0 = 20, - STD_VIDEO_AV1_MESA_LEVEL_7_1 = 21, - STD_VIDEO_AV1_MESA_LEVEL_7_2 = 22, - STD_VIDEO_AV1_MESA_LEVEL_7_3 = 23, - STD_VIDEO_AV1_MESA_LEVEL_MAX = 31, -} StdVideoAV1MESALevel; - -typedef struct StdVideoAV1MESAFilmGrainFlags { - uint8_t apply_grain; - uint8_t chroma_scaling_from_luma; - uint8_t overlap_flag; - uint8_t clip_to_restricted_range; -} StdVideoAV1MESAFilmGrainFlags; - -typedef struct StdVideoAV1MESAFilmGrainParameters { - StdVideoAV1MESAFilmGrainFlags flags; - uint32_t grain_scaling_minus_8; - uint32_t ar_coeff_lag; - uint32_t ar_coeff_shift_minus_6; - uint32_t grain_scale_shift; - - uint16_t grain_seed; - uint8_t num_y_points; - uint8_t point_y_value14; - uint8_t point_y_scaling14; - - uint8_t num_cb_points; - uint8_t point_cb_value10; - uint8_t point_cb_scaling10; - - uint8_t num_cr_points; - uint8_t point_cr_value10; - uint8_t point_cr_scaling10; - - int8_t ar_coeffs_y_plus_12824; - int8_t ar_coeffs_cb_plus_12825; - int8_t ar_coeffs_cr_plus_12825; - uint8_t cb_mult; - uint8_t cb_luma_mult; - uint16_t cb_offset; - uint8_t cr_mult; - uint8_t cr_luma_mult; - uint16_t cr_offset; -} StdVideoAV1MESAFilmGrainParameters; - -typedef struct StdVideoAV1MESAGlobalMotionFlags { - uint8_t gm_invalid; -} StdVideoAV1MESAGlobalMotionFlags; - -typedef struct StdVideoAV1MESAGlobalMotion { - StdVideoAV1MESAGlobalMotionFlags flags; - uint8_t gm_type; - uint32_t gm_params6; -} StdVideoAV1MESAGlobalMotion; - -typedef struct StdVideoAV1MESALoopRestoration { - uint8_t lr_type3; - uint8_t lr_unit_shift; - uint8_t lr_uv_shift; -} StdVideoAV1MESALoopRestoration; - -typedef struct StdVideoAV1MESATileInfoFlags { - uint8_t uniform_tile_spacing_flag; -} StdVideoAV1MESATileInfoFlags; - -typedef struct StdVideoAV1MESATileInfo { - StdVideoAV1MESATileInfoFlags flags; - uint8_t tile_cols; - uint8_t tile_rows; - uint8_t tile_start_col_sb64; - uint8_t tile_start_row_sb64; - uint8_t width_in_sbs_minus_164; - uint8_t height_in_sbs_minus_164; - uint16_t context_update_tile_id; - uint8_t tile_size_bytes_minus1; -} StdVideoAV1MESATileInfo; - -typedef struct StdVideoAV1MESAQuantizationFlags { - uint8_t using_qmatrix; -} StdVideoAV1MESAQuantizationFlags; - -typedef struct StdVideoAV1MESAQuantization { - StdVideoAV1MESAQuantizationFlags flags; - uint8_t base_q_idx; - int8_t delta_q_y_dc; - uint8_t diff_uv_delta; - int8_t delta_q_u_dc; - int8_t delta_q_u_ac; - int8_t delta_q_v_dc; - int8_t delta_q_v_ac; - uint8_t qm_y; - uint8_t qm_u; - uint8_t qm_v; -} StdVideoAV1MESAQuantization; - -typedef struct StdVideoAV1MESACDEF { - uint8_t damping_minus_3; - uint8_t bits; - uint8_t y_pri_strength8; - uint8_t y_sec_strength8; - uint8_t uv_pri_strength8; - uint8_t uv_sec_strength8; -} StdVideoAV1MESACDEF; - -typedef struct StdVideoAV1MESADeltaQFlags { - uint8_t delta_lf_present; - uint8_t delta_lf_multi; -} StdVideoAV1MESADeltaQFlags; - -typedef struct StdVideoAV1MESADeltaQ { - StdVideoAV1MESADeltaQFlags flags; - uint8_t delta_q_res; - uint8_t delta_lf_res; -} StdVideoAV1MESADeltaQ; - -typedef struct StdVideoAV1MESASegmentationFlags { - uint8_t enabled; - uint8_t update_map; - uint8_t temporal_update; - uint8_t update_data; -} StdVideoAV1MESASegmentationFlags; - -typedef struct StdVideoAV1MESASegmentation { - StdVideoAV1MESASegmentationFlags flags; - uint8_t feature_enabled_bits8; - int16_t feature_data88; -} StdVideoAV1MESASegmentation; - -typedef struct StdVideoAV1MESALoopFilterFlags { - uint8_t delta_enabled; - uint8_t delta_update; -} StdVideoAV1MESALoopFilterFlags; - -typedef struct StdVideoAV1MESALoopFilter { - StdVideoAV1MESALoopFilterFlags flags; - uint8_t level4; - uint8_t sharpness;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.