This disclosure relates to an encoding method, a decoding method, and a method for generating a
bitstream. The encoding method includes: when the first block is a luma block, performing a
decision process to determine the
boundary strength of the boundary between the first block and the second block, the
decision process including determining whether a first condition is met, the first condition being: (i) a first encoding mode of the first block is different from a second encoding mode of the second block and (ii) the first encoding mode and the second encoding mode are one of an intra-block copy mode, a palette mode, and an inter-frame mode; if the first condition is met, the
boundary strength is determined to be a first value indicating that deblocking filtering should be performed; if the first condition is not met, the
boundary strength is determined to be a second value indicating that deblocking filtering should not be performed; and when the first block is a chroma block, the determination of whether the first condition is met is not performed.