[FFmpeg-soc] [soc]: r297 - rv40/rv40.c

Michael Niedermayer michaelni at gmx.at
Sun Jul 1 18:04:19 CEST 2007


Hi

On Sun, Jul 01, 2007 at 04:05:08PM +0200, kostya wrote:
> Author: kostya
> Date: Sun Jul  1 16:05:08 2007
> New Revision: 297
> 
> Log:
> Skeleton and some functions for RV40 decoder.
[...]
> +/**
> + * Real Video 4.0 inverse transform
> + * Code is almost the same as in SVQ3, only scaling is different
> + */

what about passing qmul instead of qp into the svq3 function? is there
still a difference then?


[...]
> +#define DECODE_COEFF(dst, dstidx, coef, esc, gb, vlc) \
> +    if(coef){ \
> +        if(coef == esc){ \
> +            coef = get_vlc2(gb, vlc.table, 9, 2); \
> +            if(coef > 23){ \
> +                coef -= 23; \
> +                coef = 22 + ((1 << coef) | get_bits(gb, coef)); \
> +            } \
> +            coef += esc; \
> +        } \
> +        if(get_bits1(gb)) \
> +            coef = -coef; \
> +        dst[dstidx] = coef; \
> +    }
> +
> +#define DECODE_2x2_BLOCK(dst, dstoff, stride, coeffs, gb, vlc) \
> +    DECODE_COEFF(dst, dstoff+0       , coeffs[0], 3, gb, vlc); \
> +    DECODE_COEFF(dst, dstoff+1       , coeffs[1], 2, gb, vlc); \
> +    DECODE_COEFF(dst, dstoff+0+stride, coeffs[2], 2, gb, vlc); \
> +    DECODE_COEFF(dst, dstoff+1+stride, coeffs[3], 2, gb, vlc); \

i dont like this forced inlining, normal inline functions would be cleaner


[...]
> +    if(!*h){
> +        do{
> +            t = get_bits(gb, 8);
> +            *h += t << 2;
> +        }while(t == 0xFF);
> +    }

duplciate


[...]
> +    if(!tables_done){
> +        rv40_init_tables();
> +        tables_done = 1;
> +
> +        if(0){
> +         uint8_t bits[] = {0xD1, 0xB7, 0x37, 0x6A};
> +         GetBitContext gb;

the indention does not look good

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

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20070701/db4f9509/attachment.pgp>


More information about the FFmpeg-soc mailing list