Skip to content

Commit 19e0ecc

Browse files
author
Grok Compression
committed
remove dead code
1 parent 52d4603 commit 19e0ecc

11 files changed

Lines changed: 0 additions & 117 deletions

File tree

src/lib/codec/apps/GrkCompress.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -617,45 +617,7 @@ static void setHT(grk_cparameters* parameters, bool hasCompressionRatios, bool h
617617
}
618618
}
619619

620-
bool parseCommaSeparatedIntegers(const std::string& input, std::vector<uint32_t>& output,
621-
size_t numIntegers)
622-
{
623-
std::stringstream ss(input);
624-
std::string token;
625-
output.clear();
626620

627-
while(std::getline(ss, token, ','))
628-
{
629-
try
630-
{
631-
int32_t value = std::stoi(token);
632-
if(value <= 0)
633-
{
634-
spdlog::error("Synthesfmtize values must be positive.");
635-
return false;
636-
}
637-
output.push_back((uint32_t)value);
638-
}
639-
catch(const std::invalid_argument& e)
640-
{
641-
std::cerr << "Invalid integer value: " << token << std::endl;
642-
return false;
643-
}
644-
catch(const std::out_of_range& e)
645-
{
646-
std::cerr << "Integer value out of range: " << token << std::endl;
647-
return false;
648-
}
649-
}
650-
651-
if(output.size() != numIntegers)
652-
{
653-
std::cerr << "Error: Exactly " << numIntegers << " integer values are required." << std::endl;
654-
return false;
655-
}
656-
657-
return true;
658-
}
659621

660622
uint8_t charToUint8(char c)
661623
{

src/lib/core/canvas/precinct/Precinct.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ TagTreeU8* Precinct::getImsbTree(void)
5151
{
5252
return getImpl()->getIMsbTagTree();
5353
}
54-
uint16_t Precinct::getCblkGridwidth(void)
55-
{
56-
return getImpl()->cblk_grid_.width();
57-
}
58-
uint16_t Precinct::getCblkGridHeight(void)
59-
{
60-
return impl_->cblk_grid_.height();
61-
}
6254
uint16_t Precinct::getNominalBlockSize(void)
6355
{
6456
return uint16_t((1U << cblk_expn_.x) * (1U << cblk_expn_.y));

src/lib/core/canvas/precinct/Precinct.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,6 @@ struct Precinct : public Rect32_16
7373
*/
7474
TagTreeU8* getImsbTree(void);
7575

76-
/**
77-
* @brief Gets code block grid width
78-
*
79-
* @return uint16_t grid width
80-
*/
81-
uint16_t getCblkGridwidth(void);
82-
83-
/**
84-
* @brief Gets code block grid height
85-
*
86-
* @return uint16_t grid height
87-
*/
88-
uint16_t getCblkGridHeight(void);
89-
9076
/**
9177
* @brief Gets nominal size (area) of code block
9278
*

src/lib/core/codestream/Codec.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ class Codec
5353
return ((GrkObjectWrapperImpl<Codec>*)codec->wrapper)->getWrappee();
5454
}
5555

56-
grk_object* getWrapper()
57-
{
58-
return &obj;
59-
}
60-
6156
std::future<bool> queueDecompressTile(uint16_t tile_index)
6257
{
6358
startWorkerThreadIfNeeded();

src/lib/core/codestream/TileWindow.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ void TileWindow::init(Rect16 allTiles)
2828
allTiles_ = allTiles;
2929
slate(allTiles_);
3030
}
31-
uint16_t TileWindow::getTotalNumTiles(void)
32-
{
33-
return (uint16_t)allTiles_.area();
34-
}
3531
void TileWindow::slate(Rect16 tiles)
3632
{
3733
assert(!allTiles_.intersection(tiles).empty());

src/lib/core/codestream/TileWindow.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ class TileWindow
6868
*/
6969
bool isSlated(uint16_t tile_index);
7070

71-
/**
72-
* @brief Gets the total number of tiles in window
73-
* @return uint16_t
74-
*/
75-
uint16_t getTotalNumTiles(void);
76-
7771
std::set<uint16_t>& getSlatedTiles(void);
7872

7973
Rect16 getSlatedTileRect(void);

src/lib/core/codestream/compress/CodeStreamCompress.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -671,24 +671,6 @@ bool CodeStreamCompress::init(grk_cparameters* parameters, GrkImage* image)
671671
return true;
672672
}
673673

674-
void CodeStreamCompress::handleTileProcessor(
675-
ITileProcessorCompress* proc, MinHeapPtr<ITileProcessorCompress, uint16_t, MinHeapLocker>& heap,
676-
std::atomic<bool>& success)
677-
{
678-
std::unique_lock<std::mutex> lk(heapMutex_);
679-
auto seq = heap.pop(proc);
680-
for(const auto& s : seq)
681-
{
682-
// printf("Write tile %d\n", s->getIndex());
683-
if(success)
684-
{
685-
if(!writeTileParts(s))
686-
success = false;
687-
}
688-
delete s;
689-
}
690-
}
691-
692674
uint64_t CodeStreamCompress::compress(grk_plugin_tile* tile)
693675
{
694676
uint32_t numTiles = (uint32_t)cp_.t_grid_height_ * cp_.t_grid_width_;

src/lib/core/codestream/compress/CodeStreamCompress.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,6 @@ class CodeStreamCompress : public CodeStream, public ICompressor
306306
bool init_mct_encoding(TileCodingParams* tcp, GrkImage* image);
307307

308308
uint32_t totalTileParts_;
309-
mutable std::mutex heapMutex_;
310-
void handleTileProcessor(ITileProcessorCompress* proc,
311-
MinHeapPtr<ITileProcessorCompress, uint16_t, MinHeapLocker>& heap,
312-
std::atomic<bool>& success);
313309
};
314310

315311
} // namespace grk

src/lib/core/scheduling/standard/flow/ImageComponentFlow.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,5 @@ FlowComponent* ImageComponentFlow::getPrePostProc(tf::Taskflow& codecFlow)
138138

139139
return prePostProc_;
140140
}
141-
std::string ImageComponentFlow::genBlockFlowTaskName(uint8_t resFlowNo)
142-
{
143-
std::stringstream ss;
144-
ss << "blockFlowTask-" << resFlowNo;
145-
146-
return ss.str();
147-
}
148141

149142
} // namespace grk

src/lib/core/scheduling/standard/flow/ImageComponentFlow.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ class ImageComponentFlow
134134
/**
135135
* @brief Generates block flow task name
136136
*
137-
* @param resFlowNo resolution flow number
138-
* @return std::string name of block flow task
139-
*/
140-
std::string genBlockFlowTaskName(uint8_t resFlowNo);
141137
/**
142138
* @brief Gets the Resflow object
143139
*

0 commit comments

Comments
 (0)