diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index ee829196c..21f88512e 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -395,7 +395,6 @@ int main(int argc, char **argv) { std::atomic processed_count = 0; std::atomic total_uncompressed_bytes = 0; - std::atomic max_image_number_sent = 0; start_message.file_format = FileWriterFormat::NXmxIntegrated; start_message.write_master_file = true; @@ -449,7 +448,8 @@ int main(int argc, char **argv) { DataMessage msg{}; msg.image = img->image; - msg.number = image_idx; + msg.number = current_idx_offset; + msg.original_number = image_idx; msg.image_collection_efficiency = dataset->efficiency[image_idx]; total_uncompressed_bytes += msg.image.GetUncompressedSize(); @@ -477,13 +477,6 @@ int main(int argc, char **argv) { if (writer) writer->Write(msg); - // Update max sent tracking - uint64_t current_max = max_image_number_sent.load(); - while (static_cast(msg.number) > current_max) { - if (max_image_number_sent.compare_exchange_weak(current_max, static_cast(msg.number))) - break; - } - finished_count.fetch_add(1); // Progress log @@ -529,7 +522,7 @@ int main(int argc, char **argv) { // 5. Finalize Statistics and Write EndMessage EndMessage end_msg; - end_msg.max_image_number = max_image_number_sent; + end_msg.max_image_number = images_to_process; end_msg.images_collected_count = images_to_process; end_msg.images_sent_to_write_count = images_to_process; end_msg.end_date = time_UTC(std::chrono::system_clock::now());