Commit c84872d7 authored by Raphaël Zumer's avatar Raphaël Zumer
Browse files

Fix vertical partitions being coded for 4:2:2 content

parent bbb8e249
......@@ -1780,7 +1780,13 @@ fn encode_partition_topdown<T: Pixel, W: Writer>(
if split_horz { partition_types.push(PartitionType::PARTITION_HORZ); };
if split_vert { partition_types.push(PartitionType::PARTITION_VERT); };
} else if bsize.width_log2() == fi.min_partition_size.width_log2() + 1 {
partition_types.extend_from_slice(RAV1E_PARTITION_TYPES);
partition_types.push(PartitionType::PARTITION_NONE);
partition_types.push(PartitionType::PARTITION_SPLIT);
partition_types.push(PartitionType::PARTITION_HORZ);
if fi.sequence.chroma_sampling != ChromaSampling::Cs422 {
partition_types.push(PartitionType::PARTITION_VERT);
}
} else {
partition_types.push(PartitionType::PARTITION_NONE);
partition_types.push(PartitionType::PARTITION_SPLIT);
......
......@@ -280,6 +280,10 @@ impl BlockSize {
pub fn largest_chroma_tx_size(self, xdec: usize, ydec: usize) -> TxSize {
let plane_bsize = self.subsampled_size(xdec, ydec);
if plane_bsize == BLOCK_INVALID {
panic!("invalid block size for this subsampling mode");
}
let uv_tx = max_txsize_rect_lookup[plane_bsize as usize];
av1_get_coded_tx_size(uv_tx)
......
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