Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rav1e for openSUSE:Factory checked 
in at 2023-01-04 17:50:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rav1e (Old)
 and      /work/SRC/openSUSE:Factory/.rav1e.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rav1e"

Wed Jan  4 17:50:50 2023 rev:16 rq:1046283 version:0.6.2+0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rav1e/rav1e.changes      2022-12-02 
13:12:07.697519936 +0100
+++ /work/SRC/openSUSE:Factory/.rav1e.new.1563/rav1e.changes    2023-01-04 
17:51:02.837631539 +0100
@@ -1,0 +2,16 @@
+Mon Jan 02 15:54:31 UTC 2023 - a...@cryptomilk.org
+
+- Update to version 0.6.2+0:
+  * Prepare for release
+  * Fix new clippy lints for Rust 1.66
+  * Drop BUILT_TIME_UTC
+  * Shorten progress text
+  * Bump built to 0.5.2
+  * Make git2 optional
+  * Simplify the version string
+  * Specify default threads behavior
+  * Fix the capi deps
+- Removed dependency on libgit2
+  * Added rav1e-cargo-no-git-default.patch
+
+-------------------------------------------------------------------

Old:
----
  rav1e-0.6.1+0.tar.xz

New:
----
  rav1e-0.6.2+0.tar.xz
  rav1e-cargo-no-git-default.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rav1e.spec ++++++
--- /var/tmp/diff_new_pack.Igcofa/_old  2023-01-04 17:51:04.201639578 +0100
+++ /var/tmp/diff_new_pack.Igcofa/_new  2023-01-04 17:51:04.205639603 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rav1e
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 # Copyright (c) 2020 Andreas Schneider <a...@cryptomilk.org>.
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:           rav1e
-Version:        0.6.1+0
+Version:        0.6.2+0
 Release:        0
 Summary:        Fastest and safest AV1 encoder
 License:        BSD-2-Clause
@@ -31,12 +31,11 @@
 Source98:       README.suse-maint
 Source99:       baselibs.conf
 #
+Patch0:         rav1e-cargo-no-git-default.patch
+#
 BuildRequires:  cargo-c
 BuildRequires:  cargo-packaging
 BuildRequires:  nasm
-# FIXME: Should not be needed for releases
-# https://github.com/xiph/rav1e/issues/3072
-BuildRequires:  libgit2-devel
 
 %description
 rav1e is an AV1 video encoder.

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Igcofa/_old  2023-01-04 17:51:04.249639861 +0100
+++ /var/tmp/diff_new_pack.Igcofa/_new  2023-01-04 17:51:04.253639885 +0100
@@ -3,7 +3,7 @@
     <param name="url">https://github.com/xiph/rav1e.git</param>
     <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
     <param name="scm">git</param>
-    <param name="revision">v0.6.1</param>
+    <param name="revision">v0.6.2</param>
     <param name="match-tag">*</param>
     <param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
     <param name="versionrewrite-replacement">\1</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Igcofa/_old  2023-01-04 17:51:04.273640003 +0100
+++ /var/tmp/diff_new_pack.Igcofa/_new  2023-01-04 17:51:04.277640027 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/xiph/rav1e.git</param>
-              <param 
name="changesrevision">0fb96baa0a8c2a539ad0c148b6b2f9cfed37707a</param></service></servicedata>
+              <param 
name="changesrevision">b57f8150d566ff353253e52d20623c2684243476</param></service></servicedata>
 (No newline at EOF)
 

++++++ rav1e-0.6.1+0.tar.xz -> rav1e-0.6.2+0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/Cargo.toml new/rav1e-0.6.2+0/Cargo.toml
--- old/rav1e-0.6.1+0/Cargo.toml        2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/Cargo.toml        2022-12-25 06:37:43.000000000 +0100
@@ -1,6 +1,6 @@
 [package]
 name = "rav1e"
-version = "0.6.1"
+version = "0.6.2"
 authors = ["Thomas Daede <tda...@xiph.org>"]
 edition = "2021"
 rust-version = "1.60.0"
@@ -38,7 +38,8 @@
     "av-metrics",
     "nom",
 ]
-default = ["binaries", "asm", "threading", "signal_support"]
+default = ["binaries", "asm", "threading", "signal_support", "git_version"]
+git_version = ["built/git2"]
 asm = ["nasm-rs", "cc"]
 threading = ["rayon/threads"]
 signal_support = ["signal-hook"]
@@ -118,7 +119,7 @@
 [build-dependencies]
 cc = { version = "1.0", optional = true, features = ["parallel"] }
 rustc_version = "0.4"
-built = { version = "0.5.1", features = ["git2", "chrono"] }
+built = { version = "0.5.2", features = [] }
 
 [build-dependencies.nasm-rs]
 version = "0.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/activity.rs 
new/rav1e-0.6.2+0/src/activity.rs
--- old/rav1e-0.6.1+0/src/activity.rs   2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/activity.rs   2022-12-25 06:37:43.000000000 +0100
@@ -182,8 +182,7 @@
   //          C3     sqrt(C1^2 + svar * dvar)
   let rsqrt = ssim_boost_rsqrt((C1 * C1) + svar * dvar);
   ((input as u64
-    * (((RATIO * (svar + dvar + C2) as u64) * rsqrt.norm as u64)
-      >> RATIO_SHIFT))
+    * (((RATIO * (svar + dvar + C2)) * rsqrt.norm as u64) >> RATIO_SHIFT))
     >> rsqrt.shift) as u32
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/api/internal.rs 
new/rav1e-0.6.2+0/src/api/internal.rs
--- old/rav1e-0.6.1+0/src/api/internal.rs       2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/api/internal.rs       2022-12-25 06:37:43.000000000 
+0100
@@ -726,7 +726,7 @@
         output_frameno,
         segmentation: fs.segmentation,
       });
-      for i in 0..(REF_FRAMES as usize) {
+      for i in 0..REF_FRAMES {
         if (fi.refresh_frame_flags & (1 << i)) != 0 {
           coded_data.lookahead_rec_buffer.frames[i] = Some(Arc::clone(&rfs));
           coded_data.lookahead_rec_buffer.deblock[i] = fs.deblock;
@@ -808,7 +808,7 @@
       output_frameno,
       segmentation: fs.segmentation,
     });
-    for i in 0..(REF_FRAMES as usize) {
+    for i in 0..REF_FRAMES {
       if (fi.refresh_frame_flags & (1 << i)) != 0 {
         coded_data.lookahead_rec_buffer.frames[i] = Some(Arc::clone(&rfs));
         coded_data.lookahead_rec_buffer.deblock[i] = fs.deblock;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/asm/shared/transform/inverse.rs 
new/rav1e-0.6.2+0/src/asm/shared/transform/inverse.rs
--- old/rav1e-0.6.1+0/src/asm/shared/transform/inverse.rs       2022-11-30 
23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/asm/shared/transform/inverse.rs       2022-12-25 
06:37:43.000000000 +0100
@@ -73,7 +73,7 @@
   unsafe {
     func(
       output.data_ptr_mut() as *mut _,
-      T::to_asm_stride(output.plane_cfg.stride) as isize,
+      T::to_asm_stride(output.plane_cfg.stride),
       copied.data.as_mut_ptr() as *mut _,
       eob as i32 - 1,
     );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/asm/x86/dist/sse.rs 
new/rav1e-0.6.2+0/src/asm/x86/dist/sse.rs
--- old/rav1e-0.6.1+0/src/asm/x86/dist/sse.rs   2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/asm/x86/dist/sse.rs   2022-12-25 06:37:43.000000000 
+0100
@@ -127,8 +127,7 @@
             T::to_asm_stride(dst.plane_cfg.stride),
             scale.as_ptr(),
             (scale_stride * size_of_element(scale)) as isize,
-          ) as u64
-            + (den >> 1))
+          ) + (den >> 1))
             / den
         },
         None => call_rust(),
