[MPlayer-users] mencoder audio distortion on MacOSX

Guillaume POIRIER poirierg at gmail.com
Fri Jun 8 18:31:23 CEST 2007


Hi,

On 6/8/07, Lev Givon <lev at columbia.edu> wrote:
> I recently tried converting some RealMedia files (containing audio and
> video) to AVI using mencoder on Linux 2.6.17 and MacOSX 10.4.9. While
> the audio conversion on Linux was successful, the conversion on MacOSX
> using the same audio codec and options sounded extremely scratchy and
> distorted.
>
> Here is how I invoked mencoder on both systems:
>
> mencoder in.rm -ovc lavc -oac lavc -lavcopts acodec=mp3:abitrate=32:threads=2
> -ffourcc DX50 -o out.avi
>
> Specifying any bitrate other than 32 for the particular input file I
> used, incidentally, resulted in a "couldn't open codec codec mp3,
> br=.."  error (using midentify, I observed that the audio bitrate
> listed in the input file was 32 kb). Trying other RealMedia files
> (with different audio bitrates) also resulted in scratchy audio on
> MacOSX.
>
> On Linux, I used mencoder 1.0rc1; on MacOSX, I build the source in the
> mplayer svn as of 6/6/07. I also tried the static build of mencoder
> available for ffmpegX (i.e., mencoder dev-CVS-060307-04:23-4.0.1), but
> did not observe any difference in the output.
>
> The Linux machine I am using is a Pentium IV PC; the MacOSX machine is
> an Intel Core 2 Duo iMac.
>
> Has anyone else observed similar problems when running mencoder on
> Intel-based MacOSX systems? If so, has anyone managed to somehow
> circumvent it?

I think attached patch should fix it. Please try it and report.

Guilaume
-- 
Subversion has been the most pointless project ever started
  -- Linus Torvalds
-------------- next part --------------
Index: libavcodec/i386/fft_sse.c
===================================================================
--- libavcodec/i386/fft_sse.c	(revision 9152)
+++ libavcodec/i386/fft_sse.c	(working copy)
@@ -170,12 +170,12 @@
         asm volatile (
             "movaps          %0, %%xmm0 \n\t"   // xmm0 = r0 X  r1 X : in2
             "movaps          %1, %%xmm3 \n\t"   // xmm3 = X  i1 X  i0: in1
-            "movaps      -16+%0, %%xmm4 \n\t"   // xmm4 = r0 X  r1 X : in2
-            "movaps       16+%1, %%xmm7 \n\t"   // xmm7 = X  i1 X  i0: in1
+            "movaps       -16%0, %%xmm4 \n\t"   // xmm4 = r0 X  r1 X : in2
+            "movaps        16%1, %%xmm7 \n\t"   // xmm7 = X  i1 X  i0: in1
             "movlps          %2, %%xmm1 \n\t"   // xmm1 = X  X  R1 R0: tcos
             "movlps          %3, %%xmm2 \n\t"   // xmm2 = X  X  I1 I0: tsin
-            "movlps        8+%2, %%xmm5 \n\t"   // xmm5 = X  X  R1 R0: tcos
-            "movlps        8+%3, %%xmm6 \n\t"   // xmm6 = X  X  I1 I0: tsin
+            "movlps         8%2, %%xmm5 \n\t"   // xmm5 = X  X  R1 R0: tcos
+            "movlps         8%3, %%xmm6 \n\t"   // xmm6 = X  X  I1 I0: tsin
             "shufps $95, %%xmm0, %%xmm0 \n\t"   // xmm0 = r1 r1 r0 r0
             "shufps $160,%%xmm3, %%xmm3 \n\t"   // xmm3 = i1 i1 i0 i0
             "shufps $95, %%xmm4, %%xmm4 \n\t"   // xmm4 = r1 r1 r0 r0
@@ -222,13 +222,13 @@
     for (k = 0; k < n4; k += 4) {
         asm (
             "movaps          %0, %%xmm0 \n\t"   // xmm0 = i1 r1 i0 r0: z
-            "movaps       16+%0, %%xmm4 \n\t"   // xmm4 = i1 r1 i0 r0: z
+            "movaps        16%0, %%xmm4 \n\t"   // xmm4 = i1 r1 i0 r0: z
             "movlps          %1, %%xmm1 \n\t"   // xmm1 = X  X  R1 R0: tcos
-            "movlps        8+%1, %%xmm5 \n\t"   // xmm5 = X  X  R1 R0: tcos
+            "movlps         8%1, %%xmm5 \n\t"   // xmm5 = X  X  R1 R0: tcos
             "movaps      %%xmm0, %%xmm3 \n\t"   // xmm3 = i1 r1 i0 r0
             "movaps      %%xmm4, %%xmm7 \n\t"   // xmm7 = i1 r1 i0 r0
             "movlps          %2, %%xmm2 \n\t"   // xmm2 = X  X  I1 I0: tsin
-            "movlps        8+%2, %%xmm6 \n\t"   // xmm6 = X  X  I1 I0: tsin
+            "movlps         8%2, %%xmm6 \n\t"   // xmm6 = X  X  I1 I0: tsin
             "shufps $160,%%xmm0, %%xmm0 \n\t"   // xmm0 = r1 r1 r0 r0
             "shufps $245,%%xmm3, %%xmm3 \n\t"   // xmm3 = i1 i1 i0 i0
             "shufps $160,%%xmm4, %%xmm4 \n\t"   // xmm4 = r1 r1 r0 r0
@@ -248,7 +248,7 @@
             "addps       %%xmm3, %%xmm0 \n\t"   // xmm0 = result
             "addps       %%xmm7, %%xmm4 \n\t"   // xmm4 = result
             "movaps      %%xmm0, %0     \n\t"
-            "movaps      %%xmm4, 16+%0  \n\t"
+            "movaps      %%xmm4, 16%0   \n\t"
             :"+m"(z[k])
             :"m"(tcos[k]), "m"(tsin[k])
 #ifndef ARCH_X86_64


More information about the MPlayer-users mailing list