[FFmpeg-cvslog] r30841 - in trunk/libswscale: swscale.c swscale_internal.h yuv2rgb.c
Benoit Fouet
benoit.fouet
Fri Mar 5 09:42:14 CET 2010
On Fri, 5 Mar 2010 10:36:10 +0200 Kostya wrote:
> On Fri, Mar 05, 2010 at 09:32:54AM +0100, benoit wrote:
> > Author: benoit
> > Date: Fri Mar 5 09:32:54 2010
> > New Revision: 30841
> >
> > Log:
> > libswscale: Extend the unaccelerated path of the unscaled yuv2rgb special
> > converter with support for rgb444 output format.
> > Patch by Janusz Krzysztofik jkrzyszt chez tis icnet pl
> >
> [...]
>
> > Modified: trunk/libswscale/yuv2rgb.c
> > ==============================================================================
> > --- trunk/libswscale/yuv2rgb.c Thu Mar 4 17:57:04 2010 (r30840)
> > +++ trunk/libswscale/yuv2rgb.c Fri Mar 5 09:32:54 2010 (r30841)
> [...]
> > @@ -701,6 +731,25 @@ av_cold int ff_yuv2rgb_c_init_tables(Sws
> > fill_table(c->table_bU, 1, cbu, y_table + yoffs + 2048);
> > fill_gv_table(c->table_gV, 1, cgv);
> > break;
> > + case 12:
> > + rbase = isRgb ? 8 : 0;
> > + gbase = 4;
> > + bbase = isRgb ? 0 : 8;
> > + c->yuvTable = av_malloc(1024*3*2);
> > + y_table16 = c->yuvTable;
> > + yb = -(384<<16) - oy;
> > + for (i = 0; i < 1024; i++) {
> > + uint8_t yval = av_clip_uint8((yb + 0x8000) >> 16);
> > + y_table16[i ] = (yval >> 4) << rbase;
> > + y_table16[i+1024] = (yval >> 4) << gbase;
> > + y_table16[i+2048] = (yval >> 4) << bbase;
> > + yb += cy;
> > + }
>
> Isn't vertical alignment a bit off here?
fixed.
Ben
More information about the ffmpeg-cvslog
mailing list