[x264-devel] [PATCH 24/29] Templatize PowerPC assembly code
Vittorio Giovara
vittorio.giovara at gmail.com
Thu Feb 2 10:05:36 CET 2017
---
common/ppc/dct.h | 16 ++++++++++++++++
common/ppc/mc.h | 1 +
common/ppc/pixel.c | 1 +
common/ppc/pixel.h | 1 +
common/ppc/predict.h | 2 ++
common/ppc/quant.h | 6 ++++++
6 files changed, 27 insertions(+)
diff --git a/common/ppc/dct.h b/common/ppc/dct.h
index 89c43ba..c8e9460 100644
--- a/common/ppc/dct.h
+++ b/common/ppc/dct.h
@@ -27,26 +27,42 @@
#ifndef X264_PPC_DCT_H
#define X264_PPC_DCT_H
+#define x264_sub4x4_dct_altivec x264_template(sub4x4_dct_altivec)
void x264_sub4x4_dct_altivec( int16_t dct[16], uint8_t *pix1, uint8_t *pix2 );
+#define x264_sub8x8_dct_altivec x264_template(sub8x8_dct_altivec)
void x264_sub8x8_dct_altivec( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 );
+#define x264_sub16x16_dct_altivec x264_template(sub16x16_dct_altivec)
void x264_sub16x16_dct_altivec( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 );
+#define x264_add8x8_idct_dc_altivec x264_template(add8x8_idct_dc_altivec)
void x264_add8x8_idct_dc_altivec( uint8_t *p_dst, int16_t dct[4] );
+#define x264_add4x4_idct_altivec x264_template(add4x4_idct_altivec)
void x264_add4x4_idct_altivec( uint8_t *p_dst, int16_t dct[16] );
+#define x264_add8x8_idct_altivec x264_template(add8x8_idct_altivec)
void x264_add8x8_idct_altivec( uint8_t *p_dst, int16_t dct[4][16] );
+#define x264_add16x16_idct_altivec x264_template(add16x16_idct_altivec)
void x264_add16x16_idct_altivec( uint8_t *p_dst, int16_t dct[16][16] );
+#define x264_sub8x8_dct_dc_altivec x264_template(sub8x8_dct_dc_altivec)
void x264_sub8x8_dct_dc_altivec( int16_t dct[4], uint8_t *pix1, uint8_t *pix2 );
+#define x264_sub8x8_dct8_altivec x264_template(sub8x8_dct8_altivec)
void x264_sub8x8_dct8_altivec( int16_t dct[64], uint8_t *pix1, uint8_t *pix2 );
+#define x264_sub16x16_dct8_altivec x264_template(sub16x16_dct8_altivec)
void x264_sub16x16_dct8_altivec( int16_t dct[4][64], uint8_t *pix1, uint8_t *pix2 );
+#define x264_add8x8_idct8_altivec x264_template(add8x8_idct8_altivec)
void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[64] );
+#define x264_add16x16_idct8_altivec x264_template(add16x16_idct8_altivec)
void x264_add16x16_idct8_altivec( uint8_t *dst, int16_t dct[4][64] );
+#define x264_zigzag_scan_4x4_frame_altivec x264_template(zigzag_scan_4x4_frame_altivec)
void x264_zigzag_scan_4x4_frame_altivec( int16_t level[16], int16_t dct[16] );
+#define x264_zigzag_scan_4x4_field_altivec x264_template(zigzag_scan_4x4_field_altivec)
void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[16] );
+#define x264_zigzag_scan_8x8_frame_altivec x264_template(zigzag_scan_8x8_frame_altivec)
void x264_zigzag_scan_8x8_frame_altivec( int16_t level[64], int16_t dct[64] );
+#define x264_zigzag_interleave_8x8_cavlc_altivec x264_template(zigzag_interleave_8x8_cavlc_altivec)
void x264_zigzag_interleave_8x8_cavlc_altivec( int16_t *dst, int16_t *src, uint8_t *nnz );
#endif
diff --git a/common/ppc/mc.h b/common/ppc/mc.h
index f31bb39..3ee8086 100644
--- a/common/ppc/mc.h
+++ b/common/ppc/mc.h
@@ -26,6 +26,7 @@
#ifndef X264_PPC_MC_H
#define X264_PPC_MC_H
+#define x264_mc_init_altivec x264_template(mc_init_altivec)
void x264_mc_init_altivec( x264_mc_functions_t *pf );
#endif
diff --git a/common/ppc/pixel.c b/common/ppc/pixel.c
index bc21258..4d0fcbf 100644
--- a/common/ppc/pixel.c
+++ b/common/ppc/pixel.c
@@ -26,6 +26,7 @@
#include "common/common.h"
#include "ppccommon.h"
+#include "pixel.h"
#if !HIGH_BIT_DEPTH
/***********************************************************************
diff --git a/common/ppc/pixel.h b/common/ppc/pixel.h
index 84a4973..60a538c 100644
--- a/common/ppc/pixel.h
+++ b/common/ppc/pixel.h
@@ -26,6 +26,7 @@
#ifndef X264_PPC_PIXEL_H
#define X264_PPC_PIXEL_H
+#define x264_pixel_init_altivec x264_template(pixel_init_altivec)
void x264_pixel_init_altivec( x264_pixel_function_t *pixf );
#endif
diff --git a/common/ppc/predict.h b/common/ppc/predict.h
index c81150a..bf73d6f 100644
--- a/common/ppc/predict.h
+++ b/common/ppc/predict.h
@@ -26,7 +26,9 @@
#ifndef X264_PPC_PREDICT_H
#define X264_PPC_PREDICT_H
+#define x264_predict_16x16_init_altivec x264_template(predict_16x16_init_altivec)
void x264_predict_16x16_init_altivec( x264_predict_t pf[7] );
+#define x264_predict_8x8c_init_altivec x264_template(predict_8x8c_init_altivec)
void x264_predict_8x8c_init_altivec( x264_predict_t pf[7] );
#endif /* X264_PPC_PREDICT_H */
diff --git a/common/ppc/quant.h b/common/ppc/quant.h
index 7e607ca..dde96be 100644
--- a/common/ppc/quant.h
+++ b/common/ppc/quant.h
@@ -26,12 +26,18 @@
#ifndef X264_PPC_QUANT_H
#define X264_PPC_QUANT_H
+#define x264_quant_4x4_altivec x264_template(quant_4x4_altivec)
int x264_quant_4x4_altivec( int16_t dct[16], uint16_t mf[16], uint16_t bias[16] );
+#define x264_quant_8x8_altivec x264_template(quant_8x8_altivec)
int x264_quant_8x8_altivec( int16_t dct[64], uint16_t mf[64], uint16_t bias[64] );
+#define x264_quant_4x4_dc_altivec x264_template(quant_4x4_dc_altivec)
int x264_quant_4x4_dc_altivec( int16_t dct[16], int mf, int bias );
+#define x264_quant_2x2_dc_altivec x264_template(quant_2x2_dc_altivec)
int x264_quant_2x2_dc_altivec( int16_t dct[4], int mf, int bias );
+#define x264_dequant_4x4_altivec x264_template(dequant_4x4_altivec)
void x264_dequant_4x4_altivec( int16_t dct[16], int dequant_mf[6][16], int i_qp );
+#define x264_dequant_8x8_altivec x264_template(dequant_8x8_altivec)
void x264_dequant_8x8_altivec( int16_t dct[64], int dequant_mf[6][64], int i_qp );
#endif
--
2.10.0
More information about the x264-devel
mailing list