FFmpeg
Data Structures | Macros | Typedefs | Enumerations | Functions
ops_impl.h File Reference
#include <assert.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  SwsAArch64LinearOp
 
struct  SwsAArch64DitherOp
 
struct  SwsAArch64OpImplParams
 SwsAArch64OpImplParams describes the parameters for an SwsAArch64OpType operation. More...
 

Macros

#define MASK_GET(mask, idx)   (((mask) >> ((idx) << 2)) & 0xf)
 
#define MASK_SET(mask, idx, val)   do { (mask) |= (((val) & 0xf) << ((idx) << 2)); } while (0)
 
#define LOOP(mask, idx)
 
#define LOOP_BWD(mask, idx)
 
#define LOOP_MASK(p, idx)   LOOP(p->mask, idx)
 
#define LOOP_MASK_BWD(p, idx)   LOOP_BWD(p->mask, idx)
 
#define LINEAR_MASK_GET(mask, idx, jdx)   (((mask) >> (2 * ((5 * (idx) + (jdx))))) & 3)
 
#define LINEAR_MASK_SET(mask, idx, jdx, val)
 
#define LINEAR_MASK_0   0
 
#define LINEAR_MASK_1   1
 
#define LINEAR_MASK_X   3
 
#define LOOP_LINEAR_MASK(p, idx, jdx)
 
#define offsetof_exec_in   0
 These values will be used by ops_asmgen to access fields inside of SwsOpExec and SwsOpImpl. More...
 
#define offsetof_exec_out   32
 
#define offsetof_exec_in_bump   128
 
#define offsetof_exec_out_bump   160
 
#define offsetof_impl_cont   0
 
#define offsetof_impl_priv   16
 
#define sizeof_impl   32
 

Typedefs

typedef uint16_t SwsAArch64OpMask
 
typedef uint64_t SwsAArch64LinearOpMask
 Affine coefficient mask for linear op. More...
 

Enumerations

enum  SwsAArch64PixelType {
  AARCH64_PIXEL_U8, AARCH64_PIXEL_U16, AARCH64_PIXEL_U32, AARCH64_PIXEL_F32,
  AARCH64_PIXEL_TYPE_NB
}
 
enum  SwsAArch64OpType {
  AARCH64_SWS_OP_NONE = 0, AARCH64_SWS_OP_PROCESS, AARCH64_SWS_OP_PROCESS_RETURN, AARCH64_SWS_OP_READ_BIT,
  AARCH64_SWS_OP_READ_NIBBLE, AARCH64_SWS_OP_READ_PACKED, AARCH64_SWS_OP_READ_PLANAR, AARCH64_SWS_OP_WRITE_BIT,
  AARCH64_SWS_OP_WRITE_NIBBLE, AARCH64_SWS_OP_WRITE_PACKED, AARCH64_SWS_OP_WRITE_PLANAR, AARCH64_SWS_OP_SWAP_BYTES,
  AARCH64_SWS_OP_SWIZZLE, AARCH64_SWS_OP_UNPACK, AARCH64_SWS_OP_PACK, AARCH64_SWS_OP_LSHIFT,
  AARCH64_SWS_OP_RSHIFT, AARCH64_SWS_OP_CLEAR, AARCH64_SWS_OP_CONVERT, AARCH64_SWS_OP_EXPAND,
  AARCH64_SWS_OP_MIN, AARCH64_SWS_OP_MAX, AARCH64_SWS_OP_SCALE, AARCH64_SWS_OP_LINEAR,
  AARCH64_SWS_OP_DITHER, AARCH64_SWS_OP_TYPE_NB
}
 

Functions

static int linear_num_vregs (const SwsAArch64OpImplParams *params)
 
static int linear_index_to_sws_op (int idx)
 
static int linear_index_is_offset (int idx)
 
static int linear_index_to_vx (int idx)
 

Macro Definition Documentation

◆ MASK_GET

#define MASK_GET (   mask,
  idx 
)    (((mask) >> ((idx) << 2)) & 0xf)

Definition at line 111 of file ops_impl.h.

◆ MASK_SET

#define MASK_SET (   mask,
  idx,
  val 
)    do { (mask) |= (((val) & 0xf) << ((idx) << 2)); } while (0)

Definition at line 112 of file ops_impl.h.

◆ LOOP

#define LOOP (   mask,
  idx 
)
Value:
for (int idx = 0; idx < 4; idx++) \
if (MASK_GET(mask, idx))

Definition at line 114 of file ops_impl.h.

◆ LOOP_BWD

#define LOOP_BWD (   mask,
  idx 
)
Value:
for (int idx = 3; idx >= 0; idx--) \
if (MASK_GET(mask, idx))

Definition at line 117 of file ops_impl.h.

◆ LOOP_MASK

#define LOOP_MASK (   p,
  idx 
)    LOOP(p->mask, idx)

Definition at line 121 of file ops_impl.h.

◆ LOOP_MASK_BWD

#define LOOP_MASK_BWD (   p,
  idx 
)    LOOP_BWD(p->mask, idx)

Definition at line 122 of file ops_impl.h.

◆ LINEAR_MASK_GET

#define LINEAR_MASK_GET (   mask,
  idx,
  jdx 
)    (((mask) >> (2 * ((5 * (idx) + (jdx))))) & 3)

Definition at line 124 of file ops_impl.h.

◆ LINEAR_MASK_SET

#define LINEAR_MASK_SET (   mask,
  idx,
  jdx,
  val 
)
Value:
do { \
(mask) |= ((((SwsAArch64LinearOpMask) (val)) & 3) << (2 * ((5 * (idx) + (jdx))))); \
} while (0)

Definition at line 125 of file ops_impl.h.

◆ LINEAR_MASK_0

