Patent ID: 9609315
Date: 2017-03-28
CPC Classifications: H04N

Claim:
1. A video encoding method, comprising: determining, in a video encoder, one or more macroblock prediction codes for a video frame to be encoded; quantizing residue data remaining from said determination based on a quantization parameter (QP); packing the quantized residue into a bitstream; and evaluating a difference between an actual file size that results from said packing and a target file size; selecting, in response to the actual file size being smaller than the target file size, a QP value decrement from a set of predetermined decrements based on a comparison of the difference to a set of first difference thresholds that are each associated with one of the predetermined decrements, and selecting, in response to the actual file size being larger than the target file size, a QP value increment from a set of predetermined increments based on a comparison of the difference to a set of second difference thresholds that are each associated with one of the predetermined increments, wherein: modifying the value of the QP by the selected QP value decrement or increment; and repeating said quantization, with the modified QP value, and said packing, without repeating said determination.