Abstract
Parallelizing entropy coding in neural network-based video codecs typically introduces significant bit-rate overhead due to the necessity of signaling entry points and terminating independent bitstreams. This paper presents a suite of techniques—bidirectional bitstream packing, Range-Tree Compression (RTC), and joint arithmetic coding termination—designed to minimize this overhead. Experimental results demonstrate that these methods enable high levels of parallelism with negligible compression loss, often reducing overhead to less than 0.1%.
Introduction
In modern video compression, entropy coding serves as the final stage of the encoding pipeline, transforming quantized data into a compact bitstream. While neural network-based codecs offer significant advantages in compression efficiency, entropy coding remains a notorious sequential bottleneck. Traditional arithmetic coding requires the decoder to know the state of the previous bit to process the next, making it difficult to leverage multi-core hardware architectures.
Neural codecs can generate "factorized priors," which are statistically independent data chunks that theoretically allow for parallel decoding. However, practical implementation requires a bitstream organization that tells the decoder where each independent chunk begins (entry points). Additionally, each chunk requires "flushing" bits to terminate the arithmetic coder. As the degree of parallelism increases, the cumulative cost of these entry points and termination bits—the bit-rate overhead—can negate the compression gains of the neural model.
Proposed Methodology
To address the overhead challenge, three primary innovations are introduced to optimize bitstream organization.
1. Bidirectional Bitstream Packing
Traditional parallel bitstreams are concatenated sequentially, requiring a pointer for every chunk. The proposed approach pairs bitstreams together: one stream grows forward from the start of a memory block, while the other grows backward from the end. By having two streams "meet in the middle," the number of required entry point pointers in the header is halved, immediately reducing the signaling overhead.
2. Range-Tree Compression (RTC)
To further compress the lengths of these bitstreams, a novel Range-Tree Compression (RTC) method was developed. RTC organizes bitstream lengths into a binary tree structure and applies a universal coding method. Unlike existing techniques such as Binary Interpolative Compression (BIC), which can lose efficiency when bitstream sizes are similar (low variance), RTC remains robust across varying data magnitudes and distributions. This ensures consistent performance regardless of the video content or the specific neural latent variables being encoded.
3. Joint Arithmetic Coding Termination
Arithmetic coders typically append a few bits at the end of a stream to ensure the decoder can correctly finalize the process. In a bidirectional packing setup, the "wasted" bits at the end of two meeting streams are not fixed; they represent a range of valid values. By analyzing the ranges of both streams simultaneously, the encoder can often identify a single byte that satisfies the termination requirements for both. This "shared byte" approach effectively recycles termination overhead, saving approximately 8 bits per pair of streams.
Experimental Evaluation
The proposed techniques were evaluated using standard VVC test sequences (e.g., BQTerrace, Cactus, ParkScene) and latent variables generated by a state-of-the-art end-to-end neural video codec. To test the universality of the RTC algorithm, synthetic data following log-normal distributions were also utilized.
Mathematical Modeling of Overhead
The research establishes a mathematical model where the relative overhead is roughly proportional to the number of parallel threads ($N_s$) and inversely proportional to the total data size ($D$). This relationship allows system architects to determine the optimal level of parallelism for a specific target bit-rate without exceeding overhead budgets.
Key Results
The combination of bidirectional packing and RTC significantly reduces the cost of parallelism:
- Overhead Reduction: For a configuration with 64 parallel bitstreams, the relative overhead was reduced to a tiny fraction of the total bitstream size.
- Efficiency Thresholds: The relative overhead falls below 1% when the average bitstream chunk is only 95 bytes. When chunks reach 1,200 bytes, the overhead drops below 0.1%.
- Termination Savings: Bidirectional packing with bit reversal enabled a shared termination byte in 69% of tested cases. This reduced the average termination overhead from 4.56 bits to just 1.78 bits per stream.
Conclusion
By optimizing the physical organization of the bitstream, this research demonstrates that the sequential bottleneck of entropy coding can be overcome with minimal impact on compression performance. The proposed bidirectional packing and RTC methods provide a scalable pathway for integrating high-performance parallel decoding into emerging neural video standards. Future work may involve hardware-specific optimizations to further reduce the computational complexity of the RTC decoder and bit-reversal logic.
Summary updated