X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=common%2Fmacroblock.h;h=278031f6bf5cfbeeb93821c1970974b975f003bb;hb=a93e4c4a75d05e7bf379cb9a39caad57f615eeb0;hp=feb682e503cca3838fe0067738076dfc3f5165fe;hpb=323469e393af71dedd357763883232a293c3ab02;p=x264 diff --git a/common/macroblock.h b/common/macroblock.h index feb682e5..278031f6 100644 --- a/common/macroblock.h +++ b/common/macroblock.h @@ -272,12 +272,30 @@ static const uint8_t i_chroma_qp_table[QP_MAX+1+12*2] = enum cabac_ctx_block_cat_e { - DCT_LUMA_DC = 0, - DCT_LUMA_AC = 1, - DCT_LUMA_4x4 = 2, - DCT_CHROMA_DC = 3, - DCT_CHROMA_AC = 4, - DCT_LUMA_8x8 = 5, + DCT_LUMA_DC = 0, + DCT_LUMA_AC = 1, + DCT_LUMA_4x4 = 2, + DCT_CHROMA_DC = 3, + DCT_CHROMA_AC = 4, + DCT_LUMA_8x8 = 5, + DCT_CHROMAU_DC = 6, + DCT_CHROMAU_AC = 7, + DCT_CHROMAU_4x4 = 8, + DCT_CHROMAU_8x8 = 9, + DCT_CHROMAV_DC = 10, + DCT_CHROMAV_AC = 11, + DCT_CHROMAV_4x4 = 12, + DCT_CHROMAV_8x8 = 13, +}; + +static const uint8_t ctx_cat_plane[6][3] = +{ + { DCT_LUMA_DC, DCT_CHROMAU_DC, DCT_CHROMAV_DC}, + { DCT_LUMA_AC, DCT_CHROMAU_AC, DCT_CHROMAV_AC}, + {DCT_LUMA_4x4, DCT_CHROMAU_4x4, DCT_CHROMAV_4x4}, + {0}, + {0}, + {DCT_LUMA_8x8, DCT_CHROMAU_8x8, DCT_CHROMAV_8x8} }; /* Per-frame allocation: is allocated per-thread only in frame-threads mode. */