public inbox for gentoo-ppc-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-ppc-dev] mplayer altivec patches
@ 2003-05-12 10:51 Magnus Damm
  2003-05-12 21:31 ` Bartosch Pixa
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2003-05-12 10:51 UTC (permalink / raw
  To: gentoo-ppc-dev; +Cc: azarah

Here are two patches for mplayer-0.90:

http://mplayerhq.hu/pipermail/mplayer-dev-eng/2003-May/018499.html

The first one makes it possible to watch divx (ffmpeg problem).
The second one (follow the URL) adds accelerated mpeg2 support.

Please test so they can be added to portage.
Remember to pass --enable-altivec to ./configure

Thanks /

magnus

--
gentoo-ppc-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-ppc-dev] mplayer altivec patches
  2003-05-12 10:51 [gentoo-ppc-dev] mplayer altivec patches Magnus Damm
@ 2003-05-12 21:31 ` Bartosch Pixa
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosch Pixa @ 2003-05-12 21:31 UTC (permalink / raw
  To: Magnus Damm; +Cc: gentoo-ppc-dev, azarah


[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]

On Mon, 2003-05-12 at 12:51, Magnus Damm wrote:
> Here are two patches for mplayer-0.90:
> 
> http://mplayerhq.hu/pipermail/mplayer-dev-eng/2003-May/018499.html
> 

this is a bad hack imo, as it just disables optimized code, what you are
trying to fix is in fact a gcc bug, "mergel" is broken.
we are already working on a fix for this.

here's a temporal fix for everyone who can't wait: 

Snip from altivec.h

#define vec_any_out(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, 
(a1), (a2)
+#include <broken_mergel.h>
#endif /* __cplusplus */

add this to your altivec.h and copy the attatched header to the same
location altivec.h is in.

thx again lu_zero for finding the fix :)

-- 
Bartosch Pixa
Gentoo Linux Developer                    http://www.gentoo.org

[-- Attachment #1.2: broken_mergel.h --]
[-- Type: text/x-c-header, Size: 2377 bytes --]

static inline vector signed char my_vmrglb (vector signed char const A,
					  vector signed char const B)
{
    static const vector unsigned char lowbyte = {
	0x08, 0x18, 0x09, 0x19, 0x0a, 0x1a, 0x0b,  0x1b,
	0x0c, 0x1c, 0x0d, 0x1d, 0x0e, 0x1e, 0x0f, 0x1f
    };
    return vec_perm (A, B, lowbyte);
}

static inline vector signed short my_vmrglh (vector signed short const A,
					  vector signed short const B)
{
    static const vector unsigned char lowhalf = {
    	0x08, 0x09, 0x18, 0x19, 0x0a, 0x0b, 0x1a, 0x1b,
	0x0c, 0x0d, 0x1c, 0x1d, 0x0e, 0x0f, 0x1e, 0x1f
    };
    return vec_perm (A, B, lowhalf);
}

static inline vector signed int my_vmrglw (vector signed int const A,
					  vector signed int const B)
{
    static const vector unsigned char lowword = {
    	0x08, 0x09, 0x0a, 0x0b, 0x18, 0x19, 0x1a, 0x1b,
	0x0c, 0x0d, 0x0e, 0x0f, 0x1c, 0x1d, 0x1e, 0x1f
    };
    return vec_perm (A, B, lowword);
}
/*#define my_vmrglb my_vmrglb 
#define my_vmrglh my_vmrglh 
#define my_vmrglw my_vmrglw 
*/
#undef vec_mergel

#define vec_mergel(a1, a2) \
__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \
      ((vector signed char) my_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \
__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
      ((vector unsigned char) my_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \
__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \
      ((vector signed short) my_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \
__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
      ((vector unsigned short) my_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \
__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \
      ((vector float) my_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \
      ((vector signed int) my_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
      ((vector unsigned int) my_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \
    __altivec_link_error_invalid_argument ())))))))





[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-12 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-12 10:51 [gentoo-ppc-dev] mplayer altivec patches Magnus Damm
2003-05-12 21:31 ` Bartosch Pixa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox