摘要 |
The present invention provides image coding and decoding methods and devices. The method comprises: separately dividing, according to a specified rule, coding mode parameters and parameter sets of coding blocks into multi-class coding mode parameters and parameter sets that correspond to the multi-class coding mode parameters; determining, according to a preset target bit rate, quantization parameters comprised in the multi-class coding mode parameters; determining a quantization parameter of a coding block according to the restoration quality required by the coding block; selecting a coding mode parameter to be used from the multi-class coding mode parameters according to the quantization parameter of the coding block, setting a parameter set corresponding to the selected coding mode parameter, and calculating a quantization parameter difference; and writing the coding mode parameter, the parameter set used by the coding block and the quantization parameter difference into a video bitstream. By means of the technical solution provided in the present invention, the problem in the related art of failing to adaptively code, with different restoration quality, continuous tone content and discontinuous tone content is solved, so as to adaptively determine the quantization parameter according to the actual situation. |