[FFmpeg-soc] j2k review

Kamil Nowosad kamil.nowosad at gmail.com
Tue Aug 28 13:46:17 CEST 2007


Hi,

On Sun, Aug 19, 2007 at 09:31:10PM +0200, Michael Niedermayer wrote:
> >     s->XTsiz = 256; s->YTsiz = 256;
> 
> have you tested the code with other tile sizes?

yes

> > 
> > static void mct_decode(J2kDecoderContext *s, J2kTile *tile)
> > {
> >     int i, *src[3], i0, i1, i2;
> > 
> >     for (i = 0; i < 3; i++)
> >         src[i] = tile->comp[i].data;
> > 
> >     if (tile->comp[0].transform == J2K_DWT97){
> 
> >         for (i = 0; i < (tile->comp[0].y1 - tile->comp[0].y0) * (tile->comp[0].x1 - tile->comp[0].x0); i++){
> >             i0 = *src[0] + (*src[2] * 46802 >> 16);
> >             i1 = *src[0] - (*src[1] * 22553 + *src[2] * 46802 >> 16);
> >             i2 = *src[0] + (116130 * *src[1] >> 16);
> >             *src[0]++ = i0;
> >             *src[1]++ = i1;
> >             *src[2]++ = i2;
> >         }
> 
> standard yuv to rgb transform, this does not belong into a decoder, 
> directly export the yuv data please

I have a sample RGBA image, where RGB have been transformed to YUV. What
should I do in this case? Drop alpha?

-- 
Best regards,
Kamil Nowosad



More information about the FFmpeg-soc mailing list