Commit Graph

6350 Commits

Author SHA1 Message Date
Martin Storsjö
df2787881f checkasm: Increase the tolerance for ac3_sum_square_butterfly_float
Increase the tolerance from 10 ulp to 11 ulp. This fixes occasional
errors for some inputs; the errors could be reproduced on
aarch64/neon builds, with "checkasm --test=ac3dsp 3446175925".

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 11:27:51 +02:00
Rémi Denis-Courmont
d01914cfa0 checkasm/h264dsp: test TX bypass
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:52 +02:00
Leo Izen
7135c092ad fate/png: add mDCv and cLLi read and write test
This test confirms that we can write mDCv and cLLi chunks and read them
back via the png decoder. It uses an HEVC conformance sample with this
metadata as the base source for the side data in the frames.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Jan Ekström <jeebjp@gmail.com>
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:47 +02:00
James Almer
4e3dc972c3 checkasm/lls: increase epsilon value for the update_lls test
Should fix failures for some seeds on x86_32.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:47 +02:00
James Almer
8c0966a012 avformat/iamf: byteswap values in OpusHeader
Clause 3.11.1 of IAMF[1] states the values are stored in big endian, in
contrast to the Ogg Encapsulation for Opus[2] where they are in little endian.

[1]https://aomediacodec.github.io/iamf/v1.0.0-errata.html#opus-specific
[2]https://datatracker.ietf.org/doc/html/rfc7845#section-5.1

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:46 +02:00
Felicia Lim
4bab3764dc avformat/movenc: fix channel count and samplerate fields for IAMF tracks
Clause 6.2.3 of IAMF[1] states both of these shall be set to 0.

[1]https://aomediacodec.github.io/iamf/v1.0.0-errata.html#iasampleentry-section

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:45 +02:00
James Almer
7515aed401 fate/lavf-container: add a test for L-HEVC remuxing
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-24 00:53:41 +02:00
James Almer
9a4a277e0b avformat/movenc: support writing cropping values
Finishes implementing ticket #7437.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-12 21:44:33 +02:00
James Almer
3aba176c7a avformat/mov: export cropping values from clap boxes
Addresses part of ticket #7437.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-12 21:44:33 +02:00
Anton Khirnov
4bc3253c5d fftools/ffmpeg_mux_init: default to input timebase for streamcopy
Stop trying to invent some "framerate-based" timebase when there is no
reason to think the stream is CFR at all.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:04 +02:00
James Almer
0745fc2fbf avformat/hevc: don't write NALUs with nuh_layer_id > 0 in hvcC boxes
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:02 +02:00
Derek Buitenhuis
50676782f7 avformat: Add a new stream disposition for multilayer video
This lets us detect when a container has flagged a stream as multilayer.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:02 +02:00
Anton Khirnov
98f9e843fa tests/fate/mov: add a test for VFR muxing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:02 +02:00
Anton Khirnov
338fef55b6 tests/fate/filter-audio: convert atempo test to oneoff
Filter output is not bitexact.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:02 +02:00
James Almer
4c429d91fb fate/filter-video: add missing swscale flags to tiltandshift tests
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:02 +02:00
James Almer
d404cfd4b3 fate/filter-video: tests more pixel formats with the tiltandshift filter
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-10 14:29:02 +02:00
Martin Storsjö
2a7aa3c892 tests: Add a missing dependency for the filter-atempo test
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-05 23:19:37 +02:00
Paul B Mahol
13103f30d8 avfilter/vf_mergeplanes: simplify options 2024-07-04 09:15:54 +02:00
Anton Khirnov
779084f027 fftools/ffmpeg_mux_init: apply encoder options manually
Do not pass an options dictionary to the avcodec_open2() in enc_open().

This is cleaner and more robust, as previously various bits of code
would try to interpret the contents of the options dictionary, with
varying degrees of correctness. Now they can just access the encoder
AVCodecContext directly.

Cf. 372c78dd42f2b1ca743473b9c32fad71c65919e0 - analogous change for
decoding.

A non-progressive field order is now written on the container level in
interlaced ProRes encoding tests.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-03 20:58:22 +02:00
Rajiv Harlalka
e29b9b2bac tests/fate/filter-audio.mak: add test for atempo audio filter
Signed-off-by: Rajiv Harlalka <rajivharlalka009@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-07-03 20:54:56 +02:00
Ramiro Polla
112cbeea83 checkasm: add tests for yuv2rgb
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-28 22:20:31 +02:00
Ramiro Polla
ed091b37c5 libavcodec/mjpeg: preserve unclipped last_dc value
Perform av_clip_int16(val) _after_ copying the value to last_dc.

This change ensures that clipping is applied only within the context of
the current block, preventing the propagation of clipped values to
subsequent DC components.

Related commits: c28f648b19 and dffae122d0
Related ticket: 4683

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-28 22:20:31 +02:00
Nuo Mi
5294f78afb checkasm/vvc_alf: ensure right and bottom boundaries are not overwritten by asm
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-27 09:03:07 +02:00
Nuo Mi
925011ad3d checkasm/vvc_alf: random select alf virtual boundaries position
A picture's virtual boundaries will split a CTU into 4 ALF blocks.
The ALF virtual boundary may cross or not cross a ALF block.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-27 09:03:07 +02:00
Nuo Mi
6406fffad7 checkasm/vvc_alf: only check the valid filter and classify sizes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-27 09:03:07 +02:00
Lynne
b79f17e8d4 lavu/stereo3d: change the horizontal FOV field to a rational
This avoids hardcoding any implementation-specific limitiations as
part of the API, and allows for future expandability.

This also allows API users to more conveniently convert the
values into floats without hardcoding specific conversion constants.

