Skip to content

Instantly share code, notes, and snippets.

View BrandonHaynes's full-sized avatar

Brandon Haynes BrandonHaynes

View GitHub Profile
@BrandonHaynes
BrandonHaynes / parse_h265.py
Last active August 22, 2024 01:02 — forked from figgis/parse_h265.py
H.265/HEVC bitstream parser
#!/usr/bin/env python
"""
- ae(v): context-adaptive arithmetic entropy-coded syntax element. The parsing process for this descriptor is
specified in clause 9.3.
- b(8): byte having any pattern of bit string (8 bits). The parsing process
for this descriptor is specified by the return value of the function
read_bits( 8 ).
- f(n): fixed-pattern bit string using n bits written (from left to right)