shithub: libvpx

Download patch

ref: 5d678fe78a5a0ece72cddbf7d7071ef8dc3598dc
parent: 71d09c34fff6f51a153b8732eef6bfb4e381fcbf
author: James Zern <[email protected]>
date: Wed Jun 9 11:07:15 EDT 2021

simple_encode: fix some -Wsign-compare warnings

Bug: webm:1731
Change-Id: I1db777c0c3a8784fb3dcf7cd39f78ebf833ab915

--- a/vp9/simple_encode.cc
+++ b/vp9/simple_encode.cc
@@ -1248,7 +1248,7 @@
     start_show_index += gop_command.show_frame_count;
     coding_frame_count += gop_command_coding_frame_count(&gop_command);
   }
-  assert(start_show_index == gop_map.size());
+  assert(static_cast<size_t>(start_show_index) == gop_map.size());
   return coding_frame_count;
 }
 
@@ -1279,7 +1279,8 @@
 
 std::vector<int> SimpleEncode::ComputeKeyFrameMap() const {
   // The last entry of first_pass_stats is the overall stats.
-  assert(impl_ptr_->first_pass_stats.size() == num_frames_ + 1);
+  assert(impl_ptr_->first_pass_stats.size() ==
+         static_cast<size_t>(num_frames_) + 1);
   vpx_rational_t frame_rate =
       make_vpx_rational(frame_rate_num_, frame_rate_den_);
   const VP9EncoderConfig oxcf = GetEncodeConfig(