Commit Graph

111933 Commits

Author SHA1 Message Date
James Almer 8e972b13a9 avformat/demux: propagate the internal decoder's bitrate properties
Muxers may access this information through cpb properties within the stream's
side data.

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

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
Paul B Mahol bfa43447fa fate: add OSQ test 2023-09-06 11:59:20 +02:00
Stefano Sabatini 362ebf246c lavu/avstring: fix typo in av_strireplace function doxy 2023-09-06 01:12:56 +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 418c954e31.
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
Steven Liu fdd123de13 Changelog: Add Support hevc,vp9,av1 codec fourcclist in enhanced rtmp protocol
Reviewed-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-09-05 15:04:38 +08:00
Steven Liu 6c2f49e35f fate/enhanced-flv-vp9: add tests reference data 2023-09-05 15:01:34 +08:00
Steven Liu 637c761be1 avformat/rtmpproto: support enhanced rtmp
add option named rtmp_enhanced_codec,
it would support hvc1,av01,vp09 now,
the fourcc is using Array of strings.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-09-05 09:14:18 +08:00
Steven Liu c946e8d921 avformat/rtmppkt: add ff_amf_write_array for write
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-09-05 09:13:08 +08:00
Steven Liu 62fb730762 tests/fate/flvenc: add av1 in enhanced flv test case
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-09-05 09:12:08 +08:00
Steven Liu 1a86cce51e tests/fate/flvenc: add vp9 in enhanced flv test case
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-09-05 09:10:46 +08: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 5a16eb78db
tools/target_dec_fuzzer: adjust threshold for RKA
Fixes: Timeout
Fixes: 59349/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5334280839233536

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 182aef0198 fate: add rka test 2023-09-04 19:29:21 +02:00
Andreas Rheinhardt 091c41794d fate/ffmpeg: Add bitexact flag for ffmpeg-input-r test
Fixes the test when the non-bitexact MMXEXT versions of
the hpeldsp functions are used.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 14:38:56 +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
Alessandro Ros 5d84ac5a40 avformat/vpcc: fix VP9 metadata in FLV and RTMP
In order to send VP9 tracks with FLV or RTMP, the enhanced RTMP
specification tells that VPCodecConfigurationRecord, a.k.a. vpcC
ISO-BMFF box, must be inserted into a metadata message. However, the
function responsible for generating vpcCs currently returns invalid
boxes, that are lacking the Version and Flag fields, inherited from
FullBox. For some reason, both flags were being added manually in
movenc. This patch fixes the issue.

Signed-off-by: Alessandro Ros <aler9.dev@gmail.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-04 09:06:28 -03: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 a39d6e81fa tests/checkasm/sw_scale: Avoid declare_func_emms where possible
This makes the test stricter because it is checked that the
MMX registers are not accidentally clobbered.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt e7866e00c8 tests/checkasm/llvidencdsp: Don't use declare_func_emms
Only sub_media_pred has an MMXEXT version, so one can use
the version with the stricter check (that checks that
the MMX registers have not been clobbered) for sub_left_predict.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 3f82b38516 tests/checkasm/hevc_*: Avoid using declare_func_emms where possible
Only the idct_dc and add_residual functions have MMX versions,
so one can use the version with the stricter check (that checks
that the MMX registers have not been clobbered) for all the other
checks.

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 2718a3be1f.

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

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

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

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

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 63bd0f4ce8 avfilter/vf_bwdif: Remove obsolete emms_c()
Obsolete since ed42a51930.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 03a60b2b30 avfilter/vf_colorspace: Remove redundant emms_c()
It is not even clear what these emms_c() are supposed to achieve:
create_filtergraph() (where it may be called) does not call
ASM functions itself; it merely sets some function pointers.
Furthermore, there are no colorspacedsp functions using MMX
(checked by checkasm which does not use declare_new_emms()).
Finally, checking whether to issue emms_c() is overblown anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt d84ee80c04 avfilter/vf_gblur: Remove unnecessary emms_c()
There is no MMX ASM code for gblur.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt c59b082e20 avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn
ff_scene_sad_get_fn() does not return functions that use
MMX at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Steven Liu 8b7a3c6f10 tests/fate/flvenc: add hevc in enhanced flv test case
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-09-04 14:02:40 +08:00
Niklas Haas bef151d1ce vf_libplacebo: warn on extra_opts + too old libplacebo
Instead of silently ignoring this option as before.
2023-09-03 13:40:27 +02:00
Paul B Mahol a469186b8a avfilter/asrc_sinc: check return code of tx_init() 2023-09-03 09:33:26 +02:00
Paul B Mahol 966088cc6a doc: mention OSQ support 2023-09-02 21:32:37 +02:00
Paul B Mahol 9c2206a13b avcodec/wavarc: fix bugs in arithmetic coding mode 2023-09-02 21:16:20 +02:00
Paul B Mahol fb06a44360 avformat/wavarc: fix data end calculation 2023-09-02 16:34:25 +02:00
Andreas Rheinhardt fc993e7a53 avformat/matroska(dec|enc): Rename macro to avoid clash with winbase.h
winbase.h defines IGNORE and is included via bzlib.h when compiling
for Windows. So rename this macro to NOTHING.
Also rename the muxer macro for consistency.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-02 10:36:20 +02:00
Andreas Rheinhardt ee485b4051 avformat/internal: Don't auto-include os_support.h
It includes various Windows-specific headers when compiling
for Windows and these sometimes cause issues: E.g. winbase.h
defines IGNORE, which clashes with a macro used in the Matroska
muxer (since 884653ee5b) and demuxer.

This header provides fallback defines for various stuff that is
mostly not used directly by (de)muxers at all:
mkdir, rename, rmdir, unlink, access, poll, pollfd, nfds_t,
closesocket, socklen_t, fstat, stat, lseek, SHUT_(RD|WR|RDWR)
and various POLL* constants.

Ergo fix this issue by not auto-including this header in lots
of places via an inclusion in internal.h and instead include
it everywhere where the above stuff is used (most of these
translation units already included os_support.h).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-02 10:36:11 +02:00
Nuo Mi 25ecc94d58
avutil: add thread executor
The executor design pattern was introduced by java
<https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/concurrent/Executor.html>
it also adapted by python
<https://docs.python.org/3/library/concurrent.futures.html>
Compared to handcrafted thread pool management, it greatly simplifies the thread code.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-02 02:49:06 +02:00
Lynne 139e54911c
lavc/avfft: deprecate the API
This deprecates the currently unused API.
2023-09-01 23:59:14 +02:00
Lynne d40672e661
lavu/tx: fix scaling of R2R transforms
Still slightly inaccurate, but it's good enough now.
2023-09-01 23:59:13 +02:00
Lynne 59b39d241e
lavu/tx: improve rdft table generation precision slightly 2023-09-01 23:59:13 +02:00