@@ -140,9 +139,9 @@
         Some(func) => unsafe {
           ((func)(
             src.data_ptr() as *const _,
-            T::to_asm_stride(src.plane_cfg.stride) as isize,
+            T::to_asm_stride(src.plane_cfg.stride),
             dst.data_ptr() as *const _,
-            T::to_asm_stride(dst.plane_cfg.stride) as isize,
+            T::to_asm_stride(dst.plane_cfg.stride),
             scale.as_ptr(),
             (scale_stride * size_of_element(scale)) as isize,
           ) + (den >> 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/asm/x86/lrf.rs 
new/rav1e-0.6.2+0/src/asm/x86/lrf.rs
--- old/rav1e-0.6.1+0/src/asm/x86/lrf.rs        2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/asm/x86/lrf.rs        2022-12-25 06:37:43.000000000 
+0100
@@ -205,7 +205,7 @@
   let p = _mm256_max_epi32(
     _mm256_setzero_si256(),
     _mm256_sub_epi32(
-      _mm256_mullo_epi32(scaled_ssq, _mm256_set1_epi32(n as i32)),
+      _mm256_mullo_epi32(scaled_ssq, _mm256_set1_epi32(n)),
       _mm256_madd_epi16(scaled_sum, scaled_sum),
     ),
   );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/asm/x86/predict.rs 
new/rav1e-0.6.2+0/src/asm/x86/predict.rs
--- old/rav1e-0.6.1+0/src/asm/x86/predict.rs    2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/asm/x86/predict.rs    2022-12-25 06:37:43.000000000 
+0100
@@ -220,8 +220,8 @@
               );
               // From dav1d, dx and dy are the distance from the predicted 
block to the frame edge
               let (dx, dy) = (
-                (bw as isize - dst.rect().x as isize) as libc::c_int,
-                (bh as isize - dst.rect().y as isize) as libc::c_int,
+                (bw as isize - dst.rect().x) as libc::c_int,
+                (bh as isize - dst.rect().y) as libc::c_int,
               );
 
               if angle <= 90 {
@@ -371,8 +371,8 @@
             );
             // From dav1d, dx and dy are the distance from the predicted block 
to the frame edge
             let (dx, dy) = (
-              (bw as isize - dst.rect().x as isize) as libc::c_int,
-              (bh as isize - dst.rect().y as isize) as libc::c_int,
+              (bw as isize - dst.rect().x) as libc::c_int,
+              (bh as isize - dst.rect().y) as libc::c_int,
             );
 
             if angle <= 90 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/bin/common.rs 
new/rav1e-0.6.2+0/src/bin/common.rs
--- old/rav1e-0.6.1+0/src/bin/common.rs 2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/bin/common.rs 2022-12-25 06:37:43.000000000 +0100
@@ -46,7 +46,9 @@
   #[clap(short = 'y', help_heading = "INPUT/OUTPUT")]
   pub overwrite: bool,
 
-  /// Set the threadpool size
+  /// Set the threadpool size. If 0, will use the number of logical CPUs.
+  /// rav1e will use up to this many threads. Additional tiles may be needed to
+  /// increase thread utilization.
   #[clap(long, value_parser, default_value_t = 0, help_heading = "THREADING")]
   pub threads: usize,
   /// Number of tile rows. Must be a power of 2. rav1e may override this based 
on video resolution.
@@ -254,15 +256,8 @@
 fn get_version() -> &'static str {
   static VERSION_STR: Lazy<String> = Lazy::new(|| {
     format!(
-      "{} ({}) ({})",
-      built_info::PKG_VERSION,
-      built_info::GIT_VERSION
-        .map(|ver| if built_info::GIT_DIRTY.expect("git is true") {
-          format!("{}-MODIFIED", ver)
-        } else {
-          ver.to_string()
-        })
-        .unwrap_or_else(|| "UNKNOWN".to_string()),
+      "{} ({})",
+      rav1e::version::full(),
       // We cannot use `built_info::DEBUG` because that tells us if there are 
debug symbols,
       // not if there are optimizations.
       if cfg!(debug_assertions) { "debug" } else { "release" }
@@ -278,7 +273,7 @@
       rustflags = "(None)";
     }
     format!(
-      "{}\n{} {}\nCompiled CPU Features: {}\nAssembly: {}\nThreading: 
{}\nUnstable Features: {}\nCompiler Flags: {}\nBuilt {}",
+      "{}\n{} {}\nCompiled CPU Features: {}\nAssembly: {}\nThreading: 
{}\nUnstable Features: {}\nCompiler Flags: {}",
       get_version(),
       built_info::RUSTC_VERSION,
       built_info::TARGET,
@@ -286,8 +281,7 @@
       if cfg!(feature = "asm") { "Enabled" } else { "Disabled" },
       if cfg!(feature = "threading") { "Enabled" } else { "Disabled" },
       if cfg!(feature = "unstable") { "Enabled" } else { "Disabled" },
-      rustflags,
-      built_info::BUILT_TIME_UTC
+      rustflags
     )
   });
   &LONG_VERSION_STR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/bin/rav1e.rs 
new/rav1e-0.6.2+0/src/bin/rav1e.rs
--- old/rav1e-0.6.1+0/src/bin/rav1e.rs  2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/bin/rav1e.rs  2022-12-25 06:37:43.000000000 +0100
@@ -173,7 +173,7 @@
   let (ret, emit_pass_data) = match pkt_wrapped {
     Ok(pkt) => {
       output_file.write_frame(
-        pkt.input_frameno as u64,
+        pkt.input_frameno,
         pkt.data.as_ref(),
         pkt.frame_type,
       );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/bin/stats.rs 
new/rav1e-0.6.2+0/src/bin/stats.rs
--- old/rav1e-0.6.1+0/src/bin/stats.rs  2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/bin/stats.rs  2022-12-25 06:37:43.000000000 +0100
@@ -154,7 +154,7 @@
 
   // Elapsed time in seconds
   pub fn elapsed_time(&self) -> u64 {
-    Instant::now().duration_since(self.time_started).as_secs() as u64
+    Instant::now().duration_since(self.time_started).as_secs()
   }
 
   // Number of frames of given type which appear in the video
@@ -676,20 +676,20 @@
   fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     if let Some(total_frames) = self.total_frames {
       write!(
-                f,
-                "encoded {}/{} frames, {:.3} fps, {:.2} Kb/s, est. size: {:.2} 
MB, est. time: {},  elap. time: {}",
-                self.frames_encoded(),
-                total_frames,
-                self.encoding_fps(),
-                self.bitrate() as f64 / 1000f64,
-                self.estimated_size() as f64 / (1024 * 1024) as f64,
-                secs_to_human_time(self.estimated_time()),
-                secs_to_human_time(self.elapsed_time())
-            )
+        f,
+        "encoded {}/{} frames, {:.3} fps, {:.2} Kb/s, est: {}, {:.2} MB, 
elapsed: {}",
+        self.frames_encoded(),
+        total_frames,
+        self.encoding_fps(),
+        self.bitrate() as f64 / 1000f64,
+        secs_to_human_time(self.estimated_time()),
+        self.estimated_size() as f64 / (1024 * 1024) as f64,
+        secs_to_human_time(self.elapsed_time())
+      )
     } else {
       write!(
         f,
-        "encoded {} frames, {:.3} fps, {:.2} Kb/s, elap. time: {}",
+        "encoded {} frames, {:.3} fps, {:.2} Kb/s, elapsed: {}",
         self.frames_encoded(),
         self.encoding_fps(),
         self.bitrate() as f64 / 1000f64,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/cdef.rs 
new/rav1e-0.6.2+0/src/cdef.rs
--- old/rav1e-0.6.1+0/src/cdef.rs       2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/cdef.rs       2022-12-25 06:37:43.000000000 +0100
@@ -147,8 +147,7 @@
   fn constrain(diff: i32, threshold: i32, damping: i32) -> i32 {
     if threshold != 0 {
       let shift = cmp::max(0, damping - msb(threshold));
-      let magnitude =
-        cmp::min(diff.abs(), cmp::max(0, threshold - (diff.abs() >> shift)));
+      let magnitude = (threshold - (diff.abs() >> shift)).clamp(0, diff.abs());
 
       if diff < 0 {
         -magnitude
@@ -234,7 +233,7 @@
     } else {
       let xsize = (8 >> xdec) as isize;
       let ysize = (8 >> ydec) as isize;
-      let coeff_shift = bit_depth as usize - 8;
+      let coeff_shift = bit_depth - 8;
       let cdef_pri_taps = [[4, 2], [3, 3]];
       let cdef_sec_taps = [[2, 1], [2, 1]];
       let pri_taps =
@@ -341,7 +340,7 @@
   fi: &FrameInvariants<T>, in_frame: &Frame<T>, blocks: &TileBlocks<'_>,
   sbo: TileSuperBlockOffset,
 ) -> CdefDirections {
-  let coeff_shift = fi.sequence.bit_depth as usize - 8;
+  let coeff_shift = fi.sequence.bit_depth - 8;
   let mut dir: CdefDirections =
     CdefDirections { dir: [[0; 8]; 8], var: [[0; 8]; 8] };
   // Each direction block is 8x8 in y, and direction computation only looks at 
y
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/context/block_unit.rs 
new/rav1e-0.6.2+0/src/context/block_unit.rs
--- old/rav1e-0.6.1+0/src/context/block_unit.rs 2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/context/block_unit.rs 2022-12-25 06:37:43.000000000 
+0100
@@ -370,9 +370,9 @@
       (tx_size.width() as u8, tx_size.height() as u8)
     };
 
-    let above_ctx = &mut self.above_tx_context[bo.0.x..bo.0.x + n4_w as usize];
+    let above_ctx = &mut self.above_tx_context[bo.0.x..bo.0.x + n4_w];
     let left_ctx =
-      &mut self.left_tx_context[bo.y_in_sb()..bo.y_in_sb() + n4_h as usize];
+      &mut self.left_tx_context[bo.y_in_sb()..bo.y_in_sb() + n4_h];
 
     for v in above_ctx[0..n4_w].iter_mut() {
       *v = tx_w;
@@ -1009,7 +1009,7 @@
         let inc = cmp::min(-max_row_offs + row_offset + 1, cand.n4_h as isize);
         assert!(inc >= 0);
         weight = cmp::max(weight, inc as u32);
-        *processed_rows = (inc as isize) - row_offset - 1;
+        *processed_rows = inc - row_offset - 1;
       }
 
       if Self::add_ref_mv_candidate(
@@ -1075,7 +1075,7 @@
         let inc = cmp::min(-max_col_offs + col_offset + 1, cand.n4_w as isize);
         assert!(inc >= 0);
         weight = cmp::max(weight, inc as u32);
-        *processed_cols = (inc as isize) - col_offset - 1;
+        *processed_cols = inc - col_offset - 1;
       }
 
       if Self::add_ref_mv_candidate(
@@ -1403,13 +1403,13 @@
         * (8 * MI_SIZE) as isize
         + border_h;
       mv.this_mv.row =
-        (mv.this_mv.row as isize).max(mvy_min).min(mvy_max) as i16;
+        (mv.this_mv.row as isize).clamp(mvy_min, mvy_max) as i16;
       mv.this_mv.col =
-        (mv.this_mv.col as isize).max(mvx_min).min(mvx_max) as i16;
+        (mv.this_mv.col as isize).clamp(mvx_min, mvx_max) as i16;
       mv.comp_mv.row =
-        (mv.comp_mv.row as isize).max(mvy_min).min(mvy_max) as i16;
+        (mv.comp_mv.row as isize).clamp(mvy_min, mvy_max) as i16;
       mv.comp_mv.col =
-        (mv.comp_mv.col as isize).max(mvx_min).min(mvx_max) as i16;
+        (mv.comp_mv.col as isize).clamp(mvx_min, mvx_max) as i16;
     }
 
     mode_context
@@ -1906,7 +1906,7 @@
         &mut self.fc.eob_extra_cdf[txs_ctx][plane_type][(eob_pt - 3) as usize];
       symbol_with_update!(self, w, bit, cdf, 2);
       for i in 1..eob_offset_bits {
-        eob_shift = eob_offset_bits as u16 - 1 - i as u16;
+        eob_shift = eob_offset_bits - 1 - i;
         bit = u32::from((eob_extra & (1 << eob_shift)) != 0);
         w.bit(bit as u16);
       }
@@ -1942,7 +1942,7 @@
         symbol_with_update!(
           self,
           w,
-          (cmp::min(u32::cast_from(level), 3) - 1) as u32,
+          cmp::min(u32::cast_from(level), 3) - 1,
           &mut self.fc.coeff_base_eob_cdf[txs_ctx][plane_type]
             [coeff_ctx as usize],
           3
@@ -1951,7 +1951,7 @@
         symbol_with_update!(
           self,
           w,
-          (cmp::min(u32::cast_from(level), 3)) as u32,
+          cmp::min(u32::cast_from(level), 3),
           &mut self.fc.coeff_base_cdf[txs_ctx][plane_type][coeff_ctx as usize],
           4
         );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/context/mod.rs 
new/rav1e-0.6.2+0/src/context/mod.rs
--- old/rav1e-0.6.1+0/src/context/mod.rs        2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/context/mod.rs        2022-12-25 06:37:43.000000000 
+0100
@@ -161,7 +161,7 @@
 #[inline(always)]
 pub const fn mv_class_base(mv_class: usize) -> u32 {
   if mv_class != MV_CLASS_0 {
-    (CLASS0_SIZE << (mv_class as usize + 2)) as u32
+    (CLASS0_SIZE << (mv_class + 2)) as u32
   } else {
     0
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/context/partition_unit.rs 
new/rav1e-0.6.2+0/src/context/partition_unit.rs
--- old/rav1e-0.6.1+0/src/context/partition_unit.rs     2022-11-30 
23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/context/partition_unit.rs     2022-12-25 
06:37:43.000000000 +0100
@@ -473,7 +473,7 @@
 
     assert!(bsize.is_sqr());
 
-    (left * 2 + above) as usize + bsl as usize * PARTITION_PLOFFSET
+    (left * 2 + above) as usize + bsl * PARTITION_PLOFFSET
   }
 
   /// # Panics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/context/transform_unit.rs 
new/rav1e-0.6.2+0/src/context/transform_unit.rs
--- old/rav1e-0.6.1+0/src/context/transform_unit.rs     2022-11-30 
23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/context/transform_unit.rs     2022-12-25 
06:37:43.000000000 +0100
@@ -580,8 +580,8 @@
     let max_tx_high = max_tx_size.height() as u8;
     let has_above = bo.0.y > 0;
     let has_left = bo.0.x > 0;
-    let mut above = self.bc.above_tx_context[bo.0.x] >= max_tx_wide as u8;
-    let mut left = self.bc.left_tx_context[bo.y_in_sb()] >= max_tx_high as u8;
+    let mut above = self.bc.above_tx_context[bo.0.x] >= max_tx_wide;
+    let mut left = self.bc.left_tx_context[bo.y_in_sb()] >= max_tx_high;
 
     if has_above {
       let above_blk = self.bc.blocks.above_of(bo);
@@ -716,7 +716,7 @@
 
     let max_tx_size: TxSize = bsize.tx_size().sqr_up();
     let category: usize = (tx_size.sqr_up() != max_tx_size) as usize
-      + (TxSize::TX_SIZES as usize - 1 - max_tx_size as usize) * 2;
+      + (TxSize::TX_SIZES - 1 - max_tx_size as usize) * 2;
 
     debug_assert!(category < TXFM_PARTITION_CONTEXTS);
 
@@ -807,7 +807,7 @@
       eob_to_pos_small[eob] as u32
     } else {
       let e = cmp::min((eob - 1) >> 5, 16);
-      eob_to_pos_large[e as usize] as u32
+      eob_to_pos_large[e] as u32
     };
     assert!(eob as i32 >= k_eob_group_start[t as usize] as i32);
     *extra = eob as u32 - k_eob_group_start[t as usize] as u32;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/deblock.rs 
new/rav1e-0.6.2+0/src/deblock.rs
--- old/rav1e-0.6.1+0/src/deblock.rs    2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/deblock.rs    2022-12-25 06:37:43.000000000 +0100
@@ -450,10 +450,8 @@
 
     // mask4 sets the dividing line for filter vs no filter
     // nhev4 sets the dividing line between narrow2 and narrow4
-    let mask =
-      clamp(mask4(p1, p0, q0, q1, bd - 8), 1, MAX_LOOP_FILTER + 1) as usize;
-    let nhev =
-      clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1) as usize;
+    let mask = clamp(mask4(p1, p0, q0, q1, bd - 8), 1, MAX_LOOP_FILTER + 1);
+    let nhev = clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1);
 
     // sse for each; short-circuit the 'special' no-op cases.
     let sse_none = stride_sse(&a, &none);
@@ -596,11 +594,9 @@
     // flat6 decides between wide and narrow filters (unrelated to level)
     // nhev4 sets the dividing line between narrow2 and narrow4
     let mask =
-      clamp(mask6(p2, p1, p0, q0, q1, q2, bd - 8), 1, MAX_LOOP_FILTER + 1)
-        as usize;
+      clamp(mask6(p2, p1, p0, q0, q1, q2, bd - 8), 1, MAX_LOOP_FILTER + 1);
     let flatp = flat6(p2, p1, p0, q0, q1, q2) <= flat;
-    let nhev =
-      clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1) as usize;
+    let nhev = clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1);
 
     // sse for each; short-circuit the 'special' no-op cases.
     let sse_none = stride_sse(&a, &none);
@@ -800,10 +796,9 @@
       mask8(p3, p2, p1, p0, q0, q1, q2, q3, bd - 8),
       1,
       MAX_LOOP_FILTER + 1,
-    ) as usize;
+    );
     let flatp = flat8(p3, p2, p1, p0, q0, q1, q2, q3) <= flat;
-    let nhev =
-      clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1) as usize;
+    let nhev = clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1);
 
     // sse for each; short-circuit the 'special' no-op cases.
     let sse_none = stride_sse(&a, &none);
@@ -1058,11 +1053,10 @@
       mask8(p3, p2, p1, p0, q0, q1, q2, q3, bd - 8),
       1,
       MAX_LOOP_FILTER + 1,
-    ) as usize;
+    );
     let flat8p = flat8(p3, p2, p1, p0, q0, q1, q2, q3) <= flat;
     let flat14p = flat14_outer(p6, p5, p4, p0, q0, q4, q5, q6) <= flat;
