yuv2rgb_altivec fix part II
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 5 Oct 2004 18:52:36 +0000 (18:52 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 5 Oct 2004 18:52:36 +0000 (18:52 +0000)
media-video/mplayer/ChangeLog
media-video/mplayer/Manifest
media-video/mplayer/files/digest-mplayer-1.0_pre5-r4
media-video/mplayer/files/mplayer-1.0_pre5-yuv2rbg_kludge.patch [deleted file]
media-video/mplayer/files/mplayer-1.0_pre5-yuv2rgb_fix.patch [moved from media-video/mplayer/files/mplayer-1.0_pre5-yuv2rbg_fix.patch with 94% similarity]
media-video/mplayer/mplayer-1.0_pre5-r4.ebuild

index 65a0df4ae52a4c2acc8215caf34441fde5e6a370..79cc8f1145bf0021cc6e14e88cc0ff4fb06f48fc 100644 (file)
@@ -1,12 +1,27 @@
 # ChangeLog for media-video/mplayer
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.206 2004/10/03 22:43:03 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.207 2004/10/05 18:52:36 lu_zero Exp $
+
+  05 Oct 2004; Luca Barbato <lu_zero@gentoo.org>
+  -files/mplayer-1.0_pre5-yuv2rbg_fix.patch,
+  -files/mplayer-1.0_pre5-yuv2rbg_kludge.patch,
+  +files/mplayer-1.0_pre5-yuv2rgb_fix.patch, mplayer-1.0_pre5-r4.ebuild:
+  Hopefully the latest fix to that part
 
   04 Oct 2004; Luca Barbato <lu_zero@gentoo.org>
   +files/mplayer-1.0_pre5-yuv2rbg_fix.patch, mplayer-1.0_pre5-r4.ebuild:
   Eventually I fixed the yuv2rgb_altivec for vo_x11, the other scalers could
   have wrong colours
 
+  05 Oct 2004; Luca Barbato <lu_zero@gentoo.org>
+  -files/mplayer-1.0_pre5-yuv2rbg_kludge.patch,
+  +files/mplayer-1.0_pre5-yuv2rgb_fix.patch, mplayer-1.0_pre5-r4.ebuild:
+  Hopefully the latest fix to that part
+
+  03 Oct 2004; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+  Eventually I fixed the yuv2rgb_altivec for vo_x11, the other scalers could
+  have wrong colours
+
   27 Sep 2004; Jeremy Huddleston <eradicator@gentoo.org>
   mplayer-1.0_pre5-r3.ebuild:
   Moved jack support back to -r3 to fix compilation on systems with jack
index 4a4f66b40a0c27e2256b6161c1b544090b5f6603..636d77709b499367cea02391bd39530b44ddaaec 100644 (file)
@@ -1,5 +1,5 @@
-MD5 3ce2ae148e532fc74cfaf812d83635c9 mplayer-1.0_pre5-r4.ebuild 15157
-MD5 a07bfda2368d358f0ad16331b8d006e3 ChangeLog 38567
+MD5 0a8041245341c3be58375818d48f55ee mplayer-1.0_pre5-r4.ebuild 15157
+MD5 da79cc683aed4f6a967d7f894813b38b ChangeLog 39210
 MD5 31018765c8c65a239dba78a98c405543 metadata.xml 224
 MD5 a85740a291e190516009abeccd91c6f7 mplayer-1.0_pre4-r7.ebuild 12611
 MD5 ae8197c15642912b462bb9184975bc42 mplayer-1.0_pre5-r3.ebuild 15472
@@ -19,15 +19,14 @@ MD5 34f948b8f242a2aadb53a1e2b00e3155 files/vuln02-fix.diff 467
 MD5 a39bd930af792269808dc4bdbc382fbb files/mplayer-1.0_pre4-altivec-gcc34.patch 650
 MD5 09766023054d07a5f795eda66f247c42 files/mplayer-1.0_pre4-mpst.patch 459
 MD5 65d49d490b98ac8cabcafc5cb439825c files/mplayer-odml.patch 730
-MD5 ad254e1f8a5166ae1c5b53bc3c76ffd2 files/mplayer-1.0_pre5-yuv2rbg_kludge.patch 12585
 MD5 1056be7554e42ba655fd7423fe6baad7 files/mplayer-1.0_pre5-mips64.patch 459
 MD5 7d81475ff0d1ba01de3b714d6dcc4891 files/gui_vuln_code.patch 17981
 MD5 4be5ce1a1c93b8d40bc961468fcc1aa7 files/mplayer-1.0_pre5-live.patch 378
 MD5 88afe4c7008da4f33b5b89ddc1ab8069 files/digest-mplayer-1.0_pre5-r3 527
+MD5 58c893cf3a6a9684c691c94da631e810 files/mplayer-1.0_pre5-yuv2rgb_fix.patch 19578
 MD5 b72a70cd788b73c1012ebe763e1125f6 files/digest-mplayer-1.0_pre4-r7 445
 MD5 5cc95d6b380dc27e5ceae0f53ab88f99 files/mplayer-1.0_pre5-mga-kernel-2.6.patch 15043
-MD5 a2e0061ee26510ef172bd033ed2b5e21 files/mplayer-1.0_pre5-yuv2rbg_fix.patch 19672
 MD5 c2d65649f15837c5a326557ded4e47c5 files/mplayer.desktop 119
 MD5 484c45fb52a157c6b056b4298f787f3d files/cachefill.patch 6053
-MD5 0c3c71bf461e94d4dcffabab341ddeec files/digest-mplayer-1.0_pre5-r4 440
+MD5 6c62fe3136b83cc8ea960f4563df8555 files/digest-mplayer-1.0_pre5-r4 360
 MD5 a71fc9832d953424652af1125fb7ea64 files/mplayer-0.90-coreutils-fixup.patch 1857
index 76f2c5d8eada9bc3c30f0815ef146ad4011a10ad..dc6027160c768f52cb1fc56a0f564c157d12e1b3 100644 (file)
@@ -2,5 +2,4 @@ MD5 fbe6919eb025526e8ed129cd61a49969 MPlayer-1.0pre5.tar.bz2 5072836
 MD5 1ecd31d17b51f16332b1fcc7da36b312 font-arial-iso-8859-1.tar.bz2 234242
 MD5 7b47904a925cf58ea546ca15f3df160c font-arial-iso-8859-2.tar.bz2 222208
 MD5 48493efca70c570f2cda0134e63cb5df mplayer-1.0_pre5-alsa-gui.patch.tar.bz2 5852
-MD5 3f1b9eb2ba639bf42c61f7b9189f6524 svgalib_helper-1.9.17-mplayer.tar.bz2 7234
 MD5 5fdc36704c4ec3a6dc6b57a536608180 Blue-1.4.tar.bz2 221734
diff --git a/media-video/mplayer/files/mplayer-1.0_pre5-yuv2rbg_kludge.patch b/media-video/mplayer/files/mplayer-1.0_pre5-yuv2rbg_kludge.patch
deleted file mode 100644 (file)
index 69233ea..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-Files MPlayer-1.0pre5.orig/.tmp.swp and MPlayer-1.0pre5/.tmp.swp differ
-diff -ruN MPlayer-1.0pre5.orig/libvo/vo_x11.c MPlayer-1.0pre5/libvo/vo_x11.c
---- MPlayer-1.0pre5.orig/libvo/vo_x11.c        2004-07-15 14:28:07.689498136 +0200
-+++ MPlayer-1.0pre5/libvo/vo_x11.c     2004-07-15 21:55:07.937246584 +0200
-@@ -38,8 +38,18 @@
- #include "fastmemcpy.h"
- #include "sub.h"
- 
-+#ifdef HAVE_ALTIVEC_H    /* gnu */
-+#include <altivec.h>
-+#endif
-+
- #include "../postproc/swscale.h"
- #include "../postproc/swscale_internal.h"       //FIXME
-+
-+#ifdef HAVE_ALTIVEC_H    /* how NOT to code... FIXME ASAP */
-+#undef __vector
-+#endif
-+
-+
- #include "../postproc/rgb2rgb.h"
- #include "../libmpcodecs/vf_scale.h"
- 
-Files MPlayer-1.0pre5.orig/postproc/.swscale_altivec_template.c.swp and MPlayer-1.0pre5/postproc/.swscale_altivec_template.c.swp differ
-diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb.c MPlayer-1.0pre5/postproc/yuv2rgb.c
---- MPlayer-1.0pre5.orig/postproc/yuv2rgb.c    2004-07-15 14:27:46.590705640 +0200
-+++ MPlayer-1.0pre5/postproc/yuv2rgb.c 2004-07-15 14:50:14.103852504 +0200
-@@ -36,6 +36,10 @@
- #include <assert.h>
- 
- #include "config.h"
-+
-+#ifdef HAVE_ALTIVEC_H /* gnu */
-+#include <altivec.h>
-+#endif
- //#include "video_out.h"
- #include "rgb2rgb.h"
- #include "swscale.h"
-diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c MPlayer-1.0pre5/postproc/yuv2rgb_altivec.c
---- MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c    2004-07-15 14:27:46.577707616 +0200
-+++ MPlayer-1.0pre5/postproc/yuv2rgb_altivec.c 2004-07-15 21:50:03.241567368 +0200
-@@ -67,6 +67,12 @@
- #include <inttypes.h>
- #include <assert.h>
- #include "config.h"
-+#ifdef HAVE_ALTIVEC_H    /* gnu */
-+#include <altivec.h>
-+#define AVV(x...) {x}
-+#else
-+#define AVV(x...) (x)
-+#endif
- #include "rgb2rgb.h"
- #include "swscale.h"
- #include "swscale_internal.h"
-@@ -118,14 +124,18 @@
- */
- static
- const vector unsigned char
--  perm_rgb_0 = (vector unsigned char)(0x00,0x01,0x10,0x02,0x03,0x11,0x04,0x05,
--                                    0x12,0x06,0x07,0x13,0x08,0x09,0x14,0x0a),
--  perm_rgb_1 = (vector unsigned char)(0x0b,0x15,0x0c,0x0d,0x16,0x0e,0x0f,0x17,
--                                    0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f),
--  perm_rgb_2 = (vector unsigned char)(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
--                                    0x00,0x01,0x18,0x02,0x03,0x19,0x04,0x05),
--  perm_rgb_3 = (vector unsigned char)(0x1a,0x06,0x07,0x1b,0x08,0x09,0x1c,0x0a,
--                                    0x0b,0x1d,0x0c,0x0d,0x1e,0x0e,0x0f,0x1f);
-+  perm_rgb_0 = (const vector unsigned char)
-+                              AVV(0x00,0x01,0x10,0x02,0x03,0x11,0x04,0x05,
-+                                  0x12,0x06,0x07,0x13,0x08,0x09,0x14,0x0a),
-+  perm_rgb_1 = (const vector unsigned char)
-+                              AVV(0x0b,0x15,0x0c,0x0d,0x16,0x0e,0x0f,0x17,
-+                                  0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f),
-+  perm_rgb_2 = (const vector unsigned char)
-+                              AVV(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
-+                                  0x00,0x01,0x18,0x02,0x03,0x19,0x04,0x05),
-+  perm_rgb_3 = (const vector unsigned char)
-+                              AVV(0x1a,0x06,0x07,0x1b,0x08,0x09,0x1c,0x0a,
-+                                  0x0b,0x1d,0x0c,0x0d,0x1e,0x0e,0x0f,0x1f);
- 
- #define vec_merge3(x2,x1,x0,y0,y1,y2)    \
- do {                                   \
-@@ -197,25 +207,23 @@
- 
- #define vec_unh(x) \
-   (vector signed short) \
--    vec_perm(x,(typeof(x))(0),\
--             (vector unsigned char)(0x10,0x00,0x10,0x01,0x10,0x02,0x10,0x03,\
-+    vec_perm(x,(typeof(x))vec_splat_u32(0),\
-+             (vector unsigned char)AVV(0x10,0x00,0x10,0x01,0x10,0x02,0x10,0x03,\
-                                     0x10,0x04,0x10,0x05,0x10,0x06,0x10,0x07))
- #define vec_unl(x) \
-   (vector signed short) \
--    vec_perm(x,(typeof(x))(0),\
--             (vector unsigned char)(0x10,0x08,0x10,0x09,0x10,0x0A,0x10,0x0B,\
-+    vec_perm(x,(typeof(x))vec_splat_u32(0),\
-+             (vector unsigned char)AVV(0x10,0x08,0x10,0x09,0x10,0x0A,0x10,0x0B,\
-                                     0x10,0x0C,0x10,0x0D,0x10,0x0E,0x10,0x0F))
- 
--#define vec_clip(x) \
--  vec_max (vec_min (x, (typeof(x))(255)), (typeof(x))(0))
--
--#define vec_packclp_a(x,y) \
--  (vector unsigned char)vec_pack (vec_clip (x), vec_clip (y))
-+#define vec_clip_s16(x) \
-+  vec_max (vec_min (x, (vector signed short)vec_splat_s16(255)),\
-+                      (vector signed short)vec_splat_s16(0))
- 
- #define vec_packclp(x,y) \
-   (vector unsigned char)vec_packs \
--      ((vector unsigned short)vec_max (x,(vector signed short) (0)), \
--       (vector unsigned short)vec_max (y,(vector signed short) (0)))
-+      ((vector unsigned short)vec_max (x,(vector signed short)vec_splat_u32(0)), \
-+       (vector unsigned short)vec_max (y,(vector signed short)vec_splat_u32(0)))
- 
- //#define out_pixels(a,b,c,ptr) vec_mstrgb32(typeof(a),((typeof (a))(0)),a,a,a,ptr)
- 
-@@ -228,8 +236,10 @@
- 
-   Y = vec_mradds (Y, c->CY, c->OY);
- 
--  U = vec_sub (U,(vector signed short)(128));
--  V = vec_sub (V,(vector signed short)(128));
-+  U = vec_sub (U,(vector signed short)AVV(128,128,128,128,
-+                                        128,128,128,128));
-+  V = vec_sub (V,(vector signed short)AVV(128,128,128,128,
-+                                        128,128,128,128));
- 
-   //   ux  = (CBU*(u<<c->CSHIFT)+0x4000)>>15;
-   ux = vec_sl (U, c->CSHIFT);
-@@ -323,8 +333,16 @@
-       align_perm = vec_lvsl (0, vi);                                     \
-       v = (vector signed char)vec_perm (vivP[0], vivP[1], align_perm);           \
-                                                                          \
--      u  = (vector signed char)vec_sub (u, (vector signed char)(128));           \
--      v  = (vector signed char)vec_sub (v, (vector signed char)(128));           \
-+      u  = (vector signed char)vec_sub (u,                               \
-+                              (vector signed char)AVV(128,128,128,128,           \
-+                                              128,128,128,128,           \
-+                                              128,128,128,128,           \
-+                                              128,128,128,128));         \
-+      v  = (vector signed char)vec_sub (v,                               \
-+                              (vector signed char)AVV(128,128,128,128,           \
-+                                              128,128,128,128,           \
-+                                              128,128,128,128,           \
-+                                              128,128,128,128));         \
-       U  = vec_unpackh (u);                                              \
-       V  = vec_unpackh (v);                                              \
-                                                                          \
-@@ -341,18 +359,18 @@
-                                                                          \
-       /*   ux  = (CBU*(u<<CSHIFT)+0x4000)>>15 */                         \
-       ux = vec_sl (U, lCSHIFT);                                          \
--      ux = vec_mradds (ux, lCBU, (vector signed short)(0));              \
-+      ux = vec_mradds (ux, lCBU, (vector signed short)vec_splat_s16(0)); \
-       ux0  = vec_mergeh (ux,ux);                                         \
-       ux1  = vec_mergel (ux,ux);                                         \
-                                                                          \
-       /* vx  = (CRV*(v<<CSHIFT)+0x4000)>>15;  */                         \
-       vx = vec_sl (V, lCSHIFT);                                          \
--      vx = vec_mradds (vx, lCRV, (vector signed short)(0));              \
-+      vx = vec_mradds (vx, lCRV, (vector signed short)vec_splat_s16(0)); \
-       vx0  = vec_mergeh (vx,vx);                                         \
-       vx1  = vec_mergel (vx,vx);                                         \
-                                                                          \
-       /* uvx = ((CGU*u) + (CGV*v))>>15 */                                \
--      uvx = vec_mradds (U, lCGU, (vector signed short)(0));              \
-+      uvx = vec_mradds (U, lCGU, (vector signed short)vec_splat_s16(0)); \
-       uvx = vec_mradds (V, lCGV, uvx);                                   \
-       uvx0 = vec_mergeh (uvx,uvx);                                       \
-       uvx1 = vec_mergel (uvx,uvx);                                       \
-@@ -402,10 +420,14 @@
- }
- 
- 
--#define out_abgr(a,b,c,ptr)  vec_mstrgb32(typeof(a),((typeof (a))(0)),c,b,a,ptr)
--#define out_bgra(a,b,c,ptr)  vec_mstrgb32(typeof(a),c,b,a,((typeof (a))(0)),ptr)
--#define out_rgba(a,b,c,ptr)  vec_mstrgb32(typeof(a),a,b,c,((typeof (a))(0)),ptr)
--#define out_argb(a,b,c,ptr)  vec_mstrgb32(typeof(a),((typeof (a))(0)),a,b,c,ptr)
-+#define out_abgr(a,b,c,ptr)  vec_mstrgb32(typeof(a),\
-+                              ((typeof (a))vec_splat_u32(0)),c,b,a,ptr)
-+#define out_bgra(a,b,c,ptr)  vec_mstrgb32(typeof(a),\
-+                              c,b,a,((typeof (a))vec_splat_u32(0)),ptr)
-+#define out_rgba(a,b,c,ptr)  vec_mstrgb32(typeof(a),\
-+                              a,b,c,((typeof (a))vec_splat_u32(0)),ptr)
-+#define out_argb(a,b,c,ptr)  vec_mstrgb32(typeof(a),\
-+                              ((typeof (a))vec_splat_u32(0)),a,b,c,ptr)
- #define out_rgb24(a,b,c,ptr) vec_mstrgb24(a,b,c,ptr)
- #define out_bgr24(a,b,c,ptr) vec_mstrgb24(c,b,a,ptr)
- 
-@@ -421,18 +443,18 @@
- // 0123 4567 89ab cdef
- static
- const vector unsigned char
--  demux_u = (vector unsigned char)(0x10,0x00,0x10,0x00,
--                                 0x10,0x04,0x10,0x04,
--                                 0x10,0x08,0x10,0x08,
--                                 0x10,0x0c,0x10,0x0c),
--  demux_v = (vector unsigned char)(0x10,0x02,0x10,0x02,
--                                 0x10,0x06,0x10,0x06,
--                                 0x10,0x0A,0x10,0x0A,
--                                 0x10,0x0E,0x10,0x0E),
--  demux_y = (vector unsigned char)(0x10,0x01,0x10,0x03,
--                                 0x10,0x05,0x10,0x07,
--                                 0x10,0x09,0x10,0x0B,
--                                 0x10,0x0D,0x10,0x0F);
-+  demux_u = (const vector unsigned char)AVV(0x10,0x00,0x10,0x00,
-+                                          0x10,0x04,0x10,0x04,
-+                                          0x10,0x08,0x10,0x08,
-+                                          0x10,0x0c,0x10,0x0c),
-+  demux_v = (const vector unsigned char)AVV(0x10,0x02,0x10,0x02,
-+                                          0x10,0x06,0x10,0x06,
-+                                          0x10,0x0A,0x10,0x0A,
-+                                          0x10,0x0E,0x10,0x0E),
-+  demux_y = (const vector unsigned char)AVV(0x10,0x01,0x10,0x03,
-+                                          0x10,0x05,0x10,0x07,
-+                                          0x10,0x09,0x10,0x0B,
-+                                          0x10,0x0D,0x10,0x0F);
- 
- /*
-   this is so I can play live CCIR raw video
-@@ -460,25 +482,25 @@
-     for (j=0;j<w/16;j++) {
-       uyvy = vec_ld (0, img);
-       U = (vector signed short)
--      vec_perm (uyvy, (vector unsigned char)(0), demux_u);
-+      vec_perm (uyvy, (vector unsigned char)vec_splat_u32(0), demux_u);
- 
-       V = (vector signed short)
--      vec_perm (uyvy, (vector unsigned char)(0), demux_v);
-+      vec_perm (uyvy, (vector unsigned char)vec_splat_u32(0), demux_v);
- 
-       Y = (vector signed short)
--      vec_perm (uyvy, (vector unsigned char)(0), demux_y);
-+      vec_perm (uyvy, (vector unsigned char)vec_splat_u32(0), demux_y);
- 
-       cvtyuvtoRGB (c, Y,U,V,&R0,&G0,&B0);
- 
-       uyvy = vec_ld (16, img);
-       U = (vector signed short)
--      vec_perm (uyvy, (vector unsigned char)(0), demux_u);
-+      vec_perm (uyvy, (vector unsigned char)vec_splat_u32(0), demux_u);
- 
-       V = (vector signed short)
--      vec_perm (uyvy, (vector unsigned char)(0), demux_v);
-+      vec_perm (uyvy, (vector unsigned char)vec_splat_u32(0), demux_v);
- 
-       Y = (vector signed short)
--      vec_perm (uyvy, (vector unsigned char)(0), demux_y);
-+      vec_perm (uyvy, (vector unsigned char)vec_splat_u32(0), demux_y);
- 
-       cvtyuvtoRGB (c, Y,U,V,&R1,&G1,&B1);
- 
-@@ -504,7 +526,7 @@
- */
- SwsFunc yuv2rgb_init_altivec (SwsContext *c)
- {
--  if (!(c->flags & SWS_CPU_CAPS_ALTIVEC))    
-+  if (!(c->flags & SWS_CPU_CAPS_ALTIVEC))
-     return NULL;
- 
-   /*
-@@ -569,15 +591,16 @@
- int yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4])
- {
- 
--  vector signed short
-+  vector signed short CY,CRV,CBU,CGU,CGV,OY;
-+/* stray code?  
-     CY  = (vector signed short)(0x7fff),
-     CRV = (vector signed short)(22972),
-     CBU = (vector signed short)(29029),
-     CGU = (vector signed short)(-11276),
-     CGV = (vector signed short)(-23400),
-     OY;
--
--  vector unsigned short CSHIFT = (vector unsigned short)(1);
-+*/
-+  vector unsigned short CSHIFT = (vector unsigned short)vec_splat_u16(1);
- 
-   vector signed short Y0;
-   int brightness = c->brightness,  contrast = c->contrast,  saturation = c->saturation;
-@@ -589,7 +612,7 @@
- 
-   int64_t cy  = (1<<16)-1;
-   int64_t oy  = 0;
--
-+/* really needed? FIXME*/
-   if ((c->flags & SWS_CPU_CAPS_ALTIVEC) == 0)
-     return;
- 
-@@ -621,6 +644,7 @@
-   //printf("%llx %llx %llx %llx %llx\n", cy, crv, cbu, cgu, cgv);
- 
-   //  vector signed short CBU,CRV,CGU,CGY,CY;
-+  /*why not use vec_splat_${type} ??*/
-   tmp = cy;
-   CY = vec_lde (0, &tmp);
-   CY  = vec_splat (CY, 0);
-@@ -643,7 +667,7 @@
-   CGV = vec_lde (0, &tmp);
-   CGV  = vec_splat (CGV, 0);
- 
--  CSHIFT = (vector unsigned short)(2);
-+  CSHIFT = (vector unsigned short)vec_splat_u16(2);
- #if 1
-   c->CSHIFT = CSHIFT;
-   c->CY = CY;
-@@ -679,8 +703,8 @@
- 
-   vector unsigned char R,G,B,pels[3];
-   vector unsigned char *out,*nout;
--  vector signed short   RND = (vector signed short)(1<<3);
--  vector unsigned short SCL = (vector unsigned short)(4);
-+  vector signed short   RND = (vector signed short)vec_splat_s16(1<<3);
-+  vector unsigned short SCL = (vector unsigned short)vec_splat_u16(4);
-   unsigned long scratch[16] __attribute__ ((aligned (16)));
- 
-   vector signed short *vYCoeffsBank, *vCCoeffsBank;
-@@ -736,10 +760,10 @@
-     U  = vec_sra (U,  SCL);
-     V  = vec_sra (V,  SCL);
- 
--    Y0 = vec_clip (Y0);
--    Y1 = vec_clip (Y1);
--    U  = vec_clip (U);
--    V  = vec_clip (V);
-+    Y0 = vec_clip_s16 (Y0);
-+    Y1 = vec_clip_s16 (Y1);
-+    U  = vec_clip_s16 (U);
-+    V  = vec_clip_s16 (V);
- 
-     /* now we have
-       Y0= y0 y1 y2 y3 y4 y5 y6 y7     Y1= y8 y9 y10 y11 y12 y13 y14 y15
-@@ -795,10 +819,10 @@
-     U  = vec_sra (U,  SCL);
-     V  = vec_sra (V,  SCL);
- 
--    Y0 = vec_clip (Y0);
--    Y1 = vec_clip (Y1);
--    U  = vec_clip (U);
--    V  = vec_clip (V);
-+    Y0 = vec_clip_s16 (Y0);
-+    Y1 = vec_clip_s16 (Y1);
-+    U  = vec_clip_s16 (U);
-+    V  = vec_clip_s16 (V);
- 
-     /* now we have
-        Y0= y0 y1 y2 y3 y4 y5 y6 y7     Y1= y8 y9 y10 y11 y12 y13 y14 y15
similarity index 94%
rename from media-video/mplayer/files/mplayer-1.0_pre5-yuv2rbg_fix.patch
rename to media-video/mplayer/files/mplayer-1.0_pre5-yuv2rgb_fix.patch
index 73ce90c3342c31b35e3fce9683bbfbee18d94b74..57fcf6d2a48330b18e165bde0b41e42d4061f4ee 100644 (file)
@@ -1,6 +1,26 @@
+diff -ruN MPlayer-1.0pre5.orig/libvo/vo_x11.c MPlayer-1.0pre5/libvo/vo_x11.c
+--- MPlayer-1.0pre5.orig/libvo/vo_x11.c        2004-10-05 20:33:25.882255632 +0200
++++ MPlayer-1.0pre5/libvo/vo_x11.c     2004-10-05 20:33:48.286849616 +0200
+@@ -39,7 +39,6 @@
+ #include "sub.h"
+ 
+ #include "../postproc/swscale.h"
+-#include "../postproc/swscale_internal.h"       //FIXME
+ #include "../postproc/rgb2rgb.h"
+ #include "../libmpcodecs/vf_scale.h"
+ 
+@@ -49,6 +48,7 @@
+ #include "../Gui/interface.h"
+ #include "../mplayer.h"
+ #endif
++#include "../postproc/swscale_internal.h"       //FIXME
+ 
+ static vo_info_t info = {
+     "X11 ( XImage/Shm )",
+Files MPlayer-1.0pre5.orig/postproc/.yuv2rgb_altivec.c.swp and MPlayer-1.0pre5/postproc/.yuv2rgb_altivec.c.swp differ
 diff -ruN MPlayer-1.0pre5.orig/postproc/swscale.c MPlayer-1.0pre5/postproc/swscale.c
---- MPlayer-1.0pre5.orig/postproc/swscale.c    2004-10-03 22:05:57.921244408 +0200
-+++ MPlayer-1.0pre5/postproc/swscale.c 2004-10-03 22:07:01.582566416 +0200
+--- MPlayer-1.0pre5.orig/postproc/swscale.c    2004-10-05 20:33:25.075378296 +0200
++++ MPlayer-1.0pre5/postproc/swscale.c 2004-10-05 20:33:48.276851136 +0200
 @@ -1728,7 +1728,7 @@
        //FIXME factorize
  
@@ -11,27 +31,24 @@ diff -ruN MPlayer-1.0pre5.orig/postproc/swscale.c MPlayer-1.0pre5/postproc/swsca
        return 0;
  }
 diff -ruN MPlayer-1.0pre5.orig/postproc/swscale_internal.h MPlayer-1.0pre5/postproc/swscale_internal.h
---- MPlayer-1.0pre5.orig/postproc/swscale_internal.h   2004-10-03 22:05:57.921244408 +0200
-+++ MPlayer-1.0pre5/postproc/swscale_internal.h        2004-10-03 22:07:54.155574104 +0200
-@@ -20,6 +20,15 @@
+--- MPlayer-1.0pre5.orig/postproc/swscale_internal.h   2004-10-05 20:33:25.075378296 +0200
++++ MPlayer-1.0pre5/postproc/swscale_internal.h        2004-10-05 20:33:48.277850984 +0200
+@@ -19,6 +19,12 @@
+ #ifndef SWSCALE_INTERNAL_H
  #define SWSCALE_INTERNAL_H
  
- #include "../mp_msg.h"
-+#ifdef HAVE_ALTIVEC_H
-+#include <altivec.h>
-+#endif
-+
 +#ifdef CONFIG_DARWIN
 +#define AVV(x...) (x)
 +#else
 +#define AVV(x...) {x}
 +#endif
++
+ #include "../mp_msg.h"
  
  #define MSG_WARN(args...) mp_msg(MSGT_SWS,MSGL_WARN, ##args )
- #define MSG_FATAL(args...) mp_msg(MSGT_SWS,MSGL_FATAL, ##args )
 diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c MPlayer-1.0pre5/postproc/yuv2rgb_altivec.c
---- MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c    2004-10-03 22:05:57.919244712 +0200
-+++ MPlayer-1.0pre5/postproc/yuv2rgb_altivec.c 2004-10-03 22:09:11.512814016 +0200
+--- MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c    2004-10-05 20:33:25.073378600 +0200
++++ MPlayer-1.0pre5/postproc/yuv2rgb_altivec.c 2004-10-05 20:36:21.247596048 +0200
 @@ -64,6 +64,7 @@
  */
  #include <stdio.h>
@@ -162,7 +179,8 @@ diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c MPlayer-1.0pre5/postpr
 +#define out_rgba(a,b,c,ptr)  vec_mstrgb32(typeof(a),a,b,c,((typeof (a))AVV(0)),ptr)
 +#define out_argb(a,b,c,ptr)  vec_mstrgb32(typeof(a),((typeof (a))AVV(0)),a,b,c,ptr)
  #define out_rgb24(a,b,c,ptr) vec_mstrgb24(a,b,c,ptr)
- #define out_bgr24(a,b,c,ptr) vec_mstrgb24(c,b,a,ptr)
+-#define out_bgr24(a,b,c,ptr) vec_mstrgb24(c,b,a,ptr)
++#define out_bgr24(a,b,c,ptr) vec_mstbgr24(c,b,a,ptr)
  
  DEFCSP420_CVT (yuv2_abgr32, out_abgr)
 +#if 1
@@ -390,17 +408,11 @@ diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c MPlayer-1.0pre5/postpr
      default: return NULL;
      }
      break;
-@@ -565,102 +722,45 @@
+@@ -565,102 +722,38 @@
    return NULL;
  }
  
