[FFmpeg-devel] Problem with imc

Vitor Sessak vitor1001
Fri Jul 16 12:54:23 CEST 2010


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?

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imc_fix.diff
Type: text/x-patch
Size: 1647 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100716/91c2d0b0/attachment.bin>



More information about the ffmpeg-devel mailing list