[FFmpeg-devel] [PATCH] Common code for Indeo interactive

Kostya kostya.shishkov
Wed Mar 25 12:35:38 CET 2009


On Wed, Mar 25, 2009 at 12:16:05PM +0100, Maxim wrote:
> Kostya schrieb:
> > On Tue, Mar 24, 2009 at 04:27:56PM +0100, Maxim wrote:
[...]
> > look at macro INIT_VLC_STATIC in libavcodec/bitstream.h
> >   
> 
> Ok, I tried to use INIT_VLC_STATIC but it doesn't work (crash) because
> the tables are in the little endian format. The only possibility I see
> is to add two lines of code doing the same like this:
> 
> static VLC_TYPE   huff_tabs[8][8192][2]; ///< space for code/bits tables
> static VLC              mb_vlc_tabsvlc[8];
> 
> for (t = 0; t < 8; t++) {
>     /* build the table here (ommited) */
>     huff_vlc[t].table = &huff_tabs[t][0][0];
>     huff_vlc[t].table_allocated = 8192;
>     init_vlc(&huff_vlc[t], IVI_VLC_BITS, pos, &bits[0], 1, 1,
> &codewords[0], 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE);
> }
> 
> Is that ok? I can imagine myself to have a version of the
> INIT_VLC_STATIC that allows to init little endian tables...
> 
> Sorry for asking around, but I didn't see anything comparable anywhere
> in the FFmpeg...

Well, indeo2.c uses old static and LE for VLC init. Anyway, they are flags, not
exclusive alternatives, so use them without fear.

> > P.S. I have one disk with files encoded with Indeo 5 beta. Your decoder decodes
> > them with motion and other artefacts but picture is mostly OK. Binary decoder
> > used to hang my computer completely.
> >   
> 
> I just looked into it - the sample "AV36_1.AVI" have a strange frame
> sequence unknown to me. The decoder core is error-free though...
> The problem is that somewhere in this video my decoder choose wrong
> prediction frame. I think it's possible to add a fix for it quickly...

That was beta encoder.

> Regards
> Maxim



More information about the ffmpeg-devel mailing list