[FFmpeg-devel] [PATCH] UltraSPARC VIS optimized yuv2rgb
Diego Biurrun
diego
Mon Jul 16 21:39:09 CEST 2007
On Mon, Jul 16, 2007 at 09:45:51PM +0200, Balatoni Denes wrote:
>
> --- ../libswscale/yuv2rgb_vis.c 1970-01-01 01:00:00.000000000 +0100
> +++ libswscale/yuv2rgb_vis.c 2007-07-16 19:57:28.759338000 +0200
> @@ -0,0 +1,209 @@
> +
> +static short int __attribute__((aligned(8))) sparc_coeffs[4*10]=
> +{
> + 596, 596, 596, 596, // 16*1.164*32
> + 8266, 8266, 8266, 8266, //128*2.018*32
> + 1602, 1602, 1602, 1602, //128*0.391*32
> + 3330, 3330, 3330, 3330, //128*0.813*32
> + 6537, 6537, 6537, 6537, //128*1.596*32
> + 9535, 9535, 9535, 9535, //1.164*32*256
> + 6660, 6660, 6660, 6660, //0.813*32*256
> + 13074,13074,13074,13074, //1.596*32*256
> + 16531,16531,16531,16531, //2.018*32*256
> + 3203, 3203, 3203, 3203, //0.391*32*256
> +};
7 spaces
> +#define YUV2RGB_INIT \
> + "wr %%g0, 0x10, %%gsr \n\t" \
> + "ldd [%5], %%f32 \n\t" \
> + "ldd [%5+8], %%f34 \n\t" \
> + "ldd [%5+16], %%f36 \n\t" \
> + "ldd [%5+24], %%f38 \n\t" \
> + "ldd [%5+32], %%f40 \n\t" \
> + "ldd [%5+40], %%f42 \n\t" \
> + "ldd [%5+48], %%f44 \n\t" \
> + "ldd [%5+56], %%f46 \n\t" \
> + "ldd [%5+64], %%f48 \n\t" \
> + "ldd [%5+72], %%f50 \n\t"
5 spaces
> +static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
> + int srcSliceH, uint8_t* dst[], int dstStride[]){
> + int y, out1, out2, out3, out4, out5, out6;
> +
> + for(y=0;y < srcSliceH;++y) {
> + asm volatile (
> + YUV2RGB_INIT
2 spaces and 1 space
> +SwsFunc yuv2rgb_init_vis(SwsContext *c)
> +{
> + if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV422P && (c->dstW & 7)==0) {
> + av_log(c, AV_LOG_INFO, "SPARC VIS accelerated YUV422P -> RGB32\n");
4 spaces and 2 spaces
The rules say 4 spaces, please change your code to use 4 space
indentation.
> + return vis_422P_ARGB32;
> + }
trailing whitespace
Diego
More information about the ffmpeg-devel
mailing list