1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

49499 Commits

Author SHA1 Message Date
Andreas Rheinhardt
bb81c60927 Revert "avcodec: Rename ff_kbd_window_init() as it will be needed from outside libavcodec"
This reverts commits fd5aa93a37
and cf00f60bab
("avcodec/kbdwin: Support arbitrary sized windows").

The change in question has only been made for libavradio.
in anticipation of merging it into the main tree. This has
not happened, so this commit reverts the changes to kbdwin
that are not used for anything else. In particular, these
functions are no longer exported (as avpriv functions);
notice that the fixed-point function has been exported
despite having never been used outside of lavc.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
James Almer
118948cbac avcodec/version_major: postpone some deprecations until the next bump
They are either too recent, or can't be removed yet.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
583cf2a869 avutil: remove deprecated FF_API_FRAME_PICTURE_NUMBER
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
67e7f0b05e avutil: remove deprecated FF_API_REORDERED_OPAQUE
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
b8fef7e9c5 avutil: remove deprecated FF_API_PKT_DURATION
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
65ddc74988 avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
5b23b18d40 avcodec: remove deprecated FF_CODEC_CRYSTAL_HD
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
98e1eebef9 avcodec: remove deprecated FF_API_SLICE_OFFSET
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
2717dcfb85 avcodec: remove deprecated FF_API_AVCTX_FRAME_NUMBER
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
7bca8ce422 avcodec: remove deprecated FF_API_VT_HWACCEL_CONTEXT
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
c4498aae7c avcodec: remove deprecated FF_API_AVCODEC_CHROMA_POS
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
f00f70c8f1 avcodec: remove deprecated FF_API_VT_OUTPUT_CALLBACK
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer
9ee59b63f5 avcodec: remove deprecated FF_API_AYUV_CODECID
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:29 -03:00
James Almer
c947731275 avcodec: remove deprecated FF_API_SVTAV1_OPTS
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:29 -03:00
James Almer
0b8940f96a avcodec: remove deprecated FF_API_IDCT_NONE
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:29 -03:00
Andreas Rheinhardt
97beb63a66 avcodec/hq_hqa: Make VLC tables static
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 09:15:18 +01:00
Andreas Rheinhardt
51b2343ef9 avcodec/hq_hqadata: Move data in a header
It is only used by hq_hqa.c, so said header can simply
be included there.
Also move the code to initialize the VLCs to hq_hqa.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 09:15:18 +01:00
Andreas Rheinhardt
ccb432c1fe avcodec/vulkan_decode: Remove always-false check
These fields are set for all Vulkan decoding hwaccels;
they would be useless if it were different.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 09:00:47 +01:00
Andreas Rheinhardt
f9d35e78fe avcodec/vulkan_decode: Un-sparse extensions table
Only three of the 226 (== AV_CODEC_ID_AV1) entries
have been used. Unsparsing this table is especially
important given that this array lives in .data.rel.ro.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 09:00:39 +01:00
Andreas Rheinhardt
f7b227bec3 avcodec/vulkan_video: Merge dec part of FFVkCodecMap and extension props
All the fields of FFVkCodecMap are either decoder-only
or encoder-only (with the latter being unused and unset for now).
Yet there is already a per-decoder struct containing
static information about these decoders, namely
VkExtensionProperties.

This commit merges the decoder-parts of FFVkCodecMap
with the VkExtensionProperties into a common structure.

Given that FFVkCodecMap is now unused, it is removed.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 09:00:30 +01:00
Andreas Rheinhardt
6c82b7bc0a avcodec/vulkan_video: Remove unused array
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 09:00:14 +01:00
James Almer
d65908c3d4 avcodec/decode: remove HDR10+ from the global side data array
It's a per packet/frame side data type.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-05 21:39:52 -03:00
Zhao Zhili
b0e17e0f95 avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-03-05 21:25:56 +08:00
Andrew Sayers
b47b2c5b91 fix "@param foo[in/out]" to "@param[in, out] foo"
Fix a few invalid doxygen comments:

    /**
     * @param[in,out] correctly_formatted
     * @param incorrect1[in] - [in] must come immediately after @param
     * @param incorrect2[in/out] - '/' must be ','
     */

