[FFmpeg-devel] Problem with imc

Benoit Fouet benoit.fouet
Fri Jul 16 14:13:25 CEST 2010


Hi,

On Fri, 16 Jul 2010 12:54:23 +0200 Vitor Sessak wrote:
> On 07/16/2010 12:31 PM, Benoit Fouet wrote:
> > Hi,
> >
> > while trying to have all tests up and running on a PPc Sam440ep board;
> > I encountered an issue with fate-imc test (oneoff):
> > stddev:28744.69 PSNR:  7.16 MAXDIFF:57645 bytes:   671232/   671232
> >
> > After some investigations, it seems that float_to_int16 is not working
> > correctly on it. I tried a simple test with the diff below applied:
> >
> > Index: libavcodec/imc.c
> > ===================================================================
> > --- libavcodec/imc.c    (revision 24255)
> > +++ libavcodec/imc.c    (working copy)
> > @@ -654,6 +654,7 @@ static int imc_decode_frame(AVCodecConte
> >       int bits, summer;
> >       int counter, bitscount;
> >       uint16_t buf16[IMC_BLOCK_SIZE / 2];
> > +    int16_t *data16 = data;
> >
> >       if (buf_size<  IMC_BLOCK_SIZE) {
> >           av_log(avctx, AV_LOG_ERROR, "imc frame too small!\n");
> > @@ -805,7 +806,13 @@ static int imc_decode_frame(AVCodecConte
> >
> >       imc_imdct256(q);
> >
> > +#if 1
> > +    for (i = 0; i<  COEFFS; i++) {
> > +       data16[i] = q->out_samples[i];
> > +    }
> > +#else
> >       q->dsp.float_to_int16(data, q->out_samples, COEFFS);
> > +#endif
> >
> >       *data_size = COEFFS * sizeof(int16_t);
> >
> > With that, the decoded sample can be understood. and the difference
> > between the x86 and the PPC is:
> > stddev:    1.16 PSNR: 94.99 MAXDIFF:  676 bytes:   671232/   671232
> 
> Can you try the attached patch to make IMC decoder output SAMPLE_FMT_FLT?
> 

works fine on the Core2, PPC440 and Cortex-A8 I have at hands.

Ben



More information about the ffmpeg-devel mailing list