[FFmpeg-devel] [PATCH] vf_drawtext: drop text wrapping feature
Michael Niedermayer
michaelni at gmx.at
Tue Sep 20 23:30:42 CEST 2011
On Tue, Sep 20, 2011 at 08:30:39PM +0200, Stefano Sabatini wrote:
> Or in other word, do not go to the next line when the text cannot be
> rendered within the frame.
>
> The rationale is that wrapping is hard to manage, as it depends on the
> position of the text, thus making hard/impossible to compute the size
> occupied by the rendered text, and makes the filter behavior
> unpredictible with moving text (implemented in a pending patch).
> ---
> libavfilter/vf_drawtext.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index fbb1e53..d7447c2 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -655,12 +655,6 @@ static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
> x += delta.x >> 6;
> }
>
> - if (x + glyph->bbox.xMax >= width) {
> - max_text_line_w = FFMAX(max_text_line_w, x - dtext->x);
> - y += max_text_line_h;
> - x = dtext->x;
> - }
This could be made conditional on a user set flag
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110920/dcf792bd/attachment.asc>
More information about the ffmpeg-devel
mailing list