Actual command: sed -i -e "s/\(\* .*param\)\( [^\[]*\)\(\[.*\]\)/\1\3\2/g" -e "s/in\//in,/" $( git grep -l "\* .*param .*\[\(in\|out\)" )

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:45:12 +01:00
Andrew Sayers
dea1d7531d fix "param"s that should be "@param"
Actual command: sed -i -e "s/\(^ *\\* \)\(param[^a-z]\)/\1@\2/" $( git grep -l "^ *\\* param[^a-z]" )

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:45:00 +01:00
Andrew Sayers
0dde5c5efa avcodec/avcodec: downgrade multi-member comment to non-Doxygen comment
Doxygen only associates this comment with "pts_correction_num_faulty_pts",
causing it to display incorrectly.

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:40:24 +01:00
Andrew Sayers
899e022cd7 avcodec/ivi: make comments more Doxygen-friendly
Doxygen eats the newline in the first comment, making it harder to read.
Join the lines and add a comma, so source and documentation are equally readable.

Doxygen only associates the second comment with cust_dec.
The comments for cust_dec and cust_tab make perfect sense without it,
so downgrade it to a non-doxygen "//" comment.

The third comment was missed by the command in the previous commit,
because it (correctly but uniquely) doesn't have a trailing comma.

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:39:25 +01:00
Andrew Sayers
6096c244bb fix /// comments that should be ///<
Actual command: sed -i -e "s/\([;,] *\)<* *\/\/\/ *<* */\1\/\/\/< /" $( git grep -l "[;,] */// " )

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:38:57 +01:00
Nuo Mi
72b1237ece avcodec/vvcdec: fix undefined behaviours for derive_affine_mvc
libavcodec/vvc/vvc_inter.c:823:18: runtime error: signed integer overflow: 1426128896 + 1426128896 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavcodec/vvc/vvc_inter.c:823:18

Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-04 20:39:31 +08:00
Nuo Mi
49ba613146 avcodec/vvcdec: fix boundary strength when IBC involved
The following cases should set bs to 1:
If the prediction modes are not the same.
If both prediction modes are MODE_IBC, but the motion vector delta is larger than 8 of 1/16 pixels.
see 8.8.3.5

How to reproduce it:
vvencapp -i sintel_trailer_2k_1080p24.y4m --preset fast --additional "IBC=1" -o sintel.266
ffmpeg -i sintel.266 -f md5 -
md5 will mismatch

Found-by: 6ws at https://github.com/ffvvc/FFmpeg/issues/187#issuecomment-1962842135
2024-03-04 20:39:27 +08:00
Andreas Rheinhardt
4ed0fea0fa avcodec/aactab: Deduplicate ltp_coef and tns_tmp2_map tables
This will allow to make aac_defines.h decoder-only.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-04 02:11:53 +01:00
Andreas Rheinhardt
b9dea251d5 avcodec/aacdec: Move buffer to reduce padding
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-04 02:11:50 +01:00
Andreas Rheinhardt
aaf26cffba avcodec/lpc: Split inline functions into a header of their own
And move compute_ref_coefs() to its only user: lpc.c
There is no overlap between the users of compute_lpc_coefs()
and lpc proper.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-04 02:11:38 +01:00
Andreas Rheinhardt
08aa791d20 avcodec/lpc: Don't use AAC defines directly
It leads to defines for the AAC decoder being included
outside of the AAC decoder.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-04 02:11:19 +01:00
Andreas Rheinhardt
e429b0fdb7 avutil/vulkan: Don't autoinclude vulkan_loader.h
Only include it where necessary.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-03 22:55:26 +01:00
Andreas Rheinhardt
a172d80703 avcodec/x86/fpel: Remove remnants of MMX
Since 7cad4dba50
averaging functions only exist for MMXEXT and SSE2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-03 19:48:41 +01:00
Andreas Rheinhardt
cb15b7b29e avcodec/vulkan_video: Don't use sparse table
ff_vk_codec_map currently is an array indexed by AVCodecID;
it has AV_CODEC_ID_FIRST_AUDIO (= 65536) entries, but uses
only three of them; only 24B of 1MiB were actually used

This commit fixes this by adding an AVCodecID field to the table
and making it non-sparse.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-03 17:17:13 +01:00
Michael Niedermayer
b95c0d93ff avcodec/vvc/vvcdec: allow vvc_decode_close() on failed open
Fixes: division by 0
Fixes: 67008/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-5873503163187200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-02 13:29:07 +08:00
Andreas Rheinhardt
d25b3497f2 avcodec/x86/rv40dsp, simple_idct: Remove remnants of MMX
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-02 02:54:12 +01:00
Andreas Rheinhardt
540d8e7740 avcodec/vvc/vvc_mvs: Add proper header include
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-02 02:54:12 +01:00
Andreas Rheinhardt
33a3a23b79 avcodec/vvc/vvc_intra: Move utils out of vvc_intra.c
Otherwise vvc_intra.o gets pulled in by the vvc_mc checkasm
test and it in turn pulls vvc_ctu.o and then the rest of vvcdec
and lavc in. Besides being bad size-wise this also has the downside
that it pulls in avpriv_(cga|vga16)_font from libavutil which are
marked as being imported from another library when building
libavcodec as a DLL and this breaks checkasm because it links
both lavc and lavu statically.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-02 02:54:12 +01:00
Andreas Rheinhardt
4460cb485b avcodec/svq1enc: Move initializing DSP out of svq1enc.c
Otherwise svq1enc.o gets pulled in by the svq1encdsp checkasm
test and it in turn pulls the rest of lavc in.
Besides being bad size-wise this also has the downside that
it pulls in avpriv_(cga|vga16)_font from libavutil which are
marked as being imported from another library when building
libavcodec as a DLL and this breaks checkasm because it links
both lavc and lavu statically.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-02 02:54:11 +01:00
Andreas Rheinhardt
88b3b09afa avcodec/aacenc: Move initializing DSP out of aacenc.c
Otherwise aacenc.o gets pulled in by the aacencdsp checkasm
test and it in turn pulls the rest of lavc in.
Besides being bad size-wise this also has the downside that
it pulls in avpriv_(cga|vga16)_font from libavutil which are
marked as being imported from another library when building
libavcodec as a DLL and this breaks checkasm because it links
both lavc and lavu statically.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-02 02:54:11 +01:00
Andreas Rheinhardt
1e98cc4787 avcodec/bsf/mp3_header_decompress: Remove BSF
This BSF is supposed to be used in conjunction with mp3_header_compress,
which has been removed more than ten years ago in commit
c6080d8900. It mangled the headers
by removing the CRC field as well as fields that are supposed
to stay constant for the entirety of a stream (which are put into
extradata). This made these files unplayable; they need to be
decompressed with the BSF first (which does not happen automatically).
Even in this case the CRC does not get restored.

I am not aware that such compressed files exist at all; therefore
this commit removes the BSF completely.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-02 02:47:50 +01:00
Zhao Zhili
35dc129940 avcodec/encode: Fix default setting of bits_per_raw_sample
bits_per_raw_sample doesn't always match size of AV_SAMPLE_FMT_,
e.g., S24.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-03-01 17:23:38 +08:00
Andreas Rheinhardt
601bb6a739 avcodec/mss[12]: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-01 01:35:42 +01:00
Andreas Rheinhardt
80736531da avcodec/decode: Improve validity check a bit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-01 01:35:42 +01:00
Andreas Rheinhardt
72becd0627 avcodec/refstruct: Don't use STRIDE_ALIGN for alignment
It was always intended that the buffers returned by
RefStruct shall have the same alignment guarantees
as the buffers returned by av_malloc(); said alignment
depends upon the arch and the enabled instruction set
and the code used STRIDE_ALIGN as a proxy for this.

Yet since 7945d30e91
there is a better way to get av_malloc's alignment:
ALIGN_64 in mem_internal.h. So use this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-01 01:35:42 +01:00
Andreas Rheinhardt
d36cb46681 avcodec/libxeve: Use av_dict_iterate()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-01 01:34:26 +01:00
Andreas Rheinhardt
fbf1e51352 avcodec/libxevd: Fix "if (ret = ff_foo() < 0)" precedence problem
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-01 01:34:26 +01:00