A decoding method, comprising: acquiring coded data of a current block; determining that a height and a width of the current block are both less than or equal to a preset threshold and the current block is a luma block; acquiring a transform pair index corresponding to the current block from the coded data, wherein in the case that the transform pair index comprises five index values, a transform pair mapped by the transform pair index is (DCT2, DCT2) in response to the index value of the transform pair index being a first index value; the transform pair mapped by the transform pair index is (DST7, DST7) in response to the index value of the transform pair index being a second index value; the transform pair mapped by the transform pair index is (DCT8, DST7) in response to the index value of the transform pair index being a third index value; the transform pair as mapped by the transform pair index is (DST7, DCT8) in response to the index value of the transform pair index being a fourth index value; and the transform pair mapped by the transform pair index is (DCT8, DCT8) in response to the index value of the transform pair index being a fifth index value; wherein a binarized codeword corresponding to the transform pair index occupies at most four bits and a first bit of the binarized codeword corresponding to the transform pair index is intended to indicate whether the transform pair mapped by the first index value is selected, wherein the transform pair (DCT2, DCT2) mapped by the first index value is selected in response to a value of the first bit being a first value, and the transform pair mapped by one of the remaining index values is selected in response to the value of the first bit being a second value; and wherein the first value is 0 and the second value is 1, the first bit of the binarized codeword corresponding to the transform pair index is decoded by context-based adaptive binary arithmetic coding based on one context model, other bits are decoded by context-based adaptive binary arithmetic coding (CABAC) in response to the binarized codeword corresponding to the transform pair index further comprising the other bits in addition to the first bit; and determining the transform pair corresponding to the current block based on the transform pair index, wherein the transform pair comprises a horizontal transform kernel and a vertical transform kernel. acquiring coded data of a current block; determining that a height and a width of the current block are both less than or equal to a preset threshold and the current block is a luma block; acquiring a transform pair index corresponding to the current block from the coded data, wherein in the case that the transform pair index comprises five index values, a transform pair mapped by the transform pair index is (DCT2, DCT2) in response to the index value of the transform pair index being a first index value; the transform pair mapped by the transform pair index is (DST7, DST7) in response to the index value of the transform pair index being a second index value; the transform pair mapped by the transform pair index is (DCT8, DST7) in response to the index value of the transform pair index being a third index value; the transform pair as mapped by the transform pair index is (DST7, DCT8) in response to the index value of the transform pair index being a fourth index value; and the transform pair mapped by the transform pair index is (DCT8, DCT8) in response to the index value of the transform pair index being a fifth index value; wherein a binarized codeword corresponding to the transform pair index occupies at most four bits and a first bit of the binarized codeword corresponding to the transform pair index is intended to indicate whether the transform pair mapped by the first index value is selected, wherein the transform pair (DCT2, DCT2) mapped by the first index value is selected in response to a value of the first bit being a first value, and the transform pair mapped by one of the remaining index values is selected in response to the value of the first bit being a second value; and wherein the first value is 0 and the second value is 1, the first bit of the binarized codeword corresponding to the transform pair index is decoded by context-based adaptive binary arithmetic coding based on one context model, other bits are decoded by context-based adaptive binary arithmetic coding (CABAC) in response to the binarized codeword corresponding to the transform pair index further comprising the other bits in addition to the first bit; and determining the transform pair corresponding to the current block based on the transform pair index, wherein the transform pair comprises a horizontal transform kernel and a vertical transform kernel.