[FFmpeg-devel] Fw: Re: [issue986] Truemotion2 decoder - chroma issues

Michael Niedermayer michaelni
Thu Apr 23 21:52:54 CEST 2009


On Thu, Apr 23, 2009 at 12:36:20PM -0700, Jason Garrett-Glaser wrote:
> > The problem is that tm2 yuv seems to use 9bit for U & V this makes
> > it impossible to fit in any of the common pixel packings
> > thus it seems this has to be to converted in the decoder unless you
> > would use 16bit YUV420 but this seems really silly.
> 
> 9-bit U/V?  What is it using, YCgCo?

no, is anyone using YCgCo ? I tried it in ffv1 once and it was
crap compared to normal YCbCr in terms of compression IIRC.

reimars tm2 code: (which was based on guessing i think)

    for(j = 0; j < ctx->avctx->height; j++){
        for(i = 0; i < ctx->avctx->width; i++){
            int y = Y[i], u = U[i >> 1], v = V[i >> 1];
            dst[3*i+0] = av_clip_uint8(y + v);
            dst[3*i+1] = av_clip_uint8(y);
            dst[3*i+2] = av_clip_uint8(y + u);
        }
        Y += ctx->avctx->width;
        if (j & 1) {
            U += ctx->avctx->width >> 1;
            V += ctx->avctx->width >> 1;
        }
        dst += p->linesize[0];
    }



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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-devel/attachments/20090423/873cf1b1/attachment.pgp>



More information about the ffmpeg-devel mailing list