The invention discloses a coding and decoding method, a code
stream, a coder, a decoder and a storage medium. The method comprises the following steps: indicating whether a to-be-coded and decoded unit performs attribute prediction by using an inter-frame
nearest neighbor search algorithm based on a
spatial relationship through first
syntax element identification information; in use, further determining the
block size corresponding to the current LOD layer in the to-be-decoded unit; according to the
block size corresponding to the current LOD layer, determining a
reference block corresponding to the
current point in the
reference frame and a neighborhood block having
spatial correlation with the
reference block, performing inter-frame
nearest neighbor search, and determining N neighbor points of the
current point; and performing attribute prediction on the
current point according to the N neighbor points to determine an attribute reconstruction value. Therefore, inter-frame nearest neighbor searching is carried out on the attributes of the
point cloud based on the
spatial correlation of the attributes of the
point cloud, attribute prediction is carried out by using the searched N neighbor points, the correlation of the attributes of the
point cloud between adjacent frames can be further removed, and the encoding and decoding efficiency of the attributes of the point cloud is improved.