Commit a6a12a8a authored by Romain Dolbeau's avatar Romain Dolbeau Committed by Michael Niedermayer

h264 qpel mc, size 16 patch by (Romain Dolbeau <dolbeau at caps-entreprise dot com>)

Originally committed as revision 3472 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1140139f
......@@ -167,7 +167,8 @@ endif
ifeq ($(TARGET_ALTIVEC),yes)
OBJS += ppc/dsputil_altivec.o ppc/mpegvideo_altivec.o ppc/idct_altivec.o \
ppc/fft_altivec.o ppc/gmc_altivec.o ppc/fdct_altivec.o
ppc/fft_altivec.o ppc/gmc_altivec.o ppc/fdct_altivec.o \
ppc/dsputil_h264_altivec.o
endif
ifeq ($(TARGET_ARCH_SH4),yes)
......
This diff is collapsed.
This diff is collapsed.
......@@ -64,7 +64,16 @@ static unsigned char* perfname[] = {
"hadamard8_diff16_altivec",
"avg_pixels8_xy2_altivec",
"clear_blocks_dcbz32_ppc",
"clear_blocks_dcbz128_ppc"
"clear_blocks_dcbz128_ppc",
"put_h264_chroma_mc8_altivec",
"avg_h264_chroma_mc8_altivec",
"put_h264_qpel16_h_lowpass_altivec",
"avg_h264_qpel16_h_lowpass_altivec",
"put_h264_qpel16_v_lowpass_altivec",
"avg_h264_qpel16_v_lowpass_altivec",
"put_h264_qpel16_hv_lowpass_altivec",
"avg_h264_qpel16_hv_lowpass_altivec",
""
};
#include <stdio.h>
#endif
......@@ -228,6 +237,9 @@ long check_dcbzl_effect(void)
}
#endif
void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
{
// Common optimizations whether Altivec is available or not
......@@ -242,6 +254,8 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
default:
break;
}
dsputil_h264_init_ppc(c, avctx);
#ifdef HAVE_ALTIVEC
if (has_altivec()) {
......@@ -310,10 +324,10 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
{
for (j = 0; j < POWERPC_NUM_PMC_ENABLED ; j++)
{
perfdata[j][i][powerpc_data_min] = (unsigned long long)0xFFFFFFFFFFFFFFFF;
perfdata[j][i][powerpc_data_max] = (unsigned long long)0x0000000000000000;
perfdata[j][i][powerpc_data_sum] = (unsigned long long)0x0000000000000000;
perfdata[j][i][powerpc_data_num] = (unsigned long long)0x0000000000000000;
perfdata[j][i][powerpc_data_min] = 0xFFFFFFFFFFFFFFFFULL;
perfdata[j][i][powerpc_data_max] = 0x0000000000000000ULL;
perfdata[j][i][powerpc_data_sum] = 0x0000000000000000ULL;
perfdata[j][i][powerpc_data_num] = 0x0000000000000000ULL;
}
}
}
......
......@@ -32,8 +32,11 @@
#ifdef POWERPC_PERFORMANCE_REPORT
void powerpc_display_perf_report(void);
/* the 604* have 2, the G3* have 4, the G4s have 6 */
#define POWERPC_NUM_PMC_ENABLED 4
/* the 604* have 2, the G3* have 4, the G4s have 6,
and the G5 are completely different (they MUST use
POWERPC_MODE_64BITS, and let's hope all future 64 bis PPC
will use the same PMCs... */
#define POWERPC_NUM_PMC_ENABLED 6
/* if you add to the enum below, also add to the perfname array
in dsputil_ppc.c */
enum powerpc_perf_index {
......@@ -55,6 +58,14 @@ enum powerpc_perf_index {
altivec_avg_pixels8_xy2_num,
powerpc_clear_blocks_dcbz32,
powerpc_clear_blocks_dcbz128,
altivec_put_h264_chroma_mc8_num,
altivec_avg_h264_chroma_mc8_num,
altivec_put_h264_qpel16_h_lowpass_num,
altivec_avg_h264_qpel16_h_lowpass_num,
altivec_put_h264_qpel16_v_lowpass_num,
altivec_avg_h264_qpel16_v_lowpass_num,
altivec_put_h264_qpel16_hv_lowpass_num,
altivec_avg_h264_qpel16_hv_lowpass_num,
powerpc_perf_total
};
enum powerpc_data_index {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment