summaryrefslogtreecommitdiff
path: root/libswscale
Commit message (Collapse)AuthorAge
* swscale/x86/swscale: Remove unused ASM constantsAndreas Rheinhardt2021-02-24
| | | | | | | | | | | | | The last user of g15Mask, r15Mask, g16Mask and r16Mask was disabled in 77a416e8aab77058b542030870fd7178b62d2a62 and finally removed in 36e8de07ed62609df45d064b56501e3084d25723; b15Mask and b16Mask were apparently always unused (except for in_asm_used_var_warning_killer, a function that only existed to make the compiler not optimize ASM constants away). w10 is unused since d604bab901f6dfaaad672ef2164e42b1f350474c, w02 since ef423a661818f3c0d8206a2abbc65ff555cc0c67. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swscale/x86/rgb2rgb: Remove unused ASM constantsAndreas Rheinhardt2021-02-24
| | | | | | | | | mask24hh etc. are unused since f099fbf5f3ac1d6b3753fc8dfda6558572111fbd, mask32b and mask32r since 296609f859a587575b91fe9e9691f2707d6e8136, mask32g since b38d487466e68bd6baf2889017d2a751831560f0 and mask32 since f8a138be5257f751ef7d3c6b7ab534c0434e90e7. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swscale/x86/yuv2rgb: Remove unused ASM constantsAndreas Rheinhardt2021-02-24
| | | | | | | mmx_grnmask is unused since 531f97b0c32d1d421f3ac614e002c53951658115, the other constants since e934194b6a4159b7960cabefb0dd8b998c1961e8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lsws/ppc/yuv2rgb_altivec: Fix build in non-VSX environmentsChip Kerchner2021-02-22
| | | | | | | | | Add inline function for vec_xl if VSX is not supported. vec_xl intrinsic is only available on POWER 7 or higher. Fixes ticket #8750. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* swscale/x86/yuv2yuvX: use the movsxdifnidn helper macroJames Almer2021-02-18
| | | | | | Simplifies code Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/yuv2yuvX: use movq to load 8 bytes in all non-AVX2 functionsJames Almer2021-02-18
| | | | | | mova expands to movq on non-XMM functions Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/yuv2yuvX: use the SPLATW helper macroJames Almer2021-02-18
| | | | | | Simplifies code Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/swscale: fix mix of inline and external function definitionsJames Almer2021-02-18
| | | | | | This includes removing pointless static function forward declarations. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/swscale: fix compilation with old yasmJames Almer2021-02-17
| | | | | | Where AVX2 may not be supported. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale: move yuv2yuvX_sse3 to yasm, unrolls main loopAlan Kelly2021-02-17
| | | | And other small optimizations for ~20% speedup.
* lsws/ppc/yuv2rgb: Fix transparency converting from yuv->rgb32.Carl Eugen Hoyos2021-01-24
| | | | | | Based on 68363b69 by Reimar Döffinger. Fixes ticket #9077.
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-01
| | | | They are not properly namespaced and not intended for public use.
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* libswscale: avoid UB nullptr-with-offset.Jeremy Leconte2020-12-24
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/rgb2rgb_template: use shuffle macro on big-endian archesAndriy Gelman2020-12-12
| | | | | | | | | | | | | | Fixes fate-qtrle-32bit on big-endian. The macro does a simple byte swap on uint8 array without any casts, so it's valid on big-endian arches. The mentioned test was failing because the byteswap function shuffle_bytes_3210_c() is used in the pixel format conversion (argb->bgra). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* lsws/x86/yuv2rgb: Fix compilation with mmxext or ssse3 disabled.Carl Eugen Hoyos2020-11-14
| | | | Fixes ticket #8986.
* swscale/x86/yuv2rgb: fix crashes when loading alpha from unaligned buffersMarton Balint2020-11-02
| | | | | | | | | Regression since fc6a5883d6af8cae0e96af84dda0ad74b360a084 on SSSE3 enabled CPUs. Fixes ticket #8955. Signed-off-by: Marton Balint <cus@passwd.hu>
* swscale/utils: override forced-zero formats back to full rangeJan Ekström2020-10-11
| | | | | | | | Fixes vf_scale outputting RGB AVFrames with limited range flagged in case either input or output specifically sets the range. This is the reverse of the logic utilized for RGB and PAL8 content in sws_setColorspaceDetails.
* swscale/utils: split range override check into its own functionJan Ekström2020-10-11
|
* libswcale/input: use more accurate planer rgb16 yuv conversionsMark Reid2020-10-06
| | | | | | | These conversion appears to be exhibiting the same rounding error as the rgbf32 formats where. I seperated the rounding value from the 16 and 128 offsets, I think it makes it a little more clear. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswcale/input: use more accurate rgbf32 yuv conversionsMark Reid2020-10-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale/tests: add floatimg_cmp testMark Reid2020-10-02
| | | | | | | | | | changes since v1: - made into fate test - fixed c90 warnings - tests more intermediate formats - tested on BE mips too Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/x86/output: add missing AVX2 support preprocessor wrappersJames Almer2020-08-20
| | | | | | Fixes compilation with old yasm Signed-off-by: James Almer <jamrial@gmail.com>
* swscale: do not drop half of bits from 16bit bayer formatsPaul B Mahol2020-08-08
|
* swscale/yuv2rgb: cosmeticsLimin Wang2020-07-25
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/yuv2rgb: consider x2rgb10le on big endian hardwareFei Wang2020-07-20
| | | | | | | This fixed FATE fail report by filter-pixfmts* for x2rgb10le on big endian hardware. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: use 1 for indicating errosMichael Niedermayer2020-07-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Initialize res to a non random error codeMichael Niedermayer2020-07-14
| | | | | | | | | Regression since: 3adffab073bc59af39dddd035168ac72bc9ffde3 -1 is consistent what other error paths return Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: Fix incorrect return code checkMichael Niedermayer2020-07-14
| | | | | | | Regression since: 3adffab073bc59af39dddd035168ac72bc9ffde3 Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/yuv2rgb: fix crashes when storing data on unaligned buffersJames Almer2020-07-14
| | | | | | | | | Regression since fc6a5883d6af8cae0e96af84dda0ad74b360a084 on SSSE3 enabled CPUs. Fixes ticket #8747 Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/tests: check return value of sws_scaleLynne2020-07-09
|
* aarch64/yuv2rgb_neon: fix return valueLynne2020-07-09
| | | | | | We return 0 for this particular architecture but should instead be returning the number of lines. Fixes users who check the return value matches what they expect.
* swscale: cosmetic fixesNelson Gomez2020-06-14
| | | | Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* swscale/x86/output: add AVX2 version of yuv2nv12cXNelson Gomez2020-06-14
| | | | | | | | | | 256 bits is just wide enough to fit all the operands needed to vectorize the software implementation, but AVX2 is needed to for a couple of instructions like cross-lane permutation. Output is bit-for-bit identical to C. Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* swscale: make yuv2interleavedX more asm-friendlyNelson Gomez2020-06-14
| | | | | | | | | Extracting information from SwsContext in assembly is difficult, and rearranging SwsContext just for asm access didn't look good. These functions only need a couple of fields from it anyway, so just make them parameters in their own right. Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* swscale/utils: return better error code from initFilter()Limin Wang2020-06-14
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/utils: reindentLimin Wang2020-06-14
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/utils: remove FF_ALLOC_ARRAY_OR_GOTO macrosLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale: Add swscale input/output support for X2RGB10LEFei Wang2020-06-12
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* Bump minor versions after branching 4.3Michael Niedermayer2020-06-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions to separate 4.3 from masterMichael Niedermayer2020-06-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: aarch64: Add a NEON implementation of interleaveBytesMartin Storsjö2020-05-15
| | | | | | | | | | | | This allows speeding up format conversions from yuv420 to nv12. Cortex A53 A72 A73 interleave_bytes_c: 86077.5 51433.0 66972.0 interleave_bytes_neon: 19701.7 23019.2 15859.2 interleave_bytes_aligned_c: 86603.0 52017.2 67484.2 interleave_bytes_aligned_neon: 9061.0 7623.0 6309.0 Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale: arm: fix NEON hscale initJosh de Kock2020-05-15
| | | | | | | | | | | | | | | | | The NEON hscale function only supports X8 filter sizes and should only be selected when these are being used. At the moment filterAlign is set to 8 but in the future when extra NEON assembly for specific sizes is added they will need to have checks here too. The immediate usecase for this change is making the hscale checkasm test easier and without NEON specific edge-cases (x86 already has these guards). This applies the same fix from 718c8f9aa59751bb490e2688acf2b5cb68fd5ad1 on the 32 bit arm version of the function, fixing fate-checkasm-sw_scale there. Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale: fix NEON hscale initJosh de Kock2020-05-15
| | | | | | | | | | | | | The NEON hscale function only supports X8 filter sizes and should only be selected when these are being used. At the moment filterAlign is set to 8 but in the future when extra NEON assembly for specific sizes is added they will need to have checks here too. The immediate usecase for this change is making the hscale checkasm test easier and without NEON specific edge-cases (x86 already has these guards). Signed-off-by: Josh de Kock <josh@itanimul.li>
* libswscale: fix for floating point formats, require full chromaMark Reid2020-05-12
| | | | | | upon more floating point testing, looks like I missed adding this bit. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale: add output support for AV_PIX_FMT_GBRAPF32Mark Reid2020-05-05
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale: add input support AV_PIX_FMT_GBRAPF32Mark Reid2020-05-05
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/vscale: Increase type strictnessAndreas Rheinhardt2020-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | libswscale/vscale.c makes extensive use of function pointers and in doing so it converts these function pointers to and from a pointer to void. Yet this is actually against the C standard: C90 only guarantees that one can convert a pointer to any incomplete type or object type to void* and back with the result comparing equal to the original which makes pointers to void generic pointers to incomplete or object type. Yet C90 lacks a generic function pointer type. C99 additionally guarantees that a pointer to a function of one type may be converted to a pointer to a function of another type with the result and the original comparing equal when converting back. This makes any function pointer type a generic function pointer type. Yet even this does not make pointers to void generic function pointers. Both GCC and Clang emit warnings for this when in pedantic mode. This commit fixes this by using a union that can hold one member of any of the required function pointer types to store the function pointer. This works even for C90. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swscale: aarch64: Don't clobber callee-saved registers v8-v15Martin Storsjö2020-04-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale: aarch64: Avoid using the x18 registerMartin Storsjö2020-04-20
| | | | | | | | | | The x18 is a reserved platform register on Darwin and Windows. x8/w8 seems to be unused in this function though (and same about x10 and x14), so there's really no reason to use x18 here - just change the uses of x18/w18 into x8/w8 instead without any further rewrites. Signed-off-by: Martin Storsjö <martin@martin.st>