Patent ID: 7072402

Claim:
A method for dynamically adjusting f-codes for a digital picture header of a coded picture, comprising the steps of: determining motion vectors for one motion estimation stage of a video encoder encoding said picture, said video encoder having at least two motion estimation stages; analyzing the motion vectors to determine a maximum motion vector range for said picture; determining a corresponding minimum f-code for said maximum range, wherein said maximum range comprises at least one of a maximum horizontal range or a maximum vertical range; and a corresponding minimum vertical f-code and a minimum horizontal f-code is determined for each of said maximum ranges, wherein the step of determining the corresponding minimum horizontal or the minimum vertical f-code further comprises: constructing a histogram representing a plurality of f-code bins for horizontal and vertical motion vectors for said picture, each f-code bin representing the occurrence of horizontal or vertical motion vectors within a respective f-code range for that bin; determining the minimum horizontal f-code based on the bin having a maximum respective f-code range for said horizontal motion vectors; and determining the minimum vertical f-code based on the bin having a maximum respective f-code range for said vertical motion vectors; and inserting said minimum f-code into the digital picture header.