-    let nhev =
-      clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1) as usize;
+    let nhev = clamp(nhev4(p1, p0, q0, q1, bd - 8), mask, MAX_LOOP_FILTER + 1);
 
     // sse for each; short-circuit the 'special' no-op cases.
     let sse_none = stride_sse(&a, &none);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/encoder.rs 
new/rav1e-0.6.2+0/src/encoder.rs
--- old/rav1e-0.6.1+0/src/encoder.rs    2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/encoder.rs    2022-12-25 06:37:43.000000000 +0100
@@ -93,8 +93,8 @@
 
 #[derive(Debug, Clone, Default)]
 pub struct ReferenceFramesSet<T: Pixel> {
-  pub frames: [Option<Arc<ReferenceFrame<T>>>; REF_FRAMES as usize],
-  pub deblock: [DeblockState; REF_FRAMES as usize],
+  pub frames: [Option<Arc<ReferenceFrame<T>>>; REF_FRAMES],
+  pub deblock: [DeblockState; REF_FRAMES],
 }
 
 impl<T: Pixel> ReferenceFramesSet<T> {
@@ -1223,7 +1223,7 @@
 
   fn pick_strength_from_q(&mut self, qps: &QuantizerParameters) {
     self.cdef_damping = 3 + (self.base_q_idx >> 6);
-    let q = bexp64(qps.log_target_q as i64 + q57(QSCALE)) as f32;
+    let q = bexp64(qps.log_target_q + q57(QSCALE)) as f32;
     /* These coefficients were trained on libaom. */
     let (y_f1, y_f2, uv_f1, uv_f2) = if !self.intra_only {
       (
@@ -2836,17 +2836,11 @@
 
       let four_partitions = [
         tile_bo,
+        TileBlockOffset(BlockOffset { x: tile_bo.0.x + hbsw, y: tile_bo.0.y }),
+        TileBlockOffset(BlockOffset { x: tile_bo.0.x, y: tile_bo.0.y + hbsh }),
         TileBlockOffset(BlockOffset {
-          x: tile_bo.0.x + hbsw as usize,
-          y: tile_bo.0.y,
-        }),
-        TileBlockOffset(BlockOffset {
-          x: tile_bo.0.x,
-          y: tile_bo.0.y + hbsh as usize,
-        }),
-        TileBlockOffset(BlockOffset {
-          x: tile_bo.0.x + hbsw as usize,
-          y: tile_bo.0.y + hbsh as usize,
+          x: tile_bo.0.x + hbsw,
+          y: tile_bo.0.y + hbsh,
         }),
       ];
       let partitions = get_sub_partitions(&four_partitions, partition);
@@ -3235,16 +3229,16 @@
         let four_partitions = [
           tile_bo,
           TileBlockOffset(BlockOffset {
-            x: tile_bo.0.x + hbsw as usize,
+            x: tile_bo.0.x + hbsw,
             y: tile_bo.0.y,
           }),
           TileBlockOffset(BlockOffset {
             x: tile_bo.0.x,
-            y: tile_bo.0.y + hbsh as usize,
+            y: tile_bo.0.y + hbsh,
           }),
           TileBlockOffset(BlockOffset {
-            x: tile_bo.0.x + hbsw as usize,
-            y: tile_bo.0.y + hbsh as usize,
+            x: tile_bo.0.x + hbsw,
+            y: tile_bo.0.y + hbsh,
           }),
         ];
         let partitions = get_sub_partitions(&four_partitions, partition);
@@ -3890,7 +3884,7 @@
     output_frameno,
     segmentation: fs.segmentation,
   });
-  for i in 0..(REF_FRAMES as usize) {
+  for i in 0..REF_FRAMES {
     if (fi.refresh_frame_flags & (1 << i)) != 0 {
       fi.rec_buffer.frames[i] = Some(Arc::clone(&rfs));
       fi.rec_buffer.deblock[i] = fs.deblock;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/entropymode.rs 
new/rav1e-0.6.2+0/src/entropymode.rs
--- old/rav1e-0.6.1+0/src/entropymode.rs        2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/entropymode.rs        2022-12-25 06:37:43.000000000 
+0100
@@ -586,7 +586,7 @@
 #[allow(unused)]
 pub static default_interintra_mode_cdf: [[u16;
   InterIntraMode::INTERINTRA_MODES as usize];
-  BLOCK_SIZE_GROUPS as usize] = [
+  BLOCK_SIZE_GROUPS] = [
   cdf!(8192, 16384, 24576),
   cdf!(1875, 11082, 27332),
   cdf!(2473, 9996, 26388),
@@ -623,7 +623,7 @@
 #[allow(unused)]
 pub static default_compound_type_cdf: [[u16;
   CompoundType::COMPOUND_TYPES as usize - 1];
-  BlockSize::BLOCK_SIZES_ALL as usize] = [
+  BlockSize::BLOCK_SIZES_ALL] = [
   cdf!(16384),
   cdf!(16384),
   cdf!(16384),
@@ -743,7 +743,7 @@
 #[allow(unused)]
 pub static default_motion_mode_cdf: [[u16;
   MotionMode::MOTION_MODES as usize];
-  BlockSize::BLOCK_SIZES_ALL as usize] = [
+  BlockSize::BLOCK_SIZES_ALL] = [
   cdf!(10923, 21845),
   cdf!(10923, 21845),
   cdf!(10923, 21845),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/frame/plane.rs 
new/rav1e-0.6.2+0/src/frame/plane.rs
--- old/rav1e-0.6.1+0/src/frame/plane.rs        2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/frame/plane.rs        2022-12-25 06:37:43.000000000 
+0100
@@ -25,8 +25,8 @@
     let rect = area.to_rect(
       self.cfg.xdec,
       self.cfg.ydec,
-      self.cfg.stride - self.cfg.xorigin as usize,
-      self.cfg.alloc_height - self.cfg.yorigin as usize,
+      self.cfg.stride - self.cfg.xorigin,
+      self.cfg.alloc_height - self.cfg.yorigin,
     );
     PlaneRegion::new(self, rect)
   }
@@ -36,8 +36,8 @@
     let rect = area.to_rect(
       self.cfg.xdec,
       self.cfg.ydec,
-      self.cfg.stride - self.cfg.xorigin as usize,
-      self.cfg.alloc_height - self.cfg.yorigin as usize,
+      self.cfg.stride - self.cfg.xorigin,
+      self.cfg.alloc_height - self.cfg.yorigin,
     );
     PlaneRegionMut::new(self, rect)
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/header.rs 
new/rav1e-0.6.2+0/src/header.rs
--- old/rav1e-0.6.1+0/src/header.rs     2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/header.rs     2022-12-25 06:37:43.000000000 +0100
@@ -621,7 +621,7 @@
 
       for i in 0..INTER_REFS_PER_FRAME {
         if !frame_refs_short_signaling {
-          self.write(REF_FRAMES_LOG2 as u32, fi.ref_frames[i] as u8)?;
+          self.write(REF_FRAMES_LOG2 as u32, fi.ref_frames[i])?;
         }
         if fi.sequence.frame_id_numbers_present_flag {
           unimplemented!();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/lib.rs new/rav1e-0.6.2+0/src/lib.rs
--- old/rav1e-0.6.1+0/src/lib.rs        2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/lib.rs        2022-12-25 06:37:43.000000000 +0100
@@ -407,6 +407,25 @@
     }
   }
 
+  cfg_if::cfg_if! {
+    if #[cfg(feature="git_version")] {
+      fn git_version() -> &'static str {
+        crate::built_info::GIT_VERSION.unwrap_or_default()
+      }
+
+      fn git_hash() -> &'static str {
+        crate::built_info::GIT_COMMIT_HASH.unwrap_or_default()
+      }
+    } else {
+      fn git_version() -> &'static str {
+        "UNKNOWN"
+      }
+
+      fn git_hash() -> &'static str {
+        "UNKNOWN"
+      }
+    }
+  }
   /// Commit hash (short)
   ///
   /// Short hash of the git commit used by this build
@@ -414,7 +433,7 @@
   /// e.g. `g743d464`
   ///
   pub fn hash() -> String {
-    crate::built_info::GIT_COMMIT_HASH.unwrap_or_default().to_string()
+    git_hash().to_string()
   }
 
   /// Version information with the information
@@ -423,11 +442,7 @@
   /// e.g. `0.1.0 (v0.1.0-1-g743d464)`
   ///
   pub fn full() -> String {
-    format!(
-      "{} ({})",
-      short(),
-      crate::built_info::GIT_VERSION.unwrap_or_default()
-    )
+    format!("{} ({})", short(), git_version(),)
   }
 }
 #[cfg(all(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/lrf.rs new/rav1e-0.6.2+0/src/lrf.rs
--- old/rav1e-0.6.1+0/src/lrf.rs        2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/lrf.rs        2022-12-25 06:37:43.000000000 +0100
@@ -443,12 +443,11 @@
       let ly = clamp(cropped_y, self.stripe_begin - 2, self.stripe_end + 1);
 
       // decide if we're vertically inside or outside the strip
-      let src_plane =
-        if ly >= self.stripe_begin && ly < self.stripe_end as isize {
-          self.cdeffed
-        } else {
-          self.deblocked
-        };
+      let src_plane = if ly >= self.stripe_begin && ly < self.stripe_end {
+        self.cdeffed
+      } else {
+        self.deblocked
+      };
       // cannot directly return self.ps.row(row) due to lifetime issue
       let range = src_plane.row_range(self.x, ly);
       self.y += 1;
@@ -1049,13 +1048,13 @@
       ((c[0] / h[0][0]).round() as i32, 0)
     }
   } else {
-    let det = h[0][0] * h[1][1] - h[0][1] * h[1][0];
+    let det = h[0][0].mul_add(h[1][1], -h[0][1] * h[1][0]);
     if det == 0. {
       (0, 0)
     } else {
       // If scaling up dividend would overflow, instead scale down the divisor
-      let div1 = h[1][1] * c[0] - h[0][1] * c[1];
-      let div2 = h[0][0] * c[1] - h[1][0] * c[0];
+      let div1 = h[1][1].mul_add(c[0], -h[0][1] * c[1]);
+      let div2 = h[0][0].mul_add(c[1], -h[1][0] * c[0]);
       ((div1 / det).round() as i32, (div2 / det).round() as i32)
     }
   };
