[Ffmpeg-devel] [PATCH] Shift autodetection for tiny_psnr.c
Sat Oct 7 15:16:54 CEST 2006
On Friday 06 October 2006 22:47, Benjamin Larsson wrote:
> > Thanks, is it this patch?
> > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-April/010279.html
> > Is see it is at least partially committed already. I'm not sure about
> > the part still not in SVN, do I really need it?
> Those parts are for my attempt at an ISO rms calculator. It is basicly a
> scaled version of a sse metric. PSNR can be used also, but noone defined
> how to interpret the metric, so one can only say that one decoder has
> better PSNR compared to another.
OK, I understand, but why is it not committed yet then?
> > What I'm having troubles now with is shift value. I tried to encode
> > some wav file ripped from CD with lame and decode it with different
> > decoders (using mplayer, -ac mad, -ac ffmp3, -ac mp3). They all are
> > quite similar to each other (according to tiny_psnr stats), but have a
> > major difference from the original file, probably because of shift.
> And the reason that mp3 throws away lots of information from the audio.
> IMHO a sse metric is useless for this, atleast over the whole file. Use
> a "good" mp3 decoder and use that file as reference.
Yes, as I see now, even 320kbps mp3 file has a relatively large difference
from original according to sse metric. Maybe different psychoaccustics
tricks could affect that? They could be good for human ear but bad for sse.
> > And I have difficulties with figuring this shift out. I'll try to make
> > an automatic shift detection patch for tiny_psnr.c to solve this
> > problem.
> You can use Octave and it's xcorr function to figure out the shift.
Well, don't know what this Octave thing is (links are always welcome), but a
simple patch for automatic shift autodetection is attached. It works only for
shifts +-16384 and is quite slow, but probably could be useful nevertheless.
At least I use it in my mp3 decoding quality experiments now :)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3395 bytes
Desc: not available
More information about the ffmpeg-devel