Add ATLAS_SEGMENT_OBU support#3
Conversation
There was a problem hiding this comment.
Pull request overview
Adds full parsing + JSON serialization support for the ATLAS_SEGMENT OBU, enabling the toolchain to interpret atlas segment layouts across multiple atlas modes.
Changes:
- Implemented
ATLAS_SEGMENTpayload parsing across ENHANCED/BASIC/SINGLE/MULTISTREAM (+ alpha) modes usingBitstreamReader. - Added in-memory structures for segment and enhanced-atlas region/mapping data.
- Extended
to_json()to emit mode-specific fields and label segment info.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/obus/atlas_segment_obu.cpp | Implements bitstream parsing helpers, mode-specific parsing logic, and JSON output for ATLAS_SEGMENT. |
| include/av2_obu/obus/atlas_segment_obu.h | Adds enums/structs and storage fields needed to represent parsed ATLAS_SEGMENT state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try { | ||
| BitstreamReader br(raw_payload_); | ||
|
|
||
| atlas_segment_id_ = br.read_bits(3); |
There was a problem hiding this comment.
atlas_segment_id in atlas_segment_info_obu( ) is a 3-bit field, unlike lcr_layer_atlas_segment_id, which is 8-bit.
There was a problem hiding this comment.
funny how AI might lead one into wrong direction :)
| info.region_width_minus1 = br.read_uvlc(); | ||
| info.region_height_minus1 = br.read_uvlc(); | ||
| } | ||
| return (info.num_region_columns_minus1 + 1) * (info.num_region_rows_minus1 + 1); |
There was a problem hiding this comment.
MAX_ATLAS_COLS = MAX_ATLAS_ROWS = 64
So for a conformant stream, (cols+1) * (rows+1) maxes at 4096. Not even close to uint16 overflow, let alone uint32.
|
Thanks Joel. This looks like a good first implementation. We may find issues through additional testing, but I'd support incorporating this as a first step. |
No description provided.