Patent ID: 8018997

Claim:
A video encoding method, a video sequence comprising N subsequences which each comprises a plurality of frames, said method functioning encoding the jth frame in the ith subsequence, frames previous to the jth frame in the ith subsequence having been encoded, N being a natural number, i being an integer index ranging from 1 to N, j being an integer index ranging from 2 to the number of the frames of the ith subsequence, said method comprising the steps of: (a) based on the encoded frames, generating an initial quantization scale, wherein the initial quantization scale is determined by a predicted quantization scale and a differential quantization scale, and, wherein the predicted quantization scale Q P is determined by the following equation: Q P = MIN ⁡ ( X A , X L ) B + 1 , where X A is a first video complexity defining the video complexity of all frames previous to the jth frame of the ith subsequence, and X L is a second video complexity defining the video complexity of the frames between the first and the (j−1)th frame in the ith subsequence, and B is a predetermined target bit rate; (b) encoding the jth frame in the ith subsequence in a first encoding mode in accordance with the initial quantization scale; (c) defining a detection area in the current jth frame, and determining whether the jth frame in the ith subsequence is a scene change relative to the (j−1)th frame in the ith subsequence within the detection area which is smaller than the frame; and (d) when YES in step (c), based on the initial quantization scale, generating an adjusted quantization scale, and re-encoding the jth frame in the ith subsequence in a second encoding mode in accordance with the adjusted quantization scale.