[opengtl-commits] [548] use the channels position of pixel description

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 548
Author:   cyrille
Date:     2008-12-18 22:38:20 +0100 (Thu, 18 Dec 2008)

Log Message:
-----------
use the channels position of pixel description

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/OpenShiva/CodeGenerator_p.cpp


Modified: trunk/OpenGTL/OpenShiva/OpenShiva/CodeGenerator_p.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/CodeGenerator_p.cpp	2008-12-18 21:37:57 UTC (rev 547)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/CodeGenerator_p.cpp	2008-12-18 21:38:20 UTC (rev 548)
@@ -407,7 +407,7 @@
         { // Special case, special hack, for a pixel of one channel, the vec isn't a vec
           floatVec = floatValue;
         } else {
-          floatVec = llvm::InsertElementInst::Create( floatVec, floatValue, i, "", currentBlock);
+          floatVec = llvm::InsertElementInst::Create( floatVec, floatValue, _pixelDescription.channelPositions()[i], "", currentBlock);
         }
         GTL_ASSERT(channelType->bitsSize() % 8 == 0);
         currentPos += channelType->bitsSize() / 8;
@@ -497,7 +497,7 @@
         {
           floatValue = floatVec;
         } else {
-          floatValue = new llvm::ExtractElementInst( floatVec, i, "", currentBlock );
+          floatValue = new llvm::ExtractElementInst( floatVec, _pixelDescription.channelPositions()[i], "", currentBlock );
         }
   //        convert( _src[i] );
         // Scale


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/