CSJ2K.j2k.codestream.reader.HeaderDecoder.readPPT C# (CSharp) Method

readPPT() private method

Reads the PPT marker segment of the main header.
If an I/O error occurs while reading from the /// encoder header stream /// ///
private readPPT ( System ehs, int tile, int tpIdx ) : void
ehs System The encoder header stream. /// ///
tile int The tile to which the current tile part belongs /// ///
tpIdx int Tile-part index /// ///
return void
        private void readPPT(System.IO.BinaryReader ehs, int tile, int tpIdx)
        {
            int curMarkSegLen;
            int indx; // len = 0; removed
            byte[] temp;

            if (tilePartPkdPktHeaders == null)
            {
                tilePartPkdPktHeaders = new byte[nTiles][][][];
            }

            if (tilePartPkdPktHeaders[tile] == null)
            {
                tilePartPkdPktHeaders[tile] = new byte[nTileParts[tile]][][];
            }

            if (tilePartPkdPktHeaders[tile][tpIdx] == null)
            {
                tilePartPkdPktHeaders[tile][tpIdx] = new byte[nPPTMarkSeg[tile][tpIdx]][];
            }

            // Lppt (marker length)
            curMarkSegLen = ehs.ReadUInt16();

            // Zppt (index of PPT marker)
            indx = ehs.ReadByte();

            // Ippt (packed packet headers)
            temp = new byte[curMarkSegLen - 3];
            ehs.BaseStream.Read(temp, 0, temp.Length); //SupportClass.ReadInput(ehs.BaseStream, temp, 0, temp.Length);
            tilePartPkdPktHeaders[tile][tpIdx][indx] = temp;

            // Check marker length
            checkMarkerLength(ehs, "PPT marker");

            decSpec.pphs.setTileDef(tile, (System.Object) true);
        }