bino-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bino-list] SubTitles?


From: Martin Lambers
Subject: Re: [Bino-list] SubTitles?
Date: Mon, 21 Mar 2011 18:13:57 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

On 21/03/11 17:42, Joe wrote:
>>> I agree with breaking subtitle list into subtitle_box that will hold
>>> only one subtitle and will be buffered in the same way as video or audio
>>> frames/blobs.
>>>> - The subtitle reading/decoding is separated into threads just like
>>>> video and audio reading/decoding.
>>> I will redo your patch on top of my branch and unify processing of
>>> audio, vide and subtitles. I will also move font rendering from
>>> video_output to subtitles decoding thread. Is it what you want?
>> That's not necessary; my patch was just a rough sketch. The font
>> rendering should stay in video_output, it should not go into a separate
>> thread.
>>
> I don't get this. Font rendering (creating ARGB image from textual data)
> is the only time consuming operation that can be done during subtitle
> decoding. Otherwise subtitle decoding thread will only memcpy text from
> packet to subtitle_box. If separate subtitles decoding thread should be
> created, I don't get why font should be rendered elsewhere. I suggest in
> decoding thread to create subtitle_box, render text using QT into buffer
> inside subtitle_box and in video_output only blend the buffer with
> left/right image.

With decoding, I mean the work done by ffmpeg. In the simplest case, it
is just copying of text (possibly with character set conversion). For
image subtitles, it will be decoding an image with
avcodec_decode_subtitle2 and converting it to a format suitable for
textures. The rendering part is font rendering + texture blending; this
should be done in video_output as it is now, because this depends on
output parameters (font, size, subtitle depth) and potentially the
dimensions of the video frame (for image subtitles). These are things
that the media object does not know about (and should not need to know).

Martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]