@@ -1151,7 +1150,7 @@
       let off = 3 - (xi as isize);
       let s = cmp::max(0, off) as usize;
       let s1 = (s as isize - off) as usize;
-      let n1 = (n as isize - off) as usize;
+      let n1 = (n - off) as usize;
 
       for (hf, &v) in hfilter[s..n as usize].iter().zip(src[s1..n1].iter()) {
         acc += hf * i32::cast_from(v);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/mc.rs new/rav1e-0.6.2+0/src/mc.rs
--- old/rav1e-0.6.1+0/src/mc.rs 2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/mc.rs 2022-12-25 06:37:43.000000000 +0100
@@ -259,7 +259,7 @@
     let ref_stride = src.plane.cfg.stride;
     let y_filter = get_filter(mode_y, row_frac, height);
     let x_filter = get_filter(mode_x, col_frac, width);
-    let max_sample_val = ((1 << bit_depth) - 1) as i32;
+    let max_sample_val = (1 << bit_depth) - 1;
     let intermediate_bits = 4 - if bit_depth == 12 { 2 } else { 0 };
     match (col_frac, row_frac) {
       (0, 0) => {
@@ -284,8 +284,7 @@
                 },
                 7,
               )
-              .max(0)
-              .min(max_sample_val),
+              .clamp(0, max_sample_val),
             );
           }
         }
