[FFmpeg-soc] j2k review
Michael Niedermayer
michaelni at gmx.at
Tue Aug 28 14:56:33 CEST 2007
Hi
On Tue, Aug 28, 2007 at 01:46:17PM +0200, Kamil Nowosad wrote:
[...]
> > >
> > > 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?
yes, with a FIXME note saying that we would need a YUVA pixel format
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20070828/d790da78/attachment.pgp>
More information about the FFmpeg-soc
mailing list