imagingmodules/jp2kcodec/Inc/JP2KCodeBlock.inl
changeset 0 469c91dae73b
equal deleted inserted replaced
-1:000000000000 0:469c91dae73b
       
     1 /*
       
     2 * Copyright (c) 2003, 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  JP2KCodeBlock class used to collect the codeblock
       
    15 *                related information such as compressed data and data length.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __JP2KCODEBLOCK_INL__
       
    21 #define __JP2KCODEBLOCK_INL__
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CJ2kCodeBlock::LastPass
       
    27 // Get the last pass.
       
    28 // (other items were commented in a header).
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 inline TInt8 CJ2kCodeBlock::LastPass() const
       
    32     {
       
    33     return iLastPass;
       
    34     }
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // CJ2kCodeBlock::PassIndex
       
    38 // Get the pass index.
       
    39 // (other items were commented in a header).
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 inline TUint8 CJ2kCodeBlock::PassIndex() const
       
    43     {
       
    44     return iPassIndex;
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // CJ2kCodeBlock::EmptyBitplanes
       
    49 // Get the number of empty bit planes.
       
    50 // (other items were commented in a header).
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 inline TUint8 CJ2kCodeBlock::EmptyBitplanes() const
       
    54     {
       
    55     return iEmptyBitplane;
       
    56     }
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // CJ2kCodeBlock::CodeBlockCanvas
       
    60 // Get the canvas of the codeblock.
       
    61 // (other items were commented in a header).
       
    62 // -----------------------------------------------------------------------------
       
    63 //
       
    64 inline const TRect& CJ2kCodeBlock::CodeBlockCanvas() const
       
    65     {
       
    66     return iCodeBlockCanvas;
       
    67     }
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CJ2kCodeBlock::DataLength
       
    71 // Get the data length.
       
    72 // (other items were commented in a header).
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 inline TUint32 CJ2kCodeBlock::DataLength() const
       
    76     {
       
    77     return iDataLength;
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CJ2kCodeBlock::CblkLength
       
    82 // Get the data size at specific segment.
       
    83 // (other items were commented in a header).
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 inline TUint16 CJ2kCodeBlock::CblkLength(TUint16 aIndex) const
       
    87     {
       
    88     return (*iDataSize)[aIndex];
       
    89     }
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CJ2kCodeBlock::PassesPerSegment
       
    93 // Get the pass per segment at specific segment.
       
    94 // (other items were commented in a header).
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 inline TUint16 CJ2kCodeBlock::PassesPerSegment(TUint16 aIndex) const
       
    98     {
       
    99     return (*iPassesPerSegment)[aIndex];
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // CJ2kCodeBlock::ResetPassIndex
       
   104 // Reset the pass index to 0.
       
   105 // (other items were commented in a header).
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 inline void CJ2kCodeBlock::ResetPassIndex()
       
   109     {
       
   110     iPassIndex = 0;
       
   111     }
       
   112 
       
   113 // -----------------------------------------------------------------------------
       
   114 // CJ2kCodeBlock::IncrementPassIndex
       
   115 // Increment the pass index.
       
   116 // (other items were commented in a header).
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 inline void CJ2kCodeBlock::IncrementPassIndex()
       
   120     {
       
   121     ++iPassIndex;
       
   122     }
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // CJ2kCodeBlock::SetCodeBlockDecoded
       
   126 // Set to indicate that the codeblock has been decoded
       
   127 // (other items were commented in a header).
       
   128 // -----------------------------------------------------------------------------
       
   129 //
       
   130 inline void CJ2kCodeBlock::SetCodeBlockDecoded()
       
   131     {
       
   132     iIsDecoded = (TUint8)1;
       
   133     }
       
   134 
       
   135 #endif // __JP2KCODEBLOCK_INL__