Video Encoding Mode Selection Using Huber Cost Function

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing H.264 video encoding standard does not effectively utilize direct mode and skip mode for bit rate reduction in B-pictures and P-pictures, leading to suboptimal encoding efficiency due to the limitations of rate-distortion optimization methods.

Innovation Solution

The proposed method enhances encoding mode selection by using the Huber cost function to remove outliers, varying the Lagrangian multiplier more slowly with respect to the quantization parameter, and clustering Lagrangian values to favor mode 0 encoding, thereby improving bit rate reduction without introducing visible distortion.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If rate-distortion optimization is used for encoding mode selection in H.264, then video quality is maintained, but bit rate reduction is insufficient

Engineering Contradiction:
Improvevideo qualityVSAvoidbit rate
Core Design Contradiction:
Manufacturing precisionVSQuantity of substance

Solution Approach 1:

The patent modifies the cost function parameters by introducing Huber loss instead of standard MSE, and adjusts the Lagrangian multiplier λ to vary more slowly with quantization parameter Q. This parameter change allows the encoder to achieve better bit rate reduction while maintaining acceptable video quality by changing the mathematical properties of the optimization criterion.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces dynamic clustering of Lagrangian values that adapts to different encoding conditions. The clustering mechanism dynamically adjusts the encoding mode selection based on the distribution of Lagrangian values across different modes, allowing the system to respond flexibly to varying video content and encoding parameters.

Inventive Principle:
Principle #15Dynamics

2Quantity of substance

If direct mode and skip mode are used more frequently, then bit rate is reduced, but encoding efficiency is suboptimal

Engineering Contradiction:
Improvebit rateVSAvoidencoding efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent implements a feedback mechanism through the clustering of Lagrangian values. The encoder analyzes the distribution of Lagrangian values across different encoding modes and uses this feedback to adjust mode selection, favoring direct and skip modes when appropriate while maintaining overall encoding efficiency through adaptive decision-making.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

By changing the cost function to Huber loss and modifying how the Lagrangian multiplier varies with QP, the patent alters the optimization landscape to make direct and skip modes more attractive without sacrificing encoding efficiency. This parameter change reshapes the trade-off between mode selection and computational complexity.

Inventive Principle:
Principle #35Parameter changes

3Quantity of substance

If outliers in distortion values are removed using Huber cost function, then bit rate reduction is improved, but PSNR decreases slightly

Engineering Contradiction:
Improvebit rateVSAvoidPSNR
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent changes the distortion measurement parameter from standard MSE to Huber loss function. This parameter change makes the cost function more robust to outliers by applying different weighting to large errors versus small errors, achieving bit rate reduction at the expense of slight PSNR degradation while improving overall encoding robustness.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent accepts a slight degradation in PSNR (a measurable but not visually critical parameter) to achieve significant bit rate reduction. This trade-off prioritizes the more valuable bit rate savings over the less critical PSNR metric, effectively discarding the pursuit of maximum PSNR optimization in favor of more practical bit rate efficiency.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS8781002B2Method and apparatus for improved coding mode selection
Publication Date: 2014.07.15 APPLE INC
  • US8781002B2 patent drawing
  • US8781002B2 patent drawing
  • US8781002B2 patent drawing

AI summary

Some embodiments provide a method for selecting an encoding mode from several encoding modes. For each encoding mode from several encoding modes, the method computes a Lagrangian value based on a distortion value that is identified by using a function that reduces the impact of outliers. The method selects a particular encoding mode based on the computed Lagrangian values. In some embodiments, the function is a Huber function. In some embodiments, the computed Lagrangian value is further based on a bit rate value and a Lagrangian multiplier.