Re: [FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-28 Thread Philip Langdale
On Wed, 28 Mar 2018 13:14:57 +0200 wm4 wrote: > On Wed, 28 Mar 2018 14:02:04 +0300 > Andrey Turkin wrote: > > > I think first check (ascii case) should be explicit bit-test, or > > (if there is some reason to use sign-bit approach) at least "c" > > should be signed char instead of simply char.

Re: [FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-28 Thread Philip Langdale
On Wed, 28 Mar 2018 12:01:47 +0200 wm4 wrote: > > LGTM. > > Maybe a later patch that adds the UTF-8 length as lavu function (or > macro for SPEEED?) eould be nice, since we seem to need that often. I can do that. Although, I'm not sure the SPEEED version is readable enough to justify using it

[FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-28 Thread Philip Langdale
See the earlier fix for movtextdec for details. The equivalent bug is present on the encoder side as well. We need to track the text length in 'characters' (which seems to really mean codepoints) to ensure that styles are applied across the correct ranges. Signed-off-by: Philip Langdale --- lib

Re: [FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-28 Thread wm4
On Wed, 28 Mar 2018 14:02:04 +0300 Andrey Turkin wrote: > I think first check (ascii case) should be explicit bit-test, or (if there > is some reason to use sign-bit approach) at least "c" should be signed char > instead of simply char. Good point actually. It relies on char signedness, which is

Re: [FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-28 Thread Andrey Turkin
I think first check (ascii case) should be explicit bit-test, or (if there is some reason to use sign-bit approach) at least "c" should be signed char instead of simply char. 2018-03-28 6:07 GMT+03:00 Philip Langdale : > See the earlier fix for movtextdec for details. The equivalent bug is > pres

Re: [FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-28 Thread wm4
On Tue, 27 Mar 2018 20:07:05 -0700 Philip Langdale wrote: > See the earlier fix for movtextdec for details. The equivalent bug is > present on the encoder side as well. > > We need to track the text length in 'characters' (which seems to really > mean codepoints) to ensure that styles are applie

[FFmpeg-devel] [PATCH] movtextenc: fix handling of utf-8 subtitles

2018-03-27 Thread Philip Langdale
See the earlier fix for movtextdec for details. The equivalent bug is present on the encoder side as well. We need to track the text length in 'characters' (which seems to really mean codepoints) to ensure that styles are applied across the correct ranges. Signed-off-by: Philip Langdale --- lib