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

Rename uv to chroma in largest_uv_tx_size()

parent aa5a03eb
......@@ -129,7 +129,7 @@ fn deblock_size<T: Pixel>(
let (txsize, prev_txsize) = if pli==0 {
(block.txsize, prev_block.txsize)
} else {
(block.bsize.largest_uv_tx_size(xdec, ydec), prev_block.bsize.largest_uv_tx_size(xdec, ydec))
(block.bsize.largest_chroma_tx_size(xdec, ydec), prev_block.bsize.largest_chroma_tx_size(xdec, ydec))
};
let (tx_n, prev_tx_n) = if vertical {
(cmp::max(txsize.width_mi(), 1), cmp::max(prev_txsize.width_mi(), 1))
......@@ -1030,7 +1030,7 @@ fn filter_v_edge<T: Pixel>(
pli: usize, bd: usize, xdec: usize, ydec: usize
) {
let block = &blocks[bo];
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_uv_tx_size(xdec, ydec) };
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_chroma_tx_size(xdec, ydec) };
let tx_edge = bo.x >> xdec & (txsize.width_mi() - 1) == 0;
if tx_edge {
let prev_block = deblock_left(blocks, bo, p);
......@@ -1068,7 +1068,7 @@ fn sse_v_edge<T: Pixel>(
tally: &mut [i64; MAX_LOOP_FILTER + 2], pli: usize, bd: usize, xdec: usize, ydec: usize
) {
let block = &blocks[bo];
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_uv_tx_size(xdec, ydec) };
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_chroma_tx_size(xdec, ydec) };
let tx_edge = bo.x >> xdec & (txsize.width_mi() - 1) == 0;
if tx_edge {
let prev_block = deblock_left(blocks, bo, rec_plane);
......@@ -1135,7 +1135,7 @@ fn filter_h_edge<T: Pixel>(
pli: usize, bd: usize, xdec: usize, ydec: usize
) {
let block = &blocks[bo];
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_uv_tx_size(xdec, ydec) };
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_chroma_tx_size(xdec, ydec) };
let tx_edge = bo.y >> ydec & (txsize.height_mi() - 1) == 0;
if tx_edge {
let prev_block = deblock_up(blocks, bo, p);
......@@ -1173,7 +1173,7 @@ fn sse_h_edge<T: Pixel>(
tally: &mut [i64; MAX_LOOP_FILTER + 2], pli: usize, bd: usize, xdec: usize, ydec: usize
) {
let block = &blocks[bo];
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_uv_tx_size(xdec, ydec) };
let txsize = if pli==0 { block.txsize } else { block.bsize.largest_chroma_tx_size(xdec, ydec) };
let tx_edge = bo.y >> ydec & (txsize.height_mi() - 1) == 0;
if tx_edge {
let prev_block = deblock_up(blocks, bo, rec_plane);
......
......@@ -1354,7 +1354,7 @@ pub fn write_tx_blocks<T: Pixel>(
if luma_only { return tx_dist };
let uv_tx_size = bsize.largest_uv_tx_size(xdec, ydec);
let uv_tx_size = bsize.largest_chroma_tx_size(xdec, ydec);
let mut bw_uv = (bw * tx_size.width_mi()) >> xdec;
let mut bh_uv = (bh * tx_size.height_mi()) >> ydec;
......@@ -1443,7 +1443,7 @@ pub fn write_tx_tree<T: Pixel>(
if luma_only { return tx_dist };
let uv_tx_size = bsize.largest_uv_tx_size(xdec, ydec);
let uv_tx_size = bsize.largest_chroma_tx_size(xdec, ydec);
let mut bw_uv = (bw * tx_size.width_mi()) >> xdec;
let mut bh_uv = (bh * tx_size.height_mi()) >> ydec;
......
......@@ -236,7 +236,7 @@ impl BlockSize {
}
}
pub fn largest_uv_tx_size(self, xdec: usize, ydec: usize) -> TxSize {
pub fn largest_chroma_tx_size(self, xdec: usize, ydec: usize) -> TxSize {
let plane_bsize = get_plane_block_size(self, xdec, ydec);
let uv_tx = max_txsize_rect_lookup[plane_bsize as usize];
......
......@@ -902,7 +902,7 @@ pub fn rdo_cfl_alpha<T: Pixel>(
ts: &mut TileStateMut<'_, T>, tile_bo: BlockOffset, bsize: BlockSize, bit_depth: usize
) -> Option<CFLParams> {
let PlaneConfig { xdec, ydec, .. } = ts.input.planes[1].cfg;
let uv_tx_size = bsize.largest_uv_tx_size(xdec, ydec);
let uv_tx_size = bsize.largest_chroma_tx_size(xdec, ydec);
let mut ac: AlignedArray<[i16; 32 * 32]> = UninitializedAlignedArray();
luma_ac(&mut ac.array, ts, tile_bo, bsize);
......
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