[FFmpeg-devel] Pretty printing patch

Michael Niedermayer michaelni
Wed Oct 8 20:04:41 CEST 2008


On Tue, Oct 07, 2008 at 09:30:37AM -0700, Roman V. Shaposhnik wrote:
> This is a pretty printing patch I got from Diego but asked
> him to wait since I had other things to commit to the 
> repository. The attached one can be applied on top of
> the things I've just committed.
> 
> Please comment.
> 
> Thanks,
> Roman.
> 
> P.S. Personally, I like the new style.

[...]

> -                run=   new_dv_vlc_run[code] + 1;
> -                level= new_dv_vlc_level[code];
> +                run   = new_dv_vlc_run[code] + 1;
> +                level = new_dv_vlc_level[code];

i think 
run   = new_dv_vlc_run  [code] + 1;
level = new_dv_vlc_level[code];

would be even better


[...]
> -            s->dv_zigzag[1][i] = dsp.idct_permutation[(j&7) + (j&8)*4 + (j&48)/2];
> +            s->dv_zigzag[1][i] = dsp.idct_permutation[(j & 7) + (j & 8) * 4 + (j & 48) / 2];

IMHO the previous was more readable, but of course its your code and
your decission on how you want it to look.


[...]
> -                   (mb->partial_bit_buffer << (sizeof(re_cache)*8 - partial_bit_count));
> +                   (mb->partial_bit_buffer << (sizeof(re_cache) * 8 - partial_bit_count));

same here


[...]
> @@ -339,7 +339,7 @@ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
>          if (pos >= 64)
>              break;
>  
> -        level = (level*factor_table[pos] + (1 << (dv_iweight_bits-1))) >> dv_iweight_bits;
> +        level = (level * factor_table[pos] + (1 << (dv_iweight_bits-1))) >> dv_iweight_bits;

and here


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

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20081008/5d579ff5/attachment.pgp>



More information about the ffmpeg-devel mailing list