continuation commit after the refactoring of ECBlocks

This commit is contained in:
favoritas37 2015-06-18 23:57:36 +03:00
parent c711a42231
commit eaeba99ac0
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ std::vector<Ref<DataBlock> > DataBlock::getDataBlocks(ArrayRef<char> rawCodeword
ECB *ecBlock = ecBlockArray[j]; ECB *ecBlock = ecBlockArray[j];
for (int i = 0; i < ecBlock->getCount(); i++) { for (int i = 0; i < ecBlock->getCount(); i++) {
int numDataCodewords = ecBlock->getDataCodewords(); int numDataCodewords = ecBlock->getDataCodewords();
int numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords; int numBlockCodewords = ecBlocks.getECCodewordsPerBloc() + numDataCodewords;
ArrayRef<char> buffer(numBlockCodewords); ArrayRef<char> buffer(numBlockCodewords);
Ref<DataBlock> blockRef(new DataBlock(numDataCodewords, buffer)); Ref<DataBlock> blockRef(new DataBlock(numDataCodewords, buffer));
result[numResultBlocks++] = blockRef; result[numResultBlocks++] = blockRef;
@ -85,7 +85,7 @@ std::vector<Ref<DataBlock> > DataBlock::getDataBlocks(ArrayRef<char> rawCodeword
} }
longerBlocksStartAt++; longerBlocksStartAt++;
int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewords(); int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewordsPerBloc();
// The last elements of result may be 1 element longer; // The last elements of result may be 1 element longer;
// first fill out as many elements as all of them have // first fill out as many elements as all of them have
int rawCodewordsOffset = 0; int rawCodewordsOffset = 0;