| |
| |
| #### 11.4 Chroma Modes {#h-11-04} |
| |
| |
| After the Y mode (and optional subblock mode) specification comes the |
| chroma mode. The chroma modes are a subset of the Y modes and are |
| coded using the `uv_mode_tree`, as described in Section 8 and repeated |
| here for convenience: |
| |
| |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| const tree_index uv_mode_tree [2 * (num_uv_modes - 1)] = |
| { |
| -DC_PRED, 2, /* root: DC_PRED = "0", "1" subtree */ |
| -V_PRED, 4, /* "1" subtree: V_PRED = "10", |
| "11" subtree */ |
| -H_PRED, -TM_PRED /* "11" subtree: H_PRED = "110", |
| TM_PRED = "111" */ |
| }; |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| {:lang="c"} |
| |
| |
| As for the Y modes (in a key frame), the chroma modes are coded using |
| a fixed, contextless probability table: |
| |
| |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| const Prob kf_uv_mode_prob [num_uv_modes - 1] = { 142, 114, 183}; |
| uv_mode = (intra_mbmode) treed_read( d, uv_mode_tree, |
| kf_uv_mode_prob); |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| {:lang="c"} |
| |
| |
| This completes the description of macroblock prediction coding for |
| key frames. As will be discussed in Section 16, the coding of intra |
| modes within interframes is similar, but not identical, to that |
| described here (and in the reference code) for prediction modes and, |
| indeed, for all tree-coded data in VP8. |
| |