[FFmpeg-devel] PATCH BlackFin YUV2 to RGB Color Space Converters

Diego Biurrun diego
Sat May 5 11:33:08 CEST 2007


On Sat, May 05, 2007 at 05:16:24AM -0400, Marc Hoffman wrote:
> Luca Barbato writes:
>  > Marc Hoffman wrote:
>  > > Blackfin optimized YUV420 to RGB CSC Color Space Converters.
> 
> Changes made thanks, Diego and Luca.
> 
> Crazy how that white space just likes to slip in to the code at the
> end. I guess its like package padding, incase there is an accident
> and the code crashes while its in the mail. Anyways I have removed it
> all now I believe.
> 
> --- libswscale/yuv2rgb_bfin.c	(revision 0)
> +++ libswscale/yuv2rgb_bfin.c	(revision 0)
> @@ -0,0 +1,221 @@
> +/*
> + * Copyright (C) 2007 Marc Hoffman <marc.hoffman at analog.com>
> + *                    April 20, 2007
> + *
> + * Blackfin Video Color Space Converters Operations
> + *  convert I420 YV12 to RGB in various formats,
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +#include <stdio.h>

While I'm nitpicking: Leave a blank line between the header and the
#include, makes it look less cramped.

> +static
> +int core_yuv420_rgb (SwsContext *c,

The rest of libswscale does not put the static keyword on a separate
line, so I suggest you do not as well.

> --- libswscale/yuv2rgb.c      (revision 23235)
> +++ libswscale/yuv2rgb.c      (working copy)
> @@ -611,6 +611,14 @@
>      }
>  #endif
>  
> +#ifdef ARCH_BFIN 
> +    if (c->flags & SWS_CPU_CAPS_BFIN)
> +    {
> +        SwsFunc t = ff_bfin_yuv2rgb_get_func_ptr (c);
> +        if(t) return t;
> +    }
> +#endif
> + 

trailing whitespace

> --- libswscale/swscale_internal.h     (revision 23235)
> +++ libswscale/swscale_internal.h     (working copy)
> @@ -162,6 +162,12 @@
>  
> + 
> +#ifdef ARCH_BFIN
> +    uint32_t oy,oc,zero,cy,crv,rmask,cbu,bmask,cgu,cgv,gmask;
> +#endif

trailing whitespace

> --- libswscale/Makefile	(revision 23235)
> +++ libswscale/Makefile	(working copy)
> @@ -12,6 +12,9 @@
>  
> +OBJS-$(TARGET_ARCH_BFIN)   +=  yuv2rgb_bfin.o
> +ASM_OBJS-$(TARGET_ARCH_BFIN) += internal_bfin.o

This should be aligned.

Diego




More information about the ffmpeg-devel mailing list