pub stride: [usize; NA_SIMPLE_VFRAME_COMPONENTS],
pub offset: [usize; NA_SIMPLE_VFRAME_COMPONENTS],
pub components: usize,
- pub data: &'a mut Vec<T>,
+ pub data: &'a mut [T],
}
impl<'a, T:Copy> NASimpleVideoFrame<'a, T> {
stride: s,
offset: o,
components,
- data: vbuf.data.as_mut().unwrap(),
+ data: vbuf.data.as_mut_slice(),
})
}
}
let ochr = fmt.get_chromaton(i);
if ochr.is_none() { continue; }
let chr = ochr.unwrap();
- if !vinfo.is_flipped() {
- offs.push(new_size as usize);
- }
+ offs.push(new_size as usize);
let stride = chr.get_linesize(width);
let cur_h = chr.get_height(height);
let cur_sz = stride.checked_mul(cur_h);
let new_sz = new_size.checked_add(cur_sz.unwrap());
if new_sz == None { return Err(AllocatorError::TooLargeDimensions); }
new_size = new_sz.unwrap();
- if vinfo.is_flipped() {
- offs.push(new_size as usize);
- }
strides.push(stride);
}
if max_depth <= 8 {