[Ffmpeg-devel] [PATCH] rewrite vhook/drawtext.c

Gustavo Sverzut Barbieri barbieri
Thu Sep 7 04:11:21 CEST 2006


On 9/6/06, Diego Biurrun <diego at biurrun.de> wrote:
> On Wed, Sep 06, 2006 at 12:25:39PM -0300, Gustavo Sverzut Barbieri wrote:
> > On 9/6/06, Diego Biurrun <diego at biurrun.de> wrote:
> > >On Wed, Sep 06, 2006 at 11:22:04AM -0300, Gustavo Sverzut Barbieri wrote:
> > >> On 9/6/06, Diego Biurrun <diego at biurrun.de> wrote:
> > >> >On Wed, Sep 06, 2006 at 10:13:19AM -0300, Gustavo Sverzut Barbieri
> > >wrote:
> > >> >>
> > >> >> --- vhook/Makefile    (revision 6179)
> > >> >> +++ vhook/Makefile    (working copy)
> > >> >> @@ -35,7 +35,7 @@
> > >> >>
> > >> >>  %$(SLIBSUF): %.o
> > >> >> -     $(CC) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $<
> > >> >> +     $(CC) $(LDFLAGS_$@) $(VHOOKLIBS) $(LDFLAGS) -g -o $@
> > >> >$(VHOOKSHFLAGS) $<
> > >> >
> > >> >Why do you add $(VHOOKLIBS) here?
> > >>
> > >> it was a remaining from tests with cygwin patch.
> > >>
> > >> before I sent another patch with just this fix, do you really require
> > >> incremental patches? It will take me some time and as I said, it's
> > >> better to review the new code instead of changes. But if really
> > >> required I can do :-)
> > >
> > >I'm not quite sure what you mean by incremental here.
> >
> > like the linux kernel guys like, something like "[PATCH 0/N] replace
> > macros with inline functions" "[PATCH 1/N] ..."
>
> It's not the Linux kernel guys.  Every reviewer loves small and
> self-contained patches.

Okay, not split... but less moving around make it easier to read.

what's still really "confusing" if you read the patch is the split of
Process() into pieces:
 - get_text(): get text from cmd line or file, give it to strftime()
 - measure_and_cache(): see how much space each character takes, the
kerning, advance, ... and how many characters will fit the screen,
wrapping if needed. This fix most issues previously noticed with old
code (improper wrap, draw_box with invalid width and invalid height if
number of lines == 1).

draw_glyph() was also refactored to use smaller functions to isolate
problems, outline drawing now works as expected.

Please consider,

-- 
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: barbieri at gmail.com
   MSN: barbieri at gmail.com
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
 Phone:  +1 (347) 624 6296; 08122692 at sip.stanaphone.com
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drawtext-rewrite4.patch
Type: text/x-patch
Size: 28128 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060906/2e2bb951/attachment.bin>



More information about the ffmpeg-devel mailing list