File tree Expand file tree Collapse file tree
src/lib/core/codestream/decompress Expand file tree Collapse file tree Original file line number Diff line number Diff line change 164164 "program" : " /usr/bin/time" ,
165165 "args" : [
166166 " -v" ,
167- " ${workspaceFolder}/build/bin/core_decompress " ,
167+ " ${workspaceFolder}/build/bin/grk_decompress " ,
168168 " -i" ,
169- " $HOME/temp/IMG_SPOT6_PMS_201305251604372_ORT_816009101_R1C1_TLM.JP2"
169+ " $HOME/temp/IMG_SPOT6_PMS_201305251604372_ORT_816009101_R1C1_TLM.JP2" ,
170+ " -o" ,
171+ " $HOME/temp/spot6_tlm.tif"
170172 ],
171173 "cwd" : " ${workspaceFolder}" ,
172174 "environment" : [
Original file line number Diff line number Diff line change @@ -572,6 +572,17 @@ void CodeStreamDecompress::decompressTLM(const std::set<uint16_t>& pendingTiles)
572572 {
573573 for (const auto & tileIndex : pendingTiles)
574574 {
575+ // Backpressure for strip-based band callback: block if this tile's row
576+ // is too far ahead of the row currently being drained, matching the
577+ // sequential path's throttle in sequentialParseAndSchedule().
578+ if (ioBandCallback_ && tileCompletion_)
579+ {
580+ uint16_t numTileCols = tileCompletion_->getNumTileCols ();
581+ uint16_t tileY = tileIndex / numTileCols;
582+ std::unique_lock<std::mutex> lock (bandOrderMutex_);
583+ while (!(tileY < nextBandTileY_ + 2 || !success_))
584+ bandDrainCV_.wait_for (lock, std::chrono::milliseconds (100 ));
585+ }
575586 if (!schedule (getTileProcessor (tileIndex), true ))
576587 break ;
577588 }
You can’t perform that action at this time.
0 commit comments