Sub8×8 block processing
Methods and apparatuses for coding a current block are disclosed. An apparatus for decoding a current block of size 8×8 including a memory and a processor is also disclosed. The processor configured to execute instructions stored in the memory to generate, for the current block, a luma block and a chroma block, divide the luma block into luma sub-blocks, and determine a respective prediction mode for each luma sub-block. The chroma block is of size 4×4, each luma sub-block is of size 4×4, and the respective prediction mode is an intra-mode or an inter-mode. The instructions also include instructions to, on condition that each of the respective prediction modes is the inter-mode, divide the chroma block into 2×2 chroma sub-blocks and determine a respective motion vector for each chroma sub-block.
1. An apparatus for decoding a current block of size 8×8, comprising:
a memory; and
a processor configured to execute instructions stored in the memory to:
generate a luma block and a chroma block for the current block, the chroma block is of size 4×4;
divide the luma block into luma sub-blocks, each having a 4×4 size, wherein the luma sub-blocks are each a respective luma prediction block;
determine a respective prediction mode for each luma sub-block, the respective prediction mode is an intra-mode or an inter-mode;
only on a condition that each of the respective prediction modes of the luma sub-blocks is determined to be the inter-mode:
divide the chroma block into four 2×2 chroma sub-blocks, wherein each of the 2×2 chroma sub-blocks is a respective chroma prediction block; and
determine a respective motion vector for each chroma sub-block; and
on a condition that at least one of the respective prediction modes of the luma sub-blocks is determined to be the intra-mode,
decode the chroma block using a prediction mode of a last decoded luma sub-block of the luma sub-blocks,
wherein the last decoded luma sub-block is a last decoded sub-block, in a scan order, of the luma sub-blocks.
2. The apparatus of claim 1 , wherein the prediction mode of the last decoded luma sub-block is the inter-mode, the instructions further comprise instructions to:
determine a first motion vector for the chroma block using a second motion vector of the last decoded luma sub-block; and
decode the chroma block using the first motion vector.
3. The apparatus of claim 1 , wherein the prediction mode of the last decoded luma sub-block is a first intra-prediction mode, the instructions further comprise instructions to:
select a second intra-prediction mode for the chroma block; and
decode the chroma block using the second intra-prediction mode.
4. The apparatus of claim 3 , wherein the instructions further comprise instructions to:
select a context for entropy decoding the second intra-prediction mode, wherein the context is conditioned on the first intra-prediction mode.
5. A method of coding a current block, comprising:
generating a first block and a second block for the current block, the second block generated by subsampling the current block;
dividing the first block into first sub-blocks comprising a first sub-block and a second sub-block, wherein the current block is an 8×8 block and each first sub-block is a 4×4 luma prediction block, wherein the second block is a 4×4 chroma block;
determining a first prediction mode for the first sub-block and a second prediction mode for the second sub-block, the first prediction mode is an inter-mode or an intra-mode and the second prediction mode is the inter-mode or the intra-mode; and
coding the second block based on a determination that the first prediction mode or the second prediction mode is the intra-mode by steps comprising:
on a condition that the first prediction mode or the second prediction mode is determined to be the intra-mode, selecting the second prediction mode of the second sub-block as a prediction mode for the second block; and
on a condition that neither one of the first prediction mode nor the second prediction mode is the intra-mode, performing steps comprising:
dividing the second block into second sub-blocks; and
predicting at least some of the second sub-blocks using the inter-mode.
6. The method of claim 5 , further comprising:
processing the first sub-blocks based on a scan order, wherein the second sub-block is a last sub-block processed in the scan order.
7. The method of claim 6 , wherein the scan order is a raster scan order and the second sub-block is a bottom-right sub-block.
8. An apparatus for coding a current block, comprising:
a memory; and
a processor configured to execute instructions stored in the memory to:
generate a first block and a second block for the current block, the second block generated by subsampling the current block;
divide the first block into first sub-blocks comprising a first sub-block and a second sub-block;
determine a first prediction mode for the first sub-block and a second prediction mode for the second sub-block, the first prediction mode is an inter-mode or an intra-mode and the second prediction mode is the inter-mode or the intra-mode; and
code the second block based on a determination that the first prediction mode or the second prediction mode is the intra-mode by instructions including:
only on a condition that neither one of the first prediction mode nor the second prediction mode is determined to be the intra-mode:
divide the second block into second sub-blocks; and
predict at least some of the second sub-blocks using the inter-mode.
9. The apparatus of claim 8 , wherein to code the second block based on a determination that the first prediction mode or the second prediction mode is the intra-mode comprises to:
on a condition that at least one of the first prediction mode and the second prediction mode is the intra-mode, select the second prediction mode of the second sub-block as a prediction mode for the second block.
10. The apparatus of claim 9 , wherein the instructions further comprise instructions to:
process the first sub-blocks based on a scan order, wherein the second sub-block is a last sub-block processed in the scan order.
11. The apparatus of claim 10 , wherein the scan order is a raster scan order and the second sub-block is a bottom-right sub-block.
12. The apparatus of claim 8 , wherein the current block is an 8×8 block and each first block is a 4×4 luma block.
13. The apparatus of claim 12 , wherein the second block is a 4×4 chroma block and wherein each second sub-block is a 2×2 chroma block.