FFmpeg
Loading...
Searching...
No Matches
mmiutils.h File Reference
#include "config.h"
#include "libavutil/mem_internal.h"
#include "libavutil/mips/asmdefs.h"

Go to the source code of this file.

Macros

#define DECLARE_VAR_LOW32
 
#define RESTRICT_ASM_LOW32
 
#define DECLARE_VAR_ALL64
 
#define RESTRICT_ASM_ALL64
 
#define DECLARE_VAR_ADDRT
 
#define RESTRICT_ASM_ADDRT
 
#define BACKUP_REG
 Backup saved registers We're not using compiler's clobber list as it's not smart enough to take advantage of quad word load/store.
 
#define RECOVER_REG
 recover register
 
#define TRANSPOSE_2W(fr_i0, fr_i1, fr_o0, fr_o1)
 brief: Transpose 2X2 word packaged data.
 
#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.
 
#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.
 
#define PSRAB_MMI(fr_i0, fr_i1, fr_t0, fr_t1, fr_d0)
 brief: Parallel SRA for 8 byte packaged data.
 
#define PSRLB_MMI(fr_i0, fr_i1, fr_t0, fr_t1, fr_d0)
 brief: Parallel SRL for 8 byte packaged data.
 
#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
 

Macro Definition Documentation

◆ DECLARE_VAR_LOW32

◆ RESTRICT_ASM_LOW32

◆ DECLARE_VAR_ALL64

#define DECLARE_VAR_ALL64

Definition at line 39 of file mmiutils.h.

Referenced by avg_h264_qpel8_h_lowpass_l2_mmi(), avg_h264_qpel8_h_lowpass_mmi(), avg_h264_qpel8or16_hv2_lowpass_mmi(), avg_pixels8_l2_shift5_mmi(), convolve_avg_horiz_mmi(), convolve_avg_mmi(), convolve_avg_vert_mmi(), convolve_horiz_mmi(), convolve_vert_mmi(), copy_block16_mmi(), copy_block8_mmi(), deblock_v8_luma_intra_8_mmi(), ff_avg_h264_chroma_mc8_mmi(), ff_avg_no_rnd_vc1_chroma_mc8_mmi(), ff_avg_pixels16_8_mmi(), ff_avg_pixels8_8_mmi(), ff_avg_pixels8_l2_8_mmi(), ff_dct_unquantize_h263_inter_mmi(), ff_dct_unquantize_h263_intra_mmi(), ff_dct_unquantize_mpeg1_inter_mmi(), ff_dct_unquantize_mpeg1_intra_mmi(), ff_dct_unquantize_mpeg2_intra_mmi(), ff_deblock_h_luma_8_mmi(), ff_deblock_h_luma_intra_8_mmi(), ff_deblock_v8_luma_8_mmi(), ff_deblock_v_chroma_8_mmi(), ff_deblock_v_chroma_intra_8_mmi(), ff_denoise_dct_mmi(), ff_diff_pixels_mmi(), ff_fill_block16_mmi(), ff_fill_block8_mmi(), ff_get_pixels_8_mmi(), ff_h264_biweight_pixels16_8_mmi(), ff_h264_biweight_pixels8_8_mmi(), ff_h264_idct8_dc_add_8_mmi(), ff_h264_luma_dc_dequant_idct_8_mmi(), ff_h264_weight_pixels16_8_mmi(), ff_h264_weight_pixels8_8_mmi(), ff_pred16x16_vertical_8_mmi(), ff_pred8x16_vertical_8_mmi(), ff_pred8x8_top_dc_8_mmi(), ff_pred8x8l_dc_8_mmi(), ff_pred8x8l_top_dc_8_mmi(), ff_pred8x8l_vertical_8_mmi(), ff_put_h264_chroma_mc8_mmi(), ff_put_no_rnd_pixels8_l2_8_mmi(), ff_put_no_rnd_pixels_l2_mmi(), ff_put_no_rnd_vc1_chroma_mc8_mmi(), ff_put_pixels16_8_mmi(), ff_put_pixels16_l2_8_mmi(), ff_put_pixels8_8_mmi(), ff_put_pixels8_l2_8_mmi(), ff_put_pixels8_xy2_8_mmi(), ff_put_vp8_bilinear16_h_mmi(), ff_put_vp8_bilinear16_v_mmi(), ff_put_vp8_bilinear4_h_mmi(), ff_put_vp8_bilinear4_v_mmi(), ff_put_vp8_bilinear8_h_mmi(), ff_put_vp8_bilinear8_v_mmi(), ff_put_vp8_epel16_h4_mmi(), ff_put_vp8_epel16_h6_mmi(), ff_put_vp8_epel16_v4_mmi(), ff_put_vp8_epel16_v6_mmi(), ff_put_vp8_epel8_h4_mmi(), ff_put_vp8_epel8_h6_mmi(), ff_put_vp8_epel8_v4_mmi(), ff_put_vp8_epel8_v6_mmi(), ff_put_vp8_pixels16_mmi(), ff_put_vp8_pixels8_mmi(), ff_simple_idct_8_mmi(), ff_vp8_idct_add_mmi(), ff_vp8_luma_dc_wht_mmi(), pred16x16_plane_compat_mmi(), put_h264_qpel8_h_lowpass_l2_mmi(), put_h264_qpel8_h_lowpass_mmi(), put_h264_qpel8or16_hv2_lowpass_mmi(), put_pixels8_l2_shift5_mmi(), vp8_h_loop_filter8_mmi(), and vp8_v_loop_filter8_mmi().

◆ RESTRICT_ASM_ALL64

#define RESTRICT_ASM_ALL64

Definition at line 40 of file mmiutils.h.

Referenced by avg_h264_qpel8_h_lowpass_l2_mmi(), avg_h264_qpel8_h_lowpass_mmi(), avg_h264_qpel8or16_hv2_lowpass_mmi(), avg_pixels8_l2_shift5_mmi(), convolve_avg_horiz_mmi(), convolve_avg_mmi(), convolve_avg_vert_mmi(), convolve_horiz_mmi(), convolve_vert_mmi(), copy_block16_mmi(), copy_block8_mmi(), deblock_v8_luma_intra_8_mmi(), ff_avg_h264_chroma_mc8_mmi(), ff_avg_no_rnd_vc1_chroma_mc8_mmi(), ff_avg_pixels16_8_mmi(), ff_avg_pixels8_8_mmi(), ff_avg_pixels8_l2_8_mmi(), ff_dct_unquantize_h263_inter_mmi(), ff_dct_unquantize_h263_intra_mmi(), ff_dct_unquantize_mpeg1_inter_mmi(), ff_dct_unquantize_mpeg1_intra_mmi(), ff_dct_unquantize_mpeg2_intra_mmi(), ff_deblock_h_luma_8_mmi(), ff_deblock_h_luma_intra_8_mmi(), ff_deblock_v8_luma_8_mmi(), ff_deblock_v_chroma_8_mmi(), ff_deblock_v_chroma_intra_8_mmi(), ff_denoise_dct_mmi(), ff_diff_pixels_mmi(), ff_fill_block16_mmi(), ff_fill_block8_mmi(), ff_get_pixels_8_mmi(), ff_h264_biweight_pixels16_8_mmi(), ff_h264_biweight_pixels8_8_mmi(), ff_h264_idct8_dc_add_8_mmi(), ff_h264_luma_dc_dequant_idct_8_mmi(), ff_h264_weight_pixels16_8_mmi(), ff_h264_weight_pixels8_8_mmi(), ff_pred16x16_vertical_8_mmi(), ff_pred8x16_vertical_8_mmi(), ff_pred8x8_top_dc_8_mmi(), ff_pred8x8l_dc_8_mmi(), ff_pred8x8l_top_dc_8_mmi(), ff_pred8x8l_vertical_8_mmi(), ff_put_h264_chroma_mc8_mmi(), ff_put_no_rnd_pixels8_l2_8_mmi(), ff_put_no_rnd_pixels_l2_mmi(), ff_put_no_rnd_vc1_chroma_mc8_mmi(), ff_put_pixels16_8_mmi(), ff_put_pixels16_l2_8_mmi(), ff_put_pixels8_8_mmi(), ff_put_pixels8_l2_8_mmi(), ff_put_pixels8_xy2_8_mmi(), ff_put_vp8_bilinear16_h_mmi(), ff_put_vp8_bilinear16_v_mmi(), ff_put_vp8_bilinear4_h_mmi(), ff_put_vp8_bilinear4_v_mmi(), ff_put_vp8_bilinear8_h_mmi(), ff_put_vp8_bilinear8_v_mmi(), ff_put_vp8_epel16_h4_mmi(), ff_put_vp8_epel16_h6_mmi(), ff_put_vp8_epel16_v4_mmi(), ff_put_vp8_epel16_v6_mmi(), ff_put_vp8_epel8_h4_mmi(), ff_put_vp8_epel8_h6_mmi(), ff_put_vp8_epel8_v4_mmi(), ff_put_vp8_epel8_v6_mmi(), ff_put_vp8_pixels16_mmi(), ff_put_vp8_pixels8_mmi(), ff_simple_idct_8_mmi(), ff_vp8_idct_add_mmi(), ff_vp8_luma_dc_wht_mmi(), pred16x16_plane_compat_mmi(), put_h264_qpel8_h_lowpass_l2_mmi(), put_h264_qpel8_h_lowpass_mmi(), put_h264_qpel8or16_hv2_lowpass_mmi(), put_pixels8_l2_shift5_mmi(), vp8_h_loop_filter8_mmi(), and vp8_v_loop_filter8_mmi().

