An image decoding method comprising: obtaining a plurality of largest coding units by splitting a current image based on a size information of a largest coding unit; obtaining one or more coding units comprising a current coding unit, by hierarchically splitting at least one largest coding unit among the plurality of largest coding units, based on a split shape mode; when a prediction mode of the current coding unit is an inter mode, obtaining, from a bitstream, a first coded block flag indicating whether the current coding unit comprises one or more non-zero transform coefficients; when the first coded block flag indicates that the current coding unit comprises one or more non-zero transform coefficients, identifying whether at least one of a height and a width of the current coding unit is greater than a predetermined size; based on whether the at least one of the height and the width of the current coding unit is greater than the predetermined size, obtaining at least one transform unit included in the current coding unit; when the at least one of the height and the width of the current coding unit is greater than the predetermined size, obtaining, from the bitstream, a second coded block flag indicating whether a block of a luma component included in the at least one transform unit comprises one or more non-zero transform coefficients; when the height and the width of the current coding unit is less than or equal to the predetermined size, identifying that the block of the luma component included in the at least one transform unit comprises one or more non-zero transform coefficients; obtaining a residual signal of the block of the luma component included in the at least one transform unit, based on the second coded block flag; reconstructing the current coding unit based on the residual signal; and reconstructing the current image comprising the current coding unit, based on the reconstructed current coding unit, wherein the split shape mode indicates at least one of whether to perform splitting, a split direction, or a split type, and wherein the split type corresponds to one of binary splitting, tri splitting, and quad splitting. obtaining a plurality of largest coding units by splitting a current image based on a size information of a largest coding unit; obtaining one or more coding units comprising a current coding unit, by hierarchically splitting at least one largest coding unit among the plurality of largest coding units, based on a split shape mode; when a prediction mode of the current coding unit is an inter mode, obtaining, from a bitstream, a first coded block flag indicating whether the current coding unit comprises one or more non-zero transform coefficients; when the first coded block flag indicates that the current coding unit comprises one or more non-zero transform coefficients, identifying whether at least one of a height and a width of the current coding unit is greater than a predetermined size; based on whether the at least one of the height and the width of the current coding unit is greater than the predetermined size, obtaining at least one transform unit included in the current coding unit; when the at least one of the height and the width of the current coding unit is greater than the predetermined size, obtaining, from the bitstream, a second coded block flag indicating whether a block of a luma component included in the at least one transform unit comprises one or more non-zero transform coefficients; when the height and the width of the current coding unit is less than or equal to the predetermined size, identifying that the block of the luma component included in the at least one transform unit comprises one or more non-zero transform coefficients; obtaining a residual signal of the block of the luma component included in the at least one transform unit, based on the second coded block flag; reconstructing the current coding unit based on the residual signal; and reconstructing the current image comprising the current coding unit, based on the reconstructed current coding unit, wherein the split shape mode indicates at least one of whether to perform splitting, a split direction, or a split type, and wherein the split type corresponds to one of binary splitting, tri splitting, and quad splitting.