AOMediaCodec / av1-spec

AV1 Bitstream & Decoding Process Specification
https://aomedia.org/
Other
335 stars 69 forks source link

Editorial bug fix for allowed sub block size in 8x8 coded block #313

Open PDX-Runner opened 4 years ago

PDX-Runner commented 4 years ago

This issue was originally filed in bugs.chromium.org as issue 2572. https://bugs.chromium.org/p/aomedia/issues/detail?id=2572

In Av1, for 8x8 coded block (bsize = 3), PARTITION_HORZ_A/B, PARTITION_VERT_A/B are not allowed. Default_Partition_W8_Cdf[ PARTITION_CONTEXTS ][ 5 ] defined at page 420 indicates that only PARTITION_NONE/HORZ/VERT/SPLIT (0, 1, 2, 3) are allowed for 8x8 coded blocks.

At page 403 of the Av1 specification (section 9.3), Partition_Subsize table is defined to indicate the allowed sub block size for different partition types and coded block sizes.

However, in this table, when partition type is PARTITION_HORZ_A/B, PARTITION_VERT_A/B (entry 4, 5, 6, 7), the allowed sub block size for 8x8 block (index=3) is defined as BLOCK_8X4, and BLOCK_4X8, which indicates that PARTITION_HORZ_A/B, PARTITION_VERT_A/B are allowed for 8x8 coded blocks. They should be changed to BLOCK_INVALID instead.

Partition_Subsize table defined in the specification conflicts with the Default_Partition_W8_Cdf table. Corresponding table entries should be changed to BLOCK_INVALID to indicate that PARTITION_HORZ_A/B, PARTITION_VERT_A/B are not allowed for 8x8 coded blocks.

Corresponding table in the reference code should also be changed.

This fix is only editorial to avoid the conflict information. It will not change the behavior of the encoder and decoder design. Because of the Default_Partition_W8_Cdf, encoder will never encode other partition types into the bit stream for 8x8 blocks, and decoder will never read other partition types from the bitstream for 8x8 blocks.

corresponding reference code changes. https://aomedia-review.googlesource.com/c/aom/+/103121

fix in the reference code has been merged as: https://aomedia.googlesource.com/aom/+/e38251f92c319b80d5df2b0b3bd7ede9ffb914ce