MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / processImpl

Method processImpl

external/nvImageCodec/src/image_generic_decoder.cpp:160–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 bool ImageGenericDecoder::processImpl(Entry& sample, int tid) noexcept {
161 try {
162 sample.should_copy = allocateTempBuffers(sample, tid);
163 auto decode_ret =
164 sample.processor->instance_->decode(sample.getImageDesc(), sample.code_stream->getCodeStreamDesc(), curr_params_, tid);
165 assert(sample.status != NVIMGCODEC_PROCESSING_STATUS_UNKNOWN);
166 bool decode_success = decode_ret && sample.status == NVIMGCODEC_PROCESSING_STATUS_SUCCESS;
167
168 if (sample.should_copy && decode_success) {
169 nvtx3::scoped_range marker{"copyToOutputBuffer #" + std::to_string(sample.sample_idx)};
170 copyToOutputBuffer(sample.orig_image_info, sample.image_info, tid);
171 }
172 return decode_success;
173 } catch (const std::exception& e) {
174 NVIMGCODEC_LOG_ERROR(logger_, "Exception during decode: " << e.what());
175 sample.status = NVIMGCODEC_PROCESSING_STATUS_FAIL;
176 return false;
177 }
178 }
179
180 bool ImageGenericDecoder::processBatchImpl(ProcessorEntry& processor) noexcept {
181 try {

Callers 1

processSampleMethod · 0.45

Calls 5

getCodeStreamDescMethod · 0.80
to_stringFunction · 0.50
decodeMethod · 0.45
getImageDescMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected