MCPcopy Create free account
hub / github.com/NVIDIA/DALI / DecodeFrames

Method DecodeFrames

dali/operators/video/frames_decoder_base.cc:640–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void FramesDecoderBase::DecodeFrames(uint8_t *data, span<const int> frame_ids,
641 boundary::BoundaryType boundary_type,
642 const uint8_t *constant_frame,
643 span<double> out_timestamps) {
644 LOG_LINE << "DecodeFrames: " << frame_ids.size() << " frames, boundary_type="
645 << boundary::to_string(boundary_type) << std::endl;
646
647 SmallVector<std::pair<int, int>, 32> sorted_frame_ids;
648 size_t num_frames = frame_ids.size();
649 sorted_frame_ids.reserve(num_frames);
650 for (int i = 0; i < static_cast<int>(frame_ids.size()); i++) {
651 sorted_frame_ids.push_back({HandleBoundary(boundary_type, frame_ids[i], 0, NumFrames()), i});
652 }
653 std::sort(sorted_frame_ids.begin(), sorted_frame_ids.end());
654 DecodeFramesImpl(data, sorted_frame_ids, boundary_type, constant_frame, out_timestamps);
655}
656
657
658void FramesDecoderBase::DecodeFrames(uint8_t *data, int start_frame, int end_frame, int stride,

Callers 2

PrefetchMethod · 0.45
RunImplFunction · 0.45

Calls 6

to_stringFunction · 0.50
sizeMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected