For real time applications where a pre-analysis is not possible, some embodiments use a “pre-fixed decision” of QP offsets. In some embodiments, the decision is based on analysis of the data from the previous pictures that have already been coded. In some embodiments in which chroma QP offsets are explicitly signaled for every quantization group, the decision is made on the fly or dynamically for every actively coded block, based on its selected luma quantization parameter, its various spatial-temporal and color characteristics, as well as coding information from past blocks (i.e. what was the bitrate, bit relationships between luma and chroma, as well as the introduced distortion of other similar or neighboring blocks coded earlier). In some embodiments, the luma quantization parameters are jointly derived with the chroma QP offsets given the same type of bitrate and content characteristic relationships and conditions.