No ARM or PPC assembly yet though.
# AltiVec optims
ifeq ($(ARCH),PPC)
-ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
- common/ppc/quant.c common/ppc/deblock.c \
- common/ppc/predict.c
-SRCS += $(ALTIVECSRC)
-$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
+SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
+ common/ppc/quant.c common/ppc/deblock.c \
+ common/ppc/predict.c
endif
# NEON optims
static void mc_luma_neon( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
- int i_width, int i_height )
+ int i_width, int i_height, const x264_weight_t *weight )
{
int qpel_idx = ((mvy&3)<<2) + (mvx&3);
int offset = (mvy>>2)*i_src_stride + (mvx>>2);
x264_pixel_avg_wtab_neon[i_width>>2](
dst, i_dst_stride, src1, i_src_stride,
src2, i_height );
+ if( weight->weightfn )
+ weight->weightfn[i_width>>2]( dst, i_dst_stride, dst, i_dst_stride, weight, i_height );
}
+ else if( weight->weightfn )
+ weight->weightfn[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, weight, i_height );
else
- {
- x264_mc_copy_wtab_neon[i_width>>2](
- dst, i_dst_stride, src1, i_src_stride, i_height );
- }
+ x264_mc_copy_wtab_neon[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, i_height );
}
static uint8_t *get_ref_neon( uint8_t *dst, int *i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
- int i_width, int i_height )
+ int i_width, int i_height, const x264_weight_t *weight )
{
int qpel_idx = ((mvy&3)<<2) + (mvx&3);
int offset = (mvy>>2)*i_src_stride + (mvx>>2);
x264_pixel_avg_wtab_neon[i_width>>2](
dst, *i_dst_stride, src1, i_src_stride,
src2, i_height );
+ if( weight->weightfn )
+ weight->weightfn[i_width>>2]( dst, *i_dst_stride, dst, *i_dst_stride, weight, i_height );
+ return dst;
+ }
+ else if( weight->weightfn )
+ {
+ weight->weightfn[i_width>>2]( dst, *i_dst_stride, src1, i_src_stride, weight, i_height );
return dst;
}
else
static void mc_luma_altivec( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
- int i_width, int i_height )
+ int i_width, int i_height, const x264_weight_t *weight )
{
int qpel_idx = ((mvy&3)<<2) + (mvx&3);
int offset = (mvy>>2)*i_src_stride + (mvx>>2);
default:
x264_pixel_avg2_w16_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
}
-
+ if( weight->weightfn )
+ weight->weightfn[i_width>>2]( dst, i_dst_stride, dst, i_dst_stride, weight, i_height );
}
+ else if( weight->weightfn )
+ weight->weightfn[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, weight, i_height );
else
{
switch(i_width) {
static uint8_t *get_ref_altivec( uint8_t *dst, int *i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
- int i_width, int i_height )
+ int i_width, int i_height, const x264_weight_t *weight )
{
int qpel_idx = ((mvy&3)<<2) + (mvx&3);
int offset = (mvy>>2)*i_src_stride + (mvx>>2);
x264_pixel_avg2_w20_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
break;
}
+ if( weight->weightfn )
+ weight->weightfn[i_width>>2]( dst, *i_dst_stride, dst, *i_dst_stride, weight, i_height );
+ return dst;
+ }
+ else if( weight->weightfn )
+ {
+ weight->weightfn[i_width>>2]( dst, *i_dst_stride, src1, i_src_stride, weight, i_height );
return dst;
}
else
ARCH="PPC"
if [ $SYS = MACOSX ]
then
- ALTIVECFLAGS="$ALTIVECFLAGS -faltivec -fastf -mcpu=G4"
+ CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4"
else
- ALTIVECFLAGS="$ALTIVECFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_H"
+ CFLAGS="$CFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_H"
fi
;;
sparc)
SYS=$SYS
CC=$CC
CFLAGS=$CFLAGS
-ALTIVECFLAGS=$ALTIVECFLAGS
LDFLAGS=$LDFLAGS
AR=$AR
RANLIB=$RANLIB