]> git.nihav.org Git - nihav.git/commitdiff
remove unused fields/methods/traits or suppress warnings about them
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 28 May 2025 16:07:32 +0000 (18:07 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 28 May 2025 16:07:32 +0000 (18:07 +0200)
nihav-duck/src/codecs/vp3.rs
nihav-duck/src/codecs/vp56.rs
nihav-duck/src/codecs/vp6enc/models.rs
nihav-duck/src/codecs/vpenc/motion_est.rs
nihav-indeo/src/codecs/ivi.rs
nihav-itu/src/codecs/h264/mod.rs
nihav-mpeg/src/codecs/mpeg4asp/types.rs
nihav-ms/src/codecs/msvideo1enc.rs

index 7eeb4e3c89aec0dcac1c8888f4dbdfa9adb7e8f7..ba5db75d109f804c96be67acc399da831d27be27 100644 (file)
@@ -1539,7 +1539,7 @@ impl VP34Decoder {
         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 {
@@ -1553,7 +1553,7 @@ impl VP34Decoder {
         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 {
@@ -1612,7 +1612,7 @@ impl VP34Decoder {
         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 {
@@ -1680,7 +1680,7 @@ impl VP34Decoder {
         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 {
index 52de1c92949ccef27d680d7dc156dd978e0113aa..7066e89d812d0115f369117d030b452b5cacbf80 100644 (file)
@@ -41,7 +41,6 @@ pub struct VP56MBTypeModel {
 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],
 }
index fe2416e6f4dfdc9b9ba265c791574a937774e69e..85b02cefe58faf026ccea9c5dee7332231d37329 100644 (file)
@@ -246,7 +246,6 @@ pub struct VP56MVModelStat {
 
 #[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],
 }
index 149588d338b3838e27951624c924a6d714cd2fa9..42adbc353cbb34718f5645704f98821ec50958ff 100644 (file)
@@ -41,17 +41,6 @@ impl std::fmt::Display for MVSearchMode {
     }
 }
 
-#[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},
index ecfab9228fd31d1af61e035d9ebac1fe95ec290a..d37e50a361535794be2abc901051ceedfb7549b9 100644 (file)
@@ -147,6 +147,7 @@ pub enum TxType {
 pub const CORR_MAP_SIZE: usize = 122;
 
 #[derive(Clone)]
+#[allow(dead_code)]
 pub struct BandHeader {
     pub plane_no:   usize,
     pub band_no:    usize,
@@ -205,6 +206,7 @@ pub enum MBType {
 }
 
 #[derive(Clone,Copy)]
+#[allow(dead_code)]
 pub struct MB {
     pub mtype:  MBType,
     pub pos_x:  usize,
index fffe7107c1ff3cb368d61f9a7d2e7690bc11be2f..cc71f3cf9409aa8efd81a6f936c3f39dff351035 100644 (file)
@@ -107,7 +107,6 @@ pub struct CurrentMBInfo {
     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],
index f76548075bdd0508bedc90841f852378166538d4..ddb9e26579b7f99e54bbf664dbe1eb18368900e8 100644 (file)
@@ -87,6 +87,7 @@ impl Default for QuantInfo {
     }
 }
 
+#[allow(dead_code)]
 pub struct VideoObjectLayer {
     pub vol_type:               u8,
     pub version:                u8,
@@ -149,6 +150,7 @@ impl Macroblock {
     }
 }
 
+#[allow(dead_code)]
 pub struct PicState {
     pub timestamp:      u32,
     pub mb_type:        Vec<MBType>,
index d1074e0b28fd7a2a166f6aa60bec7fa9c7006cb3..f9d1f6f50f26e1a73217812294830a26237154bc 100644 (file)
@@ -25,9 +25,6 @@ fn map_quality_15bit(quality: u8) -> (u32, u32) {
 
 trait PixelOps {
     fn unpack(&self) -> UnpackedPixel;
-    fn dist<T: PixelOps>(&self, val: T) -> u32 {
-        dist_core(self.unpack(), &val.unpack())
-    }
 }
 
 impl PixelOps for u16 {