The invention discloses a coding method and apparatus for video images, and belongs to the field of video coding and decoding
processing. The method comprises extracting brightness components from the video images, determining
distortion magnitude, according to the
distortion magnitude, obtaining a first threshold and a second threshold which are corresponding to the video images, according to the first threshold and the second threshold, determining
control parameters, and obtaining coded video images by coding the video images based on the
control parameters. Through utilization of a just-noticeable-difference (JND), the problem of weak
estimation of a JND threshold of a disordered area in a conventional JND model is overcome, space redundancy in a
video sequence is effectively eliminated, the coding amount is reduced, and the coding efficiency is improved. At the same time, a JND in an ordered area is more accurately estimated by use of an obtained brightness
mask layer and a space
mask layer, the
perception quality of the ordered area in a video can be better improved, and the overall watching feel of the video is improved.