Commit Graph

108446 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
a1bfb5290e sws/rgb2rgb: RISC-V 64-bit V packed YUYV/UYVY to planar 4:2:2
This is currently 64-bit only because the stack spilling code would not
assemble on RV32I (and it would corrupt s0 and s1 on RV128I, in theory).

This could be added later in the unlikely that someone wants it.
2022-09-30 07:25:44 +02:00
Rémi Denis-Courmont
9181835a24 sws/rgb2rgb: RISC-V V interleaveBytes 2022-09-30 07:24:09 +02:00
Rémi Denis-Courmont
66a03f4053 sws/rgb2rgb: RISC-V V shuffle_bytes_xxxx functions 2022-09-30 07:24:09 +02:00
Andreas Rheinhardt
e5f6918cbd avcodec/mpegvideo: Fix undefined left shift of negative numbers
Fixes the rv20-1239 FATE-test.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-30 04:45:28 +02:00
Andreas Rheinhardt
fe3c2c8bbe avcodec/jrevdct: Fix UB left shifts of negative numbers
Affected the rv20-1239 FATE test.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-30 04:45:28 +02:00
Andreas Rheinhardt
87cc318bc2 avcodec/tiff: Remove commented-out code
Also remove a variable that is only used in this commented-out
codeblock. This fixes a -Wunused-variable warning.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-30 04:40:44 +02:00
Wenbin Chen
5682046ce5 libavcodec/qsvenc: Let runtime to decide targetUsage
Set preset default value to MFX_TARGETUSAGE_UNKNOWN. Let runtime to
decide the targetUsage, so that ffmpeg-qsv can keep up with runtime's
update.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
a3c0a3ec60 libavcodec/qsvenc: Let runtime to set default parameter.
Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide
these parameters, so that it can choose the best parameter and ffmpeg-qsv
can keep up with runtime's update.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
3771d54989 libavcodec/qsvenc: Add pic_timing_sei reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
29a3ba8693 libavcodec/qsvenc: Add bitrate reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
17df61083d libavcodec/qsvenc: Add framerate reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Andreas Rheinhardt
76d8f0dd14 avcodec/ac3dsp: Remove unused parameter
Forgotten in fd98594a88.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 23:37:13 +02:00
Martin Storsjö
8089fe072e aarch64: me_cmp: Avoid using the non-unrolled codepath for the minimum unroll size
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-29 10:29:11 +03:00
Martin Storsjö
6f2ad7f951 aarch64: me_cmp: Avoid redundant loads in ff_pix_abs16_y2_neon
This avoids one redundant load per row; pix3 from the previous
iteration can be used as pix2 in the next one.

Before:       Cortex A53    A72    A73
pix_abs_0_2_neon:  138.0   59.7   48.0
After:
pix_abs_0_2_neon:  109.7   50.2   39.5

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-29 10:29:10 +03:00
Martin Storsjö
86519234b8 arm: vc1dsp: Canonicalize the syntax for aligned NEON loads/stores
This hopefully should fix building with older toolchains, hopefully
fixing the fate failures on
http://fate.ffmpeg.org/history.cgi?slot=armel5tej-qemu-debian-gcc4.4.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-29 10:28:45 +03:00
Martin Storsjö
6059ea2a14 riscv: Fix linking without RVV; change #ifdef into #if
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-29 10:28:37 +03:00
Andreas Rheinhardt
fff010591b avcodec/jpeg2000dwt: Fix left shift of negative number
Fixes the j2k-dwt FATE-test; also fixes #9945.
(I don't know whether the multiplication can overflow.)

Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 01:02:55 +02:00
Andreas Rheinhardt
3d8754cd09 avutil/display: Drop wrong comments about matrices being allocated
These functions work just as well with stack based matrices.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 00:05:32 +02:00
Andreas Rheinhardt
c35a6709d0 avcodec/lsp: Make ff_lsp2polyf() static
Possible since 48ac225db2.
Furthermore, the current code would not work on mips
in case ff_lsp2polyf() were used outside of lsp.c,
because it is not compiled on mips since commit
3827a86eac at all;
instead it is overridden with a static av_always_inline
function which only works for the callers in lsp.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 00:05:32 +02:00
Andreas Rheinhardt
e0980629d8 avcodec/lsp: Move ff_lsp2polyf() upwards in lsp.c
Will avoid a forward declaration lateron.
Also adapt the function to modern style while at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 00:05:32 +02:00
Andreas Rheinhardt
ba07c84bf9 avcodec/amrwbdec,lsp: Include mips headers only #if ARCH_MIPS
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 00:05:32 +02:00
Andreas Rheinhardt
6573e65ac0 avcodec/aacdectab: Remove empty channel layouts
They will be mistaken for the sentinel of the arrays
they are in, thereby hiding the 6.1, 7.1 and 22.2 layouts.
(This doesn't really matter, as these arrays are informational
only for decoders.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-28 23:47:46 +02:00
Andreas Rheinhardt
fdff1b9cbf avcodec/codec_internal: Avoid deprecation warnings for channel_layouts
AVCodec.channel_layouts is deprecated and Clang (unlike GCC)
warns when setting this field in a codec definition.
Fortunately, Clang (unlike GCC) allows to use
FF_DISABLE_DEPRECATION_WARNINGS inside a definition (of an FFCodec),
so that one can create simple macros to set AVCodec.channel_layouts
that also suppress deprecation warnings for Clang.

(Notice that some of the codec definitions were already
inside FF_DISABLE/ENABLE_DEPRECATION_WARNINGS (that were not
guarded by FF_API_OLD_CHANNEL_LAYOUT); these have been removed.
Also notice that setting AVCodec.channel_layouts was not guarded
by FF_API_OLD_CHANNEL_LAYOUT either, so testing disabling it
it without removing all the codeblocks would not have worked.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-28 23:44:28 +02:00
Andreas Rheinhardt
4393331250 avcodec/dirac_dwt: Avoid conversions between function pointers and void*
Pointers to void can be converted to any pointer to incomplete or
object type and back; but they are nevertheless not completely generic
pointers: There is no provision in the C standard that guarantees their
convertibility with function pointers. C90 lacks a generic function
pointer, C99 made every function pointer a generic function pointer and
still disallows the convertibility with void *. Both GCC as well as
Clang warn about this when using -pedantic.

Therefore use unions to avoid these conversions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-28 23:37:12 +02:00
Andreas Rheinhardt
a91ddce689 avcodec/dirac_dwt(_template): Don't use ff_-prefix for static func
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-28 23:23:40 +02:00
James Almer
299253ae1b avutil/channel_layout: move and improve the comment about unknown orders
Don't place it as doxy specific for the order field, and generalize it both to
also cover already defined orders and to not make it seem like the user is
required to handle a layout they don't fully support or understand.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-28 12:21:18 -03:00
James Almer
bcd2e7d685 avutil/version: bump minor for the new RISC-V cpu flags
Forgotten in 0c0a3deb18.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-28 12:21:18 -03:00
Paul B Mahol
4f022e6782 avcodec/mjpegdec: check that index is not negative 2022-09-28 16:27:06 +02:00
Rémi Denis-Courmont
d31013166a lavc/pixblockdsp: RISC-V diff_pixels & diff_pixels_unaligned 2022-09-28 11:46:11 +02:00
Rémi Denis-Courmont
ebee25855a lavc/pixblockdsp: RISC-V V 16-bit get_pixels & get_pixels_unaligned 2022-09-28 11:46:11 +02:00
Rémi Denis-Courmont
676b08cb70 lavc/pixblockdsp: RISC-V V 8-bit get_pixels & get_pixels_unaligned 2022-09-28 11:46:11 +02:00
Rémi Denis-Courmont
2746329ce2 lavc/idctdsp: RISC-V V put_signed_pixels_clamped function 2022-09-28 11:46:11 +02:00
Rémi Denis-Courmont
fa983b5656 lavc/idctdsp: RISC-V V add_pixels_clamped function 2022-09-28 11:46:11 +02:00
Rémi Denis-Courmont
b29ee63a1b lavc/idctdsp: RISC-V V put_pixels_clamped function 2022-09-28 11:46:11 +02:00
Rémi Denis-Courmont
c47ebfa141 lavu/riscv: helper to read the vector length 2022-09-28 11:43:17 +02:00
Martin Storsjö
dd2e524ffa riscv: Use the correct path for including asm.S
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-28 11:02:46 +03:00
Pierre-Anthony Lemieux
0e402ebf48
format/imfdec: improve error handling when selecting tracks for playback
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
2022-09-28 11:54:52 +10:00
Lynne
0bc7ba4488
configure: remove mdct15 from the encoder/decoder's list of requirements 2022-09-28 00:08:48 +02:00
Andreas Rheinhardt
2664b39d54 avocdec/snowenc: Fix left shift of negative number
Fixes the vsynth(1|2|_lena)-snow-ll FATE-tests.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-27 23:55:44 +02:00
Timo Rothenpieler
59cb0bd23d avfilter/vf_extractplanes: add missing break; statement 2022-09-27 19:35:49 +02:00
Derek Buitenhuis
f5cd00bf52 ffprobe: Check for invalid matrix error when printing rotation
av_display_rotation_get will return NAN when the display matrix is invalid,
which would end up printing NAN as an integer in the rotation field. This
is poor for multiple reasons:

* Users of ffprobe have no way of discerning "valid but ugly rotation from
  display matrix" from "invalid display matrix".
* It can have unintended consequences on some platforms, such as Linux x86_64,
  where NAN is equal to INT64_MIN, which, for example, when printed as JSON,
  which uses floating point for all numbers, can end up as invalid JSON or wit
  a number that cannot be reserialized as an integer at all.

Since NAN is av_display_rotation_get's error case, just print 0 (no rotation)
when that happens.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-09-27 17:37:21 +01:00
Rémi Denis-Courmont
c03f9654c9 lavc/aacpsdsp: RISC-V V stereo_interpolate[0] 2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
a15edb0bc0 lavc/aacpsdsp: RISC-V V hybrid_synthesis_deint 2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
09f907999f lavc/aacpsdsp: RISC-V V hybrid_analysis_ileave 2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
15c3a0bd6e lavc/aacpsdsp: RISC-V V hybrid_analysis
This starts with one-time initialisation of the 26 constant factors
like  08edacc248. That is done with
the scalar instruction set. While the formula can readily be vectored,
the gains would (probably) be more than lost in transfering the results
back to FP registers (or suitably reshuffling them into vector
registers).

Note that the main loop could likely be scheduled sligthly better by
expanding the filter macro and interleaving loads with arithmetic.
It is not clear yet if that would be relevant for vector processing (as
opposed to traditional SIMD).

We could also use fewer vectors, but there is not much point in sparing
them (they are *all* callee-clobbered).
2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
e180326a0b lavc/aacpsdsp: RISC-V V mul_pair_single 2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
b0cacf4c3f lavc/aacpsdsp: RISC-V V add_squares 2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
453aba71e6 lavc/vorbisdsp: RISC-V V inverse_coupling
This uses the following vectorisation:

    for (i = 0; i < blocksize; i++) {
        ang[i] = mag[i] - copysignf(fmaxf(ang[i], 0.f), mag[i]);
        mag[i] = mag[i] - copysignf(fminf(ang[i], 0.f), mag[i]);
    }
2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
220dfd0945 lavc/fmtconvert: RISC-V V int32_to_float_fmul_array8 2022-09-27 13:19:52 +02:00
Rémi Denis-Courmont
47a10b9a99 lavc/fmtconvert: RISC-V V int32_to_float_fmul_scalar 2022-09-27 13:19:52 +02:00