[FFmpeg-devel] [PATCH] Swscale YUV2RGB table generator
Diego Biurrun
diego
Sun Feb 8 21:17:50 CET 2009
On Sun, Feb 08, 2009 at 08:27:49PM +0200, Kostya wrote:
> Here's LGPLed version of YUV2RGB tables generator.
> While it may be not perfect, it seems to work.
>
> Please test and/or give your comments.
This is terribly good news. I'm happy somebody finally gets around to
doing it.
> --- yuv2rgb2.c (revision 0)
> +++ yuv2rgb2.c (revision 0)
> @@ -0,0 +1,740 @@
> +/*
> + * yuv2rgb2.c, Software YUV to RGB converter
Leave out the filename, it only creates problems and gives no useful
information.
> + * Copyright (C) 2009, Konstantin Shishkov
s/,//
> +const int32_t Inverse_Table_6_9[8][4] = {
ugly capitalized name
> + for (y=0; y<srcSliceH; y+=2){\
> + dst_type *dst_1= (dst_type*)(dst[0] + (y+srcSliceY )*dstStride[0]);\
> + dst_type *dst_2= (dst_type*)(dst[0] + (y+srcSliceY+1)*dstStride[0]);\
> + dst_type av_unused *r, *b;\
> + dst_type *g;\
> + uint8_t *py_1= src[0] + y*srcStride[0];\
> + uint8_t *py_2= py_1 + srcStride[0];\
> + uint8_t *pu= src[1] + (y>>1)*srcStride[1];\
> + uint8_t *pv= src[2] + (y>>1)*srcStride[2];\
> + unsigned int h_size= c->dstW>>3;\
I think this would be more readable with spaces around the =.
> +SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
nit: extra space
> + if (c->flags & SWS_CPU_CAPS_MMX2){
> + if (c->flags & SWS_CPU_CAPS_MMX){
extra good karma for space before {, same below
> +int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
long line
Diego
More information about the ffmpeg-devel
mailing list