Patent ID: 7295610

Claim:
An apparatus in a network for transcoding a digital stream of compressed frames, the apparatus comprising: a decoder adapted to decompress a frame having content information and non-content information included therein into the run-level domain, wherein the content-information carried by the frame is represented in run-level domain; a processor adapted to determine the number of bits to shave (N S ) from the frame; process the frame in the run-level domain to reduce the compressed bit size of the frame by approximately N S bits, wherein the content-information of the frame is changed from initial content information to final content information; determine whether to requantize at least a given portion of the frame based on a reduction threshold determined from the number of bits to shave from the given portion of the frame and an initial content size for the given portion; responsive to determining to requantize at least the given portion of the frame, requantize in the run-level domain at least the given portion of the frame; determine whether to threshold at least the given portion of the frame; responsive to determining to threshold at least the given portion of the frame, threshold in the run-level domain at least the given portion of the frame; determine the number of bits to shave from the given portion of the frame (N SHAVE ); determine for the given portion the initial content size (S INT ) of the portion of the frame, which is defined as the number of bits representing the given portion when the initial content information of the given portion of the frame is compressed; and determine a reduction threshold (R T ), wherein the reduction threshold is given as R T =N SHAVE /S INT , and wherein the determination whether to requantize is based at least in part upon the reduction threshold; and an encoder adapted to compress the frame.