-+static uint16_t roundToInt16(int64_t f){
-+      int r= (f + (1<<15))>>16;
-+           if(r<-0x7FFF) return 0x8000;
-+      else if(r> 0x7FFF) return 0x7FFF;
-+      else               return r;
-+}
- 
+-
 -int yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4])
 +void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brightness,int contrast, int saturation)
  {
@@ -528,7 +540,7 @@ diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c MPlayer-1.0pre5/postpr
  }
  
  
-@@ -672,15 +772,16 @@
+@@ -672,15 +765,16 @@
  {
    int i,j;
    short tmp __attribute__((aligned (16)));
@@ -548,28 +560,9 @@ diff -ruN MPlayer-1.0pre5.orig/postproc/yuv2rgb_altivec.c MPlayer-1.0pre5/postpr
    unsigned long scratch[16] __attribute__ ((aligned (16)));
  
    vector signed short *vYCoeffsBank, *vCCoeffsBank;
-@@ -832,5 +933,3 @@
+@@ -832,5 +926,3 @@
    if (vCCoeffsBank) free (vCCoeffsBank);
  
  }
 -
 -
-diff -ruN MPlayer-1.0pre5.orig/libvo/vo_x11.c MPlayer-1.0pre5/libvo/vo_x11.c
---- MPlayer-1.0pre5.orig/libvo/vo_x11.c        2004-10-03 22:58:23.946975800 +0200
-+++ MPlayer-1.0pre5/libvo/vo_x11.c     2004-10-03 22:59:45.485580048 +0200
-@@ -39,7 +39,6 @@
- #include "sub.h"
- 
- #include "../postproc/swscale.h"
--#include "../postproc/swscale_internal.h"       //FIXME
- #include "../postproc/rgb2rgb.h"
- #include "../libmpcodecs/vf_scale.h"
- 
-@@ -49,6 +48,7 @@
- #include "../Gui/interface.h"
- #include "../mplayer.h"
- #endif
-+#include "../postproc/swscale_internal.h"       //FIXME
- 
- static vo_info_t info = {
-     "X11 ( XImage/Shm )",
index d37c9f289d7fe7c324a8fcefd5048d2309a65fbb..f07396bcb0e6cddd5adc6c3b4b7c7c5bd0584cb3 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild,v 1.5 2004/10/03 22:43:03 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild,v 1.6 2004/10/05 18:52:36 lu_zero Exp $
 
 inherit eutils flag-o-matic kmod
 
@@ -118,7 +118,7 @@ src_unpack() {
        epatch ${FILESDIR}/mplayer-1.0_pre4-alsa-gcc34.patch
 
        #Workaround for the altivec softscaler issues
-       epatch ${FILESDIR}/mplayer-1.0_pre5-yuv2rbg_fix.patch
+       epatch ${FILESDIR}/mplayer-1.0_pre5-yuv2rgb_fix.patch
 
        #bug #55936, eradicator's cachefill patch.
        epatch ${FILESDIR}/cachefill.patch