[Ffmpeg-devel] [RFC] IMC decoder

Kostya kostya.shishkov
Mon Oct 30 15:06:26 CET 2006


On Mon, Oct 30, 2006 at 10:39:24AM +0100, Benjamin Larsson wrote:
> Kostya skrev:
> >On Mon, Oct 30, 2006 at 01:26:51AM +0100, Michael Niedermayer wrote:
> >  
> >>Hi
> >>
> >>On Sun, Oct 29, 2006 at 08:35:11AM +0200, Kostya wrote:
> >>    
> >>>Here is Intel Music Codec decoder RE'd by Maxim Poliakovski, FFmpeg'ized
> >>>by Benjamin Larsson, cleaned and fixed by me.
> >>>      
> 
> First thanks for cleaning up my code. And here are some comments.

I learned a bit more of lavc doing this so thanks for opportunity ;)

> >>    
> >>------------------------------------------------------------------------
> >>
> >>Index: Changelog
> >>===================================================================
> >>--- Changelog	(revision 6830)
> >>+++ Changelog	(working copy)
> >>@@ -65,6 +65,7 @@
> >> - MTV demuxer
> >> - TIFF picture decoder
> >> - GIF picture decoder
> >>+- Intel Music decoder
> >>    
> 
> I think that the official name of the codec is "Intel Music Coder".

At least MPlayer lists it so in codecs.conf
Replaced in all instances.

[...]
> 
> last_fft_im is the old non overlapped non windowed samples that is used 
> in the last part of the mdct so the last_fft_im name might not be the best.

At least it points that is imaginary part of last fft transform.

> And the coef part of the twiddle factors (post/pre_*) could be renamed 
> *_sin or *_cos depending on what they are.

post_coef[12] renamed to post_{cos,sin}, pre_coef[12] left as is - they are
not pure sin/cos and my trigonometry is rusty.

[...]
> 
> This looks alot like the ffmpeg imdct function with the exception of the 
> postrotation, window and reorder part. The thing that can be tried is to 
> like the do_imdct_512 function in the soc ac3 decoder. If that doesn't 
> work then the transforms aren't identical and the code can't be replaced.

Well, two issues stopped me:
a) different prerotating coefficients (and signs)
b) windowing and output also involve last_fft_im (with updating) and
untangling it is not trivial to me

Anyway, feel free to convert it to imdct. I just not dare to do this.

> >>+
> >>+
> >>+static int imc_decode_close(AVCodecContext * avctx)
> >>+{
> >>+    IMCContext *q = avctx->priv_data;
> >>+
> >>+    ff_fft_end(&q->fft);
> >>    
> 
> Shouldn't the VLC table be free'd also ?

They are allocated as static now.





More information about the ffmpeg-devel mailing list