Skip to content
Brendan G Bohannon edited this page Nov 29, 2016 · 8 revisions

Rationale:

  • The normal (single-axis) blocks can't always give good results.
  • Partition blocks are hit and miss and expensive to encode.
  • 4:2:0 sub-sampled chroma is widely used, ex, in JPEG, and delivers overall acceptable results.
Wished for blocks in BC7:
  • 4:2:0 Chroma block
    • Uses GDbDr
    • Uses separate interpolation for Y/U/V channels.
  • Mode: 0000-0000 0100-001 (Simple 4:2:0 Chroma)
  • Mode: 0000-0000 0100-1AA (Simple 4:2:0 Chroma, Punch-through Alpha)
    • 8 bits Y0
    • 8 bits Y1
    • 7 bits U0
    • 7 bits U1
    • 7 bits V0
    • 7 bits V1
    • 47 bits Y (4x4x3)
    • 11 bits U (2x2x3)
    • 11 bits V (2x2x3)
    • AA: Punch Through Y Value, 00=1, 01=3, 10=4, 11=6
      • Possible: Punch-through U (otherwise, reserved)
        • Uses V as a 3-bit alpha value, with: U=(U0+U1)/2, V=(V0+V1)/2
      • Punch through V is reserved.
  • Mode: 0000-0000 0100-0001 (Each 2x2 sub-block is a vector in color-space keyed to Y)
    • Resv 5 bits
    • 8 bits Y0
    • 8 bits Y1
    • 8 bits U0
    • 8 bits U1
    • 8 bits V0
    • 8 bits V1
    • 31 bits Y (4x4x2)
    • 7 bits Um (2x2x2), U at Y0
    • 7 bits Un (2x2x2), U at Y1
    • 7 bits Vm (2x2x2), V at Y0
    • 7 bits Vn (2x2x2), V at Y1
YUV to RGB: G=Y, B=G+(U-128), R=G+(V-128)

Alternative (technically better): Use RCT or YCbCr, but more expensive to decode than GDbDr.

Clone this wiki locally