@@ -306,8 +305,7 @@
                 ),
                 intermediate_bits,
               )
-              .max(0)
-              .min(max_sample_val),
+              .clamp(0, max_sample_val),
             );
           }
         }
@@ -345,8 +343,7 @@
                   },
                   7 + intermediate_bits,
                 )
-                .max(0)
-                .min(max_sample_val),
+                .clamp(0, max_sample_val),
               );
             }
           }
@@ -462,7 +459,7 @@
     assert_eq!(height & 1, 0);
     assert!(width.is_power_of_two() && (2..=128).contains(&width));
 
-    let max_sample_val = ((1 << bit_depth) - 1) as i32;
+    let max_sample_val = (1 << bit_depth) - 1;
     let intermediate_bits = 4 - if bit_depth == 12 { 2 } else { 0 };
     let prep_bias = if bit_depth == 8 { 0 } else { PREP_BIAS * 2 };
     for r in 0..height {
@@ -475,8 +472,7 @@
               + prep_bias,
             intermediate_bits + 1,
           )
-          .max(0)
-          .min(max_sample_val),
+          .clamp(0, max_sample_val),
         );
       }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/me.rs new/rav1e-0.6.2+0/src/me.rs
--- old/rav1e-0.6.1+0/src/me.rs 2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/me.rs 2022-12-25 06:37:43.000000000 +0100
@@ -236,8 +236,8 @@
         // Processing the block a size up produces data that can be used by
         // the right and bottom corners.
         MVSamplingMode::CORNER {
-          right: x as usize & mv_size == mv_size,
-          bottom: y as usize & mv_size == mv_size,
+          right: x & mv_size == mv_size,
+          bottom: y & mv_size == mv_size,
         }
       };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/predict.rs 
