An encoder comprising: processing circuitry; and a memory coupled to the processing circuitry, wherein, using the memory, the processing circuitry is configured to: encode a picture in units of blocks; determine a filter characteristic, wherein reference values are determined for pixels (p,q) in a first block (P) and a second block (Q), the pixels (p,q) in the first block (P) and the second block (Q) being arranged along a line across a boundary between the first block (P) and the second block (Q); and perform deblocking filtering using the filter characteristic determined to change values of the pixels (p,q) in the first block (P) and the second block (Q) to filter the boundary, comprising clipping such that change amounts of respective values of the pixels (p, q) due to the deblocking filtering do not exceed respective reference values, wherein the pixels (p,q) include luminance pixels and chrominance pixels, and the deblocking filtering is performed on the luminance pixels and/or the chrominance pixels, and in the deblocking filtering, at least one of the reference values for the pixels (p) in the first block (P) is different from a reference value for the pixel (q) in the second block (Q) at a same distance to the boundary, and the reference values are determined based on block sizes of the blocks. processing circuitry; and a memory coupled to the processing circuitry, wherein, using the memory, the processing circuitry is configured to: encode a picture in units of blocks; determine a filter characteristic, wherein reference values are determined for pixels (p,q) in a first block (P) and a second block (Q), the pixels (p,q) in the first block (P) and the second block (Q) being arranged along a line across a boundary between the first block (P) and the second block (Q); and perform deblocking filtering using the filter characteristic determined to change values of the pixels (p,q) in the first block (P) and the second block (Q) to filter the boundary, comprising clipping such that change amounts of respective values of the pixels (p, q) due to the deblocking filtering do not exceed respective reference values, wherein the pixels (p,q) include luminance pixels and chrominance pixels, and the deblocking filtering is performed on the luminance pixels and/or the chrominance pixels, and in the deblocking filtering, at least one of the reference values for the pixels (p) in the first block (P) is different from a reference value for the pixel (q) in the second block (Q) at a same distance to the boundary, and the reference values are determined based on block sizes of the blocks. encode a picture in units of blocks; determine a filter characteristic, wherein reference values are determined for pixels (p,q) in a first block (P) and a second block (Q), the pixels (p,q) in the first block (P) and the second block (Q) being arranged along a line across a boundary between the first block (P) and the second block (Q); and perform deblocking filtering using the filter characteristic determined to change values of the pixels (p,q) in the first block (P) and the second block (Q) to filter the boundary, comprising clipping such that change amounts of respective values of the pixels (p, q) due to the deblocking filtering do not exceed respective reference values, wherein the pixels (p,q) include luminance pixels and chrominance pixels, and the deblocking filtering is performed on the luminance pixels and/or the chrominance pixels, and in the deblocking filtering, at least one of the reference values for the pixels (p) in the first block (P) is different from a reference value for the pixel (q) in the second block (Q) at a same distance to the boundary, and the reference values are determined based on block sizes of the blocks. <EOS>