[MPlayer-dev-eng] [PATCH] fix for -srate bug

Michael Niedermayer michaelni at gmx.at
Thu Oct 21 03:14:45 CEST 2004


Hi

On Thursday 21 October 2004 01:14, Ed Wildgoose wrote:
> >next try :)
>
> ....
>
> >    libavcodec 22bit coeff, 2.5x longer filter, linear interpolation
> > between polyphase entries
> >    Worst case Signal-to-Noise Ratio : 108.65 dB.
> >    Worst case conversion rate       : 327680 samples/sec.
> >    Measured -3dB rolloff point      : 97.02 %
> >
> >    libavcodec 22bit coeff, 16x longer filter, linear interpolation
> > between polyphase entries
> >    Worst case Signal-to-Noise Ratio : 104.81 dB.
> >    Worst case conversion rate       : 43116 samples/sec.
> >    Measured -3dB rolloff point      : 99.51 %
> >
> >the difference for the default filter is probably caused by a 10l bugfix
> >(padding samples wherent memset(0))
> >
> >wc -l libavcodec/resample2.c
> >247 libavcodec/resample2.c
> >
> >cat libsamplerate-0.1.2/src/*.{c,h} | wc -l
> >26989
> >
> >[...]
>
> Wow, I am extremely hooked!  Can you send me (privately?) your latest
> diff for this test please? (and to libavcodec)

it should be the same as the one i already posted, except:
----
                         if(v > INT16_MAX || v < -INT16_MAX)
                                 printf("i thought its supposed to be 1.0 .. 
-1.0\n");
                 }
+                for(; i<input_len + PADDING; i++){
+                        data16[i]= 0;
+                }
      }else{
----

and lavc is as it is in cvs, just with the #defines at the top of resample2.c 
changed for each test

>
> I would love to see such a filter added to mplayer (perhaps as option 3
> to resample?).  Since libavcodec is used in other projects like mythtv,
> it would be very interesting to switch out libsamplerate and use this
> instead.
>
> On thinking about this for two seconds longer though, I will have to
> have a closer look at the test code.  Assuming 16 bit input(?) then it's
> curious to see that you are getting more than 96dB SNR?

the SNR calculation code is exactly the one from libsamplerate, i didnt change 
it


[...]
-- 
Michael

"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire




More information about the MPlayer-dev-eng mailing list