◆ DECLARE_VAR_ADDRT

◆ RESTRICT_ASM_ADDRT

◆ BACKUP_REG

#define BACKUP_REG
Value:
LOCAL_ALIGNED_16(double, temp_backup_reg, [8]); \
if (_MIPS_SIM == _ABI64) \
__asm__ volatile ( \
MMI_SQC1($f25, $f24, %[temp], 0x00) \
MMI_SQC1($f27, $f26, %[temp], 0x10) \
MMI_SQC1($f29, $f28, %[temp], 0x20) \
MMI_SQC1($f31, $f30, %[temp], 0x30) \
: \
: [temp]"r"(temp_backup_reg) \
: "memory" \
); \
else \
__asm__ volatile ( \
MMI_SQC1($f22, $f20, %[temp], 0x10) \
MMI_SQC1($f26, $f24, %[temp], 0x10) \
MMI_SQC1($f30, $f28, %[temp], 0x20) \
: \
: [temp]"r"(temp_backup_reg) \
: "memory" \
);
__asm__(".macro parse_r var r\n\t" "\\var = -1\n\t" _IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31) ".iflt \\var\n\t" ".error \"Unable to parse register name \\r\"\n\t" ".endif\n\t" ".endm")
#define LOCAL_ALIGNED_16(t, v,...)
else temp
Definition vf_mcdeint.c:275

Backup saved registers We're not using compiler's clobber list as it's not smart enough to take advantage of quad word load/store.

Definition at line 235 of file mmiutils.h.

Referenced by ff_simple_idct_8_mmi().

◆ RECOVER_REG

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

recover register

Definition at line 260 of file mmiutils.h.

Referenced by ff_simple_idct_8_mmi().

◆ 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 286 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 295 of file mmiutils.h.

Referenced by ff_vp8_idct_add_mmi(), idct_column_false_mmi(), and idct_column_true_mmi().

◆ 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 311 of file mmiutils.h.

Referenced by vp8_h_loop_filter8_mmi().

◆ 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 345 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 359 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"
static int shift(int a, int b)
Definition bonk.c:261

Definition at line 366 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)
#define PSRAH_4_MMI(fp1, fp2, fp3, fp4, shift)
Definition mmiutils.h:366

Definition at line 372 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 383 of file mmiutils.h.

Referenced by convolve_avg_horiz_mmi(), convolve_avg_vert_mmi(), convolve_horiz_mmi(), and convolve_vert_mmi().