mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
This adds a test for the mpegvideo unquantize functions. It has been written in order to be able to easily bench these functions. It should be noted that the random input fed to the tested functions is not necessarily representative of the stuff actually occuring in the wild. So benchmarks should be taken with a grain of salt; but comparisons between two functions that do not depend on branch predictions are valid (the usecase for this is to port the x86 mmx functions to use xmm registers). During testing I have found a bug in the arm/aarch64 neon optimizations when using the LIBMPEG2 permutation (used by FF_IDCT_INT): The code seems to be based on the presumption that the remainder of the number of coefficients to process is always <= 4 mod 16. The test therefore sometimes fails for these arches. Hint: I am not certain that 16 bits are enough for the intermediate values of all the computations involved; e.g. both FLV and MPEG-4 escape values can go beyond that after the corresponding multiplications. The input in this test is nevertheless designed to fit into 16 bits. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>