Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Elimar Riesebieter
tags 639948 +patch
thanks

Hi Lennart,

many thaks for your cooperation ;-)

* Lennart Sorensen [110904 17:03 -0400]:
> On Sun, Sep 04, 2011 at 04:13:52PM -0400, Lennart Sorensen wrote:
> > Are there any that don't experience it?
[...]
> 
> So it turns out it was reported to ffmpeg upstream 3 months ago and fixed 
> already.
> 
> http://ffmpeg.org/trac/ffmpeg/ticket/272
> 
> The patch to libavcodec/ppc/asm.S is in comment #8.
> 
> It no longer segfaults for me with that patch applied.

I confirm that this patch works for me on my powerbook G4 as well.
Please find attached patch prepared for integrating to
debian/patches.

Elimar
-- 
.~.
/V\   L   I   N   U   X
   /( )\ >Phear the Penguin<
   ^^-^^
From: Elimar Riesebieter 
Subject: Fixes use of altivec flavor on PowerPC of libav-0.7
Origin: http://ffmpeg.org/trac/ffmpeg/ticket/272#comment:8
Bug: http://bugzilla.libav.org/show_bug.cgi?id=40
Forwarded: http://bugzilla.libav.org/show_bug.cgi?id=40
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639948


Thanks Lennart Sorensen for the hint ;-)


Index: libav-0.7.1/libavcodec/ppc/asm.S
===
--- libav-0.7.1.orig/libavcodec/ppc/asm.S	2011-07-21 10:47:51.0 +0200
+++ libav-0.7.1/libavcodec/ppc/asm.S	2011-09-05 00:12:47.645210696 +0200
@@ -67,7 +67,11 @@
 
 .macro movrel rd, sym
 #if CONFIG_PIC
-lwz \rd, \sym@got(r2)
+bcl 20, 31, lab_pic_\@
+lab_pic_\@:
+mflr\rd
+addis   \rd, \rd, (\sym - lab_pic_\@)@ha
+addi\rd, \rd, (\sym - lab_pic_\@)@l
 #else
 lis \rd, \sym@ha
 la  \rd, \sym@l(\rd)


signature.asc
Description: Digital signature
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Lennart Sorensen
On Sun, Sep 04, 2011 at 04:13:52PM -0400, Lennart Sorensen wrote:
> Are there any that don't experience it?
> 
> I just tried running ffmpeg on a power6+ machine under gdb and got:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0f6ff37c in ff_fft_calc_altivec () at 
> /root/libav-0.7.1/libavcodec/ppc/fft_altivec_s.S:447
> 447 DECL_FFTS 0
> (gdb) where
> #0  0x0f6ff37c in ff_fft_calc_altivec () at 
> /root/libav-0.7.1/libavcodec/ppc/fft_altivec_s.S:447
> #1  0x0f6feaa8 in ff_imdct_half_altivec (s=, output= out>, input=) at 
> /root/libav-0.7.1/libavcodec/ppc/fft_altivec.c:93
> #2  0x0f437ce8 in imdct_and_windowing (ac=0x10040ca0, sce=0xf7f260c0) at 
> /root/libav-0.7.1/libavcodec/aacdec.c:1856
> #3  0x0f43caa8 in spectral_to_sample (ac=) at 
> /root/libav-0.7.1/libavcodec/aacdec.c:2015
> #4  aac_decode_frame_int (avctx=, data=0xf7f95020, 
> data_size=0xda78, gb=) at 
> /root/libav-0.7.1/libavcodec/aacdec.c:2170
> #5  0x0f43ccec in aac_decode_frame (avctx=, data= out>, data_size=, avpkt=)
> at /root/libav-0.7.1/libavcodec/aacdec.c:2216
> #6  0x0f77f25c in avcodec_decode_audio3 (avctx=0x100406a0, samples= out>, frame_size_ptr=, avpkt=)
> at /root/libav-0.7.1/libavcodec/utils.c:726
> #7  0x0ff3f924 in try_decode_frame (avpkt=0x100466e0, st=0x1003ede0) at 
> /root/libav-0.7.1/libavformat/utils.c:2104
> #8  av_find_stream_info (ic=0x1003e840) at 
> /root/libav-0.7.1/libavformat/utils.c:2388
> #9  0x1000b200 in opt_input_file (opt=, filename= out>) at /root/libav-0.7.1/ffmpeg.c:3271
> #10 0x1000f0fc in parse_options (argc=4, argv=0xe184, options=0x10026720, 
> parse_arg_function=0x1000cfd0 ) at 
> /root/libav-0.7.1/cmdutils.c:287
> #11 0x100067c8 in main (argc=4, argv=) at 
> /root/libav-0.7.1/ffmpeg.c:
>   (gdb) Program received signal SIGSEGV, Segmentation fault.
> 
> Anyone have an idea what to look at exactly?  I really wish debug builds
> wouldn't have so much 'optimized out' stuff that makes reading stack
> traces so hard.