The API was committed a few days ago, so changing this field now
is within the realms of acceptable.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-27 09:03:07 +02:00
Pierre-Anthony Lemieux
514cb4d772 fate/jpeg2000dec: add support for p0_10.j2k
p0_10.j2k is one of the reference codestreams included in Rec. ITU-T T.803 | ISO/IEC 15444-4.
Adding this test was made possible by commit 6f4a95cfb8e6ed97fdd1027251181caded44860f.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-27 09:03:07 +02:00
Paul B Mahol
10c2c115f5 fate: update alg-mm results 2024-06-26 09:21:47 +02:00
Martin Storsjö
be066bb5cf movenc: Add an option for resilient, hybrid fragmented/non-fragmented muxing
This allows ending up with a normal, non-fragmented file when
the file is finished, while keeping the file readable if writing
is aborted abruptly at any point. (Normally when writing a
mov/mp4 file, the unfinished file is completely useless unless it
is finished properly.)

This results in a file where the mdat atom contains (and hides)
all the moof atoms that were part of the fragmented file structure
initially.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-24 15:59:55 +02:00
Paul B Mahol
749540bf3a fate: update qoa test 2024-06-23 12:18:06 +02:00
James Almer
69e9298d4e avutil/stereo3d: set a sane default value for AVRational fields
Prevent potential divisions by 0 when using them immediately after allocation.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 22:33:15 +02:00
James Almer
ed5278ca89 ffprobe: always print all Stereo3D fields
ffprobe is meant to generate parseable output, and if a field is present, it
should be printed even if it has a default value.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 22:33:15 +02:00
Andreas Rheinhardt
edda64d05b avcodec/h261enc: Fix ac_vlc_length tables
These tables are supposed to contain the number of bits needed
to encode a given (run, level) pair. Yet the number of bits
for pairs needing the escape code was wrong (it only contained
the escape code and not the bits needed for run and level).

Furthermore, H.261 (a format with explicit end-of-block codes)
does not work well together with the RLTable API from rl.c:
The EOB code is the first one in ff_h261_rl_tcoeff's VLC table
and has a run value of zero. Therefore the result of get_rl_index()
is off by one for run == 0 and level values with explicit
(run, level) pair.

Fixing this necessitated changing the ref files of the
vsynth*-h261-trellis tests. Both filesizes as well as PSNR
decreased. If one used a qscale value of 11 for this test,
one would have received files with about the same size as
before this patch (with qscale 12), but with better PSNR.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:48 +02:00
Andreas Rheinhardt
31c95c91ab avcodec/me_cmp: Zero MECmpContext in ff_me_cmp_init()
Not every function will be set, so zero the context
to initialize everything.

This also allows to remove an initialization in dvenc.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:43 +02:00
Andreas Rheinhardt
3933dcd491 avcodec/me_cmp,dvenc,mpegvideo: Move ildct_cmp to its users
MECmpContext.ildct_cmp is an array of function pointers that
are not set by ff_me_cmp_init(), but that are set by users
to one of the other arrays via ff_set_cmp().