new/rav1e-0.6.2+0/src/predict.rs
--- old/rav1e-0.6.1+0/src/predict.rs    2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/predict.rs    2022-12-25 06:37:43.000000000 +0100
@@ -988,7 +988,7 @@
     {
       for (v, &l) in line[..width].iter_mut().zip(luma[..width].iter()) {
         *v = T::cast_from(
-          (avg + get_scaled_luma_q0(alpha, l)).max(0).min(sample_max),
+          (avg + get_scaled_luma_q0(alpha, l)).clamp(0, sample_max),
         );
       }
     }
@@ -1164,14 +1164,14 @@
           + (9 * dup[i + 1].to_i32().unwrap())
           + (9 * dup[i + 2].to_i32().unwrap())
           - dup[i + 3].to_i32().unwrap();
-        s = (((s + 8) / 16) as i32).max(0).min((1 << bit_depth) - 1);
+        s = ((s + 8) / 16).clamp(0, (1 << bit_depth) - 1);
 
         edge[2 * i + 1] = T::cast_from(s);
         edge[2 * i + 2] = dup[i + 2];
       }
     }
 
-    let sample_max = ((1 << bit_depth) - 1) as i32;
+    let sample_max = (1 << bit_depth) - 1;
 
     let max_x = output.plane_cfg.width as isize - 1;
     let max_y = output.plane_cfg.height as isize - 1;
@@ -1326,16 +1326,15 @@
           let base = (idx >> (6 - upsample_above)) + (j << upsample_above);
           let shift = (((idx << upsample_above) >> 1) & 31) as i32;
           let max_base_x = (height + width - 1) << upsample_above;
-          let v = if base < max_base_x {
+          let v = (if base < max_base_x {
             let a: i32 = above_edge[base + offset_above].into();
             let b: i32 = above_edge[base + 1 + offset_above].into();
             round_shift(a * (32 - shift) + b * shift, 5)
           } else {
             let c: i32 = above_edge[max_base_x + offset_above].into();
             c
-          }
-          .max(0)
-          .min(sample_max);
+          })
+          .clamp(0, sample_max);
           row[j] = T::cast_from(v);
         }
       }
@@ -1356,8 +1355,7 @@
             let b: i32 =
               above_edge[(base + 1 + offset_above as isize) as usize].into();
             let v = round_shift(a * (32 - shift) + b * shift, 5)
-              .max(0)
-              .min(sample_max);
+              .clamp(0, sample_max);
             row[j] = T::cast_from(v);
           } else {
             let idx = (i << 6) as isize - ((j + 1) * dy) as isize;
@@ -1379,8 +1377,7 @@
             }
             .into();
             let v = round_shift(a * (32 - shift) + b * shift, 5)
-              .max(0)
-              .min(sample_max);
+              .clamp(0, sample_max);
             row[j] = T::cast_from(v);
           }
         }
@@ -1396,9 +1393,8 @@
           let a: i32 = left_edge[l.saturating_sub(base + offset_left)].into();
           let b: i32 =
             left_edge[l.saturating_sub(base + offset_left + 1)].into();
-          let v = round_shift(a * (32 - shift) + b * shift, 5)
-            .max(0)
-            .min(sample_max);
+          let v =
+            round_shift(a * (32 - shift) + b * shift, 5).clamp(0, sample_max);
           row[j] = T::cast_from(v);
         }
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/quantize.rs 
new/rav1e-0.6.2+0/src/quantize.rs
--- old/rav1e-0.6.1+0/src/quantize.rs   2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/quantize.rs   2022-12-25 06:37:43.000000000 +0100
@@ -245,8 +245,7 @@
     let scan = av1_scan_orders[tx_size as usize][tx_type as usize].scan;
 
     qcoeffs[0] = {
-      let coeff: i32 =
-        i32::cast_from(coeffs[0]) << (self.log_tx_scale as usize);
+      let coeff: i32 = i32::cast_from(coeffs[0]) << self.log_tx_scale;
       let abs_coeff = coeff.unsigned_abs();
       T::cast_from(copysign(
         divu_pair(abs_coeff + self.dc_offset, self.dc_mul_add),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/rate.rs 
new/rav1e-0.6.2+0/src/rate.rs
--- old/rav1e-0.6.1+0/src/rate.rs       2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/rate.rs       2022-12-25 06:37:43.000000000 +0100
@@ -557,7 +557,7 @@
     // delta_q only gets 6 bits + a sign bit, so it can differ by 63 at most.
     let min_qi = base_q_idx.saturating_sub(63).max(1);
     let max_qi = base_q_idx.saturating_add(63).min(255);
-    let clamp_qi = |qi: u8| qi.max(min_qi).min(max_qi);
+    let clamp_qi = |qi: u8| qi.clamp(min_qi, max_qi);
 
     QuantizerParameters {
       log_base_q,
@@ -887,7 +887,7 @@
         }
       }
       // If we've been missing our target, add a penalty term.
-      let rate_bias = (self.rate_bias / (self.nencoded_frames as i64 + 100))
+      let rate_bias = (self.rate_bias / (self.nencoded_frames + 100))
         * (reservoir_frames as i64);
       // rate_total is the total bits available over the next
       //  reservoir_tus TUs.
@@ -1052,10 +1052,10 @@
 
     // We use the AC quantizer as the source quantizer since its quantizer
     //  tables have unique entries, while the DC tables do not.
-    let ac_quantizer = ac_q(base_qi as u8, 0, bit_depth) as i64;
+    let ac_quantizer = ac_q(base_qi, 0, bit_depth) as i64;
     // Pick the nearest DC entry since an exact match may be unavailable.
     let dc_qi = select_dc_qi(ac_quantizer, bit_depth);
-    let dc_quantizer = dc_q(dc_qi as u8, 0, bit_depth) as i64;
+    let dc_quantizer = dc_q(dc_qi, 0, bit_depth) as i64;
     // Get the log quantizers as Q57.
     let log_ac_q = blog64(ac_quantizer) - q57(QSCALE + bit_depth as i32 - 8);
     let log_dc_q = blog64(dc_quantizer) - q57(QSCALE + bit_depth as i32 - 8);
@@ -1457,8 +1457,7 @@
     }
 
     (self.reservoir_frame_delay - self.scale_window_ntus)
-      .max(0)
-      .min(cur_nframes_left - cur_scale_window_nframes)
+      .clamp(0, cur_nframes_left - cur_scale_window_nframes)
   }
 
   pub(crate) fn parse_frame_data_packet(
@@ -1582,8 +1581,7 @@
               }
               frames_needed = (self.reservoir_frame_delay
                 - self.scale_window_ntus)
-                .max(0)
-                .min(cur_nframes_left - cur_scale_window_nframes);
+                .clamp(0, cur_nframes_left - cur_scale_window_nframes);
               // Clear the buffer for the next frame.
               self.des.pass2_buffer_fill = 0;
             } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/rdo.rs new/rav1e-0.6.2+0/src/rdo.rs
--- old/rav1e-0.6.1+0/src/rdo.rs        2022-11-30 23:34:32.000000000 +0100
+++ new/rav1e-0.6.2+0/src/rdo.rs        2022-12-25 06:37:43.000000000 +0100
@@ -592,8 +592,7 @@
       (Self::SHIFT << 11) as i64 - sum / slice.len() as i64;
     Self(
       bexp64((log_inv_mean_q11 + (Self::SHIFT << 11) as i64) << (57 - 11))
-        .min((1 << Self::BITS) - 1)
-        .max(1) as u32,
+        .clamp(1, (1 << Self::BITS) - 1) as u32,
     )
   }
 
@@ -628,8 +627,7 @@
     Self(
       (((self.0 as u64 * rhs.0 as u64) + (1 << (Self::SHIFT - 1)))
         >> Self::SHIFT)
-        .min((1 << Self::BITS) - 1)
-        .max(1) as u32,
+        .clamp(1, (1 << Self::BITS) - 1) as u32,
     )
   }
 }
