DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Sensor Indexer Ingestion Tool

Description

This tool is available on the x86 Host System.

This is an executable which takes a binary sensor file as input, indexes it and outputs the result to a binary index file.

The tool currently supports Camera, CAN, GPS, IMU and Lidar binary file indexing.

Input

The input file must be a MP4 file or a DriveWorks-supported binary sensor file: *.raw, *.lraw, *.xraw or *.bin.

Output

The output binary index file is filled with a single 1024 byte superblock and multiple entries. The order of bytes is little endian. For non-mp4 formats, the output of this tool is an intermediate index output to be fed into the timesync_index tool for time synchronization. For mp4 videos, this will be the final index output, and no time synchronization needs to be done. The output structure for non-mp4 formats is:

  • Superblock : 1024 bytes
    • magic number : 8 bytes, uint32_t
    • version : 1 byte, uint8_t
    • intermediate magic number : 4 bytes, uint32_t
    • frameCount : 8 bytes, size_t, the number of frames indexed
    • reserved : 1003 bytes
  • Entry 1 : 22/31/40/49/56 bytes, based on the number of timestamps in the entry
    • offset : 8 bytes, uint64_t
    • length : 4 bytes, uint32_t
    • numTimestamps : 1 byte, uint8_t, number of timestamps in the entry
    • timestamp_0 : 8 bytes, int64_t
    • timeDomain_0 : 1 byte, uint8_t, { 0 : HOST, 1 : TSC, 2 : PTP, 3 : UTC, 4 : UTCTOH }
    • **(if available) timestamp_1** : 8 bytes
    • **(if available) timeDomain_1** : 1 byte
    • **............**
  • Entry 2 : 22/31/40/49/56 bytes
  • Entry 3 : 22/31/40/49/56 bytes
  • **............**

The output structure for mp4 is:

  • Superblock : 1024 bytes
    • magic number : 8 bytes, uint32_t
    • version : 1 byte, uint8_t
    • reserved : 1015 bytes
  • Entry 1 : 20 bytes
    • offset : 8 bytes, uint64_t
    • length : 4 bytes, uint32_t
    • timestamp_us : 8 bytes, int64_t, the synchronized host timestamp in microseconds
  • Entry 2 : 20 bytes
  • Entry 3 : 20 bytes
  • **............**

The timestamps are ordered by the timesync tool's time conversion preference.

Usage

cd install/tools/ingestion ./ingest_index –input=[path to input sensor file] –output=[path to output binary index file]