A method for encoding a video frame. The method including obtaining a current frame from a video stream, where the video stream includes a number of frames, determining a first base QP value for the current frame, and sending the first base QP value for the current frame to a decoder. The method also includes obtaining a first macroblock from the current frame, where the first macroblock includes a first image on the current frame, determining a first actual quantization parameter (QP) value for the first macroblock, and determining a first reference block for the first macroblock. The method also includes determining a first predicted QP value for the first macroblock using the first reference block, calculating a first ΔQP value for the first macroblock, and sending the first ΔQP value, a first prediction mode, and a first reference vector to the decoder.