1. A method of processing a video frame, comprising: determining quantization parameters corresponding to Lagrangian multiplier values offline by computing a Lagrangian cost function including a Lagrange multiplier; storing the quantization parameters corresponding to the Lagrangian multiplier values offline; and encoding the uncompressed video frame by using the stored quantization parameters, the encoding comprising: receiving an uncompressed video frame after storing the quantization parameters; determining block model parameters of the uncompressed video frame responsive to receiving the uncompressed video frame, the block model parameters representing properties to be calculated or approximated from one or more macroblocks in the uncompressed video frame; selecting a Lagrange multiplier value corresponding to the uncompressed video frame based on the determined block model parameters; generating a plurality of transform coefficients of the uncompressed video frame; and selecting quantization parameters for each of the plurality of blocks based on the selected Lagrange multiplier value.