Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222477 - xvid-1.1.3-r3.ebuild and textrel-3.patch on AMD XP 2000+
Summary: xvid-1.1.3-r3.ebuild and textrel-3.patch on AMD XP 2000+
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on: 271786
Blocks:
  Show dependency tree
 
Reported: 2008-05-17 09:46 UTC by Mario Bachmann
Modified: 2009-05-29 17:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
segfault while encoding (mencoder_xvid_segfault.txt,10.36 KB, text/plain)
2008-05-18 09:55 UTC, Mario Bachmann
Details
emerge --info (emerge_info.txt,5.32 KB, text/plain)
2008-05-18 10:02 UTC, Mario Bachmann
Details
mplayer -vc xvid (xvid with texrel-patch) GREEN (texrel_amd2000_green.png,224.31 KB, image/png)
2008-05-18 10:12 UTC, Mario Bachmann
Details
mplayer -vc xvid (xvid with texrel-patch) PURPLE (texrel_amd2000_purple.png,130.50 KB, image/png)
2008-05-18 10:12 UTC, Mario Bachmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Bachmann 2008-05-17 09:46:44 UTC
With xvid-1.1.3 my xvid-videos looks good. 
With any greater version (r1, r2, r3), my xvid-videos look green or purple.
I use "mplayer -vc xvid" to make sure, that the original xvid-codec is used. 

I noticed: The DIFFERENCE between xvid-1.1.3 and xvid-1.1.3-rX is the texrel-patch. 

So when i modify the xvid-1.1.3-r3.ebuild in the portage-overlay (and remove the texrel-patch), my xvid-videos looks good again. With the texrel-patch, my xvid-videos look green or purple.

I _would_ be happy with the xvid-1.1.3 (without rX), but when i use mencoder to encode with xvid, i get segfaults. So i tried newer versions of xvid (xvid-1.1.3-r1, r2, r3) and noticed the texrel-problem. 
Beside: modified xvid-1.1.3-r3 without texrel-patch produces a segfault too when encoding with mencoder!

I use an AMD XP 2000+:  cat /proc/cpuinfo |grep flags
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow ts
Comment 1 Mario Bachmann 2008-05-18 09:55:09 UTC
Created attachment 153507 [details]
segfault while encoding

no matter if pass=1 or pass=2 or no pass
Comment 2 Mario Bachmann 2008-05-18 10:02:05 UTC
Created attachment 153511 [details]
emerge --info
Comment 3 Mario Bachmann 2008-05-18 10:12:29 UTC
Created attachment 153513 [details]
mplayer -vc xvid (xvid with texrel-patch) GREEN
Comment 4 Mario Bachmann 2008-05-18 10:12:58 UTC
Created attachment 153515 [details]
mplayer -vc xvid (xvid with texrel-patch) PURPLE
Comment 5 Mario Bachmann 2008-05-18 10:22:58 UTC
Another point: beside the amd 2000+, i own an amd duron with the same core but less cache and less MHz (both machines have the same cpu-flags). on booth machines i got a segfault while encoding with mencoder/xvid-1.1.3[-rX]. 
I also tried to slow down the RAM-settings in the BIOS. No effect. 

Because i have 2 machines and i slowed down the RAM, i think it is not a hardware problem... The segfaults come on random positions i think. 

please let me know if you need more informations...
Comment 6 Mario Bachmann 2008-05-28 13:31:10 UTC
I fear no one has such an "old" CPU?!
Comment 7 PaX Team 2008-06-30 16:17:46 UTC
Mario,

could you try to emerge with USE="-3dnow -3dnowext -mmx -mmxext -sse" and see if that gets you the segfault and/or the bad encoding results? i'm asking it because one thing that the textrel patch touches is the low-level asm code which is specific to each CPU and it's very possible that i introduced a bug in the 3dnow parts (FWIW, i don't know if anyone verified the other parts either so the above USE will turn off all asm hopefully...). also for the segfault you should try to get a core dump and backtrace/etc info from gdb (preferably compile xvid with debug info: CFLAGS=-ggdb and FEATURES="splitdebug -nostrip").
Comment 8 Mario Bachmann 2008-06-30 21:16:53 UTC
i activated the xvid-texrel-ebuild again and 
USE="-3dnow -3dnowext -mmx -mmxext -sse" emerge xvid
  same green result as on screenshot.

than:
USE="-3dnow -3dnowext -mmx -mmxext -sse" emerge mplayer
  -> mplayer wants mmx at least!

than:
USE="-3dnow -3dnowext mmx -mmxext -sse" emerge mplayer
  same green result as on screenshot. 
Comment 9 Sébastien Benoit 2008-07-10 14:39:49 UTC
I experienced similar problems with the textrel patch.  In my case, the encoded videos had weird colors "stepping".  The colors gradually become greenish frame after frame and suddenly come back to normal and the cycle repeats again.  I recompiled xvid-1.1.3-r3 without that patch and everything is back to normal now and contrary to what others experienced, removing the patch does not cause segfaults with mencoder.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2009-05-29 17:28:06 UTC
Test =media-video/xvid-1.2.1-r1 (You can get rid of TEXTRELs by USE="pic" and EXECSTACKs should be fixed without USE flag altering.)
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2009-05-29 17:28:22 UTC
Sorry, 1.2.2-r1
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2009-05-29 17:28:49 UTC
Arg, wrong resolution. Sorry for bugspam.