summaryrefslogtreecommitdiff
path: root/libswscale
Commit message (Collapse)AuthorAge
* libs: bump major version for all librariesJames Almer2024-03-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libswscale/utils: Fix bayer to yuvjMichael Niedermayer2024-02-21
| | | | | | | | | Fixes: out of array access. Earlier code assumes that a unscaled bayer to yuvj420 converter exists but the later code then skips yuvj420 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "swscale: fix sws_setColorspaceDetails after sws_init_context"Michael Niedermayer2024-02-21
| | | | | | | | | Suggested by: Niklas Haas in Ticket10824 Fixes: Assertion failure Fixes: Ticket10824 This reverts commit cedf589c09c567b72bf4c1a58db53d94622567e1.
* swscale/swscale: Check srcSliceH for bayerMichael Niedermayer2024-02-21
| | | | | Fixes: Assertion srcSliceH > 1 failed at libswscale/swscale_unscaled.c:1359 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Allocate more dithererrorMichael Niedermayer2024-02-21
| | | | | Fixes: out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Add help textMichael Niedermayer2024-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Highlight cases that worsenedMichael Niedermayer2024-02-15
| | | | | | also highlight cases that worsened alot in uppercase Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Allow comparing a subset of cases to a reference fileMichael Niedermayer2024-02-15
| | | | | | Testing all cases exhaustively is slow Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Test a wider range of flag combinationsMichael Niedermayer2024-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Compute chroma and alpha between gray and opaque ↵Michael Niedermayer2024-02-15
| | | | | | frames too Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Split sws_getContext()Michael Niedermayer2024-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Implement isALPHA() using AVPixFmtDescriptorMichael Niedermayer2024-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* all: use designated initializers for AVOption.unitAnton Khirnov2024-02-14
| | | | | | | | | | | | | | | | | | | | | | | | Makes it robust against adding fields before it, which will be useful in following commits. Majority of the patch generated by the following Coccinelle script: @@ typedef AVOption; identifier arr_name; initializer list il; initializer list[8] il1; expression tail; @@ AVOption arr_name[] = { il, { il1, - tail + .unit = tail }, ... }; with some manual changes, as the script: * has trouble with options defined inside macros * sometimes does not handle options under an #else branch * sometimes swallows whitespace
* riscv: test for assembler supportRémi Denis-Courmont2023-12-08
| | | | | This should fix the build on LLVM 16 and earlier, at the cost of turning all non-RVV optimisations off.
* swscale/x86/rgb_2_rgb: Add opaque pointer to missed definitions of ff_nv12ToUVAlfred Wingate2023-12-02
| | | | | | | | | | | Opaque parameters were previously added to the original definition of ff_nv12ToUV, leading to gcc noticing a type mismatch with -Wlto-type-mismatch. https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f2de911818fbd7e73343803626b697fd0c968121 https://bugs.gentoo.org/907484 Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc/hevcdsp_qpel_neon: using movi.16b instead of movi.2dxufuji4562023-11-28
| | | | | | | Building iOS platform with arm64, the compiler has a warning: "instruction movi.2d with immediate #0 may not function correctly on this CPU, converting to movi.16b" Signed-off-by: xufuji456 <839789740@qq.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* sws/rgb2rgb: fix unaligned accesses in R-V V YUYV to I422pRémi Denis-Courmont2023-11-13
| | | | | | | | | | | | | | | In my personal opinion, we should not need to support unaligned YUY2 pixel maps. They should always be aligned to at least 32 bits, and the current code assumes just 16 bits. However checkasm does test for unaligned input bitmaps. QEMU accepts it, but real hardware dose not. In this particular case, we can at the same time improve performance and handle unaligned inputs, so do just that. uyvytoyuv422_c: 104379.0 uyvytoyuv422_c: 104060.0 uyvytoyuv422_rvv_i32: 25284.0 (before) uyvytoyuv422_rvv_i32: 19303.2 (after)
* sws/rgb2rgb: rework R-V V YUY2 to 4:2:2 planarRémi Denis-Courmont2023-11-13
| | | | | | This saves three scratch registers and three instructions per line. The performance gains are mostly negligible. The main point is to free up registers for further rework.
* swscale/yuv2rgb: fix sws_getCoefficients for colorspace=0Niklas Haas2023-11-09
| | | | | | The documentation states that invalid entries default to SWS_CS_DEFAULT. A value of 0 is not a valid SWS_CS_*, yet the code incorrectly hard-codes it to BT.709 coefficients instead of SWS_CS_DEFAULT.
* swscale: don't omit ff_sws_init_range_convert for high-bitNiklas Haas2023-11-09
| | | | | | | This was a complete hack seemingly designed to work around a different bug, which was fixed in the previous commit. As such, there is no more reason not to do this, as it simply breaks changing color range in sws_setColorspaceDetails for no reason.
* swscale: fix sws_setColorspaceDetails after sws_init_contextNiklas Haas2023-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | More commonly, this fixes the case of sws_setColorspaceDetails after sws_getContext, since the latter implies sws_init_context. The problem here is that sws_init_context sets up the range conversion and fast path tables based on the values of srcRange/dstRange at init time. This may result in locking in a "wrong" path (either using unscaled fast path when range conversion later required, or using scaled slow path when range conversion becomes no longer required). There are two way outs: 1. Always initialize range conversion and unscaled converters, even if they will be unused, and extend the runtime check. 2. Re-do initialization if the values change after sws_setColorspaceDetails. I opted for approach 1 because it was simpler and easier to reason about. Reword the av_log message to make it clear that this special converter is not necessarily used, depending on whether or not there is range conversion or YUV matrix conversion going on.
* Bump versions after 6.1Michael Niedermayer2023-10-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump versions prior to 6.1Michael Niedermayer2023-10-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aarch64: Reindent all assembly to 8/24 column indentationMartin Storsjö2023-10-21
| | | | | | | | libavcodec/aarch64/vc1dsp_neon.S is skipped here, as it intentionally uses a layered indentation style to visually show how different unrolled/interleaved phases fit together. Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Lowercase UXTW/SXTW and similar flagsMartin Storsjö2023-10-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Consistently use lowercase for vector element specifiersMartin Storsjö2023-10-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale/rgb2rgb: R-V V deinterleaveBytesRémi Denis-Courmont2023-10-03
|
* swscale/rgb2rgb: fix extra iteration in R-V V interleaveRémi Denis-Courmont2023-10-03
| | | | | | There was an additional iteration doing nothing for each line, due to checking the selected vector length instead of the available vector length.
* swscale/rgb2rgb: unroll R-V V interleave_bytesRémi Denis-Courmont2023-10-03
|
* swscale/rgb2rgb: unroll RISC-V V uyvytoyuv422Rémi Denis-Courmont2023-10-03
|
* swscale/rgb2rgb: avoid S-regs in RISC-V V uyvytoyuv422Rémi Denis-Courmont2023-10-03
| | | | | We can make do with callee-clobbered registers only now. As an added bonus, this makes the code XLEN-independent.
* swscale/rgb2rgb: rework RISC-V V uyvytoyuv422Rémi Denis-Courmont2023-10-03
| | | | This avoids using relatively slow register strides.
* swscale/rgb2rgb: remove R-V V shuffle_bytes_3012Rémi Denis-Courmont2023-10-02
| | | | | | This is slower than the Zbb version on real hardware due to register strides. Proper support for vector byte-swap requires the Zvbb extension, but it's much too early for me to worry about it.
* swscale/rgb2rgb: add R-V Zbb shuffle_bytes_3210Rémi Denis-Courmont2023-10-02
|
* swscale: add GBRAP14 format supportPaul B Mahol2023-09-28
|
* avutil/internal: Don't auto-include emms.hAndreas Rheinhardt2023-09-04
| | | | | | Instead include emms.h wherever it is needed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Set WIN32_LEAN_AND_MEAN at configure timeL. E. Segovia2023-08-14
| | | | | | | | | | | | | Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h. See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia <amy@amyspark.me> Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale/rgb2rgb2: rework RISC-V V shuffle_bytes_{1230,3012}Rémi Denis-Courmont2023-07-21
| | | | | | | | | | | | This avoids strided loads. Before: shuffle_bytes_1230_rvv_i32: 308.7 shuffle_bytes_3012_rvv_i32: 308.7 After: shuffle_bytes_1230_rvv_i32: 46.7 shuffle_bytes_3012_rvv_i32: 46.7
* swscale/rgb2rgb2: rework RISC-V V shuffle_bytes_{0321,2103}Rémi Denis-Courmont2023-07-21
| | | | | | | | | | | | This avoids strided loads. Before: shuffle_bytes_0321_rvv_i32: 307.7 shuffle_bytes_2103_rvv_i32: 308.7 After: shuffle_bytes_0321_rvv_i32: 59.7 shuffle_bytes_2103_rvv_i32: 61.5
* swscale: inline ff_shuffle_bytes_3210_rvvRémi Denis-Courmont2023-07-21
| | | | No functional changes.
* lavu: add/use flag for RISC-V Zba extensionRémi Denis-Courmont2023-07-19
| | | | | | The code was blindly assuming that Zbb or V implied Zba. While the earlier is practically always true, the later broke some QEMU setups, as V was introduced earlier than Zba.
* libswscale/riscv: fix syntax of vsetvliKhem Raj2023-07-13
| | | | | | | | | | | | Add missing operand which clang complains about but GCC assumes it to be 'm1' if not specified. Works around build failure with Clang: | src/libswscale/riscv/rgb2rgb_rvv.S:88:25: error: operand must be e[8|16|32|64|128|256|512|1024],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu] | vsetvli t4, t3, e8, ta, ma | ^ Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
* swscale: bump minor for implementing support for the new pixfmtsLynne2023-05-29
|
* lsws: add in/out support for the new 12-bit 2-plane 422 and 444 pixfmtsLynne2023-05-29
|
* swscale/la: Add following builtin optimized functionsJin Bo2023-05-25
| | | | | | | | | | | | | | | | | yuv420_rgb24_lsx yuv420_bgr24_lsx yuv420_rgba32_lsx yuv420_argb32_lsx yuv420_bgra32_lsx yuv420_abgr32_lsx ./configure --disable-lasx ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -pix_fmt rgb24 -y /dev/null -an before: 184fps after: 207fps Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/la: Optimize the functions of the swscale series with lsx.Lu Wang2023-05-25
| | | | | | | | | | | ./configure --disable-lasx ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -pix_fmt bgra -y /dev/null -an before: 91fps after: 160fps Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/ppc: remove hScale8To19_vsxLynne2023-05-20
| | | | Fails checkasm on a Power9 system.
* version.h: Bump minor post 6.0 branchMichael Niedermayer2023-02-19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* version.h: Bump minor for 6.0 branchMichael Niedermayer2023-02-19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump major versions of all librariesJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>