#define LINEAR_MASK_0   0

Definition at line 128 of file ops_impl.h.

◆ LINEAR_MASK_1

#define LINEAR_MASK_1   1

Definition at line 129 of file ops_impl.h.

◆ LINEAR_MASK_X

#define LINEAR_MASK_X   3

Definition at line 130 of file ops_impl.h.

◆ LOOP_LINEAR_MASK

#define LOOP_LINEAR_MASK (   p,
  idx,
  jdx 
)
Value:
LOOP_MASK(p, idx) \
for (int jdx = 0; jdx < 5; jdx++) \
if (LINEAR_MASK_GET(p->linear.mask, idx, jdx))

Definition at line 132 of file ops_impl.h.

◆ offsetof_exec_in

#define offsetof_exec_in   0

These values will be used by ops_asmgen to access fields inside of SwsOpExec and SwsOpImpl.

The sizes are checked below when compiling for AArch64 to make sure there is no mismatch.

Definition at line 171 of file ops_impl.h.

◆ offsetof_exec_out

#define offsetof_exec_out   32

Definition at line 172 of file ops_impl.h.

◆ offsetof_exec_in_bump

#define offsetof_exec_in_bump   128

Definition at line 173 of file ops_impl.h.

◆ offsetof_exec_out_bump

#define offsetof_exec_out_bump   160

Definition at line 174 of file ops_impl.h.

◆ offsetof_impl_cont

#define offsetof_impl_cont   0

Definition at line 175 of file ops_impl.h.

◆ offsetof_impl_priv

#define offsetof_impl_priv   16

Definition at line 176 of file ops_impl.h.

◆ sizeof_impl

#define sizeof_impl   32

Definition at line 177 of file ops_impl.h.

Typedef Documentation

◆ SwsAArch64OpMask

typedef uint16_t SwsAArch64OpMask

Definition at line 68 of file ops_impl.h.

◆ SwsAArch64LinearOpMask

typedef uint64_t SwsAArch64LinearOpMask

Affine coefficient mask for linear op.

Packs a 4x5 matrix in execution order, where the offset is the first element, with 2 bits per element: 00: m[i][j] == 0 01: m[i][j] == 1 11: m[i][j] is any other coefficient

Definition at line 77 of file ops_impl.h.

Enumeration Type Documentation

◆ SwsAArch64PixelType

Enumerator
AARCH64_PIXEL_U8 
AARCH64_PIXEL_U16 
AARCH64_PIXEL_U32 
AARCH64_PIXEL_F32 
AARCH64_PIXEL_TYPE_NB 

Definition at line 29 of file ops_impl.h.

◆ SwsAArch64OpType

Enumerator
AARCH64_SWS_OP_NONE 
AARCH64_SWS_OP_PROCESS 
AARCH64_SWS_OP_PROCESS_RETURN 
AARCH64_SWS_OP_READ_BIT 
AARCH64_SWS_OP_READ_NIBBLE 
AARCH64_SWS_OP_READ_PACKED 
AARCH64_SWS_OP_READ_PLANAR 
AARCH64_SWS_OP_WRITE_BIT 
AARCH64_SWS_OP_WRITE_NIBBLE 
AARCH64_SWS_OP_WRITE_PACKED 
AARCH64_SWS_OP_WRITE_PLANAR 
AARCH64_SWS_OP_SWAP_BYTES 
AARCH64_SWS_OP_SWIZZLE 
AARCH64_SWS_OP_UNPACK 
AARCH64_SWS_OP_PACK 
AARCH64_SWS_OP_LSHIFT 
AARCH64_SWS_OP_RSHIFT 
AARCH64_SWS_OP_CLEAR 
AARCH64_SWS_OP_CONVERT 
AARCH64_SWS_OP_EXPAND 
AARCH64_SWS_OP_MIN 
AARCH64_SWS_OP_MAX 
AARCH64_SWS_OP_SCALE 
AARCH64_SWS_OP_LINEAR 
AARCH64_SWS_OP_DITHER 
AARCH64_SWS_OP_TYPE_NB 

Definition at line 38 of file ops_impl.h.

Function Documentation

◆ linear_num_vregs()

static int linear_num_vregs ( const SwsAArch64OpImplParams params)
inlinestatic

Definition at line 138 of file ops_impl.h.

Referenced by aarch64_setup_linear(), and asmgen_op_linear().

◆ linear_index_to_sws_op()

static int linear_index_to_sws_op ( int  idx)
inlinestatic

Definition at line 146 of file ops_impl.h.

Referenced by aarch64_setup_linear().

◆ linear_index_is_offset()

static int linear_index_is_offset ( int  idx)
inlinestatic

Definition at line 152 of file ops_impl.h.

Referenced by asmgen_op_linear(), linear_index_to_vx(), and linear_pass().

◆ linear_index_to_vx()

static int linear_index_to_vx ( int  idx)
inlinestatic

Definition at line 157 of file ops_impl.h.

Referenced by asmgen_op_linear(), and linear_pass().

LINEAR_MASK_GET
#define LINEAR_MASK_GET(mask, idx, jdx)
Definition: ops_impl.h:124
mask
int mask
Definition: mediacodecdec_common.c:154
val
static double val(void *priv, double ch)
Definition: aeval.c:77
SwsAArch64LinearOpMask
uint64_t SwsAArch64LinearOpMask
Affine coefficient mask for linear op.
Definition: ops_impl.h:77
LOOP_MASK
#define LOOP_MASK(p, idx)
Definition: ops_impl.h:121
MASK_GET
#define MASK_GET(mask, idx)
Definition: ops_impl.h:111
Windows::Graphics::DirectX::Direct3D11::p
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
Definition: vsrc_gfxcapture_winrt.hpp:53