Remove these pointers from MECmpContext and add pointers
for the actually used functions to its users. (The DV encoder
already did so.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:43 +02:00
Andreas Rheinhardt
d2c568bd77 avcodec/me_cmp, mpegvideo: Move frame_skip_cmp to MpegEncContext
MECmpContext has several arrays of function pointers that
are not set by ff_me_cmp_init(), but that are set by users
to one of the other arrays via ff_set_cmp().

One of these other users is mpegvideo_enc; it is the only user
of MECmpContext.frame_skip_cmp and it only uses one of these
function pointers at all.

This commit therefore moves this function pointer to MpegEncContext;
and removes the array from MECmpContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:43 +02:00
Andreas Rheinhardt
840eb90aba avcodec/me_cmp, motion_est: Move me_(pre_)?_cmp etc. to MotionEstContext
MECmpContext has several arrays of function pointers that
are not set by ff_me_cmp_init(), but that are set by users
to one of the other arrays via ff_set_cmp().

One of these other users is the motion estimation API.
It uses MECmpContext.(me_pre|me|me_sub|mb)_cmp. It is
basically the only user of these arrays.

This commit therefore moves these arrays to MotionEstContext;
this has the additional advantage of making motion_est.c
more independent from MpegEncContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:43 +02:00
Frank Plowman
82226fb431 fate/vvc: add vvc-conformance-RPR_A_4
Before    After
-------------------------------------------------
make fate-vvc CPU Time (No ASM)  131.52s  134.83s
libavcodec/vvc/* Line Coverage     95.3%    96.9%
inter_template.c Line Coverage     74.3%    88.2%
inter.c Line Coverage              85.3%    99.2%

Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-20 20:27:40 +02:00
James Almer
51756aa667 avformat/evc: fix writing reserved bits
They are all zeroes, not ones.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-19 17:49:30 +02:00
James Almer
e0f74ccad7 fate/lavf-container: add extract_extradata BSF dependency to lavf-fate-hevc.mp4
Otherwise a bunch of SEI units that should not be in hvcC will be included,
and generate different output with builds where extract_extradata_bsf is not
present.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-19 17:49:29 +02:00
James Almer
0e8b4c07df fate/lavf-container: add a hevc in ISOBMFF remux test
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-19 17:49:29 +02:00
Derek Buitenhuis
233105196d fftools/ffprobe: Print more Stereo 3D info from side data
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-19 17:49:29 +02:00
Zhao Zhili
4e1c8f1a93 tests/checkasm: Remove check on linux perf fd in uninit
The check should be >= 0, not > 0. The check itself is redundant
since uninit only being called after init is success.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-19 17:49:28 +02:00
James Almer
c9fd1e1460 fate/checkasm: run the sw_range_convert test
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-17 13:58:41 +02:00
Ramiro Polla
2250a5963e checkasm: add tests for {lum,chr}ConvertRange
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-17 13:37:29 +02:00
James Almer
5200d0b509 checkasm/lls: add missing random values to the test buffers
Fixes valgrind warnings after 18adaf9fe558587cb1b707c647af83015b69da48.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-13 21:50:47 +02:00
Marton Balint
8f2ee60617 avformat/mov_chan: use the newly added channel ids for more exact mapping
Also make the iso_channel_position table consistent with what the AAC decoder
uses in avcodec/aac/aacdec_usac.c.

Fate changes are caused by the change of how 7.1 layout is mapped, previously
it included Side Surround channels, now it includes the Surround channels.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-13 17:10:03 +02:00
Andreas Rheinhardt
2f8ea9f62f api/api-band-test: Query codec capabilities to decide admissibility
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-12 15:48:49 +02:00
Andreas Rheinhardt
defe49c0d9 api/api-band-test: Perform codec admissibility check earlier
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-12 15:48:49 +02:00
Andreas Rheinhardt
f2e61dc423 api/api-band-test: Remove write-only variable
Besides being write only it had the wrong type:
An uint8_t is definitely not enough to store the size
of these buffers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-12 15:48:49 +02:00
Rémi Denis-Courmont
3312c631bb riscv: probe for Zbb extension at load time
Due to hysterical raisins, most RISC-V Linux distributions target a
RV64GC baseline excluding the Bit-manipulation ISA extensions, most
notably:
- Zba: address generation extension and
- Zbb: basic bit manipulation extension.
Most CPUs that would make sense to run FFmpeg on support Zba and Zbb
(including the current FATE runner), so it makes sense to optimise for
them. In fact a large chunk of existing assembler optimisations relies
on Zba and/or Zbb.

Since we cannot patch shared library code, the next best thing is to
carry a flag initialised at load-time and check it on need basis.
This results in 3 instructions overhead on isolated use, e.g.:
1:  AUIPC rd, %pcrel_hi(ff_rv_zbb_supported)
    LBU   rd, %pcrel_lo(1b)(rd)
    BEQZ  rd, non_Zbb_fallback_code
    // Zbb code here

The C compiler will typically load the flag ahead of time to reducing
latency, and can also keep it around if Zbb is used multiple times in a
single optimisation scope. For this to work, the flag symbol must be
hidden; otherwise the optimisation degrades with a GOT look-up to
support interposition:
1:  AUIPC rd, GOT_OFFSET_HI
    LD    rd, GOT_OFFSET_LO(rd)
    LBU   rd, (rd)
    BEQZ  rd, non_Zbb_fallback_code
    // Zbb code here

This patch adds code to provision the flag in libraries using bit
manipulation functions from libavutil: byte-swap, bit-weight and
counting leading or trailing zeroes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-11 21:52:15 +02:00
Rémi Denis-Courmont
3ea49a7f29 checkasm/lls: adjust buffer sizes and alignments
var must be padded.
param has `order + 1`, not `order` elements and is *not* over-aligned.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-11 21:52:14 +02:00
Anton Khirnov
a509340e41 lavc/hevcdec: output RASL frames based on the value of no_rasl_output_flag
Instead of an ad-hoc scheme. Also, combine skipping RASL frames with
skip_frame handling - current code seems flawed as it only executes for
the first slice of a RASL frame and unnecessarily unsets is_decoded,
which should not be set at this point anyway..

Some RASL frames in fate-hevc-afd-tc-sei that were previously discarded
are now output.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-11 21:52:14 +02:00
Zhao Zhili
d25c581ec4 tests/checkasm: Fix build error when enable linux perf on Android
B0 is defined by system header, see f0f596dbc6 for ref.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-11 16:59:43 +02:00
James Almer
452c2cda30 checkasm/sw_rgb: fix alignment of buffers for rgb_to_yuv tests
src is apparently not guaranteed to be >8 byte aligned, but align to 16
nonetheless as the x86 asm will do unaligned loads anyway.
dst is guaranteed to be 32 byte aligned for the Y plane, but 16 byte for UV.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 20:45:22 +02:00
James Almer
5a3ca52691 checkasm/sw_rgb: test rgb32/rgb32_1 to yuv
Test all four pixel formats, but only bench the two native endian ones for a
given target.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 20:45:21 +02:00
James Almer
d4ede3f449 x86/aacencdsp: add AVX version of quantize_bands
quant_bands_signed_c: 1928.0
quant_bands_signed_sse2: 406.0
quant_bands_signed_avx: 207.0
quant_bands_unsigned_c: 1702.0
quant_bands_unsigned_sse2: 404.0
quant_bands_unsigned_avx: 209.0

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 20:45:21 +02:00
Andreas Rheinhardt
cd606c125c tests/checkasm/sw_rgb: Be more strict about clobbering MMX state
The MMXEXT versions of the rgb2rgb functions tested here
always emit emms on their own. Therefore one can use
a stricter test to ensure that it stays that way.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 16:06:34 +02:00
Andreas Rheinhardt
3df9c8fea4 avformat/vvc: Don't use ff_copy_bits()
There is no benefit in using it: The fast path of copying
is not taken because of misalignment; furthermore we are
only dealing with a few byte here anyway, so simply copy
the bytes manually, avoiding the dependency on bitstream.c
in lavf (which also contains a function that is completely
unused in lavf).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 11:19:52 +02:00
Nuo Mi
ba9c36d315 avcodec/vvcdec: support mv wraparound
A 360 video specific tool
see https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9503377

passed files:
    DMVR_A_Huawei_3.bit
    WRAP_D_InterDigital_4.bit
    WRAP_A_InterDigital_4.bit
    WRAP_B_InterDigital_4.bit
    WRAP_C_InterDigital_4.bit
    ERP_A_MediaTek_3.bit

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 00:01:53 +02:00
Rémi Denis-Courmont
d2583e57f1 checkasm: disable unaligned access emulation
The OS may silently fix (emulate) unaligned hardware access exceptions.
This is extremely slow and code should be fixed not to rely on unaligned
access on affected hardware. Accordingly this requests that the OS
disable emulation and instead throw Bus error, which will be caught by
checkasm's signal handler.

This has no effects if the hardware supports unaligned access in
hardware, since no exceptions are generated. prctl() will fail safe in
that case.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-09 00:01:48 +02:00
Zhao Zhili
4f1247e232 checkasm/sw_rgb: test rgb24/bgr24 to yuv
The line width 8 is supposed to test corner case, while the
performance doesn't matter. Width 1080 is also a case of
unaligned to 16.

Width 1920 meant for benchmark (together with --runs options).

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-06 16:47:03 +02:00
Anton Khirnov
cf7d6a9987 lavc/hevc*: move to hevc/ subdir
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-06 16:47:02 +02:00
Rémi Denis-Courmont
49db497336 checkasm: add aacencdsp.quant_bands test
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-04 08:38:16 +02:00
Lynne
c14fa543d9 fate: add tests for xHE-AAC
Starting off small with a few features.
Samples and reference decoded files copied from the official ISO
reference suite.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-02 21:40:37 +02:00
Rémi Denis-Courmont
98525299e0 checkasm: add linear least square tests
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-01 18:25:44 +02:00
James Almer
b913b58cc0 checkasm/lpc: use fixed length to bench apply_welch_window
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-01 18:25:43 +02:00
Rémi Denis-Courmont
f2a38bd7df checkasm/lpc: test compute_autocorr
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-01 18:25:42 +02:00
Rémi Denis-Courmont
d261039da9 checkasm/float_dsp: add double-precision scalar product
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 21:53:42 +02:00
James Almer
4a8f4e5e4d tests/checkasm/vvc_mc: don't zero the SAD buffers
They will be filled immediately after.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 14:50:27 +02:00
James Almer
054b0d38ba tests/checkasm/vvc_mc: fix indentation
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 14:50:27 +02:00
Wu Jianhua
ac5637ae71 tests/checkasm/vvc_alf: change alf step size to 8
From Benjamin Bross:
> for ALF where functions are in increments of 4 while 8 should be sufficient according to the spec.

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 14:50:27 +02:00
Pierre-Anthony Lemieux
62e094904a avcodec/jpeg2000dec: fix HT block decoder
Addresses https://trac.ffmpeg.org/ticket/10905

Co-authored-by: Osamu Watanabe <owatanab@es.takushoku-u.ac.jp>
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:09:00 +02:00
Rémi Denis-Courmont
48bcee416b checkasm/vp8dsp: add VP7 tests
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:09:00 +02:00
Rémi Denis-Courmont
e65e9c389c checkasm/vp8dsp: share DSP context across tests
This will simplify later changes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:09:00 +02:00
Stone Chen
434c941f59 tests/checkasm/vvc_mc: for SAD, only test valid subblock sizes
According to the VVC specification (section 8.5.1), the maximum width/height of a subblock passed for DMVR SAD is 16. This along with previous constraint requiring width * height >= 128 means that  8x16, 16x8, and 16x16 are the only allowed sizes.

This changes check_vvc_sad() to only test and benchmark those sizes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:08:59 +02:00
Rémi Denis-Courmont
1ebc732fff checkasm: add h263dsp.{h,v}_loop_filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-28 16:28:05 +02:00
Andreas Rheinhardt
67d868a876 tests/fate/source-check: Relax BSD licence check
Several files already had standard license header (namely
2-clause BSD files), yet due to the 80 char line length limit,
they were not treated as such by source-check.sh (which
fate-source uses). Therefore relax the BSD check.

Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-28 16:28:05 +02:00
Andreas Rheinhardt
6fbe3bc7ba tests/checkasm/vvc_alf: Don't use declare_func_emms
VVC does not have MMX code at all, so one can use the stricter
declare_func to also check that the MMX state has not been clobbered
with (which would be an ABI violation).

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-25 15:28:18 +02:00
Rémi Denis-Courmont
b575460b82 checkasm/riscv: test misaligned before V
Otherwise V functions mask scalar misaligned ones.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-24 22:47:42 +02:00
James Almer
aea36dcee7 checkasm/flacdsp: add a test for lpc33
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-24 22:47:41 +02:00
Stone Chen
b9be32cced tests/checkasm: Add check_vvc_sad to vvc_mc.c
Adds checkasm for DMVR SAD AVX2 implementation.

Benchmarks ( AMD 7940HS )
vvc_sad_8x8_c: 50.3
vvc_sad_8x8_avx2: 0.3
vvc_sad_16x16_c: 250.3
vvc_sad_16x16_avx2: 10.3
vvc_sad_32x32_c: 1020.3
vvc_sad_32x32_avx2: 60.3
vvc_sad_64x64_c: 3850.3
vvc_sad_64x64_avx2: 220.3
vvc_sad_128x128_c: 14100.3
vvc_sad_128x128_avx2: 840.3

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:01 +02:00
James Almer
029500ce24 avformat/vvc: initialize some ptl flags
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:01 +02:00
Martin Storsjö
9b77a199ac checkasm: h264dsp: Avoid out of buffer writes when benchmarking
The loop filters can write before the pointer given to them;
the actual test invocations correctly used an offset, while
the benchmark calls were lacking an offset. Therefore, when
running with benchmarking, these tests could have spurious
failures.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
Lynne
6c3a274901 checkasm: print bench runs when benchmarking
Helps make sense of the possible noise in the results.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
J. Dekker
590308ef40 checkasm: add runs argument to adjust during bench
Some timers on certain device and test combinations can produce noisy
results, affecting the reliability of performance measurements. One
notable example of this is the Canaan K230 RISC-V development board.

An option to adjust the number of samples by an exponent (--runs) has
been added, allowing developers to increase the sample count for more
reliable results.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
Martin Storsjö
22050228c6 checkasm: vvc_alf: Limit benchmarking to a reasonable subset of functions
Don't benchmark every single combination of widths and heights;
only benchmark cases which are squares (like in vvc_mc.c).

Contrary to vvc_mc, which increases sizes by doubling dimensions,
vvc_alf tests all sizes in increments of 4. Limit benchmarking to
the cases which are powers of two.

This reduces the number of benchmarked cases from 3072 down to 18.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
Nuo Mi
d97e8b20de avcodec/vvcdec: add vvc inter filters for RPR
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:02:59 +02:00
Andreas Rheinhardt
f3f3ecfd01 tests/ref/fate/source: Add exceptions for riscv startcode files
Fixes fate-source.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-21 00:02:14 +02:00
Andreas Rheinhardt
6ec29c9752 avcodec/decode: Set KEY flag+pict_type generically for intra-only codecs
This commit is the analog of 3f11eac757
for decoding: It sets the AV_FRAME_FLAG_KEY and (for video decoders)
also pict_type to AV_PICTURE_TYPE_I. It furthermore stops setting
audio frames as always being key frames -- it is wrong for e.g.
TrueHD/MLP. The latter also affects TAK and DFPWM.

The change already improves output for several decoders where
it has been forgotten to set e.g. pict_type like speedhq, wnv1
or tiff. The latter is the reason for the change to the exif-image-tiff
FATE test reference file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-19 15:33:55 +02:00
Andreas Rheinhardt
8bcc57d5b6 avcodec/codec_desc, jvdec: JV is not intra-only
It reuses the previous frame and does not code unchanged blocks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-19 15:33:55 +02:00
James Almer
cc5c2ba166 fate/lavf-container: add a test for VVC in mp4 muxing
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:13 +02:00
James Almer
953f988d7b avformat/vvc: fix writing general_constraint_info bytes
The existing implementation was completely broken.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:12 +02:00
James Almer
46d5595f54 checkasm/h264dsp: use int64_t scale values
Fixes "signed integer overflow: [varies] * 104858 cannot be represented in type 'int'" errors
under ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
56582dec4a tests/checkasm/sw_gbrp: Use correct function types for calls
E.g. f2de911818 forgot to
add the unused void* here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
f7b4a2150f tests/checkasm/vf_blend: Update function type
Forgotten in 5b8faaad6c,
a69a0b689c3c4e1e0bbf4c17716a25e14332a250.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
88485ee1f1 tests/checkasm/vf_bwdif: Use correct function pointer type
Forgotten in fa06f48371.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
6d78a83178 tests/checkasm/vf_colorspace: Use correct function pointer type
Forgotten in 9b26a8077f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
105116f1f8 tests/checkasm/vvc_mc: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
a32f8af5f2 tests/checkasm/vp8dsp: Use correct function pointer type
Forgotten in a54e53a1c4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
81d93892f0 tests/checkasm/motion: Use correct function pointer type
Forgotten in abb85429f3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
10121f1f61 tests/checkasm/llviddsp: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
d2016d3659 tests/checkasm/huffyuvdsp: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:10 +02:00
Andreas Rheinhardt
dc43263c22 tests/checkasm/hevc_*: Fix funtion pointer types
Forgotten in b3bbbb14d0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:10 +02:00
Andreas Rheinhardt
1101317540 tests/checkasm/llauddsp: Avoid UB integer overflow
The only multiplicators used in scalarproduct_and_madd_*
are -1, 0 and +1. Yet it is of type int and the checkasm
test uses the complete range of int for it, leading to overflows
that don't happen for actual users.

Fix this by using a more reasonable range for mul: Given
that it is used in v1[i] += v3[i] * mul with v1 being
a 16bit integer, it makes no sense to use values for mul
that don't fit into 16bit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:10 +02:00
James Almer
1835a405fd checkasm/h264dsp: add missing pixel_mask values
Fixes "runtime error: index 4 out of bounds for type 'uint32_t [3]'" errors
after commit 4ced36744ee0bea5fb7a20d1b2926c588f89ea0b.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:09 +02:00
James Almer
1398d20f5a fate/checkasm: test vvc_alf
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:09 +02:00
Rémi Denis-Courmont
8382c30c65 lavu/riscv: CPU flag for fast misaligned accesses
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
J. Dekker
35e11873a0 checkasm/h264dsp: support checking more idct depths
Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
Wu Jianhua
a65d3c375b tests/checkasm/vvc_alf: add check_alf_classify
Perforamnce Test (fps):
clip                                      before  after delta
Tango2_3840x2160_60_10_420_27_LD.266      56      115   105.36%
RitualDance_1920x1080_60_10_420_32_LD.266 272     481   76.83%
RitualDance_1920x1080_60_10_420_37_RA.266 303     426   40.59%

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
Wu Jianhua
a6c469372d tests/checkasm: add checkasm_check_vvc_alf and check_alf_filter
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:47 +02:00
James Almer
7e87e283ba checkasm/flacdsp: add a test for wasted33
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 23:44:15 +02:00
James Almer
f1ae0b06ef checkasm/flacdsp: add a test for wasted32
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 10:54:07 +02:00
James Almer
b809537d06 checkasm/flacdsp: sanitize lpc arguments
Fixes signed integer overflows as reported by ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 10:54:05 +02:00
James Almer
33ca299ecc checkasm/flacdsp: run lpc benchmarks with an unmodified buffer
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 10:54:05 +02:00
Rémi Denis-Courmont
3bc242e279 riscv: add Zvbb vector bit manipulation extension
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:55 +02:00
sunyuechi
271de7f632 checkasm: Fix h264chroma test name
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:54 +02:00
Ramiro Polla
4af7efdbef checkasm: add test for fdct
Reviewed-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:54 +02:00
Ramiro Polla
92cc7b221a libavcodec/motion_est: fix penalty_factor for b frames
In direct_search() and ff_estimate_b_frame_motion(), penalty_factor
would be used before being initialized in estimate_motion_b(). Also,
the initialization would happen more than once unnecessarily.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:54 +02:00
Paul B Mahol
bb0a155bde avfilter/af_dcshift: add s16p sample format support 2024-05-11 13:34:26 +02:00
Andreas Rheinhardt
7710283570 tests/checkasm/svq1enc: Use proper range for input
ssd_int8_vs_int16 is only called from encode_block()
in svq1enc.c; it calls it in stages: At stage 0,
the int16_t array contains the difference of two
uint16_t. At each of the following stages, the
int16_t array is filled by subtracting an int8_t from
the current stage's int16_t array. The maximum stage
is five, so the int16_t are in the range
(-255 - 5 * 127)..(255 + 5 * 128).

This commit modifies the checkasm test to only use
values from this range, fixing (undefined) integer overflow
in the test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:11 +02:00
James Almer
2ac747b008 checkasm/blockdsp: use smallest allowed aligned buffers for fill_block_tab tests
The requirement is either 8 or 16 bytes alignment, not 32.
This should help finding bugs in asm implementations.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:09 +02:00
James Almer
96bfbf553a checkasm/blockdsp: don't randomize the buffers for fill_block_tab
It ignores and overwrites the previous values.
Fixes running the test under ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-09 19:04:09 +02:00
Paul B Mahol
29494ac6a4 avfilter/af_aemphasis: add fltp sample format support 2024-05-07 09:07:18 +02:00
James Almer
57009a8334 avutil/opt: add an unsigned option type
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-06 19:53:13 +02:00
James Almer
d4582e1289 avutil/tests/opt: test values > INT_MAX for INT64 type
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-06 19:53:12 +02:00
James Almer
442de7c50e avutil/tests/opt: test negative values for INT and INT64 types
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-06 19:53:12 +02:00
Paul B Mahol
d90f007b12 avfilter/af_aemphasis: improve curves response
Remove lowpass completely.
2024-05-05 01:15:01 +02:00
sunyuechi
1b502bf795 checkasm/rv40dsp: add chroma_mc test
This is similar to h264.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-04 12:21:40 +02:00
sunyuechi
d0fe109b59 checkasm/blockdsp: add fill_block test
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-04 12:21:40 +02:00
Niklas Haas
395604e6e0 fate/scale2ref_keep_aspect: switch to vf_scale ref_*
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-04 12:21:39 +02:00
Martin Storsjö
3a8897c642 checkasm: vc1dsp: Align buffers sufficiently for the mspel tests
This fixes crashes in the mspel tests on x86.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-01 08:36:24 +02:00
sunyuechi
f43d6da978 checkasm/vc1dsp: add mspel_pixels test
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-30 21:42:22 +02:00
Timo Rothenpieler
58470c83f0 fate: allow https for git URLs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-28 19:39:37 +02:00
Lynne
4298e719c4 opusdsp: add ability to modify deemphasis constant
xHE-AAC relies on the same postfilter mechanism
that Opus uses to improve clarity (albeit with a steeper
deemphasis filter).

The code to apply it is identical, it's still just a
simple IIR low-pass filter. This commit makes it possible
to use alternative constants.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-27 11:25:15 +02:00
James Almer
4cb4482388 fate/iamf: don't demux packets in fate-iamf-5_1-{copy,demux}
They contain side data whose size is arch dependent.
This fixes fate failures on 32bit targets.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-27 11:25:13 +02:00
James Almer
a62ea05102 fate/iamf: add a demux text
Using the same input sample as iamf-5_1-copy, in order to compare both test's output

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-27 11:25:11 +02:00
James Almer
14f74f575b fftools/ffmpeg_mux_init: add missing IAMF Param Definition copies
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-27 11:25:11 +02:00
James Almer
4233394d0a fate/iamf: add a remux test with stream group copying
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-24 22:10:41 +02:00
James Almer
afaaaea4b5 avutil/opt: add support for children objects in av_opt_serialize
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-24 22:10:41 +02:00
James Almer
1431c81eff avutil/tests/opt: test av_opt_find2()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-24 22:10:41 +02:00
James Almer
81e0c848c6 avutil/test/opt: test the AV_OPT_SERIALIZE_SKIP_DEFAULTS flag
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-24 22:10:40 +02:00
James Almer
b3264714cc avutil/frame: add a flag to allow overwritting existing entries
Enable it only for side data types that don't allow more than one entry.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-11 19:36:58 +02:00
Martin Storsjö
26cdd5f0eb tests/movenc: Validate that normal muxer usage doesn't print warnings
We have test to make sure that certain configurations do print
warnings. However, the normal operation of the muxer within this
test always printed a warning, so those tests to check for
extra warnings didn't essentially guard anything.

The warning that always was printed, "track 1: codec frame size is
not set" was not present in the libav fork where this testcase
originated, it was removed in f234e8a32e.

Set the frame size for the audio stream to silence the warning,
and use this frame size in a couple later calculations, and check
that one test configuration doesn't print warnings.

Setting the frame size apparently changes the rounding of a timestamp
in the ismv muxing testcase.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-11 19:36:58 +02:00
J. Dekker
538f7ae3ed tests/checkasm: add exclude_guest for non-x86 linux perf
The exclude_guest option only has an effect on x86. Omitting
'exclude_guest' defaults to zero which implies that you can count guest
events should you run one. Some non-x86 kernels just ignore it, while
others (e.g. the Asahi Linux kernels) require the user to explicitly set
the option to 1, i.e. the only behaviour that makes sense when counting
guest events isn't supported.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-11 09:51:33 +02:00
Martin Storsjö
f257ee209a movenc: Allow writing timed ID3 metadata
This is based on a spec at https://aomediacodec.github.io/id3-emsg/,
further based on ISO/IEC 23009-1:2019.

Within libavformat, timed ID3 metadata (already supported by the
mpegts demuxer and muxer) is handled as a separate data AVStream
with codec type AV_CODEC_ID_TIMED_ID3. However, it doesn't
have a corresponding track in the mov file - instead, these events
are written as separate toplevel 'emsg' boxes.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-11 09:51:32 +02:00
Marton Balint
964eb674c9 avformat/mov_chan: respect channel order when parsing and creating chnl atom
Previously we always assumed that the channels are in native order, even if
they were not. The new channel layout API allows us to signal the proper
channel order, so let's do so.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-10 01:21:09 +02:00
J. Dekker
f872413b51 configure, etc: switch to shebang without space
Note that the config.sh file is left without a shebang, this file is
supposed to be sourced into the current environment.

This commit is purely cosmetic.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-10 01:21:07 +02:00
Geoff Hill
9b7f43c04a avcodec/ac3: Implement sum_square_butterfly_float for aarch64 NEON
Signed-off-by: Geoff Hill <geoff@geoffhill.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-08 19:21:53 +02:00
Geoff Hill
dc8865d219 avcodec/ac3: Implement sum_square_butterfly_int32 for aarch64 NEON
Signed-off-by: Geoff Hill <geoff@geoffhill.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-08 19:21:53 +02:00
Geoff Hill
245335223b avcodec/ac3: Implement ac3_extract_exponents for aarch64 NEON
Signed-off-by: Geoff Hill <geoff@geoffhill.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-08 19:21:53 +02:00
Geoff Hill
0d2fcaf176 avcodec/ac3: Implement ac3_exponent_min for aarch64 NEON
Signed-off-by: Geoff Hill <geoff@geoffhill.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-08 19:21:53 +02:00
Oneric
143f5357d1 avcodec/ass,webvttdec: implement more portable curly brace escapes
Unlike what the old comment suggested, standard ASS has no character
escape mechanism, but a closing curly bracket doesn't even need one.

For manual authored sub files using a full-width variant of an
appropriate font and with scaling and spacing modifiers is a common
workaround.
This is not an option here, but we can still make things much less bad.
Now the desired opening bracket still shows up in libass, and
standard renders will merely display a backslash in its place
instead of stripping the following text like before.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:24 +02:00
Oneric
25b2cb91b8 avcodec/webvttdec: honour bidi marks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:24 +02:00
Andreas Rheinhardt
f01f42db3a fate/ffmpeg: Avoid dependency on samples
Creating vsynth_lena.yuv needs the FATE suite,
yet several tests in ffmpeg.mak without a dependency
on samples used it as input file. Fix this by using
vsynth1.yuv (which does not have such a dependency)
instead.
Also use vsynth1.yuv in fate-shortest to avoid
the samples dependency in this test, too.

Fixes ticket #10947.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:24 +02:00
Andreas Rheinhardt
743a20438e fate/wavpack: Add test for DSD
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:23 +02:00
Andreas Rheinhardt
5dbeba95ab avcodec/vvc: Rename vvc_?foo->foo
A namespace is unnecessary here given that all these files
are already in the vvc subfolder.

Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-06 18:08:21 +02:00
Andreas Rheinhardt
863b38b563 fate/ffprobe: Fix test requirements
The ffprobe-test file is generated via ffmpeg and several filters;
the requirements for them were missing.
Also deduplicate this while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:40 +02:00
Andreas Rheinhardt
7f565998fa fate/api: Fix requirements of fate-api-seek
It relies on the fate-lavf-flv test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:40 +02:00
Andreas Rheinhardt
1d6e0a9925 fate/lavf-container: Check earlier for presence of ffmpeg cli
Several other tests (e.g. concatdec) examine FATE_LAVF_CONTAINER
in order to enable or disable tests that depend on samples
created by the lavf-container tests; right now this procedure
did not account for CONFIG_FFMPEG.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:40 +02:00
Andreas Rheinhardt
58935226ed fate/libswscale: Disable ffmpeg-dependent tests without ffmpeg
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-04 01:53:40 +02:00
James Almer
30c45b8126 fate/vvc: add vvc-conformance-IBC_B_Tencent_2
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-03 17:29:51 +02:00
James Almer
26fb3cbd6e fate/vvc: add vvc-conformance-SUBPIC_C_ERICSSON_1
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-03 17:29:51 +02:00
James Almer
8da7346d90 fate/vvc: disable vvc-conformance-OPI_B_3 and vvc-conformance-VPS_A_3
Both samples rely on a feature our decoder doesn't currently support.

Should fix fate failures on some systems where not even the one single frame
could be generated.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-03 17:29:51 +02:00
Andreas Rheinhardt
f8878dc475 fate/fits: Fix tests on BE
The fits decoder decodes to native pixel formats; so
the fitsdec-gbrap16be fate test failed on BE despite
its name because the reference file is LE.
This patch fixes this by forcing a pixel format;
the forced pixel format is BE, causing a change
in the reference file.
The fitsdec-gbrp16be test was not affected, because
its source file (lena-rgb48.png from tne FATE suite)
is actually biendian (as if someone had multiplied
8bit content by 257...).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-02 14:58:55 +02:00
Andreas Rheinhardt
1a1cc5e2fa fate/filter-video: Insert scale, format filters in filter-yadif,bwdif10
The format and the first scale filter ensures that the filter
processing actually happens in high bit depth; the second
scale filter is only necessary for big endian arches.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-02 14:58:54 +02:00
Andreas Rheinhardt
f687d445f8 fate/filter-video: Always use little endian pixel format
Fixes filter-metadata-signalstats-yuv420p10 on BE arches.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-02 14:58:54 +02:00
Andreas Rheinhardt
5b585ba560 fate/video: Only use bitexact IDCT in avid meridian
Precludes the usage of the altivec IDCT which fixes
the avid-meridian FATE test on ppc64be here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-02 14:58:53 +02:00
Andreas Rheinhardt
a1a1d49355 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-01 19:51:37 +02:00
Andreas Rheinhardt
ed6f9bf08b fate/image: Fix EXR tests on big endian
These tests need a scale filter to convert to the prescribed
pixel format (the native format is endian-dependent).

Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 21:00:43 +01:00
Sean McGovern
3515a6782d fate: fix sub2video_{basic, time_limited} on big-endian targets
The reference file uses BGRA pixel format, so request it here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 21:00:41 +01:00
Anton Khirnov
4c3dc0df22 lavfi/setpts: unset frame durations
Actual frame durations are, in general, not computable without buffering
a frame.

FIxes #10886

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 13:46:45 +01:00
Anton Khirnov
4428b0f519 lavf/vf_setpts: unset output framerate
This filter produces VFR output in general.

Avoids dropping frames in the setpts test.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 13:46:45 +01:00
Tobias Rapp
209bc9c1ce tests/audiogen: Fix total RIFF chunk size
The "RIFF" identifier and chunk size fields should not be included
within the size value.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-28 22:25:54 +01:00
Anton Khirnov
46ef0baf71 fftools/ffmpeg_dec: apply cropping manually
lavfi does not require aligned buffers, so we can safely apply top/left
cropping by any amount, without passing any special flags to lavc.
Longer term, an even better solution would probably be auto-inserting
the crop filter (or its hwaccel versions) as needed.

Multiple FATE tests no longer need -flags unaligned.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-28 22:25:53 +01:00
Zhao Zhili
51f0437eeb tests: Remove fate-libx265-hdr10
The test depends on the compile option of x265. It failed when
HIGH_BIT_DEPTH isn't enabled. It also failed when asan is enabled
because of memory issue inside of x265, which I don't think can
be fixed within FFmpeg.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-27 19:21:51 +01:00
Marton Balint
359600f01a avutil/timestamp: change precision of av_ts_make_time_string()
By calling the av_ts_make_time_string2() from the function we can fix the
precision issue.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 22:54:44 +01:00
Andreas Rheinhardt
366ed95718 fate/source: Fix FATE reference file
Forgotten in ecdc94b97f809d5f2b88640842fd0541951ad295.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 22:54:43 +01:00
Marton Balint
fd5a5e85ae avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified
In this case in_channel_idx was never set and the default 0 was used.
Suprisingly no one noticed that the respective fate test output was wrong.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 01:34:01 +01:00
Anton Khirnov
d4fd74b786 tests/fate/ffmpeg: evaluate thread count in fate-run.sh rather than make
Fixes fate-ffmpeg-loopback-decoding with THREADS=random*

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-23 14:23:47 +01:00
Andreas Rheinhardt
e2fe34f485 fate/filter-audio: Don't use pcm output for channelsplit test
This test muxes two streams into a single pcm file, although
the two streams are of course not recoverable from the output
(unless one has extra information). So use the streamhash muxer
instead (which also provides coverage for it; it was surprisingly
unused in FATE so far). This is in preparation for actually
enforcing a limit of one stream for the PCM muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-23 14:23:45 +01:00
Jan Ekström
540edf66be avcodec/libx265: add support for writing out CLL and MDCV
The newer of these two are the separate integers for content light
level, introduced in 3952bf3e98c76c31594529a3fe34e056d3e3e2ea ,
with X265_BUILD 75. As we already require X265_BUILD of at least
89, no further conditions are required.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:41 +01:00
Jan Ekström
94bb479eb6 avcodec/libx264: add support for writing out CLL and MDCV
Both of these two structures were first available with X264_BUILD
163, so make relevant functionality conditional on the version
being at least such.

Keep handle_side_data available in all cases as this way X264_init
does not require additional version based conditions within it.

Finally, add a FATE test which verifies that pass-through of the
MDCV/CLL side data is working during encoding.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:41 +01:00
Jan Ekström
7ecbfe38fa avcodec/libsvtav1: add support for writing out CLL and MDCV
These two were added in 28e23d7f348c78d49a726c7469f9d4e38edec341
and 3558c1f2e97455e0b89edef31b9a72ab7fa30550 for version 0.9.0 of
SVT-AV1, which is also our minimum requirement right now.

In other words, no additional version limiting conditions seem
to be required.

Additionally, add a FATE test which verifies that pass-through of
the MDCV/CLL side data is working during encoding.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:41 +01:00
Jan Ekström
f47eaeb9c4 avutil/frame: add helper for adding side data to array
Additionally, add an API test to check that the no-duplicates
addition works after duplicates have been inserted.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:40 +01:00
Andreas Rheinhardt
37ca591b3d fate/atrac: Add atrac->aea, atrac->matroska remux tests
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-20 00:31:19 +01:00
Andreas Rheinhardt
8a670310e0 tests/ref/lavf-fate/hevc.flv: Fix ref file
Unbreaks the lavf-fate-hevc.flv FATE test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-18 14:18:45 +01:00
Gyan Doshi
3cb537f56b fate/lavf-container: correct operator; unbreak build
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-18 14:18:45 +01:00
Zhu Pengfei
6188f20363 fate/flvenc: support enhanced flv PacketTypeMetadata
Signed-off-by: Zhu Pengfei <411294962@qq.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-18 14:18:45 +01:00
Andreas Rheinhardt
424f982eed fate/lavf-audio: Test writing AIFF-native tags
In particular, test writing tags with odd strlen.
(These tags are zero-padded to even size.)

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:55 +01:00
Marton Balint
e8c292f613 avutil/channel_layout: add specific text versions for unknown and unused channels
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
ca87cd6b81 avutil/channel_layout: factorize parsing list of channel names
Also make use of the av_channel_from_string() function to determine the channel
id. This fixes some parse issues in av_channel_layout_from_string().

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
d1a3a48638 avutil/tests/channel_layout: add some av_channel_from_string and av_channel_layout_from_string tests
We lacked tests which supposed to fail, and there are some which should fail
but right now it does not. This will be fixed in a later commit.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
869bcb1760 avutil/tests/channel_layout: make printing results part of the tests
Deduplicates a lot of code.

Some minor differences (mostly white space and inconsistent use of quotes) are
expected in the fate tests, there was no point aiming for exactly the same
formatting.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
8d8697f741 avformat/pcm: decrease target audio frame per sec to 10
This makes the wav and pcm demuxer demux bigger packets, which is more
efficient.

As a side effect of the bigger packets, audio durations can become less exact
for command lines such as "ffmpeg -i $INPUT -c:a copy -t 1.0 $OUTPUT".

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:53 +01:00
Marton Balint
b71cd5ec7c avformat/wavdec: use ff_pcm_default_packet_size for the default packet size
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:53 +01:00
Marton Balint
5626772ac8 avformat/pcm: factorize and improve determining the default packet size
- Remove the 1024 cap on the number of samples, for high sample rate audio it
  was suboptimal, calculate the low neighbour power of two for the number of
  samples (audio blocks) instead.
- Make the function work correctly also for non-pcm codecs by using the stream
  bitrate to estimate the target packet size. A previous version of this patch
  used av_get_audio_frame_duration2() the estimate the desired packet size, but
  for some codecs that returns the duration of a single audio frame regardless
  of frame_bytes.
- Fallback to 4096/block_align*block_align if bitrate is not available.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
24465faf64 fate/wmavoice: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
c1094751c2 fate/vqf: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
b73ad63ae3 fate/voice: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00