summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny van Dyk <kugelfang@gentoo.org>2004-06-22 20:40:07 +0000
committerDanny van Dyk <kugelfang@gentoo.org>2004-06-22 20:40:07 +0000
commita55589d465f4a8955f8bd7967dbe389333cbbf0b (patch)
tree1d37ef93f3560f24cd098bd6f441095d1eab88a6 /media-libs
parentfix headers in wmpower-0.3.1 ebuild (Manifest recommit) (diff)
downloadgentoo-2-a55589d465f4a8955f8bd7967dbe389333cbbf0b.tar.gz
gentoo-2-a55589d465f4a8955f8bd7967dbe389333cbbf0b.tar.bz2
gentoo-2-a55589d465f4a8955f8bd7967dbe389333cbbf0b.zip
Fixed BUG #54134. (64bit cleaning patch)
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/xvid/ChangeLog7
-rw-r--r--media-libs/xvid/files/xvid-1.0.1-64bit-clean.patch33
-rw-r--r--media-libs/xvid/xvid-1.0.1.ebuild8
3 files changed, 46 insertions, 2 deletions
diff --git a/media-libs/xvid/ChangeLog b/media-libs/xvid/ChangeLog
index 4f7dc57e2617..cda6f3d2ae8c 100644
--- a/media-libs/xvid/ChangeLog
+++ b/media-libs/xvid/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/xvid
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/xvid/ChangeLog,v 1.22 2004/06/11 11:01:05 phosphan Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/xvid/ChangeLog,v 1.23 2004/06/22 20:40:07 kugelfang Exp $
+
+ 22 Jun 2004; Danny van Dyk <kugelfang@gentoo.org>
+ +files/xvid-1.0.1-64bit-clean.patch, xvid-1.0.1.ebuild:
+ Added unconditional 64bit cleaning patch. Patch got ok by ferringb.
+ Fixes BUG #54134.
*xvid-1.0.1 (11 Jun 2004)
diff --git a/media-libs/xvid/files/xvid-1.0.1-64bit-clean.patch b/media-libs/xvid/files/xvid-1.0.1-64bit-clean.patch
new file mode 100644
index 000000000000..cf13e736b4a4
--- /dev/null
+++ b/media-libs/xvid/files/xvid-1.0.1-64bit-clean.patch
@@ -0,0 +1,33 @@
+--- src/motion/estimation_bvop.c.orig 2004-06-22 19:57:46.168910368 +0200
++++ src/motion/estimation_bvop.c 2004-06-22 19:57:50.802206000 +0200
+@@ -573,16 +573,26 @@
+ b_dy = (b_dy >> 3) + roundtab_76[b_dy & 0xf];
+ b_dx = (b_dx >> 3) + roundtab_76[b_dx & 0xf];
+
++ /* 64-bit Fix:
++ * The variables y, stride and x are unsigned, while dy and dy are signed. If
++ * e.g. dy is < -1, the factor dy/2 becomes < 0. But because y is unsigned, the
++ * -1 value will be 'promoted' to the unsigned 0xffffffff. This is no problem on
++ * 32 bit platforms, because adding 0xffffffff to a char pointer or adding -1
++ * the same. But on 64bit this is no longer the case. So we have to really use
++ * signed variables here (note that we assume that the unsiged values are
++ * below 0x80000000, which should be true, because otherwise all kind of
++ * other problems will additionally pop up).
++ */
+ sum = sad8bi(pCur->u + 8 * x + 8 * y * stride,
+- f_Ref->u + (y*8 + dy/2) * stride + x*8 + dx/2,
+- b_Ref->u + (y*8 + b_dy/2) * stride + x*8 + b_dx/2,
++ f_Ref->u + ((int) y*8 + dy/2) * (int) stride + (int) x*8 + dx/2,
++ b_Ref->u + ((int) y*8 + b_dy/2) * (int) stride + (int) x*8 + b_dx/2,
+ stride);
+
+ if (sum >= MAX_CHROMA_SAD_FOR_SKIP * (int)Data->iQuant) return; /* no skip */
+
+ sum += sad8bi(pCur->v + 8*x + 8 * y * stride,
+- f_Ref->v + (y*8 + dy/2) * stride + x*8 + dx/2,
+- b_Ref->v + (y*8 + b_dy/2) * stride + x*8 + b_dx/2,
++ f_Ref->v + ((int) y*8 + dy/2) * (int) stride + (int) x*8 + dx/2,
++ b_Ref->v + ((int) y*8 + b_dy/2) * (int) stride + (int) x*8 + b_dx/2,
+ stride);
+
+ if (sum >= MAX_CHROMA_SAD_FOR_SKIP * (int)Data->iQuant) return; /* no skip */
diff --git a/media-libs/xvid/xvid-1.0.1.ebuild b/media-libs/xvid/xvid-1.0.1.ebuild
index 7a39a2b5a165..bb03dd68d22b 100644
--- a/media-libs/xvid/xvid-1.0.1.ebuild
+++ b/media-libs/xvid/xvid-1.0.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/xvid/xvid-1.0.1.ebuild,v 1.2 2004/06/14 13:19:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/xvid/xvid-1.0.1.ebuild,v 1.3 2004/06/22 20:40:07 kugelfang Exp $
inherit eutils
@@ -23,6 +23,12 @@ src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/${PV}-DESTDIR.patch
+
+ # Appliying 64bit patch unconditionally.
+ # Simple patch that works arch independent.
+ # Danny van Dyk <kugelfang@gentoo.org> 2004/06/22
+ cd ${S}/../..
+ epatch ${FILESDIR}/${P}-64bit-clean.patch
}
src_install() {