Video Encoder Context Switching for Priority Frame Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional video encoders face challenges in efficiently processing multiple video streams with varying priorities, leading to delays in processing higher-priority frames, especially in scenarios where lower-priority frames are not completed before higher-priority frames become available for processing.

Innovation Solution

Implementing a context switching method in video encoders that allows higher-priority frames to interrupt and be processed while lower-priority frames are paused, with the ability to resume processing lower-priority frames from the exact location where they were stopped, enabling efficient handling of overlapping video streams.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If conventional block processing pipeline processes frames sequentially in scan order, then processing order is simple and predictable, but higher-priority frames experience delays when lower-priority frames are being processed

Engineering Contradiction:
Improveprocessing speed of higher-priority framesVSAvoidpipeline control complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent implements dynamic context switching within the block processing pipeline, allowing the processing order to change based on frame priority. The pipeline can pause processing of lower-priority frames and resume them later, creating a dynamic scheduling system that adapts to varying priority requirements without fundamentally changing the pipeline architecture

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent segments the frame processing into interruptible contexts that can be paused and resumed. By dividing the processing flow into saveable states (context information including current block position, processing stage, and pipeline state), the system can switch between different frame processing contexts, enabling priority-based scheduling while maintaining pipeline integrity

Inventive Principle:
Principle #1Segmentation

2Loss of time

If the pipeline processes all blocks of a frame before moving to the next frame, then frame processing is complete and atomic, but latency increases for high-priority frames that arrive during processing

Engineering Contradiction:
Improvelatency for high-priority framesVSAvoidprocessing integrity of low-priority frames
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The patent performs preliminary actions by saving the processing context (current block position, processing stage, pipeline state) before pausing to process higher-priority frames. This preparatory saving of state information enables the pipeline to reliably resume processing of lower-priority frames from the exact point where it was interrupted, maintaining processing integrity while reducing latency for high-priority frames

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The processing context information acts as an intermediary mechanism that bridges the interruption and resumption of frame processing. By storing and restoring this intermediate state, the system maintains the reliability of low-priority frame processing while enabling the time-sensitive switching needed for high-priority frame handling

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of time

If context switching is implemented to allow higher-priority frames to interrupt lower-priority frames, then latency for high-priority frames is reduced, but pipeline state management complexity increases

Engineering Contradiction:
Improveprocessing latencyVSAvoidcontext management complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent extracts the essential processing state information (current block position, processing stage, pipeline registers) into a separate context structure that can be saved and restored independently. This extraction of critical state information allows the pipeline to switch between contexts without managing the entire pipeline state, reducing the complexity of context management while enabling effective priority-based scheduling

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10313683B2Video encoder with context switching
Publication Date: 2019.06.04 APPLE INC
  • US10313683B2 patent drawing
  • US10313683B2 patent drawing
  • US10313683B2 patent drawing

AI summary

A context switching method for video encoders that enables higher priority video streams to interrupt lower priority video streams. A high priority frame may be received for processing while another frame is being processed. The pipeline may be signaled to perform a context stop for the current frame. The pipeline stops processing the current frame at an appropriate place, and propagates the stop through the stages of the pipeline and to a transcoder through DMA. The stopping location is recorded. The video encoder may then process the higher-priority frame. When done, a context restart is performed and the pipeline resumes processing the lower-priority frame beginning at the recorded location. The transcoder may process data for the interrupted frame while the higher-priority frame is being processed in the pipeline, and similarly the pipeline may begin processing the lower-priority frame after the context restart while the transcoder completes processing the higher-priority frame.