Skip to content

Commit

Permalink
Address nits remaining from PR 1594
Browse files Browse the repository at this point in the history
  • Loading branch information
xiphmont authored and lu-zero committed Aug 30, 2019
1 parent fa7152d commit f8008ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/test_encode_decode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ macro_rules! test_chroma_sampling {

test_chroma_sampling! {(420, ChromaSampling::Cs420), (422, ChromaSampling::Cs422), (444, ChromaSampling::Cs444)}

// FIXME: #1601
//#[cfg_attr(feature = "decode_test", interpolate_test(aom, "aom"))]
//#[cfg_attr(feature = "decode_test_dav1d", interpolate_test(dav1d, "dav1d"))]
fn tile_encoding_with_stretched_restoration_units(decoder: &str) {
Expand Down
13 changes: 8 additions & 5 deletions src/tiling/tile_restoration_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,20 @@ macro_rules! tile_restoration_plane_common {
}

pub fn restoration_unit_countable(&self, sbo: TileSuperBlockOffset) -> usize {
if let Some((x,y)) = self.restoration_unit_index(sbo) {
y*self.units.cols+x
if let Some((x, y)) = self.restoration_unit_index(sbo) {
y * self.units.cols + x
} else {
unreachable!()
}
}

// Is this the last sb (in scan order) in the restoration unit?
// Stretch makes this a bit annoying to compute.
pub fn restoration_unit_last_sb<T: Pixel>(&self, fi: &FrameInvariants<T>,
sbo: TileSuperBlockOffset) -> bool {
pub fn restoration_unit_last_sb<T: Pixel>(
&self,
fi: &FrameInvariants<T>,
sbo: TileSuperBlockOffset,
) -> bool {
// there is 1 restoration unit for (1 << sb_shift) super-blocks
let mask = (1 << self.rp_cfg.sb_shift) - 1;
// is this a stretch block?
Expand Down Expand Up @@ -335,7 +338,7 @@ macro_rules! tile_restoration_state_common {
let units_x = sbo.0.x >> sb_shift;
let units_y = sbo.0.y >> sb_shift;
let units_cols = sb_width + (1 << sb_shift) - 1 >> sb_shift;
let units_rows = sb_height + (1<< sb_shift) - 1 >> sb_shift;
let units_rows = sb_height + (1 << sb_shift) - 1 >> sb_shift;

let FrameRestorationUnits { cols: rs_cols, rows: rs_rows, .. } = rs.planes[pli].units;
// +1 because the last super-block may use the "stretched" restoration unit
Expand Down
1 change: 1 addition & 0 deletions src/tiling/tiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ pub mod test {
..Default::default()
};
let mut sequence = Sequence::new(&config);
// FIXME: #1601
// smallest possible tiles smaller than smallest possible LRUs
sequence.enable_large_lru = false;
FrameInvariants::new(config, sequence)
Expand Down

0 comments on commit f8008ce

Please sign in to comment.