let mut biter = self.blocks.iter_mut();
for by in 0..self.mb_h*2 {
for bx in 0..self.mb_w*2 {
- let mut blk = biter.next().unwrap();
+ let blk = biter.next().unwrap();
let qmat = &self.qmat_y;
blk.coeffs[0] *= qmat[0];
if blk.has_ac {
for plane in 1..3 {
for by in 0..self.mb_h {
for bx in 0..self.mb_w {
- let mut blk = biter.next().unwrap();
+ let blk = biter.next().unwrap();
let qmat = &self.qmat_c;
blk.coeffs[0] *= qmat[0];
if blk.has_ac {
let mut biter = self.blocks.iter_mut();
for by in 0..self.mb_h*2 {
for bx in 0..self.mb_w*2 {
- let mut blk = biter.next().unwrap();
+ let blk = biter.next().unwrap();
// do MC for whole macroblock
if !blk.btype.is_intra() && (((bx | by) & 1) == 0) && (blk.btype != VPMBType::InterFourMV) {
let src = if blk.btype.get_ref_id() == 1 {
for plane in 1..3 {
for by in 0..self.mb_h {
for bx in 0..self.mb_w {
- let mut blk = biter.next().unwrap();
+ let blk = biter.next().unwrap();
let qmat = if blk.btype.is_intra() { &self.qmat_c } else { &self.qmat_c_p };
blk.coeffs[0] *= qmat[0];
if blk.has_ac {
pub struct VP56CoeffModel {
pub dc_token_probs: [[[u8; 5]; 6]; 6],
pub dc_value_probs: [u8; 11],
- pub ac_ctype_probs: [[[[u8; 5]; 5]; 6]; 3],
pub ac_type_probs: [[[[u8; 5]; 6]; 3]; 3],
pub ac_val_probs: [[[u8; 11]; 6]; 3],
}
#[derive(Clone,Copy,Default)]
pub struct VP56CoeffModelStat {
- pub dc_token_probs: [[[ProbCounter; 5]; 6]; 6],
pub dc_value_probs: [ProbCounter; 11],
pub ac_val_probs: [[[ProbCounter; 11]; 6]; 3],
}
}
}
-#[allow(clippy::wrong_self_convention)]
-trait FromPixels {
- fn from_pixels(self) -> Self;
-}
-
-impl FromPixels for MV {
- fn from_pixels(self) -> MV {
- MV { x: self.x * 4, y: self.y * 4 }
- }
-}
-
pub const DIA_PATTERN: [MV; 9] = [
ZERO_MV,
MV {x: -2, y: 0},
pub const CORR_MAP_SIZE: usize = 122;
#[derive(Clone)]
+#[allow(dead_code)]
pub struct BandHeader {
pub plane_no: usize,
pub band_no: usize,
}
#[derive(Clone,Copy)]
+#[allow(dead_code)]
pub struct MB {
pub mtype: MBType,
pub pos_x: usize,
pub sub_mb_type: [SubMBType; 4],
pub ipred: [IntraPredMode; 16],
pub chroma_ipred: u8,
- pub luma_ipred: [u8; 16],
pub mv_l0: [MV; 16],
pub ref_l0: [PicRef; 4],
pub mv_l1: [MV; 16],
}
}
+#[allow(dead_code)]
pub struct VideoObjectLayer {
pub vol_type: u8,
pub version: u8,
}
}
+#[allow(dead_code)]
pub struct PicState {
pub timestamp: u32,
pub mb_type: Vec<MBType>,
trait PixelOps {
fn unpack(&self) -> UnpackedPixel;
- fn dist<T: PixelOps>(&self, val: T) -> u32 {
- dist_core(self.unpack(), &val.unpack())
- }
}
impl PixelOps for u16 {