In 1-pass rate control mode, NVENC estimates the required QP for the macroblock and immediately encodes the macroblock. In 2-pass rate control modes, NVENC estimates the complexity of the frame to be encoded and determines bit distribution across the frame in the first pass. In the second pass, NVENC actually encodes macroblocks in the frame using the distribution determined in the first pass. As a result, quality of the encoded bitstream is generally better with 2-pass encoding, at the cost of some performance.