Unverified Commit 5c4888db authored by Yushin Cho's avatar Yushin Cho Committed by GitHub

Revise CFL for new 8x4 and 4x8 partition sizes (#788)

parent 6503e40c
......@@ -1952,7 +1952,8 @@ pub fn luma_ac(
let PlaneConfig { xdec, ydec, .. } = fs.input.planes[1].cfg;
let plane_bsize = get_plane_block_size(bsize, xdec, ydec);
let po = if bsize.is_sub8x8() {
bo.with_offset(-1, -1).plane_offset(&fs.input.planes[0].cfg)
let offset = bsize.sub8x8_offset();
bo.with_offset(offset.0, offset.1).plane_offset(&fs.input.planes[0].cfg)
} else {
bo.plane_offset(&fs.input.planes[0].cfg)
};
......
......@@ -208,6 +208,13 @@ impl BlockSize {
self.width_log2().min(self.height_log2()) < 3
}
pub fn sub8x8_offset(self) -> (isize, isize) {
let offset_x: isize = if self.width_log2() == 2 { -1 } else { 0 };
let offset_y: isize = if self.height_log2() == 2 { -1 } else { 0 };
(offset_x, offset_y)
}
#[cfg_attr(rustfmt, rustfmt_skip)]
const SUBSIZE_LOOKUP: [[BlockSize; BlockSize::BLOCK_SIZES_ALL];
EXT_PARTITION_TYPES] = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment