From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 7 21:00:16 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71FC616A420 for ; Tue, 7 Mar 2006 21:00:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC46143D49 for ; Tue, 7 Mar 2006 21:00:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k27L0F6l061975 for ; Tue, 7 Mar 2006 21:00:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k27L0F8X061969; Tue, 7 Mar 2006 21:00:15 GMT (envelope-from gnats) Resent-Date: Tue, 7 Mar 2006 21:00:15 GMT Resent-Message-Id: <200603072100.k27L0F8X061969@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Brent Casavant Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3A3D16A420 for ; Tue, 7 Mar 2006 20:58:03 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73AC643D48 for ; Tue, 7 Mar 2006 20:58:03 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k27Kw37t062093 for ; Tue, 7 Mar 2006 20:58:03 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k27Kw3P1062092; Tue, 7 Mar 2006 20:58:03 GMT (envelope-from nobody) Message-Id: <200603072058.k27Kw3P1062092@www.freebsd.org> Date: Tue, 7 Mar 2006 20:58:03 GMT From: Brent Casavant To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/94188: libdv reorder_block() incorrect on non-x86 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 21:00:16 -0000 >Number: 94188 >Category: ports >Synopsis: libdv reorder_block() incorrect on non-x86 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 07 21:00:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Brent Casavant >Release: 5.4-RELEASE-p12 >Organization: Silicon Graphics, Inc. >Environment: FreeBSD chenjesu 5.4-RELEASE-p12 FreeBSD 5.4-RELEASE-p12 #17: Mon Mar 6 16:04:57 CST 2006 bcasavan@chenjesu:/usr/obj/usr/src/sys/chenjesu i386 >Description: In libdv 0.104, the reorder_block() zigzag behaves incorrectly in the !ARCH_X86 && !ARCH_X86_64 case. The current code fails to take into account the effects of _dv_prepare_reorder_tables(), which changes the indexes contained in the reorder_88[] and reorder_248[] arrays. >How-To-Repeat: Encode a DV stream on a non-x86 build of libdv. >Fix: This is the patch I submitted to libdv-dev@lists.sourceforge.net: diff -ru libdv-0.104-orig/libdv/encode.c libdv-0.104-fixed/libdv/encode.c --- libdv-0.104-orig/libdv/encode.c 2004-11-16 21:36:30.000000000 -0600 +++ libdv-0.104-fixed/libdv/encode.c 2006-03-07 14:07:22.000000000 -0600 @@ -512,10 +512,9 @@ _dv_reorder_block_mmx_x86_64(bl->coeffs, reorder); emms(); #else - for (i = 0; i < 64; i++) { - // *(unsigned short*) ((char*) zigzag + reorder[i])=bl->coeffs[i]; - zigzag[reorder[i] - 1] = bl->coeffs[i]; - } + for (i = 0; i < 64; i++) + *(unsigned short*) ((char*) zigzag + reorder[i])=bl->coeffs[i]; + memcpy(bl->coeffs, zigzag, 64 * sizeof(dv_coeff_t)); #endif } >Release-Note: >Audit-Trail: >Unformatted: