code wiki / (root) / nx_vmvres.nx

nx_vmvres.nx

buildroot/runtime/nx_vmvres.nx

1138 B22 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_vmvres.nx -- efficient MV-RESIDUAL coding. After MV prediction (nx_vmvpred) most residual components are exactly 0 (neighbouring blocks share motion on a pan/head-pan), so paying the varint's fixed 5-bit length prefix on every component is wasteful. Code instead: [1 bit nonzero-flag]; only if nonzero, the signed varint. A 0 residual costs 1 bit instead of 5 -> MVP's magnitude win finally shows up in the total bitrate. Composes nx_ventropy. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_ventropy.nx nx_vmvres.nx nx_vmvres_gate.nx

imports: nx_ventropy.nx

imported by: nx_vmvres_gate.nx

structs

none

consts

none

functions

8func mvr_put(buf: *u8, bp: i64, v: i64) -> i64
called by 1: main calls 2: nx_bw_putve_vput
14func mvr_get(buf: *u8, bp: i64) -> i64
called by 1: main calls 2: nx_br_getve_vval
19func mvr_len(buf: *u8, bp: i64) -> i64
called by 1: main calls 2: nx_br_getve_vlen