public virtual bool readPktBody(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb)
{
int curOff = ehs.Pos;
//Coord curCB;
CBlkInfo ccb;
bool stopRead = false;
int tIdx = src.TileIdx;
Coord cbc;
bool precFound = false;
int mins = (r == 0)?0:1;
int maxs = (r == 0)?1:4;
for (int s = mins; s < maxs; s++)
{
if (p < ppinfo[c][r].Length)
{
precFound = true;
}
}
if (!precFound)
{
return false;
}
for (int s = mins; s < maxs; s++)
{
for (int numCB = 0; numCB < cblks[s].Count; numCB++)
{
cbc = ((CBlkCoordInfo) cblks[s][numCB]).idx;
ccb = cbI[s][cbc.y][cbc.x];
ccb.off[l] = curOff;
curOff += ccb.len[l];
try
{
ehs.seek(curOff);
}
catch (System.IO.EndOfStreamException e)
{
if (l == 0)
{
cbI[s][cbc.y][cbc.x] = null;
}
else
{
ccb.off[l] = ccb.len[l] = 0;
ccb.ctp -= ccb.ntp[l];
ccb.ntp[l] = 0;
ccb.pktIdx[l] = - 1;
}
throw new System.IO.EndOfStreamException();
}
// If truncation mode
if (isTruncMode)
{
if (stopRead || ccb.len[l] > nb[tIdx])
{
// Remove found information in this code-block
if (l == 0)
{
cbI[s][cbc.y][cbc.x] = null;
}
else
{
ccb.off[l] = ccb.len[l] = 0;
ccb.ctp -= ccb.ntp[l];
ccb.ntp[l] = 0;
ccb.pktIdx[l] = - 1;
}
stopRead = true;
}
if (!stopRead)
{
nb[tIdx] -= ccb.len[l];
}
}
// If ncb quit condition reached
if (ncbQuit && r == rQuit && s == sQuit && cbc.x == xQuit && cbc.y == yQuit && tIdx == tQuit && c == cQuit)
{
cbI[s][cbc.y][cbc.x] = null;
stopRead = true;
}
} // Loop on code-blocks
} // End loop on subbands
// Seek to the end of the packet
ehs.seek(curOff);
if (stopRead)
{
return true;
}
else
{
return false;
}
}