pub fn to_rect(
    &self, xdec: usize, ydec: usize, parent_width: usize, parent_height: usize,
  ) -> Rect {
    match *self {
      Area::Rect { x, y, width, height } => Rect { x, y, width, height },
      Area::StartingAt { x, y } => Rect {
        x,
        y,
        width: (parent_width as isize - x) as usize,
        height: (parent_height as isize - y) as usize,
      },
      Area::BlockRect { bo, width, height } => Rect {
        x: (bo.x >> xdec << BLOCK_TO_PLANE_SHIFT) as isize,
        y: (bo.y >> ydec << BLOCK_TO_PLANE_SHIFT) as isize,
        width,
        height,
      },
      Area::BlockStartingAt { bo } => {
        let x = (bo.x >> xdec << BLOCK_TO_PLANE_SHIFT) as isize;
        let y = (bo.y >> ydec << BLOCK_TO_PLANE_SHIFT) as isize;
        Rect {
          x,
          y,
          width: (parent_width as isize - x) as usize,
          height: (parent_height as isize - y) as usize,
        }
      }
    }
  }
/// Convert to a rectangle of pixels.
/// For a BlockRect and BlockStartingAt, for subsampled chroma planes,
/// the returned rect will be aligned to a 4x4 chroma block.
/// This is necessary for compute_distortion and rdo_cfl_alpha as
/// the subsampled chroma block covers multiple luma blocks.
Convert to a rectangle of pixels.
For a BlockRect and BlockStartingAt, for subsampled chroma planes,
the returned rect will be aligned to a 4x4 chroma block.
This is necessary for compute_distortion and rdo_cfl_alpha as
the subsampled chroma block covers multiple luma blocks.
Convert to a rectangle of pixels . For a BlockRect and BlockStartingAt for subsampled chroma planes the returned rect will be aligned to a 4x4 chroma block . This is necessary for compute_distortion and rdo_cfl_alpha as the subsampled chroma block covers multiple luma blocks .
pub fn to_rect(
    &self, xdec: usize, ydec: usize, parent_width: usize, parent_height: usize,
  ) -> Rect {
    match *self {
      Area::Rect { x, y, width, height } => Rect { x, y, width, height },
      Area::StartingAt { x, y } => Rect {
        x,
        y,
        width: (parent_width as isize - x) as usize,
        height: (parent_height as isize - y) as usize,
      },
      Area::BlockRect { bo, width, height } => Rect {
        x: (bo.x >> xdec << BLOCK_TO_PLANE_SHIFT) as isize,
        y: (bo.y >> ydec << BLOCK_TO_PLANE_SHIFT) as isize,
        width,
        height,
      },
      Area::BlockStartingAt { bo } => {
        let x = (bo.x >> xdec << BLOCK_TO_PLANE_SHIFT) as isize;
        let y = (bo.y >> ydec << BLOCK_TO_PLANE_SHIFT) as isize;
        Rect {
          x,
          y,
          width: (parent_width as isize - x) as usize,
          height: (parent_height as isize - y) as usize,
        }
      }
    }
  }
pub fn to_rect ( & self , xdec : usize , ydec : usize , parent_width : usize , parent_height : usize , ) -> Rect { match * self { Area :: Rect { x , y , width , height } => Rect { x , y , width , height } , Area :: StartingAt { x , y } => Rect { x , y , width : ( parent_width as isize - x ) as usize , height : ( parent_height as isize - y ) as usize , } , Area :: BlockRect { bo , width , height } => Rect { x : ( bo . x >> xdec << BLOCK_TO_PLANE_SHIFT ) as isize , y : ( bo . y >> ydec << BLOCK_TO_PLANE_SHIFT ) as isize , width , height , } , Area :: BlockStartingAt { bo } => { let x = ( bo . x >> xdec << BLOCK_TO_PLANE_SHIFT ) as isize ; let y = ( bo . y >> ydec << BLOCK_TO_PLANE_SHIFT ) as isize ; Rect { x , y , width : ( parent_width as isize - x ) as usize , height : ( parent_height as isize - y ) as usize , } } } }
Convert to a rectangle of pixels.
Convert to a rectangle of pixels .
&self
xdec
usize
ydec
usize
parent_width
usize
parent_height
usize
&self
xdec
usize
ydec
usize
parent_width
usize
parent_height
usize