swscale/x86: use NASM uop macros generated by uops_macros_gen

Replaces the hack of running the C preprocessor over the C macros to produce
NASM syntax at build time. The generated file is now committed and checked by
FATE, as with uops_macros.h.

As a side effect, the DECL_* macros are now proper multi-line NASM macros,
so drop the parentheses around their arguments.

The FATE test is split up per generated file, with fate-sws-uops-macros
running all of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas HaasandClaude Opus 5.5 authored and Niklas Haas committed 2026-10-25 02:23:01 +00:00
1 parent 372d0019b3
commit 4e3adb4225
10 files changed
+963 -163

No files matched your search

-1
View File
@@ -26,7 +26,6 @@
*.spv
*.spv.c
*.spv.gz
*.gen.asm
*.gen.c
*.gen.S
*.ptx
-9
View File
@@ -19,18 +19,9 @@ X86ASM-OBJS += x86/input.o \
x86/yuv_2_rgb.o \
x86/yuv2yuvX.o \
SKIPHEADERS += x86/uops_macros.asm.h
ifdef ARCH_X86_64
X86ASM-OBJS-$(CONFIG_UNSTABLE) += x86/ops_common.o \
x86/ops_int.o \
x86/ops_float.o \
x86/ops.o
$(SUBDIR)x86/ops_common.o: $(SUBDIR)x86/uops_macros.gen.asm
$(SUBDIR)x86/ops_int.o: $(SUBDIR)x86/uops_macros.gen.asm
$(SUBDIR)x86/ops_float.o: $(SUBDIR)x86/uops_macros.gen.asm
$(SUBDIR)x86/uops_macros.gen.asm: $(SRC_PATH)/libswscale/x86/uops_macros.asm.h \
$(SRC_PATH)/libswscale/uops_macros.h | $(MSCL)
$(HOSTCC) $(HOSTCC_E) $(HOSTCPPFLAGS) $<
endif
+4 -4
View File
@@ -258,13 +258,13 @@ cglobal NAME, 6, 10, 3, exec, shuffle, bx, y, bxend, yend, src, dst, src_stride,
%endmacro
INIT_XMM sse4
DECL_U8_RW_SHUFFLE (RW_SHUFFLE)
DECL_U8_RW_SHUFFLE RW_SHUFFLE
INIT_YMM avx2
DECL_U8_RW_SHUFFLE (RW_SHUFFLE)
DECL_U8_RW_SHUFFLE RW_SHUFFLE
INIT_ZMM avx512
DECL_U8_RW_SHUFFLE (RW_SHUFFLE)
DECL_U8_RW_SHUFFLE RW_SHUFFLE
INIT_ZMM avx512icl
DECL_U8_RW_SHUFFLE (RW_SHUFFLE)
DECL_U8_RW_SHUFFLE RW_SHUFFLE
+11 -11
View File
@@ -677,21 +677,21 @@ IF W, addps mw2, m11
; Instantiate above macros to generate all uop kernels
%macro decl_filter_ops 1 ; type
decl_suffix _4x4, DECL_%1_READ_PLANAR_FH (READ_PLANAR_FH_4X4)
decl_suffix _4x4, DECL_%1_READ_PLANAR_FH READ_PLANAR_FH_4X4
DECL_%1_READ_PLANAR_FH (READ_PLANAR_FH)
DECL_%1_READ_PLANAR_FV (READ_PLANAR_FV)
DECL_%1_READ_PLANAR_FV_FMA (READ_PLANAR_FV_FMA)
DECL_%1_READ_PLANAR_FH READ_PLANAR_FH
DECL_%1_READ_PLANAR_FV READ_PLANAR_FV
DECL_%1_READ_PLANAR_FV_FMA READ_PLANAR_FV_FMA
%endmacro
%macro decl_float_ops 1 ; type
DECL_%1_SCALE (SCALE)
DECL_%1_ADD (ADD)
DECL_%1_MIN (MIN)
DECL_%1_MAX (MAX)
DECL_%1_LINEAR (LINEAR)
DECL_%1_LINEAR_FMA (LINEAR_FMA)
DECL_%1_DITHER (DITHER)
DECL_%1_SCALE SCALE
DECL_%1_ADD ADD
DECL_%1_MIN MIN
DECL_%1_MAX MAX
DECL_%1_LINEAR LINEAR
DECL_%1_LINEAR_FMA LINEAR_FMA
DECL_%1_DITHER DITHER
%endmacro
INIT_YMM avx2
+2 -2
View File
@@ -19,7 +19,7 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
%include "libswscale/x86/uops_macros.gen.asm"
%include "libswscale/x86/uops_macros.asm"
; High-level explanation of how the x86 backend works:
;
@@ -153,7 +153,7 @@ endstruc
; Common macros for declaring operations
; Declare an operation kernel, calling a provided macro to generate the body.
; Note: This is automatically called by the DECL_*() macros
; Note: This is automatically called by the DECL_* macros
%macro DECL_OP 5-6+ ; macro, name, type, uop, mask
; Declare named variables for common macro parameters
%ifdef NAME_SUFFIX
+39 -39
View File
@@ -884,57 +884,57 @@ IF2 V2, linear_pass 2
; Instantiate above macros to generate all uop kernels
%macro decl_ops 1 ; type
DECL_%1_READ_PACKED (READ_PACKED)
DECL_%1_READ_NIBBLE (READ_NIBBLE)
DECL_%1_READ_BIT (READ_BIT)
DECL_%1_READ_PALETTE (READ_PALETTE)
DECL_%1_WRITE_PACKED (WRITE_PACKED)
DECL_%1_WRITE_NIBBLE (WRITE_NIBBLE)
DECL_%1_WRITE_BIT (WRITE_BIT)
DECL_%1_PERMUTE (MOVE)
DECL_%1_COPY (MOVE)
DECL_%1_SWAP_BYTES (SWAP_BYTES)
DECL_%1_EXPAND_BIT (EXPAND_BIT)
DECL_%1_SCALE (SCALE)
DECL_%1_ADD (ADD)
DECL_%1_MIN (MIN)
DECL_%1_MAX (MAX)
DECL_%1_UNPACK (UNPACK)
DECL_%1_PACK (PACK)
DECL_%1_LSHIFT (LSHIFT)
DECL_%1_RSHIFT (RSHIFT)
DECL_%1_LINEAR_FMA (LINEAR_FMA)
DECL_%1_DITHER (DITHER)
DECL_%1_LINEAR (LINEAR)
DECL_%1_READ_PACKED READ_PACKED
DECL_%1_READ_NIBBLE READ_NIBBLE
DECL_%1_READ_BIT READ_BIT
DECL_%1_READ_PALETTE READ_PALETTE
DECL_%1_WRITE_PACKED WRITE_PACKED
DECL_%1_WRITE_NIBBLE WRITE_NIBBLE
DECL_%1_WRITE_BIT WRITE_BIT
DECL_%1_PERMUTE MOVE
DECL_%1_COPY MOVE
DECL_%1_SWAP_BYTES SWAP_BYTES
DECL_%1_EXPAND_BIT EXPAND_BIT
DECL_%1_SCALE SCALE
DECL_%1_ADD ADD
DECL_%1_MIN MIN
DECL_%1_MAX MAX
DECL_%1_UNPACK UNPACK
DECL_%1_PACK PACK
DECL_%1_LSHIFT LSHIFT
DECL_%1_RSHIFT RSHIFT
DECL_%1_LINEAR_FMA LINEAR_FMA
DECL_%1_DITHER DITHER
DECL_%1_LINEAR LINEAR
%endmacro
%macro decl_type_invariant 0
DECL_U8_READ_PLANAR (READ_PLANAR)
DECL_U8_WRITE_PLANAR (WRITE_PLANAR)
DECL_U8_CLEAR (CLEAR)
DECL_U8_READ_PLANAR READ_PLANAR
DECL_U8_WRITE_PLANAR WRITE_PLANAR
DECL_U8_CLEAR CLEAR
%endmacro
%macro decl_cast_u16 0
DECL_U8_TO_U16 (CAST_TO)
DECL_U16_TO_U8 (CAST_TO)
DECL_U8_EXPAND_PAIR (EXPAND_BYTE)
DECL_U8_TO_U16 CAST_TO
DECL_U16_TO_U8 CAST_TO
DECL_U8_EXPAND_PAIR EXPAND_BYTE
%endmacro
%macro decl_cast_u32 0
DECL_U8_TO_U32 (CAST_TO)
DECL_U32_TO_U8 (CAST_TO)
DECL_U16_TO_U32 (CAST_TO)
DECL_U32_TO_U16 (CAST_TO)
DECL_U8_EXPAND_QUAD (EXPAND_BYTE)
DECL_U8_TO_U32 CAST_TO
DECL_U32_TO_U8 CAST_TO
DECL_U16_TO_U32 CAST_TO
DECL_U32_TO_U16 CAST_TO
DECL_U8_EXPAND_QUAD EXPAND_BYTE
%endmacro
%macro decl_cast_f32 0
DECL_U8_TO_F32 (CAST_TO)
DECL_F32_TO_U8 (CAST_TO)
DECL_U16_TO_F32 (CAST_TO)
DECL_F32_TO_U16 (CAST_TO)
DECL_U32_TO_F32 (CAST_TO)
DECL_F32_TO_U32 (CAST_TO)
DECL_U8_TO_F32 CAST_TO
DECL_F32_TO_U8 CAST_TO
DECL_U16_TO_F32 CAST_TO
DECL_F32_TO_U16 CAST_TO
DECL_U32_TO_F32 CAST_TO
DECL_F32_TO_U32 CAST_TO
%endmacro
INIT_XMM sse4
+891
View File
@@ -0,0 +1,891 @@
;******************************************************************************
;* This file is automatically generated. Do not edit manually.
;* To regenerate, run: make fate-sws-uops-macros GEN=1
;*
;* Boilerplate helper macros, for template-based backends. Invoking
;* DECL_<TYPE>_<UOP> MACRO will instantiate, for every matching uop:
;* DECL_OP MACRO, NAME, TYPE, UOP, MASK, [PARAMS]
;* with parameters in struct order.
;******************************************************************************
%macro DECL_U8_READ_PLANAR 1
DECL_OP %1, u8_read_planar_x , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR , 0x1
DECL_OP %1, u8_read_planar_xy , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR , 0x3
DECL_OP %1, u8_read_planar_xyz , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR , 0x7
DECL_OP %1, u8_read_planar_xyzw , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR , 0xf
%endmacro
%macro DECL_U8_READ_PLANAR_FH 1
DECL_OP %1, u8_read_planar_fh_x_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH , 0x1, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fh_xy_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH , 0x3, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fh_xyz_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH , 0x7, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fh_xyzw_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FH , 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_U8_READ_PLANAR_FV 1
DECL_OP %1, u8_read_planar_fv_x_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV , 0x1, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fv_xy_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV , 0x3, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fv_xyz_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV , 0x7, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fv_xyzw_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV , 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_U8_READ_PLANAR_FV_FMA 1
DECL_OP %1, u8_read_planar_fv_fma_x_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0x1, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fv_fma_xy_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0x3, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fv_fma_xyz_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0x7, SWS_PIXEL_F32
DECL_OP %1, u8_read_planar_fv_fma_xyzw_f32 , SWS_PIXEL_U8 , SWS_UOP_READ_PLANAR_FV_FMA, 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_U8_READ_PACKED 1
DECL_OP %1, u8_read_packed_xy , SWS_PIXEL_U8 , SWS_UOP_READ_PACKED , 0x3
DECL_OP %1, u8_read_packed_xyz , SWS_PIXEL_U8 , SWS_UOP_READ_PACKED , 0x7
DECL_OP %1, u8_read_packed_xyzw , SWS_PIXEL_U8 , SWS_UOP_READ_PACKED , 0xf
%endmacro
%macro DECL_U8_READ_NIBBLE 1
DECL_OP %1, u8_read_nibble_x , SWS_PIXEL_U8 , SWS_UOP_READ_NIBBLE , 0x1
%endmacro
%macro DECL_U8_READ_BIT 1
DECL_OP %1, u8_read_bit_x , SWS_PIXEL_U8 , SWS_UOP_READ_BIT , 0x1
%endmacro
%macro DECL_U8_READ_PALETTE 1
DECL_OP %1, u8_read_palette_xyzw , SWS_PIXEL_U8 , SWS_UOP_READ_PALETTE , 0xf
%endmacro
%macro DECL_U8_WRITE_PLANAR 1
DECL_OP %1, u8_write_planar_x , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR , 0x1
DECL_OP %1, u8_write_planar_xy , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR , 0x3
DECL_OP %1, u8_write_planar_xyz , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR , 0x7
DECL_OP %1, u8_write_planar_xyzw , SWS_PIXEL_U8 , SWS_UOP_WRITE_PLANAR , 0xf
%endmacro
%macro DECL_U8_WRITE_PACKED 1
DECL_OP %1, u8_write_packed_xy , SWS_PIXEL_U8 , SWS_UOP_WRITE_PACKED , 0x3
DECL_OP %1, u8_write_packed_xyz , SWS_PIXEL_U8 , SWS_UOP_WRITE_PACKED , 0x7
DECL_OP %1, u8_write_packed_xyzw , SWS_PIXEL_U8 , SWS_UOP_WRITE_PACKED , 0xf
%endmacro
%macro DECL_U8_WRITE_NIBBLE 1
DECL_OP %1, u8_write_nibble_x , SWS_PIXEL_U8 , SWS_UOP_WRITE_NIBBLE , 0x1
%endmacro
%macro DECL_U8_WRITE_BIT 1
DECL_OP %1, u8_write_bit_x , SWS_PIXEL_U8 , SWS_UOP_WRITE_BIT , 0x1
%endmacro
%macro DECL_U8_RW_SHUFFLE 1
DECL_OP %1, u8_rw_shuffle_x_0_2_12 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 2, 12
DECL_OP %1, u8_rw_shuffle_x_0_4_12 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 4, 12
DECL_OP %1, u8_rw_shuffle_x_0_4_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 4, 16
DECL_OP %1, u8_rw_shuffle_x_0_5_15 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 5, 15
DECL_OP %1, u8_rw_shuffle_x_0_6_12 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 6, 12
DECL_OP %1, u8_rw_shuffle_x_0_8_12 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 8, 12
DECL_OP %1, u8_rw_shuffle_x_0_8_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 8, 16
DECL_OP %1, u8_rw_shuffle_x_0_10_15 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 10, 15
DECL_OP %1, u8_rw_shuffle_x_0_12_12 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 12, 12
DECL_OP %1, u8_rw_shuffle_x_0_12_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 12, 16
DECL_OP %1, u8_rw_shuffle_x_0_15_5 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 15, 5
DECL_OP %1, u8_rw_shuffle_x_0_15_15 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 15, 15
DECL_OP %1, u8_rw_shuffle_x_0_16_4 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 16, 4
DECL_OP %1, u8_rw_shuffle_x_0_16_8 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 16, 8
DECL_OP %1, u8_rw_shuffle_x_0_16_12 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 16, 12
DECL_OP %1, u8_rw_shuffle_x_0_16_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0x0, 16, 16
DECL_OP %1, u8_rw_shuffle_x_ff_2_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0xff, 2, 16
DECL_OP %1, u8_rw_shuffle_x_ff_4_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0xff, 4, 16
DECL_OP %1, u8_rw_shuffle_x_ff_6_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0xff, 6, 16
DECL_OP %1, u8_rw_shuffle_x_ff_8_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0xff, 8, 16
DECL_OP %1, u8_rw_shuffle_x_ff_12_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0xff, 12, 16
DECL_OP %1, u8_rw_shuffle_x_ff_16_16 , SWS_PIXEL_U8 , SWS_UOP_RW_SHUFFLE , 0x1, 0xff, 16, 16
%endmacro
%macro DECL_U8_PERMUTE 1
DECL_OP %1, u8_permute_xy_xy_zw , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x3, 2, 0, 1, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0
DECL_OP %1, u8_permute_xyz_x_w , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x7, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_xyz_y_w , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x7, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_xyz_xy_yw , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x7, 2, 0, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0
DECL_OP %1, u8_permute_xyz_yx_xw , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x7, 2, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0
DECL_OP %1, u8_permute_xyz_xyz_yzw , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x7, 3, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0
DECL_OP %1, u8_permute_xyz_xtyz_wyzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0x7, 4, 0, -1, 1, 2, 0, 0, 3, 1, 2, -1, 0, 0
DECL_OP %1, u8_permute_xyw_x_z , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xb, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_xzw_x_y , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xd, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_y_x , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_z_x , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_w_x , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_wz_zx , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 2, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_wyz_yzx , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 3, 3, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_wzy_zyx , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 3, 3, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0
DECL_OP %1, u8_permute_yzw_wtyz_xyzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xe, 4, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0
DECL_OP %1, u8_permute_xyzw_txy_xyt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 3, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0
DECL_OP %1, u8_permute_xyzw_txz_xzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 3, -1, 0, 2, 0, 0, 0, 0, 2, -1, 0, 0, 0
DECL_OP %1, u8_permute_xyzw_tyz_yzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0, 0
DECL_OP %1, u8_permute_xyzw_tyw_ywt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 3, -1, 1, 3, 0, 0, 0, 1, 3, -1, 0, 0, 0
DECL_OP %1, u8_permute_xyzw_txyz_xyzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0
DECL_OP %1, u8_permute_xyzw_txzy_xzyt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 2, 1, 0, 0, 0, 2, 1, -1, 0, 0
DECL_OP %1, u8_permute_xyzw_txzw_xzwt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 2, 3, 0, 0, 0, 2, 3, -1, 0, 0
DECL_OP %1, u8_permute_xyzw_txwz_xwzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 3, 2, 0, 0, 0, 3, 2, -1, 0, 0
DECL_OP %1, u8_permute_xyzw_tyzw_yzwt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 4, -1, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0, 0
DECL_OP %1, u8_permute_xyzw_txyzw_xyzwt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0
DECL_OP %1, u8_permute_xyzw_txwyz_xwyzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 3, 1, 2, 0, 0, 3, 1, 2, -1, 0
DECL_OP %1, u8_permute_xyzw_txwzy_xwzyt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 3, 2, 1, 0, 0, 3, 2, 1, -1, 0
DECL_OP %1, u8_permute_xyzw_txwtyz_xwtyzt , SWS_PIXEL_U8 , SWS_UOP_PERMUTE , 0xf, 6, -1, 0, 3, -1, 1, 2, 0, 3, -1, 1, 2, -1
%endmacro
%macro DECL_U8_COPY 1
DECL_OP %1, u8_copy_yzw_yzw_xxx , SWS_PIXEL_U8 , SWS_UOP_COPY , 0xe, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u8_copy_xyzw_yz_xx , SWS_PIXEL_U8 , SWS_UOP_COPY , 0xf, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u8_copy_xyzw_zwy_xyx , SWS_PIXEL_U8 , SWS_UOP_COPY , 0xf, 3, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0
DECL_OP %1, u8_copy_xyzw_zxyw_xyzz , SWS_PIXEL_U8 , SWS_UOP_COPY , 0xf, 4, 2, 0, 1, 3, 0, 0, 0, 1, 2, 2, 0, 0
%endmacro
%macro DECL_U8_SWAP_BYTES 1
%endmacro
%macro DECL_U8_EXPAND_BIT 1
DECL_OP %1, u8_expand_bit_x , SWS_PIXEL_U8 , SWS_UOP_EXPAND_BIT , 0x1
%endmacro
%macro DECL_U8_EXPAND_PAIR 1
DECL_OP %1, u8_expand_pair_x , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR , 0x1
DECL_OP %1, u8_expand_pair_xy , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR , 0x3
DECL_OP %1, u8_expand_pair_xyz , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR , 0x7
DECL_OP %1, u8_expand_pair_yzw , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR , 0xe
DECL_OP %1, u8_expand_pair_xyzw , SWS_PIXEL_U8 , SWS_UOP_EXPAND_PAIR , 0xf
%endmacro
%macro DECL_U8_EXPAND_QUAD 1
%endmacro
%macro DECL_U8_TO_U8 1
%endmacro
%macro DECL_U8_TO_U16 1
DECL_OP %1, u8_to_u16_x , SWS_PIXEL_U8 , SWS_UOP_TO_U16 , 0x1
DECL_OP %1, u8_to_u16_xyz , SWS_PIXEL_U8 , SWS_UOP_TO_U16 , 0x7
DECL_OP %1, u8_to_u16_yzw , SWS_PIXEL_U8 , SWS_UOP_TO_U16 , 0xe
DECL_OP %1, u8_to_u16_xyzw , SWS_PIXEL_U8 , SWS_UOP_TO_U16 , 0xf
%endmacro
%macro DECL_U8_TO_U32 1
DECL_OP %1, u8_to_u32_x , SWS_PIXEL_U8 , SWS_UOP_TO_U32 , 0x1
DECL_OP %1, u8_to_u32_xyz , SWS_PIXEL_U8 , SWS_UOP_TO_U32 , 0x7
%endmacro
%macro DECL_U8_TO_F32 1
DECL_OP %1, u8_to_f32_x , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0x1
DECL_OP %1, u8_to_f32_y , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0x2
DECL_OP %1, u8_to_f32_xy , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0x3
DECL_OP %1, u8_to_f32_z , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0x4
DECL_OP %1, u8_to_f32_xyz , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0x7
DECL_OP %1, u8_to_f32_yw , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0xa
DECL_OP %1, u8_to_f32_zw , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0xc
DECL_OP %1, u8_to_f32_yzw , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0xe
DECL_OP %1, u8_to_f32_xyzw , SWS_PIXEL_U8 , SWS_UOP_TO_F32 , 0xf
%endmacro
%macro DECL_U8_SCALE 1
DECL_OP %1, u8_scale_xyz , SWS_PIXEL_U8 , SWS_UOP_SCALE , 0x7
%endmacro
%macro DECL_U8_ADD 1
%endmacro
%macro DECL_U8_MIN 1
%endmacro
%macro DECL_U8_MAX 1
%endmacro
%macro DECL_U8_UNPACK 1
DECL_OP %1, u8_unpack_xyz_121 , SWS_PIXEL_U8 , SWS_UOP_UNPACK , 0x7, 1, 2, 1, 0
DECL_OP %1, u8_unpack_xyz_233 , SWS_PIXEL_U8 , SWS_UOP_UNPACK , 0x7, 2, 3, 3, 0
DECL_OP %1, u8_unpack_xyz_332 , SWS_PIXEL_U8 , SWS_UOP_UNPACK , 0x7, 3, 3, 2, 0
%endmacro
%macro DECL_U8_PACK 1
DECL_OP %1, u8_pack_xyz_121 , SWS_PIXEL_U8 , SWS_UOP_PACK , 0x7, 1, 2, 1, 0
DECL_OP %1, u8_pack_xyz_233 , SWS_PIXEL_U8 , SWS_UOP_PACK , 0x7, 2, 3, 3, 0
DECL_OP %1, u8_pack_xyz_332 , SWS_PIXEL_U8 , SWS_UOP_PACK , 0x7, 3, 3, 2, 0
%endmacro
%macro DECL_U8_LSHIFT 1
%endmacro
%macro DECL_U8_RSHIFT 1
%endmacro
%macro DECL_U8_CLEAR 1
DECL_OP %1, u8_clear_x_0 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x1, 0x00000, 0x00001
DECL_OP %1, u8_clear_x_1 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x1, 0x00001, 0x00000
DECL_OP %1, u8_clear_y_1 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x2, 0x00002, 0x00000
DECL_OP %1, u8_clear_xy_xx , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x3, 0x00000, 0x00000
DECL_OP %1, u8_clear_xz_xx , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x5, 0x00000, 0x00000
DECL_OP %1, u8_clear_yz_xx , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x6, 0x00000, 0x00000
DECL_OP %1, u8_clear_xyz_1xx , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x7, 0x00001, 0x00000
DECL_OP %1, u8_clear_w_0 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x8, 0x00000, 0x00008
DECL_OP %1, u8_clear_w_1 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0x8, 0x00008, 0x00000
DECL_OP %1, u8_clear_xyw_xx0 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0xb, 0x00000, 0x00008
DECL_OP %1, u8_clear_xyw_xx1 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0xb, 0x00008, 0x00000
DECL_OP %1, u8_clear_zw_xx , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0xc, 0x00000, 0x00000
DECL_OP %1, u8_clear_xzw_1xx , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0xd, 0x00001, 0x00000
DECL_OP %1, u8_clear_xzw_xx1 , SWS_PIXEL_U8 , SWS_UOP_CLEAR , 0xd, 0x00008, 0x00000
%endmacro
%macro DECL_U8_LINEAR 1
DECL_OP %1, u8_linear_x_x000x , SWS_PIXEL_U8 , SWS_UOP_LINEAR , 0x1, 0x00000, 0xfffee
DECL_OP %1, u8_linear_y_0x000 , SWS_PIXEL_U8 , SWS_UOP_LINEAR , 0x2, 0x00000, 0xfffbf
DECL_OP %1, u8_linear_xyz_x000x_0x00x_00x0x , SWS_PIXEL_U8 , SWS_UOP_LINEAR , 0x7, 0x00000, 0xfadae
DECL_OP %1, u8_linear_xyz_x0000_0x000_00x00 , SWS_PIXEL_U8 , SWS_UOP_LINEAR , 0x7, 0x00000, 0xfefbe
%endmacro
%macro DECL_U8_LINEAR_FMA 1
%endmacro
%macro DECL_U8_DITHER 1
%endmacro
%macro DECL_U8_LUT_3D 1
%endmacro
%macro DECL_U16_READ_PLANAR 1
DECL_OP %1, u16_read_planar_x , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR , 0x1
DECL_OP %1, u16_read_planar_xy , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR , 0x3
DECL_OP %1, u16_read_planar_xyz , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR , 0x7
DECL_OP %1, u16_read_planar_xyzw , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR , 0xf
%endmacro
%macro DECL_U16_READ_PLANAR_FH 1
DECL_OP %1, u16_read_planar_fh_x_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH , 0x1, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fh_xy_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH , 0x3, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fh_xyz_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH , 0x7, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fh_xyzw_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FH , 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_U16_READ_PLANAR_FV 1
DECL_OP %1, u16_read_planar_fv_x_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV , 0x1, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fv_xy_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV , 0x3, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fv_xyz_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV , 0x7, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fv_xyzw_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV , 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_U16_READ_PLANAR_FV_FMA 1
DECL_OP %1, u16_read_planar_fv_fma_x_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0x1, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fv_fma_xy_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0x3, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fv_fma_xyz_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0x7, SWS_PIXEL_F32
DECL_OP %1, u16_read_planar_fv_fma_xyzw_f32 , SWS_PIXEL_U16, SWS_UOP_READ_PLANAR_FV_FMA, 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_U16_READ_PACKED 1
DECL_OP %1, u16_read_packed_xy , SWS_PIXEL_U16, SWS_UOP_READ_PACKED , 0x3
DECL_OP %1, u16_read_packed_xyz , SWS_PIXEL_U16, SWS_UOP_READ_PACKED , 0x7
DECL_OP %1, u16_read_packed_xyzw , SWS_PIXEL_U16, SWS_UOP_READ_PACKED , 0xf
%endmacro
%macro DECL_U16_READ_NIBBLE 1
%endmacro
%macro DECL_U16_READ_BIT 1
%endmacro
%macro DECL_U16_READ_PALETTE 1
%endmacro
%macro DECL_U16_WRITE_PLANAR 1
DECL_OP %1, u16_write_planar_x , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR , 0x1
DECL_OP %1, u16_write_planar_xy , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR , 0x3
DECL_OP %1, u16_write_planar_xyz , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR , 0x7
DECL_OP %1, u16_write_planar_xyzw , SWS_PIXEL_U16, SWS_UOP_WRITE_PLANAR , 0xf
%endmacro
%macro DECL_U16_WRITE_PACKED 1
DECL_OP %1, u16_write_packed_xy , SWS_PIXEL_U16, SWS_UOP_WRITE_PACKED , 0x3
DECL_OP %1, u16_write_packed_xyz , SWS_PIXEL_U16, SWS_UOP_WRITE_PACKED , 0x7
DECL_OP %1, u16_write_packed_xyzw , SWS_PIXEL_U16, SWS_UOP_WRITE_PACKED , 0xf
%endmacro
%macro DECL_U16_WRITE_NIBBLE 1
%endmacro
%macro DECL_U16_WRITE_BIT 1
%endmacro
%macro DECL_U16_RW_SHUFFLE 1
%endmacro
%macro DECL_U16_PERMUTE 1
DECL_OP %1, u16_permute_xyz_x_w , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0x7, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_xyz_y_w , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0x7, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_xyz_xz_zw , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0x7, 2, 0, 2, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0
DECL_OP %1, u16_permute_xyz_yx_xw , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0x7, 2, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0
DECL_OP %1, u16_permute_xyz_xyz_yzw , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0x7, 3, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0
DECL_OP %1, u16_permute_xyz_xtyz_wyzt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0x7, 4, 0, -1, 1, 2, 0, 0, 3, 1, 2, -1, 0, 0
DECL_OP %1, u16_permute_xyw_x_z , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xb, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_xzw_x_y , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xd, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_yzw_y_x , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xe, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_yzw_w_x , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xe, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_yzw_wz_zx , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xe, 2, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0
DECL_OP %1, u16_permute_yzw_wzy_zyx , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xe, 3, 3, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0
DECL_OP %1, u16_permute_yzw_wtyz_xyzt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xe, 4, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0
DECL_OP %1, u16_permute_xyzw_txy_xyt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 3, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0
DECL_OP %1, u16_permute_xyzw_txz_xzt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 3, -1, 0, 2, 0, 0, 0, 0, 2, -1, 0, 0, 0
DECL_OP %1, u16_permute_xyzw_txyz_xyzt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0
DECL_OP %1, u16_permute_xyzw_txzy_xzyt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 2, 1, 0, 0, 0, 2, 1, -1, 0, 0
DECL_OP %1, u16_permute_xyzw_tyzw_yzwt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 4, -1, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0, 0
DECL_OP %1, u16_permute_xyzw_txyzw_xyzwt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0
DECL_OP %1, u16_permute_xyzw_txwzy_xwzyt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 3, 2, 1, 0, 0, 3, 2, 1, -1, 0
DECL_OP %1, u16_permute_xyzw_txwtyz_xwtyzt , SWS_PIXEL_U16, SWS_UOP_PERMUTE , 0xf, 6, -1, 0, 3, -1, 1, 2, 0, 3, -1, 1, 2, -1
%endmacro
%macro DECL_U16_COPY 1
DECL_OP %1, u16_copy_xyzw_yz_xx , SWS_PIXEL_U16, SWS_UOP_COPY , 0xf, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u16_copy_xyzw_zwy_xyx , SWS_PIXEL_U16, SWS_UOP_COPY , 0xf, 3, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0
%endmacro
%macro DECL_U16_SWAP_BYTES 1
DECL_OP %1, u16_swap_bytes_x , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0x1
DECL_OP %1, u16_swap_bytes_y , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0x2
DECL_OP %1, u16_swap_bytes_xy , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0x3
DECL_OP %1, u16_swap_bytes_xyz , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0x7
DECL_OP %1, u16_swap_bytes_xw , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0x9
DECL_OP %1, u16_swap_bytes_yzw , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0xe
DECL_OP %1, u16_swap_bytes_xyzw , SWS_PIXEL_U16, SWS_UOP_SWAP_BYTES , 0xf
%endmacro
%macro DECL_U16_EXPAND_BIT 1
DECL_OP %1, u16_expand_bit_x , SWS_PIXEL_U16, SWS_UOP_EXPAND_BIT , 0x1
%endmacro
%macro DECL_U16_EXPAND_PAIR 1
%endmacro
%macro DECL_U16_EXPAND_QUAD 1
%endmacro
%macro DECL_U16_TO_U8 1
DECL_OP %1, u16_to_u8_xyz , SWS_PIXEL_U16, SWS_UOP_TO_U8 , 0x7
%endmacro
%macro DECL_U16_TO_U16 1
%endmacro
%macro DECL_U16_TO_U32 1
DECL_OP %1, u16_to_u32_x , SWS_PIXEL_U16, SWS_UOP_TO_U32 , 0x1
DECL_OP %1, u16_to_u32_xyz , SWS_PIXEL_U16, SWS_UOP_TO_U32 , 0x7
%endmacro
%macro DECL_U16_TO_F32 1
DECL_OP %1, u16_to_f32_x , SWS_PIXEL_U16, SWS_UOP_TO_F32 , 0x1
DECL_OP %1, u16_to_f32_y , SWS_PIXEL_U16, SWS_UOP_TO_F32 , 0x2
DECL_OP %1, u16_to_f32_xy , SWS_PIXEL_U16, SWS_UOP_TO_F32 , 0x3
DECL_OP %1, u16_to_f32_xyz , SWS_PIXEL_U16, SWS_UOP_TO_F32 , 0x7
DECL_OP %1, u16_to_f32_yzw , SWS_PIXEL_U16, SWS_UOP_TO_F32 , 0xe
DECL_OP %1, u16_to_f32_xyzw , SWS_PIXEL_U16, SWS_UOP_TO_F32 , 0xf
%endmacro
%macro DECL_U16_SCALE 1
DECL_OP %1, u16_scale_x , SWS_PIXEL_U16, SWS_UOP_SCALE , 0x1
DECL_OP %1, u16_scale_xyz , SWS_PIXEL_U16, SWS_UOP_SCALE , 0x7
%endmacro
%macro DECL_U16_ADD 1
%endmacro
%macro DECL_U16_MIN 1
%endmacro
%macro DECL_U16_MAX 1
%endmacro
%macro DECL_U16_UNPACK 1
DECL_OP %1, u16_unpack_xyz_444 , SWS_PIXEL_U16, SWS_UOP_UNPACK , 0x7, 4, 4, 4, 0
DECL_OP %1, u16_unpack_xyz_555 , SWS_PIXEL_U16, SWS_UOP_UNPACK , 0x7, 5, 5, 5, 0
DECL_OP %1, u16_unpack_xyz_565 , SWS_PIXEL_U16, SWS_UOP_UNPACK , 0x7, 5, 6, 5, 0
%endmacro
%macro DECL_U16_PACK 1
DECL_OP %1, u16_pack_xyz_444 , SWS_PIXEL_U16, SWS_UOP_PACK , 0x7, 4, 4, 4, 0
DECL_OP %1, u16_pack_xyz_555 , SWS_PIXEL_U16, SWS_UOP_PACK , 0x7, 5, 5, 5, 0
DECL_OP %1, u16_pack_xyz_565 , SWS_PIXEL_U16, SWS_UOP_PACK , 0x7, 5, 6, 5, 0
%endmacro
%macro DECL_U16_LSHIFT 1
DECL_OP %1, u16_lshift_x_4 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x1, 4
DECL_OP %1, u16_lshift_x_6 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x1, 6
DECL_OP %1, u16_lshift_xyz_1 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 1
DECL_OP %1, u16_lshift_xyz_2 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 2
DECL_OP %1, u16_lshift_xyz_3 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 3
DECL_OP %1, u16_lshift_xyz_4 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 4
DECL_OP %1, u16_lshift_xyz_5 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 5
DECL_OP %1, u16_lshift_xyz_6 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 6
DECL_OP %1, u16_lshift_xyz_7 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 7
DECL_OP %1, u16_lshift_xyz_8 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0x7, 8
DECL_OP %1, u16_lshift_yzw_1 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0xe, 1
DECL_OP %1, u16_lshift_yzw_2 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0xe, 2
DECL_OP %1, u16_lshift_yzw_4 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0xe, 4
DECL_OP %1, u16_lshift_yzw_6 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0xe, 6
DECL_OP %1, u16_lshift_yzw_8 , SWS_PIXEL_U16, SWS_UOP_LSHIFT , 0xe, 8
%endmacro
%macro DECL_U16_RSHIFT 1
DECL_OP %1, u16_rshift_x_4 , SWS_PIXEL_U16, SWS_UOP_RSHIFT , 0x1, 4
DECL_OP %1, u16_rshift_x_6 , SWS_PIXEL_U16, SWS_UOP_RSHIFT , 0x1, 6
DECL_OP %1, u16_rshift_y_4 , SWS_PIXEL_U16, SWS_UOP_RSHIFT , 0x2, 4
DECL_OP %1, u16_rshift_xyz_4 , SWS_PIXEL_U16, SWS_UOP_RSHIFT , 0x7, 4
DECL_OP %1, u16_rshift_xyz_6 , SWS_PIXEL_U16, SWS_UOP_RSHIFT , 0x7, 6
%endmacro
%macro DECL_U16_CLEAR 1
DECL_OP %1, u16_clear_x_x , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x1, 0x00000, 0x00000
DECL_OP %1, u16_clear_x_1 , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x1, 0x00001, 0x00000
DECL_OP %1, u16_clear_y_1 , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x2, 0x00002, 0x00000
DECL_OP %1, u16_clear_xy_xx , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x3, 0x00000, 0x00000
DECL_OP %1, u16_clear_xyz_xxx , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x7, 0x00000, 0x00000
DECL_OP %1, u16_clear_xyz_1xx , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x7, 0x00001, 0x00000
DECL_OP %1, u16_clear_w_x , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x8, 0x00000, 0x00000
DECL_OP %1, u16_clear_w_0 , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x8, 0x00000, 0x00008
DECL_OP %1, u16_clear_w_1 , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0x8, 0x00008, 0x00000
DECL_OP %1, u16_clear_zw_xx , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0xc, 0x00000, 0x00000
DECL_OP %1, u16_clear_xzw_xx0 , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0xd, 0x00000, 0x00008
DECL_OP %1, u16_clear_xzw_1xx , SWS_PIXEL_U16, SWS_UOP_CLEAR , 0xd, 0x00001, 0x00000
%endmacro
%macro DECL_U16_LINEAR 1
DECL_OP %1, u16_linear_x_x000x , SWS_PIXEL_U16, SWS_UOP_LINEAR , 0x1, 0x00000, 0xfffee
DECL_OP %1, u16_linear_xyz_x000x_0x00x_00x0x , SWS_PIXEL_U16, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfadae
DECL_OP %1, u16_linear_xyz_x0000_0x000_00x00 , SWS_PIXEL_U16, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfefbe
DECL_OP %1, u16_linear_xyzw_x0000_0x000_00x00_000x0 , SWS_PIXEL_U16, SWS_UOP_LINEAR , 0xf, 0x00000, 0xbefbe
%endmacro
%macro DECL_U16_LINEAR_FMA 1
%endmacro
%macro DECL_U16_DITHER 1
%endmacro
%macro DECL_U16_LUT_3D 1
%endmacro
%macro DECL_U32_READ_PLANAR 1
DECL_OP %1, u32_read_planar_x , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR , 0x1
DECL_OP %1, u32_read_planar_xyz , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR , 0x7
DECL_OP %1, u32_read_planar_xyzw , SWS_PIXEL_U32, SWS_UOP_READ_PLANAR , 0xf
%endmacro
%macro DECL_U32_READ_PLANAR_FH 1
%endmacro
%macro DECL_U32_READ_PLANAR_FV 1
%endmacro
%macro DECL_U32_READ_PLANAR_FV_FMA 1
%endmacro
%macro DECL_U32_READ_PACKED 1
DECL_OP %1, u32_read_packed_xy , SWS_PIXEL_U32, SWS_UOP_READ_PACKED , 0x3
DECL_OP %1, u32_read_packed_xyz , SWS_PIXEL_U32, SWS_UOP_READ_PACKED , 0x7
DECL_OP %1, u32_read_packed_xyzw , SWS_PIXEL_U32, SWS_UOP_READ_PACKED , 0xf
%endmacro
%macro DECL_U32_READ_NIBBLE 1
%endmacro
%macro DECL_U32_READ_BIT 1
%endmacro
%macro DECL_U32_READ_PALETTE 1
%endmacro
%macro DECL_U32_WRITE_PLANAR 1
DECL_OP %1, u32_write_planar_x , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR , 0x1
DECL_OP %1, u32_write_planar_xy , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR , 0x3
DECL_OP %1, u32_write_planar_xyz , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR , 0x7
DECL_OP %1, u32_write_planar_xyzw , SWS_PIXEL_U32, SWS_UOP_WRITE_PLANAR , 0xf
%endmacro
%macro DECL_U32_WRITE_PACKED 1
DECL_OP %1, u32_write_packed_xy , SWS_PIXEL_U32, SWS_UOP_WRITE_PACKED , 0x3
DECL_OP %1, u32_write_packed_xyz , SWS_PIXEL_U32, SWS_UOP_WRITE_PACKED , 0x7
DECL_OP %1, u32_write_packed_xyzw , SWS_PIXEL_U32, SWS_UOP_WRITE_PACKED , 0xf
%endmacro
%macro DECL_U32_WRITE_NIBBLE 1
%endmacro
%macro DECL_U32_WRITE_BIT 1
%endmacro
%macro DECL_U32_RW_SHUFFLE 1
%endmacro
%macro DECL_U32_PERMUTE 1
DECL_OP %1, u32_permute_xyz_x_w , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_xyz_y_w , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_xyz_xz_zw , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 2, 0, 2, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0
DECL_OP %1, u32_permute_xyz_zx_xw , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0
DECL_OP %1, u32_permute_xyz_xyz_yzw , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 3, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0
DECL_OP %1, u32_permute_xyz_xzy_zyw , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 3, 0, 2, 1, 0, 0, 0, 2, 1, 3, 0, 0, 0
DECL_OP %1, u32_permute_xyz_xtyz_wyzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0x7, 4, 0, -1, 1, 2, 0, 0, 3, 1, 2, -1, 0, 0
DECL_OP %1, u32_permute_xyw_x_z , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xb, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_xzw_x_y , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xd, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_xzw_w_y , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xd, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_xzw_wx_xy , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xd, 2, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_y_x , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_z_x , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_w_x , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_wy_yx , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_wz_zx , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 2, 3, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_wyz_yzx , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 3, 3, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_wzy_zyx , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 3, 3, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0
DECL_OP %1, u32_permute_yzw_wtyz_xyzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xe, 4, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0
DECL_OP %1, u32_permute_xyzw_txy_xyt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 3, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0
DECL_OP %1, u32_permute_xyzw_txz_xzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 3, -1, 0, 2, 0, 0, 0, 0, 2, -1, 0, 0, 0
DECL_OP %1, u32_permute_xyzw_tyz_yzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 3, -1, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0, 0
DECL_OP %1, u32_permute_xyzw_tyw_ywt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 3, -1, 1, 3, 0, 0, 0, 1, 3, -1, 0, 0, 0
DECL_OP %1, u32_permute_xyzw_txyz_xyzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 1, 2, 0, 0, 0, 1, 2, -1, 0, 0
DECL_OP %1, u32_permute_xyzw_txzy_xzyt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 4, -1, 0, 2, 1, 0, 0, 0, 2, 1, -1, 0, 0
DECL_OP %1, u32_permute_xyzw_txyzw_xyzwt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 1, 2, 3, 0, 0, 1, 2, 3, -1, 0
DECL_OP %1, u32_permute_xyzw_txwyz_xwyzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 3, 1, 2, 0, 0, 3, 1, 2, -1, 0
DECL_OP %1, u32_permute_xyzw_txwzy_xwzyt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 5, -1, 0, 3, 2, 1, 0, 0, 3, 2, 1, -1, 0
DECL_OP %1, u32_permute_xyzw_txwtyz_xwtyzt , SWS_PIXEL_U32, SWS_UOP_PERMUTE , 0xf, 6, -1, 0, 3, -1, 1, 2, 0, 3, -1, 1, 2, -1
%endmacro
%macro DECL_U32_COPY 1
DECL_OP %1, u32_copy_yzw_yzw_xxx , SWS_PIXEL_U32, SWS_UOP_COPY , 0xe, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u32_copy_xyzw_yz_xx , SWS_PIXEL_U32, SWS_UOP_COPY , 0xf, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
DECL_OP %1, u32_copy_xyzw_zwy_xyx , SWS_PIXEL_U32, SWS_UOP_COPY , 0xf, 3, 2, 3, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0
%endmacro
%macro DECL_U32_SWAP_BYTES 1
DECL_OP %1, u32_swap_bytes_x , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES , 0x1
DECL_OP %1, u32_swap_bytes_xy , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES , 0x3
DECL_OP %1, u32_swap_bytes_xyz , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES , 0x7
DECL_OP %1, u32_swap_bytes_xw , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES , 0x9
DECL_OP %1, u32_swap_bytes_yzw , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES , 0xe
DECL_OP %1, u32_swap_bytes_xyzw , SWS_PIXEL_U32, SWS_UOP_SWAP_BYTES , 0xf
%endmacro
%macro DECL_U32_EXPAND_BIT 1
%endmacro
%macro DECL_U32_EXPAND_PAIR 1
%endmacro
%macro DECL_U32_EXPAND_QUAD 1
%endmacro
%macro DECL_U32_TO_U8 1
%endmacro
%macro DECL_U32_TO_U16 1
DECL_OP %1, u32_to_u16_y , SWS_PIXEL_U32, SWS_UOP_TO_U16 , 0x2
DECL_OP %1, u32_to_u16_z , SWS_PIXEL_U32, SWS_UOP_TO_U16 , 0x4
DECL_OP %1, u32_to_u16_xyz , SWS_PIXEL_U32, SWS_UOP_TO_U16 , 0x7
DECL_OP %1, u32_to_u16_yzw , SWS_PIXEL_U32, SWS_UOP_TO_U16 , 0xe
%endmacro
%macro DECL_U32_TO_U32 1
%endmacro
%macro DECL_U32_TO_F32 1
DECL_OP %1, u32_to_f32_y , SWS_PIXEL_U32, SWS_UOP_TO_F32 , 0x2
DECL_OP %1, u32_to_f32_z , SWS_PIXEL_U32, SWS_UOP_TO_F32 , 0x4
DECL_OP %1, u32_to_f32_xyz , SWS_PIXEL_U32, SWS_UOP_TO_F32 , 0x7
DECL_OP %1, u32_to_f32_yzw , SWS_PIXEL_U32, SWS_UOP_TO_F32 , 0xe
%endmacro
%macro DECL_U32_SCALE 1
DECL_OP %1, u32_scale_x , SWS_PIXEL_U32, SWS_UOP_SCALE , 0x1
DECL_OP %1, u32_scale_xyz , SWS_PIXEL_U32, SWS_UOP_SCALE , 0x7
%endmacro
%macro DECL_U32_ADD 1
%endmacro
%macro DECL_U32_MIN 1
%endmacro
%macro DECL_U32_MAX 1
%endmacro
%macro DECL_U32_UNPACK 1
DECL_OP %1, u32_unpack_y_aaa2 , SWS_PIXEL_U32, SWS_UOP_UNPACK , 0x2, 10, 10, 10, 2
DECL_OP %1, u32_unpack_z_2aaa , SWS_PIXEL_U32, SWS_UOP_UNPACK , 0x4, 2, 10, 10, 10
DECL_OP %1, u32_unpack_xyz_aaa2 , SWS_PIXEL_U32, SWS_UOP_UNPACK , 0x7, 10, 10, 10, 2
DECL_OP %1, u32_unpack_yzw_2aaa , SWS_PIXEL_U32, SWS_UOP_UNPACK , 0xe, 2, 10, 10, 10
%endmacro
%macro DECL_U32_PACK 1
DECL_OP %1, u32_pack_xyzw_2aaa , SWS_PIXEL_U32, SWS_UOP_PACK , 0xf, 2, 10, 10, 10
DECL_OP %1, u32_pack_xyzw_aaa2 , SWS_PIXEL_U32, SWS_UOP_PACK , 0xf, 10, 10, 10, 2
%endmacro
%macro DECL_U32_LSHIFT 1
DECL_OP %1, u32_lshift_xyz_2 , SWS_PIXEL_U32, SWS_UOP_LSHIFT , 0x7, 2
%endmacro
%macro DECL_U32_RSHIFT 1
%endmacro
%macro DECL_U32_CLEAR 1
DECL_OP %1, u32_clear_x_x , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0x1, 0x00000, 0x00000
DECL_OP %1, u32_clear_y_x , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0x2, 0x00000, 0x00000
DECL_OP %1, u32_clear_xz_xx , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0x5, 0x00000, 0x00000
DECL_OP %1, u32_clear_w_x , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0x8, 0x00000, 0x00000
DECL_OP %1, u32_clear_yw_xx , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0xa, 0x00000, 0x00000
DECL_OP %1, u32_clear_xyw_xxx , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0xb, 0x00000, 0x00000
DECL_OP %1, u32_clear_xzw_xxx , SWS_PIXEL_U32, SWS_UOP_CLEAR , 0xd, 0x00000, 0x00000
%endmacro
%macro DECL_U32_LINEAR 1
DECL_OP %1, u32_linear_x_x000x , SWS_PIXEL_U32, SWS_UOP_LINEAR , 0x1, 0x00000, 0xfffee
DECL_OP %1, u32_linear_xyz_x000x_0x00x_00x0x , SWS_PIXEL_U32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfadae
DECL_OP %1, u32_linear_xyz_x0000_0x000_00x00 , SWS_PIXEL_U32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfefbe
%endmacro
%macro DECL_U32_LINEAR_FMA 1
%endmacro
%macro DECL_U32_DITHER 1
%endmacro
%macro DECL_U32_LUT_3D 1
%endmacro
%macro DECL_F32_READ_PLANAR 1
%endmacro
%macro DECL_F32_READ_PLANAR_FH 1
DECL_OP %1, f32_read_planar_fh_x_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH , 0x1, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fh_xy_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH , 0x3, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fh_xyz_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH , 0x7, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fh_xyzw_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FH , 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_F32_READ_PLANAR_FV 1
DECL_OP %1, f32_read_planar_fv_x_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV , 0x1, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fv_xy_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV , 0x3, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fv_xyz_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV , 0x7, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fv_xyzw_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV , 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_F32_READ_PLANAR_FV_FMA 1
DECL_OP %1, f32_read_planar_fv_fma_x_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0x1, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fv_fma_xy_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0x3, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fv_fma_xyz_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0x7, SWS_PIXEL_F32
DECL_OP %1, f32_read_planar_fv_fma_xyzw_f32 , SWS_PIXEL_F32, SWS_UOP_READ_PLANAR_FV_FMA, 0xf, SWS_PIXEL_F32
%endmacro
%macro DECL_F32_READ_PACKED 1
%endmacro
%macro DECL_F32_READ_NIBBLE 1
%endmacro
%macro DECL_F32_READ_BIT 1
%endmacro
%macro DECL_F32_READ_PALETTE 1
%endmacro
%macro DECL_F32_WRITE_PLANAR 1
%endmacro
%macro DECL_F32_WRITE_PACKED 1
%endmacro
%macro DECL_F32_WRITE_NIBBLE 1
%endmacro
%macro DECL_F32_WRITE_BIT 1
%endmacro
%macro DECL_F32_RW_SHUFFLE 1
%endmacro
%macro DECL_F32_PERMUTE 1
%endmacro
%macro DECL_F32_COPY 1
%endmacro
%macro DECL_F32_SWAP_BYTES 1
%endmacro
%macro DECL_F32_EXPAND_BIT 1
%endmacro
%macro DECL_F32_EXPAND_PAIR 1
%endmacro
%macro DECL_F32_EXPAND_QUAD 1
%endmacro
%macro DECL_F32_TO_U8 1
DECL_OP %1, f32_to_u8_x , SWS_PIXEL_F32, SWS_UOP_TO_U8 , 0x1
DECL_OP %1, f32_to_u8_xy , SWS_PIXEL_F32, SWS_UOP_TO_U8 , 0x3
DECL_OP %1, f32_to_u8_xyz , SWS_PIXEL_F32, SWS_UOP_TO_U8 , 0x7
DECL_OP %1, f32_to_u8_xw , SWS_PIXEL_F32, SWS_UOP_TO_U8 , 0x9
DECL_OP %1, f32_to_u8_yzw , SWS_PIXEL_F32, SWS_UOP_TO_U8 , 0xe
DECL_OP %1, f32_to_u8_xyzw , SWS_PIXEL_F32, SWS_UOP_TO_U8 , 0xf
%endmacro
%macro DECL_F32_TO_U16 1
DECL_OP %1, f32_to_u16_x , SWS_PIXEL_F32, SWS_UOP_TO_U16 , 0x1
DECL_OP %1, f32_to_u16_xy , SWS_PIXEL_F32, SWS_UOP_TO_U16 , 0x3
DECL_OP %1, f32_to_u16_xyz , SWS_PIXEL_F32, SWS_UOP_TO_U16 , 0x7
DECL_OP %1, f32_to_u16_xw , SWS_PIXEL_F32, SWS_UOP_TO_U16 , 0x9
DECL_OP %1, f32_to_u16_yzw , SWS_PIXEL_F32, SWS_UOP_TO_U16 , 0xe
DECL_OP %1, f32_to_u16_xyzw , SWS_PIXEL_F32, SWS_UOP_TO_U16 , 0xf
%endmacro
%macro DECL_F32_TO_U32 1
DECL_OP %1, f32_to_u32_x , SWS_PIXEL_F32, SWS_UOP_TO_U32 , 0x1
DECL_OP %1, f32_to_u32_xyz , SWS_PIXEL_F32, SWS_UOP_TO_U32 , 0x7
DECL_OP %1, f32_to_u32_xw , SWS_PIXEL_F32, SWS_UOP_TO_U32 , 0x9
DECL_OP %1, f32_to_u32_yzw , SWS_PIXEL_F32, SWS_UOP_TO_U32 , 0xe
DECL_OP %1, f32_to_u32_xyzw , SWS_PIXEL_F32, SWS_UOP_TO_U32 , 0xf
%endmacro
%macro DECL_F32_TO_F32 1
%endmacro
%macro DECL_F32_SCALE 1
DECL_OP %1, f32_scale_x , SWS_PIXEL_F32, SWS_UOP_SCALE , 0x1
DECL_OP %1, f32_scale_xy , SWS_PIXEL_F32, SWS_UOP_SCALE , 0x3
DECL_OP %1, f32_scale_xyz , SWS_PIXEL_F32, SWS_UOP_SCALE , 0x7
DECL_OP %1, f32_scale_yzw , SWS_PIXEL_F32, SWS_UOP_SCALE , 0xe
DECL_OP %1, f32_scale_xyzw , SWS_PIXEL_F32, SWS_UOP_SCALE , 0xf
%endmacro
%macro DECL_F32_ADD 1
DECL_OP %1, f32_add_x , SWS_PIXEL_F32, SWS_UOP_ADD , 0x1
DECL_OP %1, f32_add_xy , SWS_PIXEL_F32, SWS_UOP_ADD , 0x3
DECL_OP %1, f32_add_xz , SWS_PIXEL_F32, SWS_UOP_ADD , 0x5
DECL_OP %1, f32_add_xyz , SWS_PIXEL_F32, SWS_UOP_ADD , 0x7
DECL_OP %1, f32_add_w , SWS_PIXEL_F32, SWS_UOP_ADD , 0x8
DECL_OP %1, f32_add_xw , SWS_PIXEL_F32, SWS_UOP_ADD , 0x9
DECL_OP %1, f32_add_yzw , SWS_PIXEL_F32, SWS_UOP_ADD , 0xe
DECL_OP %1, f32_add_xyzw , SWS_PIXEL_F32, SWS_UOP_ADD , 0xf
%endmacro
%macro DECL_F32_MIN 1
DECL_OP %1, f32_min_x , SWS_PIXEL_F32, SWS_UOP_MIN , 0x1
DECL_OP %1, f32_min_y , SWS_PIXEL_F32, SWS_UOP_MIN , 0x2
DECL_OP %1, f32_min_xy , SWS_PIXEL_F32, SWS_UOP_MIN , 0x3
DECL_OP %1, f32_min_z , SWS_PIXEL_F32, SWS_UOP_MIN , 0x4
DECL_OP %1, f32_min_xz , SWS_PIXEL_F32, SWS_UOP_MIN , 0x5
DECL_OP %1, f32_min_xyz , SWS_PIXEL_F32, SWS_UOP_MIN , 0x7
DECL_OP %1, f32_min_w , SWS_PIXEL_F32, SWS_UOP_MIN , 0x8
DECL_OP %1, f32_min_xw , SWS_PIXEL_F32, SWS_UOP_MIN , 0x9
DECL_OP %1, f32_min_yzw , SWS_PIXEL_F32, SWS_UOP_MIN , 0xe
DECL_OP %1, f32_min_xyzw , SWS_PIXEL_F32, SWS_UOP_MIN , 0xf
%endmacro
%macro DECL_F32_MAX 1
DECL_OP %1, f32_max_x , SWS_PIXEL_F32, SWS_UOP_MAX , 0x1
DECL_OP %1, f32_max_xy , SWS_PIXEL_F32, SWS_UOP_MAX , 0x3
DECL_OP %1, f32_max_xyz , SWS_PIXEL_F32, SWS_UOP_MAX , 0x7
DECL_OP %1, f32_max_w , SWS_PIXEL_F32, SWS_UOP_MAX , 0x8
DECL_OP %1, f32_max_xw , SWS_PIXEL_F32, SWS_UOP_MAX , 0x9
DECL_OP %1, f32_max_xyzw , SWS_PIXEL_F32, SWS_UOP_MAX , 0xf
%endmacro
%macro DECL_F32_UNPACK 1
%endmacro
%macro DECL_F32_PACK 1
%endmacro
%macro DECL_F32_LSHIFT 1
%endmacro
%macro DECL_F32_RSHIFT 1
%endmacro
%macro DECL_F32_CLEAR 1
%endmacro
%macro DECL_F32_LINEAR 1
DECL_OP %1, f32_linear_x_xxx0x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x1, 0x00000, 0xfffe8
DECL_OP %1, f32_linear_x_x000x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x1, 0x00000, 0xfffee
DECL_OP %1, f32_linear_x_xxx00 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x1, 0x00000, 0xffff8
DECL_OP %1, f32_linear_y_0x000 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x2, 0x00000, 0xfffbf
DECL_OP %1, f32_linear_xyz_xxx0x_xxx0x_xxx0x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfa108
DECL_OP %1, f32_linear_xyz_x0x0x_xxx0x_xx00x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfb10a
DECL_OP %1, f32_linear_xyz_xxx00_xxx0x_xxx0x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfa118
DECL_OP %1, f32_linear_xyz_x000x_0x00x_00x0x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfadae
DECL_OP %1, f32_linear_xyz_x0000_0x000_00x00 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x7, 0x00000, 0xfefbe
DECL_OP %1, f32_linear_xyz_10x0x_1xx0x_1x00x , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x7, 0x00421, 0xfb10a
DECL_OP %1, f32_linear_w_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x8, 0x00000, 0xbffff
DECL_OP %1, f32_linear_xw_x000x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x9, 0x00000, 0xbffee
DECL_OP %1, f32_linear_xw_xxx00_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0x9, 0x00000, 0xbfff8
DECL_OP %1, f32_linear_xyzw_xxx0x_xxx0x_xxx0x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0xf, 0x00000, 0xba108
DECL_OP %1, f32_linear_xyzw_x0x0x_xxx0x_xx00x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0xf, 0x00000, 0xbb10a
DECL_OP %1, f32_linear_xyzw_x0000_0x000_00x00_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR , 0xf, 0x00000, 0xbefbe
%endmacro
%macro DECL_F32_LINEAR_FMA 1
DECL_OP %1, f32_linear_fma_x_xxx0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xfffe8, 0xfffe8
DECL_OP %1, f32_linear_fma_x_XXX0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xfffe8, 0xfffef
DECL_OP %1, f32_linear_fma_x_x000x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xfffee, 0xfffee
DECL_OP %1, f32_linear_fma_x_X000x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xfffee, 0xfffef
DECL_OP %1, f32_linear_fma_x_xxx00 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xffff8, 0xffff8
DECL_OP %1, f32_linear_fma_x_xXx00 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xffff8, 0xffffa
DECL_OP %1, f32_linear_fma_x_xxX00 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xffff8, 0xffffc
DECL_OP %1, f32_linear_fma_x_xXX00 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x1, 0x00000, 0xffff8, 0xffffe
DECL_OP %1, f32_linear_fma_y_0x000 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x2, 0x00000, 0xfffbf, 0xfffbf
DECL_OP %1, f32_linear_fma_xyz_xxx0x_xxx0x_xxx0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfa108, 0xfa108
DECL_OP %1, f32_linear_fma_xyz_XXX0x_XxX0x_XXX0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfa108, 0xfbdaf
DECL_OP %1, f32_linear_fma_xyz_XXX0x_XXX0x_XXX0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfa108, 0xfbdef
DECL_OP %1, f32_linear_fma_xyz_X0X0x_XXX0x_XX00x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfb10a, 0xfbdef
DECL_OP %1, f32_linear_fma_xyz_xxx00_xxx0x_xxx0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfa118, 0xfa118
DECL_OP %1, f32_linear_fma_xyz_xXX00_XxX0x_XXX0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfa118, 0xfbdbe
DECL_OP %1, f32_linear_fma_xyz_xXX00_XXX0x_XXX0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfa118, 0xfbdfe
DECL_OP %1, f32_linear_fma_xyz_X000x_0X00x_00X0x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfadae, 0xfbdef
DECL_OP %1, f32_linear_fma_xyz_x0000_0x000_00x00 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00000, 0xfefbe, 0xfefbe
DECL_OP %1, f32_linear_fma_xyz_10X0x_1XX0x_1X00x , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x7, 0x00421, 0xfb10a, 0xfbdef
DECL_OP %1, f32_linear_fma_w_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x8, 0x00000, 0xbffff, 0xbffff
DECL_OP %1, f32_linear_fma_xw_x000x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x9, 0x00000, 0xbffee, 0xbffee
DECL_OP %1, f32_linear_fma_xw_X000x_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x9, 0x00000, 0xbffee, 0xbffef
DECL_OP %1, f32_linear_fma_xw_xxx00_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x9, 0x00000, 0xbfff8, 0xbfff8
DECL_OP %1, f32_linear_fma_xw_xXX00_000x0 , SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0x9, 0x00000, 0xbfff8, 0xbfffe
DECL_OP %1, f32_linear_fma_xyzw_xxx0x_xxx0x_xxx0x_000x0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0xf, 0x00000, 0xba108, 0xba108
DECL_OP %1, f32_linear_fma_xyzw_XXX0x_XXX0x_XXX0x_000x0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0xf, 0x00000, 0xba108, 0xbbdef
DECL_OP %1, f32_linear_fma_xyzw_X0X0x_XXX0x_XX00x_000x0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0xf, 0x00000, 0xbb10a, 0xbbdef
DECL_OP %1, f32_linear_fma_xyzw_x0000_0x000_00x00_000x0, SWS_PIXEL_F32, SWS_UOP_LINEAR_FMA , 0xf, 0x00000, 0xbefbe, 0xbefbe
%endmacro
%macro DECL_F32_DITHER 1
DECL_OP %1, f32_dither_x_0_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x1, 0, 0, 0, 0, 4
DECL_OP %1, f32_dither_y_3_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x2, 0, 3, 0, 0, 4
DECL_OP %1, f32_dither_xy_0_3_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x3, 0, 3, 0, 0, 4
DECL_OP %1, f32_dither_z_2_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x4, 0, 0, 2, 0, 4
DECL_OP %1, f32_dither_xz_0_2_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x5, 0, 0, 2, 0, 4
DECL_OP %1, f32_dither_xyz_0_0_0_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x7, 0, 0, 0, 0, 4
DECL_OP %1, f32_dither_xyz_0_3_2_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x7, 0, 3, 2, 0, 4
DECL_OP %1, f32_dither_xyz_2_0_3_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x7, 2, 0, 3, 0, 4
DECL_OP %1, f32_dither_xyz_2_3_0_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x7, 2, 3, 0, 0, 4
DECL_OP %1, f32_dither_xyz_3_0_2_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x7, 3, 0, 2, 0, 4
DECL_OP %1, f32_dither_xyz_3_2_0_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x7, 3, 2, 0, 0, 4
DECL_OP %1, f32_dither_w_5_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x8, 0, 0, 0, 5, 4
DECL_OP %1, f32_dither_xw_0_3_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x9, 0, 0, 0, 3, 4
DECL_OP %1, f32_dither_xw_0_5_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0x9, 0, 0, 0, 5, 4
DECL_OP %1, f32_dither_yzw_0_3_2_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xe, 0, 0, 3, 2, 4
DECL_OP %1, f32_dither_yzw_2_0_3_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xe, 0, 2, 0, 3, 4
DECL_OP %1, f32_dither_yzw_2_3_0_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xe, 0, 2, 3, 0, 4
DECL_OP %1, f32_dither_xyzw_0_0_0_3_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 0, 0, 0, 3, 4
DECL_OP %1, f32_dither_xyzw_0_3_2_5_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 0, 3, 2, 5, 4
DECL_OP %1, f32_dither_xyzw_2_3_0_5_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 2, 3, 0, 5, 4
DECL_OP %1, f32_dither_xyzw_3_0_2_5_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 3, 0, 2, 5, 4
DECL_OP %1, f32_dither_xyzw_3_2_0_5_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 3, 2, 0, 5, 4
DECL_OP %1, f32_dither_xyzw_5_0_3_2_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 5, 0, 3, 2, 4
DECL_OP %1, f32_dither_xyzw_5_2_3_0_16x16 , SWS_PIXEL_F32, SWS_UOP_DITHER , 0xf, 5, 2, 3, 0, 4
%endmacro
%macro DECL_F32_LUT_3D 1
DECL_OP %1, f32_lut_3d_xyz_static , SWS_PIXEL_F32, SWS_UOP_LUT_3D , 0x7, 0
DECL_OP %1, f32_lut_3d_xyz_dynamic , SWS_PIXEL_F32, SWS_UOP_LUT_3D , 0x7, 1
DECL_OP %1, f32_lut_3d_xyzw_static , SWS_PIXEL_F32, SWS_UOP_LUT_3D , 0xf, 0
DECL_OP %1, f32_lut_3d_xyzw_dynamic , SWS_PIXEL_F32, SWS_UOP_LUT_3D , 0xf, 1
%endmacro
-92
View File
@@ -1,92 +0,0 @@
/**
* Copyright (C) 2025 Niklas Haas
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* WARNING: This file is preprocessed by the C compiler to generate the NASM
* source file uops_macros.gen.asm. It must *NOT* include any headers that
* may inadvertently declare any C syntax. The following header only declares
* further macros, and is therefore safe.
*/
#include "../uops_macros.h"
/**
* NASM expects one statement per source line, but the C preprocessor expands
* multi-line macros into a single line. This NASM macro allows us to work
* around that by expanding its arguments into multiple lines.
*/
%macro MULTILINE 0-*
%rep %0
%1
%rotate 1
%endrep
%endmacro
/* Used to suppress "trailing empty parameter" warnings */
%macro dummy 0
%endmacro
#define DECL_OP_MACRO(...) {DECL_OP MACRO __VA_ARGS__},
#define DEF_MACRO(UOP, TYPE) \
%define DECL_##TYPE##_##UOP(MACRO) \
MULTILINE SWS_FOR_##TYPE##_##UOP(DECL_OP_MACRO) \
dummy
#define DEF_ALL_MACROS(TYPE) \
MULTILINE \
{DEF_MACRO(READ_BIT, TYPE)}, \
{DEF_MACRO(READ_NIBBLE, TYPE)}, \
{DEF_MACRO(READ_PACKED, TYPE)}, \
{DEF_MACRO(READ_PLANAR, TYPE)}, \
{DEF_MACRO(READ_PLANAR_FH, TYPE)}, \
{DEF_MACRO(READ_PLANAR_FV, TYPE)}, \
{DEF_MACRO(READ_PLANAR_FV_FMA, TYPE)}, \
{DEF_MACRO(READ_PALETTE, TYPE)}, \
{DEF_MACRO(WRITE_BIT, TYPE)}, \
{DEF_MACRO(WRITE_NIBBLE, TYPE)}, \
{DEF_MACRO(WRITE_PACKED, TYPE)}, \
{DEF_MACRO(WRITE_PLANAR, TYPE)}, \
{DEF_MACRO(RW_SHUFFLE, TYPE)}, \
{DEF_MACRO(PERMUTE, TYPE)}, \
{DEF_MACRO(COPY, TYPE)}, \
{DEF_MACRO(SWAP_BYTES, TYPE)}, \
{DEF_MACRO(EXPAND_BIT, TYPE)}, \
{DEF_MACRO(EXPAND_PAIR, TYPE)}, \
{DEF_MACRO(EXPAND_QUAD, TYPE)}, \
{DEF_MACRO(TO_U8, TYPE)}, \
{DEF_MACRO(TO_U16, TYPE)}, \
{DEF_MACRO(TO_U32, TYPE)}, \
{DEF_MACRO(TO_F32, TYPE)}, \
{DEF_MACRO(SCALE, TYPE)}, \
{DEF_MACRO(LINEAR, TYPE)}, \
{DEF_MACRO(LINEAR_FMA, TYPE)}, \
{DEF_MACRO(ADD, TYPE)}, \
{DEF_MACRO(MIN, TYPE)}, \
{DEF_MACRO(MAX, TYPE)}, \
{DEF_MACRO(UNPACK, TYPE)}, \
{DEF_MACRO(PACK, TYPE)}, \
{DEF_MACRO(LSHIFT, TYPE)}, \
{DEF_MACRO(RSHIFT, TYPE)}, \
{DEF_MACRO(CLEAR, TYPE)}, \
{DEF_MACRO(DITHER, TYPE)}
DEF_ALL_MACROS(U8)
DEF_ALL_MACROS(U16)
DEF_ALL_MACROS(U32)
DEF_ALL_MACROS(F32)
+15 -4
View File
@@ -102,16 +102,27 @@ FATE_LIBSWSCALE-$(CONFIG_UNSTABLE) += fate-sws-ops-list
fate-sws-ops-list: libswscale/tests/sws_ops$(EXESUF)
fate-sws-ops-list: CMD = run libswscale/tests/sws_ops$(EXESUF) | do_md5sum | cut -d" " -f1
FATE_SWS_UOPS_MACROS = fate-sws-uops-macros-c \
fate-sws-uops-macros-x86-nasm \
ifeq ($(HAVE_INT128),yes)
# Disable by default without int128 because it is too slow (several minutes)
FATE_LIBSWSCALE-$(CONFIG_UNSTABLE) += fate-sws-uops-macros
FATE_LIBSWSCALE-$(CONFIG_UNSTABLE) += $(FATE_SWS_UOPS_MACROS)
endif
# Disable on bigendian because it would result in a different iteration order
# (and thus output) due to sorting by memcmp() on the parameters struct.
fate-sws-uops-macros: libswscale/uops_macros_gen$(EXESUF)
fate-sws-uops-macros: REF = $(SRC_PATH)/libswscale/uops_macros.h
fate-sws-uops-macros: CMD = run libswscale/uops_macros_gen$(EXESUF)
fate-sws-uops-macros-c: libswscale/uops_macros_gen$(EXESUF)
fate-sws-uops-macros-c: REF = $(SRC_PATH)/libswscale/uops_macros.h
fate-sws-uops-macros-c: CMD = run libswscale/uops_macros_gen$(EXESUF) \
-nasm $(TARGET_PATH)/tests/data/fate/sws-uops-macros.asm
# Generated together with fate-sws-uops-macros-c, since enumeration is slow
fate-sws-uops-macros-x86-nasm: fate-sws-uops-macros-c
fate-sws-uops-macros-x86-nasm: REF = $(SRC_PATH)/libswscale/x86/uops_macros.asm
fate-sws-uops-macros-x86-nasm: CMD = cat tests/data/fate/sws-uops-macros.asm
fate-sws-uops-macros: $(FATE_SWS_UOPS_MACROS)
endif
+1 -1
View File
@@ -21,6 +21,7 @@ libswscale/aarch64/ops_entries.c
libswscale/log2_tab.c
libswscale/riscv/cpu_common.c
libswscale/uops_macros.h
libswscale/x86/uops_macros.asm
tools/uncoded_frame.c
tools/yuvcmp.c
Headers without standard inclusion guards:
@@ -29,7 +30,6 @@ compat/float/float.h
compat/float/limits.h
compat/stdbit/stdbit.h
libavcodec/bitstream_template.h
libswscale/x86/uops_macros.asm.h
tools/decode_simple.h
Use of av_clip() where av_clip_uintp2() could be used:
Use of av_clip() where av_clip_intp2() could be used: