State Machine Decoding for H.264 Stuffing Byte Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveprocessing speedVSAvoiddecoding accuracy
Core Design Contradiction:
ProductivityVSReliability

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvestart code emulation preventionVSAvoidoverhead and cache misses
Core Design Contradiction:
ReliabilityVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #26Copying

3Productivity

If a state machine is used to simultaneously read and check for stuffing bytes, then processing efficiency is improved, but device complexity increases

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidstate machine complexity
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS7974307B2Methods and apparatus for data decoding/encoding and for searching for/inserting stuffing bytes
Publication Date: 2011.07.05 VESTEL ELEKTRONIK SANAYI & TICARET ANONIM SIRKETI
  • US7974307B2 patent drawing
  • US7974307B2 patent drawing
  • US7974307B2 patent drawing

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.