[FFmpeg-soc] [soc]: r323 - in rv40: rv40.c rv40data.h rv40vlc2.h

Michael Niedermayer michaelni at gmx.at
Fri Jul 6 12:17:54 CEST 2007


On Fri, Jul 06, 2007 at 08:37:06AM +0200, kostya wrote:
> Author: kostya
> Date: Fri Jul  6 08:37:06 2007
> New Revision: 323
> 
> Log:
> Add more decoding functions (and tables needed by them)
> 
[...]
> @@ -354,6 +375,15 @@ static inline void rv40_decode_block(DCT
>   * @{
>   */
>  
> +static inline int decode210(GetBitContext *gb){
> +    int n;
> +    n = get_bits1(gb);
> +    if (n == 1)
> +        return 0;
> +    else
> +        return 2 - get_bits1(gb);
> +}


if(get_bits1(gb)) 
    return 0;
else
    return 2 - get_bits1(gb);


[...]
> +#define MODE2_PATTERNS_NUM 20
> +/**
> + * Intra types table
> + *
> + * These values are actually base 10 coded 3-tuples
> + * used for detecting standard block configurations
> + */
> +static const uint16_t rv40_aic_table_index[MODE2_PATTERNS_NUM] = {
> +   0, 100, 200,
> +  11, 111, 211, 511, 611,
> +  22, 122, 222, 722,
> + 272, 227,
> + 822, 282, 228,
> + 112, 116, 221
> +};

coding them base 8 or 16 seems like it would be a much better idea ...


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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- 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/20070706/95b22b83/attachment.pgp>


More information about the FFmpeg-soc mailing list