• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Eyevinn / mp4ff / 37002615480
83%
master: 83%

Build:
Build:
LAST BUILD BRANCH: fix/extract-protect-avc3-hev1
DEFAULT BRANCH: master
Ran 02 Oct 2026 11:44AM UTC
Jobs 1
Files 217
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Oct 2026 11:40AM UTC coverage: 82.565% (+0.03%) from 82.533%
37002615480

Pull #614

github

tobbee
perf(bits,avc): read EBSP without allocating per byte

EBSPReader.Read fetched every byte with binary.Read, which allocates since the byte escapes through an interface: 13 allocations to parse an AVC slice header and 28 for an SPS. Read now uses ReadByte when the reader is an io.ByteReader, as the bytes.Reader and bytes.Buffer of all AVC and HEVC parameter set and slice header parsers are, and io.ReadFull into a local array otherwise.

NewEBSPReaderFromSlice reads directly from a slice and goes back in it for MoreRbspData without seeking. ParseSliceHeader uses it, and the new avc.SliceHeaderSize returns only the header size without allocating a SliceHeader, which is all that cbcs subsample encryption needs.

BenchmarkParseNALUnits (Apple M4 Pro, n=10):
- ParseSliceHeader: 341 ns -> 263 ns, 13 -> 1 allocations
- ParseSPSNALUnit: 568 ns -> 359 ns, 28 -> 3 allocations
- SliceHeaderSize: 244 ns, 0 allocations

TestEBSPReaderKinds runs the same reads, Exp-Golomb codes, MoreRbspData and trailing bits, across emulation prevention bytes and the end of data, through a slice, an io.ReadSeeker and a plain io.Reader, and requires identical values, positions and errors. TestEBSPReaderAllocations fails on master with 101 allocations for 100 bytes. TestSliceHeaderSize checks that SliceHeaderSize returns ParseSliceHeader's size and error for the test streams and for truncated, weighted-prediction and unknown-PPS slices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #614: perf(bits,avc): read EBSP without allocating per byte

44 of 48 new or added lines in 2 files covered. (91.67%)

23058 of 27927 relevant lines covered (82.57%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
67.73
3.1% avc/slice.go
2
92.47
0.96% bits/ebspreader.go
Jobs
ID Job ID Ran Files Coverage
1 37002615480.1 02 Oct 2026 11:44AM UTC 217
82.57
GitHub Action Run
Source Files on build 37002615480
  • Tree
  • List 217
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #614
  • PR Base - master (#37002244250)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc