1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-03 14:32:16 +02:00

48585 Commits

Author SHA1 Message Date
Andreas Rheinhardt
947d51f32a avcodec/x86/hpeldsp_vp3: Merge into hpeldsp
Once upon a time, 413abbe16465a7b49472ac110e42939e853e24a1
added versions of some put_no_rnd_pixels functions for use
in VP3 and Theora (with an explicit check so that they are
only used for VP3 and Theora). When this was moved to hpeldsp
(from dsputil) in 3ced55d51c2e65b37e50d500dff88bcd80e01b9c,
the check was replaced by a check for the bitexact flag
(and a CONFIG_VP3_DECODER compile-time check), so that
these functions were now used for other codecs as well.

Later commit 1dfc3cf89d0eb026af28be46294b85d79499ffb5
split off the "VP3-specific bits into a separate file",
yet these bits were not really VP3-specific bits at all
any more. (The error was repeated in commit
0a39c9ac0bfd7345fe676b4e2707d9cec3cbb553.) This commit
has not been reverted, because this would make future
changes from Libav (from where it originated) harder,
yet Libav is no more, so this commit effectively reverts
1dfc3cf89d0eb026af28be46294b85d79499ffb5.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:24:39 +02:00
Christophe Gisquet
da888b790a avcodec/utvideodec: add vlc multi support
Faster decoding, by average 50% faster overall.
2023-09-07 00:23:30 +02:00
Paul B Mahol
8b7391cb5f avcodec/magicyuv: add vlc multi support
Gives nice speed boost, depending on encoded content it goes from
30% to 60% faster.
2023-09-07 00:23:30 +02:00
Paul B Mahol
29b9fca4b3 avcodec: add multi vlc reader
Heavily based and inspired by Christophe's cache branches.

Co-Authored-by: Christophe Gisquet
2023-09-07 00:23:30 +02:00
James Almer
3a5be28857 avcodec/qsvenc: add missing header include
Needed for ff_encode_add_cpb_side_data().
Fixes regression since 0231df505dc70ac435f2b437d1995ebabd70a66a.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-06 16:08:40 -03:00
James Almer
1652f2492f avcodec/av1dec: don't set aspect ratio when it's not yet known
Makes the output of the native decoder consistent with external decoders like
libdav1d with fate-enhanced-flv-av1.

Reviewed-by: Zhao Zhili <quinkblack@foxmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-06 14:37:15 -03:00
Paul B Mahol
6022e0b04f avcodec/rpzaenc: fix assertions with very small width/height 2023-09-06 16:25:41 +02:00
James Almer
0231df505d avcodec/utils: move ff_add_cpb_side_data() to encoder code
It's only used by encoders, so move it to prevent wrong usage.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-06 10:27:45 -03:00
James Almer
3744ada3b8 avcodec/mpeg12dec: stop propagating AVCPBProperties side data
It's already exported using the relevant AVCodecContext fields.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-06 10:27:45 -03:00
James Almer
b6627a57f4 Revert "avcodec/mpeg12dec: Do not alter avctx->rc_buffer_size"
This reverts commit eb88ccb92e05018b1060cf8126b30eeeff551d3b.

AVCodecContext fields are the proper place for a decoder to export such values.
This change is in preparation for the following commits.
2023-09-06 10:27:12 -03:00
Paul B Mahol
d33c630b2a avcodec/yuv4enc: do not read past end of input in case of odd height 2023-09-06 15:17:12 +02:00
Stefano Sabatini
a76fb12375 lavc/avcodec.h: fix typos in AVCodecContext.pkt_timebase description 2023-09-06 01:02:38 +02:00
Stefano Sabatini
bf600db2a0 lavc/libx264: do not unconditionally set x4->params.analyse.b_fast_pskip
Fix output change regression introduced in 418c954e318.
2023-09-06 01:02:07 +02:00
Paul B Mahol
d464a687c9 avcodec/hcadec: support decoding with extradata provided in first packet 2023-09-05 23:24:01 +02:00
Paul B Mahol
39f6d9c5c1 avcodec/adxdec: add support for 6 channels 2023-09-05 23:21:39 +02:00
Paul B Mahol
8cb2c6a71e avcodec/osq: fix 20bit decoding and remove invalid modes 2023-09-05 00:10:53 +02:00
Michael Niedermayer
0adaa90d89
avcodec/mpeg4videodec: more unsigned in amv computation
Fixes: signed integer overflow: -2147483648 + -1048576 cannot be represented in type 'int'
Fixes: 59365/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-642654923954585

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-04 21:45:51 +02:00
Michael Niedermayer
283bf5c35b
avcodec/tta: fix signed overflow in decorrelate
Fixes: signed integer overflow: 2079654542 - -139267653 cannot be represented in type 'int'
Fixes: 60811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5915858409750528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-04 21:45:51 +02:00
Paul B Mahol
c4ab17a62d avcodec/osq: improve 32bit sample format decoding 2023-09-04 14:16:57 +02:00
Paul B Mahol
87b8c10819 avcodec/osq: fix type of nb_samples
Fixes crash caused by signed integer overflow.
2023-09-04 14:16:56 +02:00
Andreas Rheinhardt
f8503b4c33 avutil/internal: Don't auto-include emms.h
Instead include emms.h wherever it is needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt
13c988556b avcodec/pcm: Remove unnecessary emms_c()
The floating point dsp code does not use MMX registers
since 2718a3be1f8867fd4f6cb3f452d6917838b1ed88.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Paul B Mahol
9c2206a13b avcodec/wavarc: fix bugs in arithmetic coding mode 2023-09-02 21:16:20 +02:00
Lynne
139e54911c
lavc/avfft: deprecate the API
This deprecates the currently unused API.
2023-09-01 23:59:14 +02:00
Lynne
86aa34d339
avfft: wrap lavu/tx instead of ff_dct 2023-09-01 23:59:13 +02:00
Lynne
83ede01bb0
avfft: wrap lavu/tx instead of ff_rdft 2023-09-01 23:59:12 +02:00
Lynne
517e4fcca6
avfft: wrap lavu/tx instead of ff_mdct 2023-09-01 23:59:12 +02:00
Lynne
dfcd4bbf51
avfft: wrap lavu/tx instead of ff_fft 2023-09-01 23:59:11 +02:00
Lynne
a810126501
wmavoice: convert DCT-I/DST-I to lavu/tx
This is the very last user of any lavc transform code.

This also *corrects* wmavoice decoding, as the previous DCT/DST
transforms were incorrect, bringing it closer to Microsoft's
own wmavoice decoder.
2023-09-01 23:59:11 +02:00
Lynne
d895d3c8c7
wmavoice: convert RDFT to lavu/tx 2023-09-01 23:59:10 +02:00
Paul B Mahol
7ef9d31071 avcodec: add OSQ audio decoder 2023-09-01 14:26:47 +02:00
Paul B Mahol
7aa71ab5c0 avcodec/rka: do not output extra invalid samples in last frame 2023-08-30 23:07:34 +02:00
Tong Wu
a25a60d763 avcodec/jpegxl_parser: fix a compile error
Compiler: MSVC 14.35.32215
Error type: error C2099: initializer is not a constant
Related commit: 0c0dd23 avcodec/jpegxl_parser: add JPEG XL parser

Signed-off-by: Tong Wu <tong1.wu@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-28 22:11:51 -03:00
Michael Niedermayer
86c092a0ed
avcodec/apedec: Implement interim mode detection
Fixes: NoLegacy.ape
Found-by: Matt Ashland <mail@monkeysaudio.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-28 01:10:13 +02:00
Michael Niedermayer
7995e175b8
avcodec/apedec: remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-28 01:10:13 +02:00
Jun Zhao
c48ec95ba3 lavc/libx264: replace ITU-T T35(A/53 CC) SEI type by enum value
replace ITU-T T35(A/53 CC) SEI type by enum value

Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2023-08-27 23:21:31 +08:00
Leo Izen
0c0dd23fe1
avcodec/jpegxl_parser: add JPEG XL parser
Add a full parser to libavcodec for AV_CODEC_ID_JPEGXL. It finds the
end of the stream in order to packetize the codec, and it looks at
the headers to set preliminary information like dimensions and pixel
format.

Note that much of this code is duplicated from avformat/jpegxl_probe.c,
but that code will be removed and call this instead in the next commit.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-08-27 01:36:08 -04:00
Leo Izen
7a69f7312e
avcodec/libjxldec: use internal AVFrame as buffered space
Before this commit, the decoder erroneously assumes that the AVFrame
passed to the receive_frame is the same one each time. Now it keeps an
internal AVFrame to write into, and copies it over when it's done.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-08-27 01:36:03 -04:00
Leo Izen
245910d5c9
avcodec/libjxldec: fix errors when decoding grayscale after rgb
Fixes an error that's caused by decoding a grayscale JXL image after an
RGB image is decoded, with the same decoder instance.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-08-27 01:36:00 -04:00
Christophe Gisquet
8028b8260e avcodec/huffyuvdec: don't prepare unnecessary joint tables
The number of planes can be lower than 4.
2023-08-26 19:22:25 +02:00
Michael Niedermayer
80ad0e2198
avcodec/apedec: Fix 48khz 24bit below insane level
Fixes: Ticket9816
Fixes: vlc.ape and APE_48K_24bit_2CH_02_01.ape

Regression since: ed0001482a74b60f3d5bc5cd7e304c9d65b2fcd5.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-26 00:20:23 +02:00
Michael Niedermayer
696e161919
avcodec/apedec: Fix CRC for 24bps and bigendian
Fixes CRC for vlc.ape and APE_48K_24bit_2CH_02_01.ape

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-26 00:20:09 +02:00
Kacper Michajłow
9f66286f0b avcodec/vulkan_decode: print also codec header name
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2023-08-24 22:51:36 +02:00
Kacper Michajłow
9d0da996f0 avcodec/vulkan_decode: fix struct type for h265_profile
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2023-08-24 22:51:25 +02:00
Benjamin Cheng
b4f0701358 vulkan_h264: send scaling lists in zig-zag order
h264_ps turns the scaling lists into matrices with a raster scan order,
but Vulkan wants the scaling lists as originally defined.
2023-08-24 22:50:57 +02:00
Rémi Denis-Courmont
9bc5676e40 lavc/g722dsp: add RISC-V V DSP function 2023-08-24 21:07:18 +03:00
Michael Niedermayer
5f5a1ccd04
avcodec/wavarc: Check that nb_samples is not negative
It is currently probably not possible for it to be negative as
the needed 2Mb input buf size is not achievable. But it is more
robust to check for it too.
If it would become negative than code like
s->samples[0][n] = s->samples[0][s->nb_samples + n];
would crash

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-23 22:52:26 +02:00
Michael Niedermayer
1a81a40de2
avcodec/wavarc: Check shift
Fixes: shift exponent 1285 is too large for 32-bit type 'int'
Fixes: 60870/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5332050340347904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-23 22:52:26 +02:00
Michael Niedermayer
0ce322a51e
avcodec/xvididct: Fix integer overflow in idct_row()
Fixes: signed integer overflow: -1403461578 + -843974775 cannot be represented in type 'int'
Fixes: 60868/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-4599793035378688

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-08-23 22:52:26 +02:00
Aleksoid
7eb0d9e905 avcodec/nvenc: add option to limit slice size 2023-08-22 23:46:11 +02:00