Summary
Several dead or placeholder artifacts remain in the tree: an unused (and non-deterministic) Rice helper, a stored-but-ignored constructor parameter, empty .cpp/.hpp placeholder files, and a correctness self-test compiled into the production CLI binary. These mislead readers about what is load-bearing.
Affected areas
src/codec/rice/rice.cpp / src/codec/rice/rice.hpp
src/codec/block/encoder.hpp / src/codec/block/encoder.cpp
src/utils/logger.cpp, src/utils/endian.hpp, src/codec/bitstream/bit_reader.cpp
src/main.cpp
Problem details
Rice::compute_k is dead code. It is declared (rice.hpp:39) and defined (rice.cpp:51-68) but never called from src/ (only the header/definition exist; tests do not use it). It also uses a double-based estimate (1u<<k) < (uint32_t)(mean+0.5) that differs from the live integer adapt_k, so it is both unused and a cross-compiler non-determinism trap if revived.
Block::Encoder::order member is effectively dead. The constructor takes and stores order (encoder.hpp:22, encoder.cpp:17), but encode recomputes the order from candidates and never reads this->order; LAC::Encoder passes 12, which is ignored. A parameter that looks load-bearing but is not is a maintenance trap.
- Empty placeholder files.
utils/logger.cpp (0 bytes), utils/endian.hpp (0 bytes), and codec/bitstream/bit_reader.cpp (1 line) imply implementations that were never written.
- Self-test embedded in the production binary.
lac_cli selftest (main.cpp:794-867) is a correctness round-trip test living in the CLI, not the test suite, and it does not cover per-block stereo (mode 2) or mono.
Acceptance criteria
Rice::compute_k is removed (or, if a use is intended, documented and made consistent with adapt_k).
- The unused
Block::Encoder order parameter/member is removed or actually used.
- Empty placeholder files are removed, or filled with their intended content and a reason to exist.
- The self-test is moved into the test suite (or kept but expanded to cover per-block stereo and mono, with a documented rationale for shipping it in the CLI).
Summary
Several dead or placeholder artifacts remain in the tree: an unused (and non-deterministic) Rice helper, a stored-but-ignored constructor parameter, empty
.cpp/.hppplaceholder files, and a correctness self-test compiled into the production CLI binary. These mislead readers about what is load-bearing.Affected areas
src/codec/rice/rice.cpp/src/codec/rice/rice.hppsrc/codec/block/encoder.hpp/src/codec/block/encoder.cppsrc/utils/logger.cpp,src/utils/endian.hpp,src/codec/bitstream/bit_reader.cppsrc/main.cppProblem details
Rice::compute_kis dead code. It is declared (rice.hpp:39) and defined (rice.cpp:51-68) but never called fromsrc/(only the header/definition exist; tests do not use it). It also uses adouble-based estimate(1u<<k) < (uint32_t)(mean+0.5)that differs from the live integeradapt_k, so it is both unused and a cross-compiler non-determinism trap if revived.Block::Encoder::ordermember is effectively dead. The constructor takes and storesorder(encoder.hpp:22,encoder.cpp:17), butencoderecomputes the order from candidates and never readsthis->order;LAC::Encoderpasses12, which is ignored. A parameter that looks load-bearing but is not is a maintenance trap.utils/logger.cpp(0 bytes),utils/endian.hpp(0 bytes), andcodec/bitstream/bit_reader.cpp(1 line) imply implementations that were never written.lac_cli selftest(main.cpp:794-867) is a correctness round-trip test living in the CLI, not the test suite, and it does not cover per-block stereo (mode 2) or mono.Acceptance criteria
Rice::compute_kis removed (or, if a use is intended, documented and made consistent withadapt_k).Block::Encoderorderparameter/member is removed or actually used.