[FFmpeg-devel] [PATCH 2/3] vf_drawtext: use drawutils.
Stefano Sabatini
stefasab at gmail.com
Mon Apr 2 00:27:13 CEST 2012
On date Wednesday 2012-03-28 16:25:58 +0200, Nicolas George encoded:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/vf_drawtext.c | 209 ++++++--------------------------------------
> 1 files changed, 29 insertions(+), 180 deletions(-)
>
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index 987508d..1d9a858 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -31,13 +31,11 @@
>
> #include "config.h"
> #include "libavutil/avstring.h"
> -#include "libavutil/colorspace.h"
> #include "libavutil/file.h"
> #include "libavutil/eval.h"
> #include "libavutil/opt.h"
> #include "libavutil/random_seed.h"
> #include "libavutil/parseutils.h"
> -#include "libavutil/pixdesc.h"
> #include "libavutil/timecode.h"
> #include "libavutil/tree.h"
> #include "libavutil/lfg.h"
> @@ -129,26 +127,20 @@ typedef struct {
> char *fontcolor_string; ///< font color as string
> char *boxcolor_string; ///< box color as string
> char *shadowcolor_string; ///< shadow color as string
> - uint8_t fontcolor[4]; ///< foreground color
> - uint8_t boxcolor[4]; ///< background color
> - uint8_t shadowcolor[4]; ///< shadow color
> - uint8_t fontcolor_rgba[4]; ///< foreground color in RGBA
> - uint8_t boxcolor_rgba[4]; ///< background color in RGBA
> - uint8_t shadowcolor_rgba[4]; ///< shadow color in RGBA
>
> short int draw_box; ///< draw box around text - true or false
> int use_kerning; ///< font kerning is used - true/false
> int tabsize; ///< tab size
> int fix_bounds; ///< do we let it go out of frame bounds - t/f
>
> + FFDrawContext dc;
nit+: dc->draw looks more readable/consistent
[...]
Looks fine otherwise, great work.
Note: a drawtext test would be useful at some point.
--
FFmpeg = Funny and Free Multimedia Perennial Educated Goblin
More information about the ffmpeg-devel
mailing list