State Machine Decoding for H.264 Stuffing Byte Handling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data decoding methods face inefficiencies in preventing start code emulation and locating synchronization markers in digital data streams, particularly in video/audio data, due to errors and complex processing requirements, which can lead to incorrect decoding and increased overhead.
Innovation Solution
A method and apparatus that utilize a state machine to simultaneously read and check for stuffing bytes during the decoding process, reducing the need for extensive zero counting and pre-searching, thereby optimizing processing speed and reducing overhead by discarding or inserting stuffing bytes as necessary to prevent start code emulation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional decoding methods are used to prevent start code emulation, then decoding accuracy is maintained, but processing speed decreases due to extensive zero counting and pre-searching
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing the positions of all stuffing bytes in a lookup table before decoding begins. This allows the decoder to directly access stuffing byte positions without performing extensive zero counting or pre-searching during the actual decoding process, thereby resolving the contradiction between processing speed and decoding accuracy.
2Reliability
If extensive zero counting and pre-searching are performed to locate stuffing bytes, then start code emulation is prevented, but overhead and cache misses increase
Solution Approach 1:
The patent performs the time-consuming zero counting and pre-searching operations in advance, storing the results in a lookup table. This preliminary action eliminates the need for repeated searches during decoding, reducing overhead and cache misses while maintaining reliable start code emulation prevention.
Solution Approach 2:
The patent creates a copy of the bitstream data in a lookup table, storing pre-analyzed information about stuffing byte positions. This copied data structure allows rapid access during decoding without requiring the original bitstream to be re-parsed, thereby reducing overhead and cache misses while maintaining emulation prevention.
3Productivity
If a state machine is used to simultaneously read and check for stuffing bytes, then processing efficiency is improved, but device complexity increases
Solution Approach 1:
The patent implements a multi-functional state machine that simultaneously performs multiple tasks: reading bits from the stream, checking for stuffing bytes, updating position tracking, and managing lookup table access. This universal state machine consolidates what would otherwise require separate processing components, improving efficiency while keeping the added complexity manageable through functional integration.
Data Source
AI summary
In a method of decoding data that contains payload data, start codes and stuffing data that prevents emulation of start codes within the data, and correspondingly in a method of encoding data that contains payload data and start codes, data is read or written. Substantially simultaneously with reading or writing the data, the data is checked for the presence of stuffing data which are to be discarded or the need to insert stuffing data as the case may be. In preferred embodiments, one or more state machines are used to track the need to discard/insert stuffing data.


