GOP Merging and Bit Allocation for Video Encoding Conformance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Supporting HRD conformance in GOP-parallel single-pass video encoders with multiple threads is challenging due to the difficulty in achieving exact bit allocation and preventing buffer overflow or underflow, especially in real-time video coding scenarios where preceding GOPs may still be under coding, making it hard to track buffer levels accurately.
Innovation Solution
The proposed solution involves scene-end short GOP merging, bit budget rounding, GOP and frame-level bit reservation, bit overshooting compensation, filler unit addition, and multi-thread coding information buffering and communication to ensure exact bit allocation and HRD conformance, including techniques like inter-thread waiting with semaphores and efficient buffering to manage coding information among threads.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If GOP-parallel single-pass encoding with multiple threads is used, then encoding speed and productivity are significantly improved, but HRD conformance becomes difficult to support due to inability to track buffer levels accurately
Solution Approach 1:
The patent performs preliminary actions by calculating and reserving bit budgets for GOPs before they are actually encoded. The system pre-computes the bit allocation for each GOP based on HRD parameters and buffer level predictions, so that when encoding occurs in parallel, the bit budget is already determined and can be enforced during the encoding process without requiring post-processing or sequential execution.
Solution Approach 2:
The patent implements feedback mechanisms where the encoding system continuously monitors actual bit usage during parallel encoding and compares it against the pre-calculated bit budgets. When deviations are detected, the system adjusts subsequent bit allocation dynamically. This feedback loop ensures HRD conformance is maintained even though encoding operations proceed in parallel without sequential dependency.
2Productivity
If multiple GOPs are encoded in parallel by multiple threads, then encoding throughput increases, but bit allocation precision deteriorates because preceding GOPs may still be under coding
Solution Approach 1:
The patent segments the video stream into discrete GOPs, each with its own independently calculated bit budget. This segmentation allows parallel encoding of multiple GOPs by different threads while maintaining precise bit allocation control for each segment. The bit budget for each GOP is calculated independently based on its specific characteristics and the HRD parameters, enabling precise control even during parallel processing.
Solution Approach 2:
The system performs preliminary bit budget calculation for each GOP before parallel encoding begins. By pre-determining the exact bit allocation for each GOP based on HRD conformance requirements, the system eliminates the need for sequential processing to achieve bit precision. The pre-calculated budgets are then enforced during parallel encoding, ensuring both throughput and precision.
3Reliability
If exact bit allocation is enforced for HRD conformance, then buffer overflow and underflow are prevented, but encoding flexibility and adaptability are reduced
Solution Approach 1:
The patent implements dynamic bit allocation within the constraints of pre-calculated bit budgets. While the overall GOP bit budget is determined in advance to ensure HRD conformance, the system dynamically adjusts bit allocation at the frame and macroblock levels during encoding based on actual video content characteristics. This dynamic adaptation allows the system to maintain buffer constraint satisfaction while optimizing encoding efficiency and adapting to varying video conditions.
Solution Approach 2:
The system changes parameters dynamically during the encoding process. The bit budget for each GOP is calculated based on HRD parameters and buffer level predictions, but within that budget, the actual bit allocation is adjusted by changing encoding parameters such as quantization levels, motion compensation strength, and transform coefficient thresholds. This allows the system to maintain exact bit allocation for HRD conformance while adapting encoding quality to actual video content.
Data Source
AI summary
A method of encoding video wherein an end of scene is detected, frames are partitioned and groups of pictures (GOPs) may be merged. In the method, an end of scene in a plurality of input frames is detected. The input frames are partitioned into GOPs. If the number of frames at the end of scene GOP is below a low frame threshold, then those frames are merged with a preceding GOP. The GOPs are buffered and multiple threads of GOPs are encoded in parallel from the buffer in a single pass.


