[Ffmpeg-devel] [PATCH] rms calculation for tiny_psnr and more
Benjamin Larsson
banan
Wed Apr 12 16:21:28 CEST 2006
Michael Niedermayer wrote:
>Hi
>
>On Wed, Apr 12, 2006 at 04:06:46AM +0000, Benjamin Larsson wrote:
>
>
>>This patch includes a ISO/IEC 13818-3 compatible rms calculator for
>>16bit pcm data. It also includes skip and stride options for tiny_psnr.
>>The patch is abit messy to make the regressions test pass.
>>
>>
>
>[...]
>
>
>
>>- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
>>+ $(CC) -lm $(LDFLAGS) $(CFLAGS) -o $@ $<
>>
>>
>
>iam against this and all FPU useage in tiny_psnr as the primary purpose
>of tiny_psnr are our regression tests and floats are not guarenteed to be
>binary identical on different platforms
>
>
True. I didn't thought of the RMS value as one of the regressions tests.
>
>[...]
>
>>+ samples = i/(len);
>>+ rms = (float)sqrt( (1.0/samples) * ((sse/(float)(1<<30)) ));
>>
>>
>
>rms = dev / (F<<15) if iam not misstaken
>
>something like:
> "%d.%07d", dev / (F<<15), (dev % (F<<15)) * 1000000LL / (F<<15)
>
>should maybe do what you want
>
>
Didn't work for me. I'll try to figure out how to make it work.
And I found some bugs in my code so I will reject my own patch.
MvH
Benjamin Larsson
--
"incorrect information" is an oxymoron. Information is, by definition, factual, correct.
More information about the ffmpeg-devel
mailing list