Skip to content

feat(analyzer): H.264 slice header fields and slice data info - #58

Merged
blocksmith314 merged 1 commit into
mainfrom
feature/slice-details
Nov 11, 2026
Merged

blocksmith314 merged 1 commit into
mainfrom
feature/slice-details

Conversation

@blocksmith314

Copy link
Copy Markdown
Owner

Summary

Improves #20: the NAL details panel now shows a real H.264 slice header and basic slice-data information instead of just a heading.

H.264

  • first_mb_in_slice, slice_type (numeric + name, "all slices" variants), pic_parameter_set_id, frame_num
  • field flags, idr_pic_id, POC fields (lsb, delta_pic_order_cnt_bottom/[0]/[1])
  • redundant_pic_cnt, direct_spatial_mv_pred_flag
  • num_ref_idx_active_override_flag + l0/l1, number of ref-pic-list modifications
  • reference marking: IDR flags or adaptive operation count
  • cabac_init_idc, slice_qp_delta, SP/SI fields, deblocking offsets
  • slice data: header bytes vs data bytes, entropy mode (CABAC/CAVLC), hex dump of the first 32 data bytes

pred_weight_table is detected but not decoded; the panel says later fields are not decoded instead of misreading them.

H.265

Basic slice segment header (type, PPS id, POC, IRAP/IDR/dependent) plus payload size and hex preview. Full HEVC header fields (SAO, RPS, merge candidates, entry points) remain for a follow-up, so this PR references #20 without closing it.

Verification

  • ctest: 67/67 pass (new H264ParamsTest.BuildsSliceDetailsText).
  • ./test/tools/tidy.sh core/nalanalyzer.cpp core/h264types.cpp core/expgolomb.cpp test/test_h264_params.cpp: 0 issues.

Refs #20

Extend H264SliceHeader with the fields that depend on SPS/PPS and decode
them when the slice header is available: field flags, idr_pic_id, delta
POC, redundant count, ref index overrides and list modifications,
reference marking, cabac_init_idc, QP/QS deltas and deblocking offsets.

The NAL details panel now prints the header, the split between header and
slice data, the entropy mode and a hex dump of the first 32 data bytes.
H.265 slices get a basic header summary plus the same payload preview.

RbspBitReader tracks consumed bits so the header size can be reported.
@blocksmith314
blocksmith314 merged commit 2b1bcf5 into main Nov 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant