archppc.c.svn-base

来自「SumatraPDF是一款小型开源的pdf阅读工具。虽然玲珑小巧(只有800多K」· SVN-BASE 代码 · 共 68 行

SVN-BASE
68
字号
/* * PowerPC specific render optims live here */#include "fitz-base.h"#include "fitz-world.h"#include "fitz-draw.h"typedef unsigned char byte;#ifdef HAVE_ALTIVECstatic void srow1ppc(byte *src, byte *dst, int w, int denom){	int x, left;	int sum;	left = 0;	sum = 0;	for (x = 0; x < w; x++)	{		sum += *src++;		if (++left == denom)		{			left = 0;			*dst++ = sum / denom;			sum = 0;		}	}	if (left)		*dst++ = sum / left;}static void scol1ppc(byte *src, byte *dst, int w, int denom){	int x, y;	unsigned char *s;	int sum;	for (x = 0; x < w; x++)	{		s = src + x;		sum = 0;		for (y = 0; y < denom; y++)			sum += s[y * w];		*dst++ = sum / denom;	}}#endif /* HAVE_ALTIVEC */#if defined (ARCH_PPC)voidfz_accelerate(void){#  ifdef HAVE_ALTIVEC	if (fz_cpuflags & HAVE_ALTIVEC)	{		fz_srow1 = srow1ppc;		fz_scol1 = scol1ppc;	}#  endif}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?