nx_h264_ts_probe.nx
buildroot/runtime/nx_h264_ts_probe.nx
about
nx_h264_ts_probe.nx -- STEP 0 decisive probe for the cam-poster build.
Reads a real MPEG-TS cam recording, demuxes the video PES (reusing the proven
nx_ts2fmp4 PAT->PMT->video-PID->ES logic), NAL-walks the elementary stream for
SPS (type 7) + PPS (type 8), and reports the two facts that LOCK the decode path:
PPS.entropy_coding_mode_flag (0=CAVLC, 1=CABAC) -> which entropy decoder
PPS.transform_8x8_mode_flag (High-profile 8x8) -> which inverse transform
plus SPS profile_idc/level/dims. main() is intentionally decomposed into small
functions (nx_cc SIGSEGVs on an over-large function body). license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_h264_bits.nxnx_h264_sps.nxnx_h264_pps.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const K_MAGIC_1024: i64 = 1024 |
| 15 | const MAXSCAN: i64 = 8388608 // 8 MiB from head: covers the first IDR + its SPS/PPS |
functions
| 17 | func pp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 18 | func pn(v: i64) -> i64 |
| 33 | func lb_bit(data: *u8, len: i64, pos: *i64) -> i64 |
| 40 | func lb_bits(data: *u8, len: i64, pos: *i64, n: i64) -> i64 |
| 46 | func lb_ue(data: *u8, len: i64, pos: *i64) -> i64 |
| 57 | func lb_se(data: *u8, len: i64, pos: *i64) -> i64 |
| 66 | func probe_more_rbsp(data: *u8, len: i64, curpos: i64) -> i64 called by 1: probe_parse_pps_full |
| 83 | func probe_parse_pps_full(rbsp: *u8, len: i64, out: *i64) -> i64 |
| 113 | func read_head(path: *u8, buf: *u8) -> i64 |
| 129 | func demux_video_es(filebuf: *u8, total: i64, es: *u8, pidout: *i64) -> i64 called by 1: main |
| 177 | func find_first_nal(es: *u8, eslen: i64, want: i64, dst: *u8, cap: i64) -> i64 called by 1: main |
| 201 | func nal_to_rbsp(nal: *u8, nallen: i64, rbsp: *u8) -> i64 |
| 205 | func report_sps(nal: *u8, nallen: i64) -> i64 |
| 217 | func report_pps(nal: *u8, nallen: i64) -> i64 |
| 233 | func main(argc: i64, argv: *i64) -> i64 |