From mint-bounce@lists.fishpool.fi Wed Jul 7 15:09:04 2010 X-ME-UUID: 20100707190039991.F22247000B0A@mwinf2b11.orange.fr Date: Wed, 7 Jul 2010 21:00:40 +0200 From: Patrice Mandin To: mint@lists.fishpool.fi Subject: Re: [MiNT] Bit-Depth and Graphics stuff.... Message-Id: <20100707210040.cdf8cdd2.mandin.patrice@orange.fr> In-Reply-To: <3847624A-0252-410C-B103-5BA7AAE195E0@gmail.com> References: <2d64e795294918b05c6ec6ea3bc731b7-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYPXkF0A1Y6XF1YSUYAWVNeQw==-webmailer2@server08.webmailer.hosteurope.de> <6BF9B6DD-38A2-4874-8D8C-10EE1E99E6DD@gmail.com> <1BCB0F08-DCCB-423A-B4E1-CCDB279C6B83@gmail.com> <6dbce3cf64caf9c3441739836652cad8-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYMXUF0BVM6XF1YSUADWl9cQw==-webmailer2@server05.webmailer.hosteurope.de> <4C34C2E4.5080909@online.no> <3847624A-0252-410C-B103-5BA7AAE195E0@gmail.com> Organization: Chez moi X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.12; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: mandin.patrice@orange.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id o67J93Kk003241 Le Wed, 7 Jul 2010 20:17:01 +0200 Peter Persson a écrit: > 7 jul 2010 kl. 20.09 skrev Jo Even Skarstein: > > > No, the way to do this is to first transform the bitmaps to a generic > > format (such a format already exists in VDI for 8 bit and less), and > > then transform this generic format to the screen format. > > Is this a good idea in truecolor? > > To be honest, it's not even a good idea in palette modes, because performance is just horrible. A chunky2planar conversion -> buffer which is then blitted to the screen is just so much faster. > Using the Device Independent format in 8bpp chunky just means losing tons of CPU, because you'll first convert a chunky bitmap to consecutive planes, then the VDI will convert that image back to chunky. > > Since he has to add custom code for hicolor/truecolor, wouldn't it make sense to add conversion code for palette modes as well? Patrice, correct me if I'm wrong, but I'm 99.999% sure SDL does this). When blitting stuff with VDI, you have the choice between: - Device independent format: each bitplane is stored completely one after the other, like in IMG files. Do not know how it works for true colour blits. - Device dependent format: in this case you must know the format completely (bitplanes, chunky, bits organization in true colour), and this is what I use in SDL. This requires much less operations for the VDI, but a bit more for the application. The app needs to write the data precisely in the screen format. -- Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux "who writes the code, decides"