Commit 1382552b authored by Oskar Arvidsson's avatar Oskar Arvidsson Committed by Fiona Glaser

Convert X264_HIGH_BIT_DEPTH to HIGH_BIT_DEPTH

Less verbose.
parent abde94f6
......@@ -61,7 +61,7 @@ ifneq ($(AS),)
X86SRC0 = const-a.asm cabac-a.asm dct-a.asm deblock-a.asm mc-a.asm \
mc-a2.asm pixel-a.asm predict-a.asm quant-a.asm \
cpu-a.asm dct-32.asm bitstream-a.asm
ifneq ($(findstring X264_HIGH_BIT_DEPTH, $(CONFIG)),)
ifneq ($(findstring HIGH_BIT_DEPTH, $(CONFIG)),)
X86SRC0 += sad16-a.asm
else
X86SRC0 += sad-a.asm
......
......@@ -79,7 +79,7 @@ void x264_hpel_filter_v_neon( uint8_t *, uint8_t *, int16_t *, int, int );
void x264_hpel_filter_c_neon( uint8_t *, int16_t *, int );
void x264_hpel_filter_h_neon( uint8_t *, uint8_t *, int );
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
static void x264_weight_cache_neon( x264_t *h, x264_weight_t *w )
{
if( w->i_scale == 1<<w->i_denom )
......@@ -202,22 +202,22 @@ static void hpel_filter_neon( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8
src += stride;
}
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
void x264_mc_init_arm( int cpu, x264_mc_functions_t *pf )
{
if( !(cpu&X264_CPU_ARMV6) )
return;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf->prefetch_fenc = x264_prefetch_fenc_arm;
pf->prefetch_ref = x264_prefetch_ref_arm;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
if( !(cpu&X264_CPU_NEON) )
return;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf->copy_16x16_unaligned = x264_mc_copy_w16_neon;
pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_neon;
pf->copy[PIXEL_8x8] = x264_mc_copy_w8_neon;
......@@ -242,7 +242,7 @@ void x264_mc_init_arm( int cpu, x264_mc_functions_t *pf )
pf->get_ref = get_ref_neon;
pf->hpel_filter = hpel_filter_neon;
pf->frame_init_lowres_core = x264_frame_init_lowres_core_neon;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
// Apple's gcc stupidly cannot align stack variables, and ALIGNED_ARRAY can't work on structs
#ifndef SYS_MACOSX
......
......@@ -54,7 +54,7 @@ void x264_predict_4x4_init_arm( int cpu, x264_predict_t pf[12] )
if (!(cpu&X264_CPU_ARMV6))
return;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf[I_PRED_4x4_H] = x264_predict_4x4_h_armv6;
pf[I_PRED_4x4_DC] = x264_predict_4x4_dc_armv6;
pf[I_PRED_4x4_DDR] = x264_predict_4x4_ddr_armv6;
......@@ -63,7 +63,7 @@ void x264_predict_4x4_init_arm( int cpu, x264_predict_t pf[12] )
return;
pf[I_PRED_4x4_DDL] = x264_predict_4x4_ddl_neon;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
void x264_predict_8x8c_init_arm( int cpu, x264_predict_t pf[7] )
......@@ -71,14 +71,14 @@ void x264_predict_8x8c_init_arm( int cpu, x264_predict_t pf[7] )
if (!(cpu&X264_CPU_NEON))
return;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf[I_PRED_CHROMA_DC] = x264_predict_8x8c_dc_neon;
pf[I_PRED_CHROMA_DC_TOP] = x264_predict_8x8c_dc_top_neon;
pf[I_PRED_CHROMA_DC_LEFT] = x264_predict_8x8c_dc_left_neon;
pf[I_PRED_CHROMA_H] = x264_predict_8x8c_h_neon;
pf[I_PRED_CHROMA_V] = x264_predict_8x8c_v_neon;
pf[I_PRED_CHROMA_P] = x264_predict_8x8c_p_neon;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
void x264_predict_8x8_init_arm( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_filter_t *predict_filter )
......@@ -86,10 +86,10 @@ void x264_predict_8x8_init_arm( int cpu, x264_predict8x8_t pf[12], x264_predict_
if (!(cpu&X264_CPU_NEON))
return;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf[I_PRED_8x8_DC] = x264_predict_8x8_dc_neon;
pf[I_PRED_8x8_H] = x264_predict_8x8_h_neon;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
void x264_predict_16x16_init_arm( int cpu, x264_predict_t pf[7] )
......@@ -97,12 +97,12 @@ void x264_predict_16x16_init_arm( int cpu, x264_predict_t pf[7] )
if (!(cpu&X264_CPU_NEON))
return;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf[I_PRED_16x16_DC ] = x264_predict_16x16_dc_neon;
pf[I_PRED_16x16_DC_TOP] = x264_predict_16x16_dc_top_neon;
pf[I_PRED_16x16_DC_LEFT]= x264_predict_16x16_dc_left_neon;
pf[I_PRED_16x16_H ] = x264_predict_16x16_h_neon;
pf[I_PRED_16x16_V ] = x264_predict_16x16_v_neon;
pf[I_PRED_16x16_P ] = x264_predict_16x16_p_neon;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
......@@ -110,7 +110,7 @@ typedef union { x264_uint128_t i; uint64_t a[2]; uint32_t b[4]; uint16_t c[8]; u
#define CP64(dst,src) M64(dst) = M64(src)
#define CP128(dst,src) M128(dst) = M128(src)
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
typedef uint16_t pixel;
typedef uint64_t pixel4;
typedef int32_t dctcoef;
......
......@@ -421,7 +421,7 @@ void x264_dct_init( int cpu, x264_dct_function_t *dctf )
dctf->dct4x4dc = dct4x4dc;
dctf->idct4x4dc = idct4x4dc;
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
{
......@@ -430,7 +430,7 @@ void x264_dct_init( int cpu, x264_dct_function_t *dctf )
dctf->sub16x16_dct = x264_sub16x16_dct_mmx;
}
#endif // HAVE_MMX
#else // !X264_HIGH_BIT_DEPTH
#else // !HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
{
......@@ -528,7 +528,7 @@ void x264_dct_init( int cpu, x264_dct_function_t *dctf )
dctf->add16x16_idct8= x264_add16x16_idct8_neon;
}
#endif
#endif // X264_HIGH_BIT_DEPTH
#endif // HIGH_BIT_DEPTH
}
void x264_dct_init_weights( void )
......@@ -722,7 +722,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced )
pf->sub_8x8 = zigzag_sub_8x8_field;
pf->sub_4x4 = zigzag_sub_4x4_field;
pf->sub_4x4ac = zigzag_sub_4x4ac_field;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMXEXT )
{
......@@ -740,7 +740,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced )
if( cpu&X264_CPU_ALTIVEC )
pf->scan_4x4 = x264_zigzag_scan_4x4_field_altivec;
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
else
{
......@@ -749,7 +749,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced )
pf->sub_8x8 = zigzag_sub_8x8_frame;
pf->sub_4x4 = zigzag_sub_4x4_frame;
pf->sub_4x4ac = zigzag_sub_4x4ac_frame;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
pf->scan_4x4 = x264_zigzag_scan_4x4_frame_mmx;
......@@ -775,16 +775,16 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced )
if( cpu&X264_CPU_NEON )
pf->scan_4x4 = x264_zigzag_scan_4x4_frame_neon;
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
pf->interleave_8x8_cavlc = zigzag_interleave_8x8_cavlc;
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
pf->interleave_8x8_cavlc = x264_zigzag_interleave_8x8_cavlc_mmx;
if( cpu&X264_CPU_SHUFFLE_IS_FAST )
pf->interleave_8x8_cavlc = x264_zigzag_interleave_8x8_cavlc_sse2;
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
......@@ -463,7 +463,7 @@ void x264_deblock_v8_luma_intra_mmxext( uint8_t *pix, int stride, int alpha, int
void x264_deblock_v_chroma_intra_mmxext( pixel *pix, int stride, int alpha, int beta );
void x264_deblock_h_chroma_intra_mmxext( pixel *pix, int stride, int alpha, int beta );
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
void x264_deblock_v_luma_mmxext( pixel *pix, int stride, int alpha, int beta, int8_t *tc0 );
void x264_deblock_v_luma_intra_mmxext( pixel *pix, int stride, int alpha, int beta );
#else
......@@ -478,7 +478,7 @@ static void x264_deblock_v_luma_intra_mmxext( uint8_t *pix, int stride, int alph
x264_deblock_v8_luma_intra_mmxext( pix, stride, alpha, beta );
x264_deblock_v8_luma_intra_mmxext( pix+8, stride, alpha, beta );
}
#endif // X264_HIGH_BIT_DEPTH
#endif // HIGH_BIT_DEPTH
#endif
#endif
......@@ -540,7 +540,7 @@ void x264_deblock_init( int cpu, x264_deblock_function_t *pf )
}
#endif
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC )
{
......@@ -558,5 +558,5 @@ void x264_deblock_init( int cpu, x264_deblock_function_t *pf )
// pf->deblock_chroma[0] = x264_deblock_h_chroma_neon;
}
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
......@@ -263,7 +263,7 @@ int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
return -1;
}
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
if( !(src->img.i_csp & X264_CSP_HIGH_DEPTH) )
{
x264_log( h, X264_LOG_ERROR, "This build of x264 requires high depth input. Rebuild to support 8-bit input.\n" );
......
......@@ -371,7 +371,7 @@ static ALWAYS_INLINE uint64_t pack32to64( uint32_t a, uint32_t b )
#endif
}
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
# define pack_pixel_1to2 pack16to32
# define pack_pixel_2to4 pack32to64
#else
......
......@@ -442,14 +442,14 @@ SAD_X( 8x4 )
SAD_X( 4x8 )
SAD_X( 4x4 )
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if ARCH_UltraSparc
SAD_X( 16x16_vis )
SAD_X( 16x8_vis )
SAD_X( 8x16_vis )
SAD_X( 8x8_vis )
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
/****************************************************************************
* pixel_satd_x4
......@@ -484,18 +484,18 @@ SATD_X( 4x4, cpu )
SATD_X_DECL7()
#if HAVE_MMX
SATD_X_DECL7( _mmxext )
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
SATD_X_DECL6( _sse2 )
SATD_X_DECL7( _ssse3 )
SATD_X_DECL7( _sse4 )
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
#endif
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if HAVE_ARMV6
SATD_X_DECL7( _neon )
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
#define INTRA_MBCMP_8x8( mbcmp, cpu )\
void x264_intra_##mbcmp##_x3_8x8##cpu( pixel *fenc, pixel edge[33], int res[3] )\
......@@ -511,7 +511,7 @@ void x264_intra_##mbcmp##_x3_8x8##cpu( pixel *fenc, pixel edge[33], int res[3] )
INTRA_MBCMP_8x8( sad, )
INTRA_MBCMP_8x8(sa8d, )
#if X264_HIGH_BIT_DEPTH && HAVE_MMX
#if HIGH_BIT_DEPTH && HAVE_MMX
INTRA_MBCMP_8x8( sad, _mmxext)
INTRA_MBCMP_8x8( sad, _sse2 )
INTRA_MBCMP_8x8( sad, _ssse3 )
......@@ -536,7 +536,7 @@ INTRA_MBCMP(satd, 8, dc, h, v, c, )
INTRA_MBCMP( sad, 16, v, h, dc, , )
INTRA_MBCMP(satd, 16, v, h, dc, , )
#if X264_HIGH_BIT_DEPTH && HAVE_MMX
#if HIGH_BIT_DEPTH && HAVE_MMX
INTRA_MBCMP( sad, 4, v, h, dc, , _mmxext)
INTRA_MBCMP(satd, 4, v, h, dc, , _mmxext)
INTRA_MBCMP( sad, 8, dc, h, v, c, _mmxext)
......@@ -740,7 +740,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
pixf->intra_sad_x3_16x16 = x264_intra_sad_x3_16x16;
pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16;
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMXEXT )
{
......@@ -827,7 +827,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
pixf->intra_sad_x3_16x16 = x264_intra_sad_x3_16x16_ssse3;
}
#endif // HAVE_MMX
#else // !X264_HIGH_BIT_DEPTH
#else // !HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
{
......@@ -1055,20 +1055,20 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
}
}
#endif
#endif // X264_HIGH_BIT_DEPTH
#endif // HIGH_BIT_DEPTH
#if HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC )
{
x264_pixel_altivec_init( pixf );
}
#endif
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#if ARCH_UltraSparc
INIT4( sad, _vis );
INIT4( sad_x3, _vis );
INIT4( sad_x4, _vis );
#endif
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
pixf->ads[PIXEL_8x16] =
pixf->ads[PIXEL_8x4] =
......
......@@ -27,7 +27,7 @@
#include "common/common.h"
#include "ppccommon.h"
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#define VEC_DCT(a0,a1,a2,a3,b0,b1,b2,b3) \
b1 = vec_add( a0, a3 ); \
b3 = vec_add( a1, a2 ); \
......@@ -486,5 +486,5 @@ void x264_zigzag_scan_4x4_field_altivec( int16_t level[16], int16_t dct[16] )
vec_st( tmp0v, 0x00, level );
vec_st( tmp1v, 0x10, level );
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
......@@ -26,7 +26,7 @@
#include "common/common.h"
#include "ppccommon.h"
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
#define transpose4x16(r0, r1, r2, r3) \
{ \
register vec_u8_t r4; \
......@@ -298,4 +298,4 @@ void x264_deblock_h_luma_altivec( uint8_t *pix, int stride, int alpha, int beta,
transpose4x16(line1, line2, line3, line4);
write16x4(pix-2, stride, line1, line2, line3, line4);
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
......@@ -36,7 +36,7 @@
#include "mc.h"
#include "ppccommon.h"
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
typedef void (*pf_mc_t)( uint8_t *src, int i_src,
uint8_t *dst, int i_dst, int i_height );
......@@ -856,11 +856,11 @@ static void frame_init_lowres_core_altivec( uint8_t *src0, uint8_t *dst0, uint8_
dstc += dst_stride;
}
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
void x264_mc_altivec_init( x264_mc_functions_t *pf )
{
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf->mc_luma = mc_luma_altivec;
pf->get_ref = get_ref_altivec;
pf->mc_chroma = mc_chroma_altivec;
......@@ -870,5 +870,5 @@ void x264_mc_altivec_init( x264_mc_functions_t *pf )
pf->hpel_filter = x264_hpel_filter_altivec;
pf->frame_init_lowres_core = frame_init_lowres_core_altivec;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
......@@ -27,7 +27,7 @@
#include "common/common.h"
#include "ppccommon.h"
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
/***********************************************************************
* SAD routines
**********************************************************************/
......@@ -1983,14 +1983,14 @@ static void ssim_4x4x2_core_altivec( const uint8_t *pix1, int stride1,
sums[0][3] = temp[0];
sums[1][3] = temp[1];
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
/****************************************************************************
* x264_pixel_init:
****************************************************************************/
void x264_pixel_altivec_init( x264_pixel_function_t *pixf )
{
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pixf->sad[PIXEL_16x16] = pixel_sad_16x16_altivec;
pixf->sad[PIXEL_8x16] = pixel_sad_8x16_altivec;
pixf->sad[PIXEL_16x8] = pixel_sad_16x8_altivec;
......@@ -2029,5 +2029,5 @@ void x264_pixel_altivec_init( x264_pixel_function_t *pixf )
pixf->hadamard_ac[PIXEL_8x8] = x264_pixel_hadamard_ac_8x8_altivec;
pixf->ssim_4x4x2_core = ssim_4x4x2_core_altivec;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
......@@ -28,7 +28,7 @@
#include "pixel.h"
#include "ppccommon.h"
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
static void predict_8x8c_p_altivec( uint8_t *src )
{
int H = 0, V = 0;
......@@ -200,7 +200,7 @@ static void predict_16x16_v_altivec( uint8_t *src )
src += FDEC_STRIDE;
}
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
/****************************************************************************
......@@ -208,7 +208,7 @@ static void predict_16x16_v_altivec( uint8_t *src )
****************************************************************************/
void x264_predict_16x16_init_altivec( x264_predict_t pf[7] )
{
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf[I_PRED_16x16_V ] = predict_16x16_v_altivec;
pf[I_PRED_16x16_H ] = predict_16x16_h_altivec;
pf[I_PRED_16x16_DC] = predict_16x16_dc_altivec;
......@@ -216,12 +216,12 @@ void x264_predict_16x16_init_altivec( x264_predict_t pf[7] )
pf[I_PRED_16x16_DC_LEFT] = predict_16x16_dc_left_altivec;
pf[I_PRED_16x16_DC_TOP ] = predict_16x16_dc_top_altivec;
pf[I_PRED_16x16_DC_128 ] = predict_16x16_dc_128_altivec;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
void x264_predict_8x8c_init_altivec( x264_predict_t pf[7] )
{
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
pf[I_PRED_CHROMA_P] = predict_8x8c_p_altivec;
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
}
......@@ -27,7 +27,7 @@
#include "ppccommon.h"
#include "quant.h"
#if !X264_HIGH_BIT_DEPTH
#if !HIGH_BIT_DEPTH
// quant of a whole 4x4 block, unrolled 2x and "pre-scheduled"
#define QUANT_16_U( idx0, idx1 ) \
{ \
......@@ -366,5 +366,5 @@ void x264_dequant_8x8_altivec( int16_t dct[64], int dequant_mf[6][64], int i_qp
DEQUANT_SHR();
}
}
#endif // !X264_HIGH_BIT_DEPTH
#endif // !HIGH_BIT_DEPTH
......@@ -285,7 +285,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
pf->coeff_level_run[ DCT_LUMA_AC] = x264_coeff_level_run15;
pf->coeff_level_run[ DCT_LUMA_4x4] = x264_coeff_level_run16;
#if X264_HIGH_BIT_DEPTH
#if HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
{
......@@ -369,7 +369,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
pf->quant_8x8 = x264_quant_8x8_sse4;
}
#endif // HAVE_MMX
#else // !X264_HIGH_BIT_DEPTH
#else // !HIGH_BIT_DEPTH
#if HAVE_MMX
if( cpu&X264_CPU_MMX )
{
......@@ -508,7 +508,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
pf->coeff_last[DCT_LUMA_8x8] = x264_coeff_last64_neon;
}
#endif
#endif // X264_HIGH_BIT_DEPTH
#endif // HIGH_BIT_DEPTH
pf->coeff_last[ DCT_LUMA_DC] = pf->coeff_last[DCT_LUMA_4x4];
pf->coeff_last[DCT_CHROMA_AC] = pf->coeff_last[ DCT_LUMA_AC];
pf->coeff_level_run[ DCT_LUMA_DC] = pf->coeff_level_run[DCT_LUMA_4x4];
......
......@@ -114,7 +114,7 @@ cglobal idct4x4dc_mmx, 1,1
movq [r0+24], m3
RET
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
;-----------------------------------------------------------------------------
; void sub4x4_dct( int32_t dct[4][4], uint16_t *pix1, uint16_t *pix2 )
;-----------------------------------------------------------------------------
......@@ -132,9 +132,9 @@ cglobal sub4x4_dct_mmx, 3,3
STORE_DIFF m2, m4, m5, [r0+32], [r0+40]
STORE_DIFF m3, m4, m5, [r0+48], [r0+56]
RET
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
%macro SUB_DCT4 1
;-----------------------------------------------------------------------------
; void sub4x4_dct( int16_t dct[4][4], uint8_t *pix1, uint8_t *pix2 )
......@@ -162,9 +162,9 @@ cglobal sub4x4_dct_%1, 3,3
SUB_DCT4 mmx
SUB_DCT4 ssse3
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
;-----------------------------------------------------------------------------
; void add4x4_idct( uint8_t *p_dst, int16_t dct[4][4] )
;-----------------------------------------------------------------------------
......@@ -236,7 +236,7 @@ cglobal add4x4_idct_sse4, 2,2,6
movd [r0+FDEC_STRIDE*2], m0
pextrd [r0+FDEC_STRIDE*3], m0, 1
RET
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
INIT_MMX
;-----------------------------------------------------------------------------
......@@ -244,14 +244,14 @@ INIT_MMX
;-----------------------------------------------------------------------------
%macro SUB_NxN_DCT 6
cglobal %1, 3,3,11*(mmsize/16)
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
%if mmsize == 8
pxor m7, m7
%else
add r2, 4*FDEC_STRIDE
mova m7, [hsub_mul]
%endif
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
.skip_prologue:
%ifdef WIN64
sub rsp, 8
......@@ -308,11 +308,11 @@ cglobal %1, 2,2,11*(mmsize/16)
%endif
%endmacro
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
INIT_MMX
SUB_NxN_DCT sub8x8_dct_mmx, sub4x4_dct_mmx.skip_prologue, 64, 8, 0, 0
SUB_NxN_DCT sub16x16_dct_mmx, sub8x8_dct_mmx.skip_prologue, 64, 16, 8, 8
%else ; !X264_HIGH_BIT_DEPTH
%else ; !HIGH_BIT_DEPTH
%ifndef ARCH_X86_64
SUB_NxN_DCT sub8x8_dct_mmx, sub4x4_dct_mmx.skip_prologue, 32, 4, 0, 0
ADD_NxN_IDCT add8x8_idct_mmx, add4x4_idct_mmx.skip_prologue, 32, 4, 0, 0
......@@ -341,7 +341,7 @@ ADD_NxN_IDCT add16x16_idct8_sse2, add8x8_idct8_sse2.skip_prologue, 128, 8, 0, 0
cextern sub8x8_dct8_ssse3.skip_prologue
SUB_NxN_DCT sub16x16_dct8_ssse3, sub8x8_dct8_ssse3.skip_prologue, 128, 8, 0, 0
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
;-----------------------------------------------------------------------------
......
......@@ -43,7 +43,7 @@ cextern pw_4
cextern pw_00ff
cextern pw_pixel_max
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
; out: %4 = |%1-%2|-%3
; clobbers: %5
%macro ABS_SUB 5
......@@ -781,9 +781,9 @@ INIT_XMM
DEBLOCK_LUMA sse2
DEBLOCK_LUMA_INTRA sse2
%endif
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
; expands to [base],...,[base+7*stride]
%define PASS8ROWS(base, base3, stride, stride3) \
[base], [base+stride], [base+stride*2], [base3], \
......@@ -1557,9 +1557,9 @@ DEBLOCK_LUMA_INTRA sse2, v
INIT_MMX
DEBLOCK_LUMA_INTRA mmxext, v8
%endif
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
; in: %1=p0, %2=q0, %3=p1, %4=q1, %5=mask, %6=tmp, %7=tmp
; out: %1=p0', %2=q0'
%macro CHROMA_DEBLOCK_P0_Q0_INTRA 7
......@@ -1743,9 +1743,9 @@ DEBLOCK_CHROMA mmxext
%endif
INIT_XMM
DEBLOCK_CHROMA sse2
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
%macro CHROMA_V_START 0
dec r2d ; alpha-1
dec r3d ; beta-1
......@@ -1909,7 +1909,7 @@ DEBLOCK_CHROMA_INTRA sse2
INIT_MMX
DEBLOCK_CHROMA_INTRA mmxext
%endif
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
......
......@@ -186,7 +186,7 @@ AVG_WEIGHT ssse3, 16, 7
; P frame explicit weighted prediction
;=============================================================================
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
%macro WEIGHT_START 1 ; (width)
movd m2, [r4+32] ; denom
movd m3, [r4+36] ; scale
......@@ -236,7 +236,7 @@ AVG_WEIGHT ssse3, 16, 7
%endrep
%endmacro
%else ; !X264_HIGH_BIT_DEPTH
%else ; !HIGH_BIT_DEPTH
%macro WEIGHT_START 1
mova m3, [r4]
......@@ -351,7 +351,7 @@ AVG_WEIGHT ssse3, 16, 7
%endrep
%endmacro
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
;-----------------------------------------------------------------------------
;void mc_weight_wX( uint8_t *dst, int i_dst_stride, uint8_t *src, int i_src_stride, weight_t *weight, int h )
......@@ -370,7 +370,7 @@ AVG_WEIGHT ssse3, 16, 7
%endif
%assign XMMREGS 7
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
%assign NUMREGS NUMREGS+1
%assign XMMREGS 8
%endif
......@@ -399,7 +399,7 @@ INIT_XMM
WEIGHTER 8, sse2
WEIGHTER 16, sse2
WEIGHTER 20, sse2
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
WEIGHTER 12, sse2
%else
%define WEIGHT WEIGHT_SSSE3
......@@ -573,7 +573,7 @@ AVGH 4, 2, ssse3
; pixel avg2
;=============================================================================
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
;-----------------------------------------------------------------------------
; void pixel_avg2_wN( uint16_t *dst, int dst_stride,
; uint16_t *src1, int src_stride,
......@@ -755,9 +755,9 @@ cglobal pixel_avg2_w18_sse2, 6,7,6
lea r0, [r0+r1*2]
jg .height_loop
REP_RET
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
;-----------------------------------------------------------------------------
; void pixel_avg2_w4( uint8_t *dst, int dst_stride,
; uint8_t *src1, int src_stride,
......@@ -1081,7 +1081,7 @@ AVG16_CACHELINE_LOOP_SSSE3 j, k
%assign j j+1
%assign k k+1
%endrep
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
;=============================================================================
; pixel copy
......@@ -1098,7 +1098,7 @@ AVG16_CACHELINE_LOOP_SSSE3 j, k
%1 [r0+%3], m3
%endmacro
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
%macro COPY_ONE 6
COPY4 %1, %2, %3, %4
%endmacro
......@@ -1168,9 +1168,9 @@ INIT_XMM
MC_COPY ONE, 8, movu, sse2, 0
MC_COPY TWO, 16, movu, sse2, 8
MC_COPY TWO, 16, mova, aligned_sse2, 8
%endif ; X264_HIGH_BIT_DEPTH
%endif ; HIGH_BIT_DEPTH
%ifndef X264_HIGH_BIT_DEPTH
%ifndef HIGH_BIT_DEPTH
INIT_MMX
;-----------------------------------------------------------------------------
; void mc_copy_w4( uint8_t *dst, int i_dst_stride,
......@@ -1244,7 +1244,7 @@ COPY_W16_SSE2 mc_copy_w16_sse2, movdqu
; but with SSE3 the overhead is zero, so there's no reason not to include it.
COPY_W16_SSE2 mc_copy_w16_sse3, lddqu
COPY_W16_SSE2 mc_copy_w16_aligned_sse2, movdqa
%endif ; !X264_HIGH_BIT_DEPTH
%endif ; !HIGH_BIT_DEPTH
......@@ -1347,7 +1347,7 @@ cglobal prefetch_ref_mmxext, 3,3
add r3, t0 ; src += (dx>>3) + (dy>>3) * src_stride
%endmacro
%ifdef X264_HIGH_BIT_DEPTH
%ifdef HIGH_BIT_DEPTH
%macro UNPACK_UNALIGNED 4
movu %1, [%4+0]
movu %2, [%4+4]
......@@ -1363,7 +1363,7 @@ cglobal prefetch_ref_mmxext, 3,3
shufps %2, %3, 11011101b
%endif
%endmacro