Skip to content

fix(avc): encode avcC trailing info for all profiles outside 66/77/88 - #536

Merged
tobbee merged 1 commit into
Eyevinn:masterfrom
nchitkara-xai:avcc-encode-trailing-info
Jul 25, 2026
Merged

fix(avc): encode avcC trailing info for all profiles outside 66/77/88#536
tobbee merged 1 commit into
Eyevinn:masterfrom
nchitkara-xai:avcc-encode-trailing-info

Conversation

@nchitkara-xai

@nchitkara-xai nchitkara-xai commented Jul 25, 2026

Copy link
Copy Markdown

DecodeAVCDecConfRec and Size() treat every AVC profile outside 66/77/88 as having the 4 trailing bytes (chroma format, bit depths, numSPSExt), but EncodeSW only writes them for 100, 110, 122 and 144. For other profiles like 244 the encoded record comes out 4 bytes shorter than Size(), so box sizes go wrong when the record is encoded inside an stsd.

This makes that case the default branch in EncodeSW, matching Size() and the decoder. Added a test that round-trips a profile 244 record.

EncodeSW only wrote the 4 trailing bytes for profiles 100, 110, 122,
and 144, while Size() and DecodeAVCDecConfRec treat all profiles
outside 66/77/88 that way. For other profiles like 244, the encoded
record was 4 bytes shorter than Size().
@nchitkara-xai
nchitkara-xai force-pushed the avcc-encode-trailing-info branch from 587c1e4 to 616360e Compare July 25, 2026 01:46

@tobbee tobbee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nchitkara-xai Thanks for this PR. LGTM!

@tobbee
tobbee merged commit 8a95b1f into Eyevinn:master Jul 25, 2026
9 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.

2 participants