[Ffmpeg-devel] [RFC] rms calculator

Benjamin Larsson banan
Mon Mar 27 15:33:05 CEST 2006


Michael Niedermayer wrote:

>On Mon, Mar 27, 2006 at 10:20:31AM +0000, Benjamin Larsson wrote:
>>Well the idea was to use the same type of metric test that ISO/IEC uses
>>for audio codecs. I'm sure that it would be possible to use psnr and try
>>to give some meaning to those values. I just wanted to have software
>>that can calculate the compliance for mpeg layer 3 as defined in
>>**ISO/IEC 13818-4.
>then why not add 2 lines of code to tiny_psnr to print this metric?
True, I just thought it would be better if it had it's own file. It
seamed more intuitive and would ease further development.

>the question is why do you even need to read the headers?
>16bit data: yes
>stereo / mono: will match
I think I only need to know if it is a stereo or mono stream. The reason
I added it was that the final rms value should be the largest rms of
both channels thus I needed to read the headers. I modified tiny_psnr to
get the sse and that was fine, but I had to skip the headers and the sse
was the combined sse for both channels, so the rms would be the average
of the channels rms. Would a byte skip parameter patch for tiny_psnr
like the one attached be accepted ? And later a stride patch?

Note, that the rms calculation is not yet there.

A testrun with "./tiny_psnr testff.wav test.wav 2 0 44" produced a SSE
value of 432, matching the result from my code.

Benjamin Larsson

"incorrect information" is an oxymoron. Information is, by definition, factual, correct.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tiny_psnr.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060327/0c88e657/attachment.asc>

More information about the ffmpeg-devel mailing list