摘要 |
The embodiments of the present invention relate to a method and an encoder for encoding a bitstream representing a sequence of pictures of a video stream. The pictures are divided into units which are further divided into blocks of a first size, wherein the blocks can be divided further into four quarter blocks of a second size. The encoder comprises a processor (810) and a memory (820), said memory (820) containing instructions executable by said processor (810) whereby said encoder is operative to: calculate a result of at least one comparison involving a scaled version of a first error measure associated with one of the quarter blocks, a scaled version of a second error measure associated with at least the remaining quarter blocks; and a threshold C. When at least one of said comparisons gives a Boolean result of a first kind, the encoder is operative to determine that the unit could be divided into quarter blocks of the second size to be used for encoding the picture. When all of said comparisons give a Boolean result of a second kind different from the first kind, wherein the Boolean result of the second kind is indicative of a difference being smaller than if the Boolean result would be of the first kind, wherein said difference is the scaled version of the second error measure subtracted from the scaled version of the first error measure, the encoder is operative to determine that the unit should be divided into blocks of the first size to be used for encoding the picture. |