Patent ID: 7190723

Claim:
A method of transcoding a digital stream of compressed frames, the method comprising the steps of: (a) receiving a compressed video frame having content information and non-content information included therein; (b) determining the total compressed size of the frame (N T ); (c) determining from at least the total compressed size of the frame the total number of bits (N S ) to shave from compressed frame; (d) determining a plurality of statistics about a given portion of the frame; (e) determining whether to requantize the given portion based at least in part upon at least one of the statistics about the given portion; (f) responsive to determining to requantize the given portion, requantizing the levels of the given portion; (g) determining whether to threshold the given portion based at least in part on the at least one of the statistics about the given portion; (h) responsive to determining to threshold the given portion, thresholding the levels of the given portion; (i) transmitting the given portion; and prior to step (h), determining a target number (N THRESH ) of levels to set to zero by thresholding; determining the number of levels (CNT) beneath a threshold function having a predetermined width and height profile; responsive to the number of levels (CNT) beneath the threshold function being within a predetermined range of the target number (N THRESH ), setting the magnitude of the levels beneath the threshold function to zero; and responsive to the number of levels (CNT) beneath the threshold function being outside of the predetermined range of the target number (N THRESH ), adjusting the threshold function.