[Ffmpeg-devel] [PATCH] drawtext.c: 07fix glyphs cache and ft_pos_to_pixels

Michael Niedermayer michaelni
Tue Sep 12 21:46:39 CEST 2006


Hi

On Sun, Sep 10, 2006 at 03:55:12PM -0300, Gustavo Sverzut Barbieri wrote:
> This fix glyphs cache when it cannot load character (fix possible
> access to non-initialized memory) an declare ft_pos_to_pixels()
> function.
> 
> it's simple, but seems long since code was moved into another block
> (and thus indentation level) due an "if" clause.

to quote our policy:
"NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code,
then either do NOT change the indentation of the inner part within (don't 
move it to the right)! or do so in a separate commit"


[...]
> +/**
> + * FreeType represent values in 64/th of pixels.
> + */
> +static inline int ft_pos_to_pixels(FT_Pos value)
> +{
> +  return value >> 6;
> +}
> +

is this really needed? if so why dont you replace every a+b by add(a,b) ?
anyway is the rounding correct at all?


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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list