@@ -1883,17 +1881,11 @@
   let hbsh = subsize.height_mi(); // Half the block size height in blocks
   let four_partitions = [
     tile_bo,
+    TileBlockOffset(BlockOffset { x: tile_bo.0.x + hbsw, y: tile_bo.0.y }),
+    TileBlockOffset(BlockOffset { x: tile_bo.0.x, y: tile_bo.0.y + hbsh }),
     TileBlockOffset(BlockOffset {
-      x: tile_bo.0.x + hbsw as usize,
-      y: tile_bo.0.y,
-    }),
-    TileBlockOffset(BlockOffset {
-      x: tile_bo.0.x,
-      y: tile_bo.0.y + hbsh as usize,
-    }),
-    TileBlockOffset(BlockOffset {
-      x: tile_bo.0.x + hbsw as usize,
-      y: tile_bo.0.y + hbsh as usize,
+      x: tile_bo.0.x + hbsw,
+      y: tile_bo.0.y + hbsh,
     }),
   ];
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/scenechange/fast.rs 
new/rav1e-0.6.2+0/src/scenechange/fast.rs
--- old/rav1e-0.6.1+0/src/scenechange/fast.rs   2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/scenechange/fast.rs   2022-12-25 06:37:43.000000000 
+0100
@@ -63,11 +63,11 @@
         let delta = self.delta_in_planes(first, second);
 
         ScenecutResult {
-          threshold: self.threshold as f64,
-          inter_cost: delta as f64,
-          imp_block_cost: delta as f64,
-          forward_adjusted_cost: delta as f64,
-          backward_adjusted_cost: delta as f64,
+          threshold: self.threshold,
+          inter_cost: delta,
+          imp_block_cost: delta,
+          forward_adjusted_cost: delta,
+          backward_adjusted_cost: delta,
         }
       } else {
         // SAFETY: `downscaled_frame_buffer` is always initialized to 
`Some(..)` with a valid state
@@ -89,11 +89,11 @@
         );
 
         ScenecutResult {
-          threshold: self.threshold as f64,
-          inter_cost: delta as f64,
-          imp_block_cost: delta as f64,
-          backward_adjusted_cost: delta as f64,
-          forward_adjusted_cost: delta as f64,
+          threshold: self.threshold,
+          inter_cost: delta,
+          imp_block_cost: delta,
+          backward_adjusted_cost: delta,
+          forward_adjusted_cost: delta,
         }
       } else {
         // SAFETY: `frame_ref_buffer` is always initialized to `Some(..)` at 
the start
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/tiling/tile.rs 
new/rav1e-0.6.2+0/src/tiling/tile.rs
--- old/rav1e-0.6.1+0/src/tiling/tile.rs        2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/tiling/tile.rs        2022-12-25 06:37:43.000000000 
+0100
@@ -49,8 +49,8 @@
   pub fn to_frame_block_offset(
     &self, tile_bo: TileBlockOffset, xdec: usize, ydec: usize,
   ) -> PlaneBlockOffset {
-    debug_assert!(self.x as usize % (MI_SIZE >> xdec) == 0);
-    debug_assert!(self.y as usize % (MI_SIZE >> ydec) == 0);
+    debug_assert!(self.x % (MI_SIZE >> xdec) == 0);
+    debug_assert!(self.y % (MI_SIZE >> ydec) == 0);
     let bx = self.x >> (MI_SIZE_LOG2 - xdec);
     let by = self.y >> (MI_SIZE_LOG2 - ydec);
     PlaneBlockOffset(BlockOffset { x: bx + tile_bo.0.x, y: by + tile_bo.0.y })
@@ -62,10 +62,10 @@
     ydec: usize,
   ) -> PlaneSuperBlockOffset {
     debug_assert!(sb_size_log2 == 6 || sb_size_log2 == 7);
-    debug_assert!(self.x as usize % (1 << (sb_size_log2 - xdec)) == 0);
-    debug_assert!(self.y as usize % (1 << (sb_size_log2 - ydec)) == 0);
-    let sbx = self.x as usize >> (sb_size_log2 - xdec);
-    let sby = self.y as usize >> (sb_size_log2 - ydec);
+    debug_assert!(self.x % (1 << (sb_size_log2 - xdec)) == 0);
+    debug_assert!(self.y % (1 << (sb_size_log2 - ydec)) == 0);
+    let sbx = self.x >> (sb_size_log2 - xdec);
+    let sby = self.y >> (sb_size_log2 - ydec);
     PlaneSuperBlockOffset(SuperBlockOffset {
       x: sbx + tile_sbo.0.x,
       y: sby + tile_sbo.0.y,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/tiling/tile_blocks.rs 
new/rav1e-0.6.2+0/src/tiling/tile_blocks.rs
--- old/rav1e-0.6.1+0/src/tiling/tile_blocks.rs 2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/tiling/tile_blocks.rs 2022-12-25 06:37:43.000000000 
+0100
@@ -287,7 +287,7 @@
     let bh = cmp::min(bo.y + MIB_SIZE, self.rows);
     for y in bo.y..bh {
       for x in bo.x..bw {
-        self[y as usize][x as usize].cdef_index = cdef_index;
+        self[y][x].cdef_index = cdef_index;
       }
     }
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rav1e-0.6.1+0/src/tiling/tiler.rs 
new/rav1e-0.6.2+0/src/tiling/tiler.rs
--- old/rav1e-0.6.1+0/src/tiling/tiler.rs       2022-11-30 23:34:32.000000000 
+0100
+++ new/rav1e-0.6.2+0/src/tiling/tiler.rs       2022-12-25 06:37:43.000000000 
+0100
@@ -93,7 +93,7 @@
     );
 
     let tile_cols_log2 =
-      tile_cols_log2.max(min_tile_cols_log2).min(max_tile_cols_log2);
+      tile_cols_log2.clamp(min_tile_cols_log2, max_tile_cols_log2);
     let tile_width_sb_pre =
       sb_cols.align_power_of_two_and_shift(tile_cols_log2);
 
@@ -134,8 +134,7 @@
       };
     let tile_rows_log2 = tile_rows_log2
       .max(min_tile_rows_log2)
-      .max(min_tile_rows_ratelimit_log2)
-      .min(max_tile_rows_log2);
+      .clamp(min_tile_rows_ratelimit_log2, max_tile_rows_log2);
     let tile_height_sb = sb_rows.align_power_of_two_and_shift(tile_rows_log2);
 
     let rows = (frame_height_sb + tile_height_sb - 1) / tile_height_sb;

++++++ rav1e-cargo-no-git-default.patch ++++++
Index: rav1e/Cargo.toml
===================================================================
--- rav1e.orig/Cargo.toml       2023-01-02 16:54:30.914458207 +0100
+++ rav1e/Cargo.toml    2023-01-02 17:06:28.018646860 +0100
@@ -38,7 +38,7 @@ binaries = [
     "av-metrics",
     "nom",
 ]
-default = ["binaries", "asm", "threading", "signal_support", "git_version"]
+default = ["binaries", "asm", "threading", "signal_support"]
 git_version = ["built/git2"]
 asm = ["nasm-rs", "cc"]
 threading = ["rayon/threads"]

++++++ rav1e.obsinfo ++++++
--- /var/tmp/diff_new_pack.Igcofa/_old  2023-01-04 17:51:04.869643516 +0100
+++ /var/tmp/diff_new_pack.Igcofa/_new  2023-01-04 17:51:04.873643540 +0100
@@ -1,5 +1,5 @@
 name: rav1e
-version: 0.6.1+0
-mtime: 1669847672
-commit: 0fb96baa0a8c2a539ad0c148b6b2f9cfed37707a
+version: 0.6.2+0
+mtime: 1671946663
+commit: b57f8150d566ff353253e52d20623c2684243476
 

++++++ vendor.tar.xz ++++++
/work/SRC/openSUSE:Factory/rav1e/vendor.tar.xz 
/work/SRC/openSUSE:Factory/.rav1e.new.1563/vendor.tar.xz differ: char 26, line 1

Reply via email to