code wiki / (root) / nx_vcodec_stream.nx

nx_vcodec_stream.nx

buildroot/runtime/nx_vcodec_stream.nx

2431 B50 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind tooltopic vcodec
docsdependenciesstructsconstsfunctions

about

nx_vcodec_stream.nx -- RUNG H8 support: serialize the codec's quantized coefficients to a byte bitstream and back, so a compressed frame can ride the sovereign QUIC/FEC transport. encode_plane_stream transforms+quantizes each 4x4 block and writes its 16 coeffs as int16; decode_plane_stream reads them back and reconstructs. This is the bridge between the codec (H5/H6) and the transport (H7). Pure integer, sovereign. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_vcodec_color_frame.nx nx_vcodec_stream.nx nx_vclient_loop_test.nx

imports: nx_vcodec_color_frame.nx

imported by: nx_vclient_loop_test.nx

structs

none

consts

7const K_MAGIC_32768: i64 = 32768
8const K_MAGIC_65536: i64 = 65536

functions

10func wr16(b: *u8, off: i64, v: i64) -> i64 { b[off]=(v & 0xff) as u8; b[off+1]=((v >> 8) & 0xff) as u8; return 0 }
called by 1: encode_plane_stream
11func rd16(b: *u8, off: i64) -> i64 { var v: i64=(b[off] as i64) | ((b[off+1] as i64) << 8); if v >= K_MAGIC_32768 { v = v - K_MAGIC_65536 } return v }
called by 1: decode_plane_stream
14func encode_plane_stream(plane: *u8, W: i64, H: i64, QSTEP: i64, out: *u8) -> i64
called by 1: main calls 2: enc_blockwr16
32func decode_plane_stream(inb: *u8, W: i64, H: i64, QSTEP: i64, rec: *u8) -> i64
called by 1: main calls 2: rd16dec_block
50func main() -> i64 { return 0 }