Patent ID: 8406297

Claim:
A method for encoding an image sequence, wherein the image sequence comprises inter-frames and intra-frames, the method comprising: grouping the inter-frames and the intra-frames into at least one group of pictures (GOP); performing a frame-level bit-allocation for the inter-frames and intra-frames in the GOP; for each frame of the inter-frames and the intra-frames in the GOP, partitioning the frame into a plurality of macroblocks, identifying macroblocks in the plurality of macroblocks as having regions of interest (ROI) by applying a ROI identification algorithm to the frame, and marking a macroblock as having ROI in response to determining that the macroblock contains an identified ROI or is part of the identified ROI; and performing a macroblock level bit-allocation for the frame based on macroblocks identified as having ROI by, for each macroblock in the frame, setting a quantization parameter for the macroblock to a first value in response to determining that the macroblock has been identified as having ROI, and setting the quantization parameter for the macroblock to a second value in response to determining that the macroblock has not been identified as having ROI, wherein the first value is smaller than the second value; encoding the image sequence based on the bit-allocations, thereby producing an encoded image sequence; and outputting the encoded image sequence.