Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx008.isp.belgacom.be (inmx008.isp.belgacom.be [195.238.3.88])
        by mailst034.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i8HEqfY5018789
        for <joris.at.lebbeke@skynet.be>; Fri, 17 Sep 2004 16:52:41 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx008.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i8HEqYxS011043
        for <joris.at.lebbeke@skynet.be>; Fri, 17 Sep 2004 16:52:36 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 99D3A2F6223; Fri, 17 Sep 2004 10:52:14 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from outmx005.isp.belgacom.be (outmx005.isp.belgacom.be
	[195.238.2.102])
	by xserve.flids.com (Postfix) with ESMTP id 8733D2F61FE
	for <tiff@remotesensing.org>; Fri, 17 Sep 2004 10:52:11 -0400 (EDT)
Received: from outmx005.isp.belgacom.be (localhost [127.0.0.1])
	by outmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with
	ESMTP id i8HEq6Wh011634
	for <tiff@remotesensing.org>; Fri, 17 Sep 2004 16:52:06 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (50-214.241.81.adsl.skynet.be [81.241.214.50])
	by outmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with SMTP
	id i8HEq4Mq011609; Fri, 17 Sep 2004 16:52:04 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <000a01c49cc6$20209380$32d6f151@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Bob Friesenhahn" <bfriesen@simple.dallas.tx.us>
References: <001c01c49c21$2bf33730$c325c850@dfgrrxsknr4e><Pine.SOC.4.60.0409161905220.15634@blade.simplesystems.org><001401c49c4d$bff536f0$379688d9@dfgrrxsknr4e><Pine.SOC.4.60.0409162021080.15634@blade.simplesystems.org><p05210618bd7003f36f75@[153.32.48.223]><Pine.SOC.4.60.0409162303330.15634@blade.simplesystems.org><p0521061ebd70184c3453@[153.32.48.223]><005601c49cab$344b3060$4c24c850@dfgrrxsknr4e>
	<Pine.SOC.4.60.0409170929380.15634@blade.simplesystems.org>
Subject: Re: [Tiff] BigTIFF Tag Value Count issue
Date: Fri, 17 Sep 2004 16:53:41 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Cc: Tiff mailing list <tiff@remotesensing.org>
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 3ceb4784015e904069f4f8e8e7951eb9

> > If I'm not mistaking, on most processors there is a gain from aligning of
data,
> > whilst things still work if data is not aligned. Thus, it pays to build
>
> With some processors (particularly RISC type processors), attempting
> to read unaligned data results in a program crash.  Probably Intel x86
> is not one of those processors.

IIRC, there's a processor flag that can be set on Intel Pentium familly that
mimicks that behaviour, but I may be misremembering.

But I wish you would draw conclusions, as, to me, you seem to be stepping on
your own point. If misaligned data can cause such disasters, and you're memory
mapping the file, you'll have to design your code to check correct alignment
anyway, and be prepared to copy the structures if needed to properly aligned
locations, since we can't trust everyone to align the IFD structure as we lay it
out in the BigTIFF spec. If all this code logic has to be built anyway, does
this not make designing aligment in the spec less important, and is this not
another argument pro regular IO instead of memory mapping for this kind of codec
application?

So I remain with my original point of view
- memory mapping is not really good design, but let's be friendly to memory
mappers if there's no cost to us
- alignment inside a file is not really an important issue, but let's do it
anyway if there's no substantial cost to us


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