So it turns out it was reported to ffmpeg upstream 3 months ago and fixed 
already.

http://ffmpeg.org/trac/ffmpeg/ticket/272

The patch to libavcodec/ppc/asm.S is in comment #8.

It no longer segfaults for me with that patch applied.

Apparently when compiling in pic mode, the new assembly altived fft
code always segfaults, while the old version was C code and worked fine.
Apparently an offset calculation was done wrong as far as I understand it.

-- 
Len Sorensen



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Lennart Sorensen
On Sun, Sep 04, 2011 at 08:47:59AM +0200, Reinhard Tartler wrote:
> I strongly disagree that this arch specific defect on ppc is in any way
> a blocking bug for recompiling moc-ffmpeg-plugin against the new libav
> libraries.  It only affects (some?) altivec enabled machines and can be
> easily avoided by disabling the altivec variant.
> 
> Ideally, we find a porter that can identify the bug and provide a patch
> for fixing the segmentation fault. I've copied the powerpc porters and
> ask them hereby for their assistance.
> 
> Or, if porters approached me, I also could disable the altivec builds in
> libav completely, penalizing potential altivec users that do not
> experience this issue.

Are there any that don't experience it?

I just tried running ffmpeg on a power6+ machine under gdb and got:

Program received signal SIGSEGV, Segmentation fault.
0x0f6ff37c in ff_fft_calc_altivec () at 
/root/libav-0.7.1/libavcodec/ppc/fft_altivec_s.S:447
447 DECL_FFTS 0
(gdb) where
#0  0x0f6ff37c in ff_fft_calc_altivec () at 
/root/libav-0.7.1/libavcodec/ppc/fft_altivec_s.S:447
#1  0x0f6feaa8 in ff_imdct_half_altivec (s=, output=, input=) at 
/root/libav-0.7.1/libavcodec/ppc/fft_altivec.c:93
#2  0x0f437ce8 in imdct_and_windowing (ac=0x10040ca0, sce=0xf7f260c0) at 
/root/libav-0.7.1/libavcodec/aacdec.c:1856
#3  0x0f43caa8 in spectral_to_sample (ac=) at 
/root/libav-0.7.1/libavcodec/aacdec.c:2015
#4  aac_decode_frame_int (avctx=, data=0xf7f95020, 
data_size=0xda78, gb=) at 
/root/libav-0.7.1/libavcodec/aacdec.c:2170
#5  0x0f43ccec in aac_decode_frame (avctx=, data=, data_size=, avpkt=)
at /root/libav-0.7.1/libavcodec/aacdec.c:2216
#6  0x0f77f25c in avcodec_decode_audio3 (avctx=0x100406a0, samples=, frame_size_ptr=, avpkt=)
at /root/libav-0.7.1/libavcodec/utils.c:726
#7  0x0ff3f924 in try_decode_frame (avpkt=0x100466e0, st=0x1003ede0) at 
/root/libav-0.7.1/libavformat/utils.c:2104
#8  av_find_stream_info (ic=0x1003e840) at 
/root/libav-0.7.1/libavformat/utils.c:2388
#9  0x1000b200 in opt_input_file (opt=, filename=) at /root/libav-0.7.1/ffmpeg.c:3271
#10 0x1000f0fc in parse_options (argc=4, argv=0xe184, options=0x10026720, 
parse_arg_function=0x1000cfd0 ) at 
/root/libav-0.7.1/cmdutils.c:287
#11 0x100067c8 in main (argc=4, argv=) at 
/root/libav-0.7.1/ffmpeg.c:
(gdb) Program received signal SIGSEGV, Segmentation fault.

