Encoder, decoder, encoding method, and decoding method
An image encoder/decoder includes circuitry and a memory coupled to the circuitry. When a geometry of a block of a picture satisfies a first condition, the circuitry splits the block of the picture into sub blocks having a first set of geometries. When the geometry of the block does not satisfy the first condition, the circuitry splits the block of the picture into sub blocks having a second set of geometries, the second set of geometries being different from the first set of geometries. The circuitry encodes/decodes the sub blocks of the block.
1. An image encoder, comprising:
circuitry; and
a memory coupled to the circuitry,
wherein the circuitry, in operation:
in response to a determined number of sub blocks of a block of a picture being set to four, splits the block into four sub blocks, wherein,
in response to a size of the block of the picture satisfying a block-size condition, splits the block into four sub blocks along a single direction, wherein the splitting includes,
in response to the width of the block being larger than the height of the block and the size of the block being 32×8, splitting the block along a vertical direction into four 8×8 sub blocks; and
in response to the height of the block being larger than the width of the block and the size of the block being 8×32, splitting the block along a horizontal direction into four 8×8 sub blocks; and
in response to the size of the block not satisfying the block-size condition, splits the block into four sub blocks along the vertical and horizontal directions, wherein the splitting includes splitting the block along the vertical and horizontal directions into four 16×16 sub blocks in response to the width of the block being equal to the height of the block and the size of the block being 32×32; and
encodes the sub blocks of the block.
2. An image encoder comprising:
a splitter which, in operation, receives and splits an original picture into blocks;
a first adder which, in operation, receives the blocks from the splitter and predictions from a prediction controller, and subtracts each prediction from its corresponding block to output a residual;
a transformer which, in operation, performs a transform on the residuals outputted from the adder to output transform coefficients;
a quantizer which, in operation, quantizes the transform coefficients to generate quantized transform coefficients;
an entropy encoder which, in operation, encodes the quantized transform coefficients to generate a bitstream;
an inverse quantizer and transformer which, in operation, inverse quantizes the quantized transform coefficients to obtain the transform coefficients and inverse transforms the transform coefficients to obtain the residuals;
a second adder which, in operation, adds the residuals outputted from the inverse quantizer and transformer and the predictions outputted from the prediction controller to reconstruct the blocks; and
the prediction controller coupled to an inter predictor, an intra predictor, and a memory, wherein the inter predictor, in operation, generates a prediction of a current block based on a reference block in an encoded reference picture and the intra predictor, in operation, generates a prediction of a current block based on an encoded reference block in a current picture, wherein the prediction controller, in operation:
in response to a determined number of sub blocks of the current block being set to four, splits the current block into four sub blocks, wherein,
in response to a size of the current block satisfying a block-size condition, splits the current block into four sub blocks along a single direction, wherein the splitting includes,
in response to the width of the current block being larger than the height of the current block and the size of the current block being 32×8, splitting the current block along a vertical direction into four 8×8 sub blocks; and
in response to the height of the current block being larger than the width of the current block and the size of the current block being 8×32, splitting the current block along a horizontal direction into four 8×8 sub blocks; and
in response to the size of the current block not satisfying the block-size condition, splits the current block into four sub blocks along the vertical and horizontal directions, wherein the splitting includes splitting the current block along the vertical and horizontal directions into four 16×16 sub blocks in response to the width of the current block being equal to the height of the current block and the size of the current block being 32×32; and
encodes the sub blocks of the current block.
3. An image encoding method, comprising:
in response to a determined number of sub blocks of a block of a picture being set to four, splits the block into four sub blocks, wherein,
in response to a size of the block satisfying a block-size condition, splits the block into four sub blocks along a single direction, wherein the splitting includes,
in response to the width of the block being larger than the height of the block and the size of the block being 32×8, splitting the block along a vertical direction into four 8×8 sub blocks; and
in response to the height of the block being larger than the width of the block and the size of the block being 8×32, splitting the block along a horizontal direction into four 8×8 sub blocks; and
in response to the size of the block not satisfying the block-size condition, splits the block into four sub blocks along the vertical and horizontal directions, wherein the splitting includes splitting the block along the vertical and horizontal directions into four 16×16 sub blocks in response to the width of the block being equal to the height of the block and the size of the block being 32×32; and
encoding the sub blocks of the block.
4. An image decoder, comprising:
circuitry; and
a memory coupled to the circuitry,
wherein the circuitry, in operation:
in response to a determined number of sub blocks of a block of a picture being set to four, splits the block into four sub blocks, wherein,
in response to a size of the block satisfying a block-size condition, splits the block into four sub blocks along a single direction, wherein the splitting includes,
in response to the width of the block being larger than the height of the block and the size of the block being 32×8, splitting the block along a vertical direction into four 8×8 sub blocks; and
in response to the height of the block being larger than the width of the block and the size of the block being 8×32, splitting the block along a horizontal direction into four 8×8 sub blocks; and
in response to the size of the block not satisfying the block-size condition, splits the block into four sub blocks along the vertical and horizontal directions, wherein the splitting includes splitting the block along the vertical and horizontal directions into four 16×16 sub blocks in response to the width of the block being equal to the height of the block and the size of the block being 32×32; and
decodes the sub blocks of the block.
5. An image decoder, comprising:
an entropy decoder which, in operation, receives and decodes an encoded bitstream to obtain quantized transform coefficients;
an inverse quantizer and transformer which, in operation, inverse quantizes the quantized transform coefficients to obtain transform coefficients and inverse transforms the transform coefficients to obtain residuals;
an adder which, in operation, adds the residuals outputted from the inverse quantizer and transformer and predictions outputted from a prediction controller to reconstruct blocks; and
the prediction controller coupled to an inter predictor, an intra predictor, and a memory, wherein the inter predictor, in operation, generates a prediction of a current block based on a reference block in an encoded reference picture and the intra predictor, in operation, generates a prediction of a current block based on an encoded reference block in a current picture, wherein the prediction controller, in operation:
in response to a determined number of sub blocks of the current block being set to four, splits the current block into four sub blocks, wherein,
in response to a size of the current block satisfying a block-size condition, splits the current block into four sub blocks along a single direction, wherein the splitting includes,
in response to the width of the current block being larger than the height of the current block and the size of the current block being 32×8, splitting the current block along a vertical direction into four 8×8 sub blocks; and
in response to the height of the current block being larger than the width of the current block and the size of the current block being 8×32, splitting the current block along a horizontal direction into four 8×8 sub blocks; and
in response to the size of the current block not satisfying the block-size condition, splits the current block into four sub blocks along the vertical and horizontal directions, wherein the splitting includes splitting the current block along the vertical and horizontal directions into four 16×16 sub blocks in response to the width of the current block being equal to the height of the current block and the size of the current block being 32×32; and
decodes the sub blocks of the current block.
6. An image decoding method, comprising:
in response to a determined number of sub blocks of a block being set to four, splits the block into four sub blocks, wherein,
in response to a size of the block satisfying a block-size condition, splits the block into four sub blocks along a single direction, wherein the splitting includes,
in response to the width of the block being larger than the height of the block and the size of the block being 32×8, splitting the block along a vertical direction into four 8×8 sub blocks; and
in response to the height of the block being larger than the width of the block and the size of the block being 8×32, splitting the block along a horizontal direction into four 8×8 sub blocks; and
in response to the size of the block not satisfying the block-size condition, splits the block into four sub blocks along the vertical and horizontal directions, wherein the splitting includes splitting the block along the vertical and horizontal directions into four 16×16 sub blocks in response to the width of the block being equal to the height of the block and the size of the block being 32×32; and
decoding the sub blocks of the block.
7. The image decoding method of claim 6 wherein the block-size condition is satisfied when:
the width of the block is four times the height of the block; or
the height of the block is four times the width of the block.