code wiki / _hdl_build / nx_vcodec_heataq.nx
nx_vcodec_heataq.nx
buildroot/runtime/_hdl_build/nx_vcodec_heataq.nx
about
nx_vcodec_heataq.nx -- Adapts skip thresholds per macroblock based on past behavior to optimize bitrate allocation.
dependencies 3 imports · 0 importers
imports: nx_gate_base.nxnx_syscalls.nxnx_video_codec_wasm.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
| 18 | const CHURN_MAGIC_2048: i64 = 2048 |
| 19 | const CHURN_MAGIC_4194304: i64 = 4194304 |
| 20 | const CHURN_MAGIC_5120: i64 = 5120 |
| 21 | const CHURN_MAGIC_8192: i64 = 8192 |
| 23 | const SW: i64 = 352 |
| 24 | const SH: i64 = 288 |
| 25 | const NF: i64 = 48 |
| 26 | const SKIPMUL: i64 = 30 |
| 27 | const CHURN_N: i64 = 3 // coded-streak arming the churn discount |
| 28 | const STABLE_N: i64 = 8 // skip-streak arming the stability protection |
| 29 | const SKIPBITS: i64 = 4 // CAVLC bits <= this across a block call ~= the MB skipped (mode+coeffs ride the rc section) |
functions
| 31 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 33 | func gn(v: i64) -> i64 |
| 37 | func cpb(d: *u8, s: *u8, n: i64) -> i64 { var i: i64=0; while i<n { d[i]=s[i]; i=i+1 } return 0 } |
| 39 | func frames(yuv: *u8, hi: i64, total: i64, fp: *i64, fdata: i64) -> i64 |
| 49 | func hq_thr(base: i64, heat: i64, churn: i64, mode: i64) -> i64 |
| 65 | func hq_enc_frame(cur: *u8, prev: *u8, recon: *u8, W: i64, H: i64, qp: i64, keyframe: i64, sad_thresh: i64, buf: *u8, blk: *i64, mv: *i64, tf: i64, rctx: *i64, heat: *i64, churn: *i64, skipf: *i64, mode: i64) -> i64 |
| 104 | func hq_enc_rct8(cur: *u8, prev: *u8, recon: *u8, W: i64, H: i64, qp: i64, keyframe: i64, sad: i64, out: *u8, out_cap: i64, blk: *i64, mv: *i64, rctx: *i64, heat: *i64, churn: *i64, skipf: *i64, mode: i64) -> i64 |
| 135 | func fidelity(fp: *i64, sz: i64) -> i64 |
| 168 | func runpq(fp: *i64, kq: i64, pq: i64, emode: i64, sz: i64, allkey: i64, mode: i64) -> i64 |
| 201 | func main(argc: i64, argv: *i64) -> i64 |