Intra Frame Bit Rate Allocation via Pre-encoding Cost

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing bit rate allocation methods for intra frames in video encoding struggle when the time interval between I frames is large, leading to inaccurate bit rate allocation and degraded picture quality due to scene changes between previous and subsequent frames.

Innovation Solution

A method involving downsampling processing to obtain a current frame, pre-encoding it as both an intra and inter frame, calculating the corresponding encoding costs using the formula cost=D+λR, and allocating an intra frame bit rate based on the calculated costs and their ratio, which is positively correlated with the pre-encoding cost, to determine the target bit rate ratio and allocate the intra frame bit rate accurately.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If bit rate allocation is based on previous sequence I frame and P/B frame parameters, then encoding complexity is reduced, but bit rate allocation accuracy deteriorates when time interval between I frames is large

Engineering Contradiction:
Improveencoding complexityVSAvoidbit rate allocation accuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent performs preliminary pre-encoding of the current I frame using both intra-frame and inter-frame modes before actual encoding. This preliminary action calculates encoding costs in advance, allowing the system to determine the most appropriate bit rate allocation based on actual frame characteristics rather than relying on outdated parameters from previous sequences, thus resolving the contradiction between complexity and accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent dynamically changes the bit rate allocation parameters based on the calculated encoding costs of the current frame. By computing both intra-frame and inter-frame encoding costs and selecting the optimal mode, the system adapts bit rate allocation to current scene characteristics, improving accuracy without requiring complex multi-sequence analysis.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If pre-encoding is performed for both intra and inter frames to improve bit rate allocation accuracy, then encoding time increases

Engineering Contradiction:
Improvebit rate allocation accuracyVSAvoidencoding time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs pre-encoding only for the current I frame rather than all frames in the sequence. This partial action approach calculates encoding costs selectively where needed (at I frames with large time intervals) rather than continuously, improving bit rate allocation accuracy at critical points while minimizing the overall encoding time penalty.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If bit rate allocation does not consider current frame characteristics, then encoding speed is maintained, but picture quality deteriorates due to scene changes

Engineering Contradiction:
Improveencoding speedVSAvoidpicture quality
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system performs self-service by automatically analyzing current frame characteristics through pre-encoding and using this information to guide bit rate allocation decisions. The encoder adapts to scene changes autonomously by computing encoding costs and selecting optimal modes without external intervention, maintaining both speed and quality.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent implements feedback by using the calculated encoding costs from pre-encoding to adjust bit rate allocation for the current frame. This feedback loop ensures that bit rate allocation reflects actual frame characteristics and scene changes, improving picture quality while maintaining encoding efficiency through automated adaptation.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP3595305B1Method for allocating code rates for intra-frame coded frames, computer device and storage medium
Publication Date: 2022.12.28 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • EP3595305B1 patent drawingFigure 1~2
  • EP3595305B1 patent drawingFigure 3
  • EP3595305B1 patent drawingFigure 4~5

AI summary

This application provides an intra frame bit rate allocation method and apparatus, a computer device, and a storage medium. The method includes: pre-encoding a current frame of picture when the current frame of picture is an intra frame in a specified frame sequence, the pre-encoding including encoding the current frame of picture into an intra frame; calculating a corresponding pre-encoding cost; and allocating an intra frame bit rate according to the pre-encoding cost, the allocated intra frame bit rate being positively correlated with the pre-encoding cost. The pre-encoding cost is obtained by pre-encoding the current frame of picture, and the pre-encoding includes encoding the current frame of picture into the intra frame. If the pre-encoding cost is high, it indicates that a bit rate required by the intra frame for reaching same video quality is high. Therefore, the intra frame bit rate allocated according to the pre-encoding cost can reflect an actual scenario of a picture of the current frame of picture, and accuracy of the allocated intra frame bit rate is high, thereby improving picture quality of video encoding.