FFmpeg
Macros
mmiutils.h File Reference
#include "config.h"
#include "libavutil/mips/asmdefs.h"

Go to the source code of this file.

Macros

#define BACKUP_REG
 backup register More...
 
#define RECOVER_REG
 recover register More...
 
#define TRANSPOSE_2W(fr_i0, fr_i1, fr_o0, fr_o1)
 brief: Transpose 2X2 word packaged data. More...
 
#define TRANSPOSE_4H(fr_i0, fr_i1, fr_i2, fr_i3, fr_t0, fr_t1, fr_t2, fr_t3)
 brief: Transpose 4X4 half word packaged data. More...
 
#define TRANSPOSE_8B(fr_i0, fr_i1, fr_i2, fr_i3, fr_i4, fr_i5, fr_i6, fr_i7, fr_t0, fr_t1, fr_t2, fr_t3)
 brief: Transpose 8x8 byte packaged data. More...
 
#define PSRAB_MMI(fr_i0, fr_i1, fr_t0, fr_t1, fr_d0)
 brief: Parallel SRA for 8 byte packaged data. More...
 
#define PSRLB_MMI(fr_i0, fr_i1, fr_t0, fr_t1, fr_d0)
 brief: Parallel SRL for 8 byte packaged data. More...
 
#define PSRAH_4_MMI(fp1, fp2, fp3, fp4, shift)
 
#define PSRAH_8_MMI(fp1, fp2, fp3, fp4, fp5, fp6, fp7, fp8, shift)
 
#define ROUND_POWER_OF_TWO_MMI(fr_i0, fr_i1, fr_t0, fr_t1, gr_t0)
 brief: (((value) + (1 << ((n) - 1))) >> (n)) fr_i0: src & dst fr_i1: Operand number fr_t0, fr_t1: temporary FPR gr_t0: temporary GPR More...
 

Macro Definition Documentation

◆ BACKUP_REG

#define BACKUP_REG
Value:
double temp_backup_reg[8]; \
if (_MIPS_SIM == _ABI64) \
__asm__ volatile ( \
"gssqc1 $f25, $f24, 0x00(%[temp]) \n\t" \
"gssqc1 $f27, $f26, 0x10(%[temp]) \n\t" \
"gssqc1 $f29, $f28, 0x20(%[temp]) \n\t" \
"gssqc1 $f31, $f30, 0x30(%[temp]) \n\t" \
: \
: [temp]"r"(temp_backup_reg) \
: "memory" \
); \
else \
__asm__ volatile ( \
"gssqc1 $f22, $f20, 0x00(%[temp]) \n\t" \
"gssqc1 $f26, $f24, 0x10(%[temp]) \n\t" \
"gssqc1 $f30, $f28, 0x20(%[temp]) \n\t" \
: \
: [temp]"r"(temp_backup_reg) \
: "memory" \
);

backup register

Definition at line 207 of file mmiutils.h.

◆ RECOVER_REG

#define RECOVER_REG
Value:
if (_MIPS_SIM == _ABI64) \
__asm__ volatile ( \
"gslqc1 $f25, $f24, 0x00(%[temp]) \n\t" \
"gslqc1 $f27, $f26, 0x10(%[temp]) \n\t" \
"gslqc1 $f29, $f28, 0x20(%[temp]) \n\t" \
"gslqc1 $f31, $f30, 0x30(%[temp]) \n\t" \
: \
: [temp]"r"(temp_backup_reg) \
: "memory" \
); \
else \
__asm__ volatile ( \
"gslqc1 $f22, $f20, 0x00(%[temp]) \n\t" \
"gslqc1 $f26, $f24, 0x10(%[temp]) \n\t" \
"gslqc1 $f30, $f28, 0x20(%[temp]) \n\t" \
: \
: [temp]"r"(temp_backup_reg) \
: "memory" \
);

recover register

Definition at line 232 of file mmiutils.h.

◆ TRANSPOSE_2W

#define TRANSPOSE_2W (   fr_i0,
  fr_i1,
  fr_o0,
  fr_o1 
)
Value:
"punpcklwd "#fr_o0", "#fr_i0", "#fr_i1" \n\t" \
"punpckhwd "#fr_o1", "#fr_i0", "#fr_i1" \n\t"

