[FFmpeg-devel] [RFC] ANSI/ASCII animation decoder

Michael Niedermayer michaelni
Thu Mar 11 01:13:47 CET 2010


On Thu, Mar 11, 2010 at 12:13:35AM +1100, Peter Ross wrote:
> On Wed, Mar 10, 2010 at 12:09:24PM +0100, Michael Niedermayer wrote:
> > On Sun, Mar 07, 2010 at 03:13:00AM +1100, Peter Ross wrote:
> > > Hi,
> > > 
> > > This was done as a proof-of-concept for Remote Imaging Protocol (RIP)
> > > decoding.
> > > 
> > > The demuxer simulates the line rate, which can be overriden using the
> > > AVFormatParameters.sample_rate field (ffmpeg -ar 5000 gives a 5 kilo-
> > > byte/second line speed).
> > > 
> > > Samples: /MPlayer/incoming/ansi, or checkout the pile of floppies/cds
> > > gathering dust in your closet.
> > > 
> > > Cheers,
> > [...]
> > 
> > > +/**
> > > + * Draw character to screen
> > > + */
> > > +static void draw_char(AVCodecContext *avctx, int c)
> > 
> > please factor this out, we need it for our ass&utf8 subtitle renderer :)
> 
> Sure. Its also used by libavcodec/tmv.c decoder.
> 
> Now I was considering PIX_FMT_TEXT to emulates the old 0xB800 video ram buffer, e.g.
> 
> data[0]= text buffer            sizeof(width * height)
> data[1]= color/attribute table  sizeof(width * height * 2)
> 	where each array element gives 4-bit foreground and background pallete index and
> 	some bits for attributes (bold, underscore, blinking, etc)
> data[2]= palette       sizeof(RGBA) * 16
> data[3]= optional structure containing
>    font height
>    pointer to font table (assumed to be 8 bit wide)
> 
> However this is probably not suitable for text-based subtitles, given the frequent need
> for UTF8 and variable-width fonts.

i agree the pix_fmt is not suitable but the little renderer would be better
than nothing for subs.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100311/bd30ae3c/attachment.pgp>



More information about the ffmpeg-devel mailing list