-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
69 lines (63 loc) · 1.49 KB
/
__init__.py
File metadata and controls
69 lines (63 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# h264/bitstream/__init__.py
"""Bitstream parsing module for H.264 Annex B format.
Handles NAL unit extraction and bit-level reading.
Two BitReader implementations available:
- NumpyBitReader: Pure NumPy, no external dependencies (default)
- BitReader: Uses bitstring library (legacy, requires pip install bitstring)
"""
from .nal_parser import (
NALUnitType,
NALUnit,
START_CODE_3,
START_CODE_4,
find_start_codes,
remove_emulation_prevention_bytes,
parse_nal_header,
parse_nal_unit,
extract_nal_units,
iter_nal_units,
filter_nal_units,
get_sps_pps,
create_test_bitstream,
)
from .bit_reader import (
BitReader,
BitWriter,
BitstringBitReader,
BitstringBitWriter,
BITSTRING_AVAILABLE,
USE_NUMPY_READER,
create_bit_reader,
)
from .numpy_bit_reader import (
NumpyBitReader,
NumpyBitWriter,
)
__all__ = [
# NAL parsing
"NALUnitType",
"NALUnit",
"START_CODE_3",
"START_CODE_4",
"find_start_codes",
"remove_emulation_prevention_bytes",
"parse_nal_header",
"parse_nal_unit",
"extract_nal_units",
"iter_nal_units",
"filter_nal_units",
"get_sps_pps",
"create_test_bitstream",
# Bit reading - NumPy (recommended)
"NumpyBitReader",
"NumpyBitWriter",
# Bit reading - bitstring (legacy)
"BitReader",
"BitWriter",
"BitstringBitReader",
"BitstringBitWriter",
# Configuration
"BITSTRING_AVAILABLE",
"USE_NUMPY_READER",
"create_bit_reader",
]