brief: Transpose 2X2 word packaged data.

fr_i0, fr_i1: src fr_o0, fr_o1: dst

Definition at line 258 of file mmiutils.h.

◆ TRANSPOSE_4H

#define TRANSPOSE_4H (   fr_i0,
  fr_i1,
  fr_i2,
  fr_i3,
  fr_t0,
  fr_t1,
  fr_t2,
  fr_t3 
)
Value:
"punpcklhw "#fr_t0", "#fr_i0", "#fr_i1" \n\t" \
"punpckhhw "#fr_t1", "#fr_i0", "#fr_i1" \n\t" \
"punpcklhw "#fr_t2", "#fr_i2", "#fr_i3" \n\t" \
"punpckhhw "#fr_t3", "#fr_i2", "#fr_i3" \n\t" \
"punpcklwd "#fr_i0", "#fr_t0", "#fr_t2" \n\t" \
"punpckhwd "#fr_i1", "#fr_t0", "#fr_t2" \n\t" \
"punpcklwd "#fr_i2", "#fr_t1", "#fr_t3" \n\t" \
"punpckhwd "#fr_i3", "#fr_t1", "#fr_t3" \n\t"

brief: Transpose 4X4 half word packaged data.

fr_i0, fr_i1, fr_i2, fr_i3: src & dst fr_t0, fr_t1, fr_t2, fr_t3: temporary register

Definition at line 267 of file mmiutils.h.

◆ TRANSPOSE_8B

#define TRANSPOSE_8B (   fr_i0,
  fr_i1,
  fr_i2,
  fr_i3,
  fr_i4,
  fr_i5,
  fr_i6,
  fr_i7,
  fr_t0,
  fr_t1,
  fr_t2,
  fr_t3 
)
Value:
"punpcklbh "#fr_t0", "#fr_i0", "#fr_i1" \n\t" \
"punpckhbh "#fr_t1", "#fr_i0", "#fr_i1" \n\t" \
"punpcklbh "#fr_t2", "#fr_i2", "#fr_i3" \n\t" \
"punpckhbh "#fr_t3", "#fr_i2", "#fr_i3" \n\t" \
"punpcklbh "#fr_i0", "#fr_i4", "#fr_i5" \n\t" \
"punpckhbh "#fr_i1", "#fr_i4", "#fr_i5" \n\t" \
"punpcklbh "#fr_i2", "#fr_i6", "#fr_i7" \n\t" \
"punpckhbh "#fr_i3", "#fr_i6", "#fr_i7" \n\t" \
"punpcklhw "#fr_i4", "#fr_t0", "#fr_t2" \n\t" \
"punpckhhw "#fr_i5", "#fr_t0", "#fr_t2" \n\t" \
"punpcklhw "#fr_i6", "#fr_t1", "#fr_t3" \n\t" \
"punpckhhw "#fr_i7", "#fr_t1", "#fr_t3" \n\t" \
"punpcklhw "#fr_t0", "#fr_i0", "#fr_i2" \n\t" \
"punpckhhw "#fr_t1", "#fr_i0", "#fr_i2" \n\t" \
"punpcklhw "#fr_t2", "#fr_i1", "#fr_i3" \n\t" \
"punpckhhw "#fr_t3", "#fr_i1", "#fr_i3" \n\t" \
"punpcklwd "#fr_i0", "#fr_i4", "#fr_t0" \n\t" \
"punpckhwd "#fr_i1", "#fr_i4", "#fr_t0" \n\t" \
"punpcklwd "#fr_i2", "#fr_i5", "#fr_t1" \n\t" \
"punpckhwd "#fr_i3", "#fr_i5", "#fr_t1" \n\t" \
"punpcklwd "#fr_i4", "#fr_i6", "#fr_t2" \n\t" \
"punpckhwd "#fr_i5", "#fr_i6", "#fr_t2" \n\t" \
"punpcklwd "#fr_i6", "#fr_i7", "#fr_t3" \n\t" \
"punpckhwd "#fr_i7", "#fr_i7", "#fr_t3" \n\t"

brief: Transpose 8x8 byte packaged data.

fr_i0~i7: src & dst fr_t0~t3: temporary register

Definition at line 283 of file mmiutils.h.

◆ PSRAB_MMI

#define PSRAB_MMI (   fr_i0,
  fr_i1,
  fr_t0,
  fr_t1,
  fr_d0 
)
Value:
"punpcklbh "#fr_t0", "#fr_t0", "#fr_i0" \n\t" \
"punpckhbh "#fr_t1", "#fr_t1", "#fr_i0" \n\t" \
"psrah "#fr_t0", "#fr_t0", "#fr_i1" \n\t" \
"psrah "#fr_t1", "#fr_t1", "#fr_i1" \n\t" \
"packsshb "#fr_d0", "#fr_t0", "#fr_t1" \n\t"

brief: Parallel SRA for 8 byte packaged data.

fr_i0: src fr_i1: SRA number(SRAB number + 8) fr_t0, fr_t1: temporary register fr_d0: dst

Definition at line 317 of file mmiutils.h.

◆ PSRLB_MMI

#define PSRLB_MMI (   fr_i0,
  fr_i1,
  fr_t0,
  fr_t1,
  fr_d0 
)
Value:
"punpcklbh "#fr_t0", "#fr_t0", "#fr_i0" \n\t" \
"punpckhbh "#fr_t1", "#fr_t1", "#fr_i0" \n\t" \
"psrlh "#fr_t0", "#fr_t0", "#fr_i1" \n\t" \
"psrlh "#fr_t1", "#fr_t1", "#fr_i1" \n\t" \
"packsshb "#fr_d0", "#fr_t0", "#fr_t1" \n\t"

brief: Parallel SRL for 8 byte packaged data.

fr_i0: src fr_i1: SRL number(SRLB number + 8) fr_t0, fr_t1: temporary register fr_d0: dst

Definition at line 331 of file mmiutils.h.

◆ PSRAH_4_MMI

#define PSRAH_4_MMI (   fp1,
  fp2,
  fp3,
  fp4,
  shift 
)
Value:
"psrah "#fp1", "#fp1", "#shift" \n\t" \
"psrah "#fp2", "#fp2", "#shift" \n\t" \
"psrah "#fp3", "#fp3", "#shift" \n\t" \
"psrah "#fp4", "#fp4", "#shift" \n\t"

Definition at line 338 of file mmiutils.h.

◆ PSRAH_8_MMI

#define PSRAH_8_MMI (   fp1,
  fp2,
  fp3,
  fp4,
  fp5,
  fp6,
  fp7,
  fp8,
  shift 
)
Value:
PSRAH_4_MMI(fp1, fp2, fp3, fp4, shift) \
PSRAH_4_MMI(fp5, fp6, fp7, fp8, shift)

Definition at line 344 of file mmiutils.h.

◆ ROUND_POWER_OF_TWO_MMI

#define ROUND_POWER_OF_TWO_MMI (   fr_i0,
  fr_i1,
  fr_t0,
  fr_t1,
  gr_t0 
)
Value:
"li "#gr_t0", 0x01 \n\t" \
"dmtc1 "#gr_t0", "#fr_t0" \n\t" \
"punpcklwd "#fr_t0", "#fr_t0", "#fr_t0" \n\t" \
"psubw "#fr_t1", "#fr_i1", "#fr_t0" \n\t" \
"psllw "#fr_t1", "#fr_t0", "#fr_t1" \n\t" \
"paddw "#fr_i0", "#fr_i0", "#fr_t1" \n\t" \
"psraw "#fr_i0", "#fr_i0", "#fr_i1" \n\t"

brief: (((value) + (1 << ((n) - 1))) >> (n)) fr_i0: src & dst fr_i1: Operand number fr_t0, fr_t1: temporary FPR gr_t0: temporary GPR

Definition at line 355 of file mmiutils.h.

PSRAH_4_MMI
#define PSRAH_4_MMI(fp1, fp2, fp3, fp4, shift)
Definition: mmiutils.h:338
temp
else temp
Definition: vf_mcdeint.c:256
shift
static int shift(int a, int b)
Definition: sonic.c:82