Anyone have an idea what to look at exactly?  I really wish debug builds
wouldn't have so much 'optimized out' stuff that makes reading stack
traces so hard.

-- 
Len Sorensen



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#639948: Bug#638250: Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Elimar Riesebieter
* Reinhard Tartler [110904 12:07 +0200]:

> On Sun, Sep 04, 2011 at 11:23:34 (CEST), Elimar Riesebieter wrote:
> 
> > * Reinhard Tartler [110904 08:47 +0200]:
> >
> >> tags 638250 help
> >> stop
> >> 
> >> On Sun, Sep 04, 2011 at 06:45:36 (CEST), Elimar Riesebieter wrote:
> >> 
> >> > block 638250 by 639948
> >> > thanks
> >> 
> >> I strongly disagree that this arch specific defect on ppc is in any way
> >> a blocking bug for recompiling moc-ffmpeg-plugin against the new libav
> >> libraries.
> >
> > moc-ffmpeg-plugin on ppc compiles well against libav 0.7.1 libraries
> > but produces exactly the same backtraces as ffplay 0.7.1 on ppc. So
> > this is surely a libav bug.
> 
> Nobody doubts that. My objection in that the 'block' relationship is
> wrong. As soon as a change for the altivec assembler code is found,
> surely moc-ffmpeg-plugin will work again.
> 
> >> It only affects (some?) altivec enabled machines and can be
> >> easily avoided by disabling the altivec variant.
> >
> > What do you mean with only? PPC is an officialy supported
> > architecture in Debian!
> 
> I mean that we know that the bug appears on your particular machine. I
> question that it might not be broken on *every* altivec machine
> available. The code in question has passed an intensive regression
> suite, which includes testing on altivec machines. I'm curious how this
> could slip through:
> 
> http://fate.libav.org/

These builds were done with "--enable-gpl --cpu=g4 --cc=gcc-4.6.1"
only, which are totaly different from Debians build so are not
coparable.

The Debian package 0.7.1-4 builds well on my "particular machine"
but coredumps with ffplay...

Elimar
-- 
  The path to source is always uphill!
-unknown-



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Reinhard Tartler
On Sun, Sep 04, 2011 at 11:23:34 (CEST), Elimar Riesebieter wrote:

> * Reinhard Tartler [110904 08:47 +0200]:
>
>> tags 638250 help
>> stop
>> 
>> On Sun, Sep 04, 2011 at 06:45:36 (CEST), Elimar Riesebieter wrote:
>> 
>> > block 638250 by 639948
>> > thanks
>> 
>> I strongly disagree that this arch specific defect on ppc is in any way
>> a blocking bug for recompiling moc-ffmpeg-plugin against the new libav
>> libraries.
>
> moc-ffmpeg-plugin on ppc compiles well against libav 0.7.1 libraries
> but produces exactly the same backtraces as ffplay 0.7.1 on ppc. So
> this is surely a libav bug.

Nobody doubts that. My objection in that the 'block' relationship is
wrong. As soon as a change for the altivec assembler code is found,
surely moc-ffmpeg-plugin will work again.

>> It only affects (some?) altivec enabled machines and can be
>> easily avoided by disabling the altivec variant.
>
> What do you mean with only? PPC is an officialy supported
> architecture in Debian!

I mean that we know that the bug appears on your particular machine. I
question that it might not be broken on *every* altivec machine
available. The code in question has passed an intensive regression
suite, which includes testing on altivec machines. I'm curious how this
could slip through:

http://fate.libav.org/

> Most of the powerpc machines are altivev capable. Apple's G4 and G5,
> IBM's Power6 and Power7 are all have altivec which is very useful to
> accelerate multimedia applications. And please notice, that altivec
> was working well on ffmpeg 0.6.2-5 so it turns out that #639948 is a
> regression!

Again, nobody doubts that. I just don't consider #639948 release
critical.

>> [...]
>> 
>> > Thanks again for the patch but there is no solution for #639948 yet.
>> > Please advice me what to do? I filed the ppc bug to libav-upstream
>> > http://bugzilla.libav.org/show_bug.cgi?id=40 but there is no
>> > response either from Debian-multimedia. Removing ppc from supported
>> > archs isn't practicable as 639948 is a regression.
>> 
>> Ideally, we find a porter that can identify the bug and provide a patch
>> for fixing the segmentation fault. I've copied the powerpc porters and
>> ask them hereby for their assistance.
>
> I'll check the CC settings in libav package, but as far as I can see
> they are equal for ppc. Hmmm. Compiling ith gcc-4.5 would be a first
> attempt to eleminate a compiler bug.

Thanks.

>> Or, if porters approached me, I also could disable the altivec builds in
>> libav completely, penalizing potential altivec users that do not
>> experience this issue.
>
> This might not be a very intelligent solution.

Well, I just state the available options.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Elimar Riesebieter
* Reinhard Tartler [110904 08:47 +0200]:

> tags 638250 help
> stop
> 
> On Sun, Sep 04, 2011 at 06:45:36 (CEST), Elimar Riesebieter wrote:
> 
> > block 638250 by 639948
> > thanks
> 
> I strongly disagree that this arch specific defect on ppc is in any way
> a blocking bug for recompiling moc-ffmpeg-plugin against the new libav
> libraries.

moc-ffmpeg-plugin on ppc compiles well against libav 0.7.1 libraries
but produces exactly the same backtraces as ffplay 0.7.1 on ppc. So
this is surely a libav bug.

> It only affects (some?) altivec enabled machines and can be
> easily avoided by disabling the altivec variant.

What do you mean with only? PPC is an officialy supported
architecture in Debian!

Most of the powerpc machines are altivev capable. Apple's G4 and G5,
IBM's Power6 and Power7 are all have altivec which is very useful to
accelerate multimedia applications. And please notice, that altivec
was working well on ffmpeg 0.6.2-5 so it turns out that #639948 is a
regression!

> [...]
> 
> > Thanks again for the patch but there is no solution for #639948 yet.
> > Please advice me what to do? I filed the ppc bug to libav-upstream
> > http://bugzilla.libav.org/show_bug.cgi?id=40 but there is no
> > response either from Debian-multimedia. Removing ppc from supported
> > archs isn't practicable as 639948 is a regression.
> 
> Ideally, we find a porter that can identify the bug and provide a patch
> for fixing the segmentation fault. I've copied the powerpc porters and
> ask them hereby for their assistance.

I'll check the CC settings in libav package, but as far as I can see
they are equal for ppc. Hmmm. Compiling ith gcc-4.5 would be a first
attempt to eleminate a compiler bug.

> Or, if porters approached me, I also could disable the altivec builds in
> libav completely, penalizing potential altivec users that do not
> experience this issue.

This might not be a very intelligent solution.

Elimar

-- 
  Alles was viel bedacht wird ist bedenklich!;-)
 Friedrich Nietzsche


signature.asc
Description: Digital signature
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#639948: Bug#638250: Needs to be adapted for libav/0.7

2011-09-04 Thread Reinhard Tartler
tags 638250 help
stop

On Sun, Sep 04, 2011 at 06:45:36 (CEST), Elimar Riesebieter wrote:

> block 638250 by 639948
> thanks

I strongly disagree that this arch specific defect on ppc is in any way
a blocking bug for recompiling moc-ffmpeg-plugin against the new libav
libraries.  It only affects (some?) altivec enabled machines and can be
easily avoided by disabling the altivec variant.

[...]

> Thanks again for the patch but there is no solution for #639948 yet.
> Please advice me what to do? I filed the ppc bug to libav-upstream
> http://bugzilla.libav.org/show_bug.cgi?id=40 but there is no
> response either from Debian-multimedia. Removing ppc from supported
> archs isn't practicable as 639948 is a regression.

Ideally, we find a porter that can identify the bug and provide a patch
for fixing the segmentation fault. I've copied the powerpc porters and
ask them hereby for their assistance.

Or, if porters approached me, I also could disable the altivec builds in
libav completely, penalizing potential altivec users that do not
experience this issue.

Cheers,

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers