shithub: libvpx

Download patch

ref: 51da38f8ab087ca554c47e387ad9aff3f38d379f
parent: f4822bb957fc7084f3ff1e75341af04f22d16e82
parent: 4f50dc943df0b2f3b08c670968a64aeb41ca7f58
author: Fyodor Kyslov <kyslov@google.com>
date: Thu Feb 7 18:37:33 EST 2019

Merge "Fixing ClangTidy issues reported by downstream integration"

--- a/test/yuv_temporal_filter_test.cc
+++ b/test/yuv_temporal_filter_test.cc
@@ -144,8 +144,8 @@
   const int rounding = (1 << strength) >> 1;
 
   // Get the square diffs
-  for (int row = 0; row < (int)block_height; row++) {
-    for (int col = 0; col < (int)block_width; col++) {
+  for (int row = 0; row < static_cast<int>(block_height); row++) {
+    for (int col = 0; col < static_cast<int>(block_width); col++) {
       const int diff = y_src_ptr[row * y_src_stride + col] -
                        y_pre_ptr[row * y_pre_stride + col];
       y_diff_ptr[row * y_diff_stride + col] = diff * diff;
@@ -152,8 +152,8 @@
     }
   }
 
-  for (int row = 0; row < (int)uv_block_height; row++) {
-    for (int col = 0; col < (int)uv_block_width; col++) {
+  for (int row = 0; row < uv_block_height; row++) {
+    for (int col = 0; col < uv_block_width; col++) {
       const int u_diff = u_src_ptr[row * uv_src_stride + col] -
                          u_pre_ptr[row * uv_pre_stride + col];
       const int v_diff = v_src_ptr[row * uv_src_stride + col] -
@@ -164,8 +164,8 @@
   }
 
   // Apply the filter to luma
-  for (int row = 0; row < (int)block_height; row++) {
-    for (int col = 0; col < (int)block_width; col++) {
+  for (int row = 0; row < static_cast<int>(block_height); row++) {
+    for (int col = 0; col < static_cast<int>(block_width); col++) {
       const int uv_row = row >> ss_y;
       const int uv_col = col >> ss_x;
       const int filter_weight = GetFilterWeight(row, col, block_height,
@@ -182,8 +182,8 @@
           const int sub_row = row + row_step;
           const int sub_col = col + col_step;
 
-          if (sub_row >= 0 && sub_row < (int)block_height && sub_col >= 0 &&
-              sub_col < (int)block_width) {
+          if (sub_row >= 0 && sub_row < static_cast<int>(block_height) &&
+              sub_col >= 0 && sub_col < static_cast<int>(block_width)) {
             y_mod += y_diff_ptr[sub_row * y_diff_stride + sub_col];
             y_num_used++;
           }
@@ -208,8 +208,8 @@
   }
 
   // Apply the filter to chroma
-  for (int uv_row = 0; uv_row < (int)uv_block_height; uv_row++) {
-    for (int uv_col = 0; uv_col < (int)uv_block_width; uv_col++) {
+  for (int uv_row = 0; uv_row < uv_block_height; uv_row++) {
+    for (int uv_col = 0; uv_col < uv_block_width; uv_col++) {
       const int y_row = uv_row << ss_y;
       const int y_col = uv_col << ss_x;
       const int filter_weight = GetFilterWeight(
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -2327,8 +2327,7 @@
   // Initialize thread frame counts.
   if (!cm->frame_parallel_decoding_mode) {
     for (col = 0; col < tile_cols; ++col) {
-      TileWorkerData *const tile_data =
-          (TileWorkerData *)&pbi->tile_worker_data[col];
+      TileWorkerData *const tile_data = &pbi->tile_worker_data[col];
       vp9_zero(tile_data->counts);
     }
   }
@@ -2372,8 +2371,7 @@
   // Accumulate thread frame counts.
   if (!cm->frame_parallel_decoding_mode) {
     for (i = 0; i < tile_cols; ++i) {
-      TileWorkerData *const tile_data =
-          (TileWorkerData *)&pbi->tile_worker_data[i];
+      TileWorkerData *const tile_data = &pbi->tile_worker_data[i];
       vp9_accumulate_frame_counts(&cm->counts, &tile_data->counts, 1);
     }
   }
--- a/vp9/encoder/vp9_temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -424,8 +424,8 @@
     }
   }
 
-  for (row = 0; row < (int)uv_block_height; row++) {
-    for (col = 0; col < (int)uv_block_width; col++) {
+  for (row = 0; row < uv_block_height; row++) {
+    for (col = 0; col < uv_block_width; col++) {
       const int u_diff =
           u_src[row * uv_src_stride + col] - u_pre[row * uv_pre_stride + col];
       const int v_diff =
@@ -480,8 +480,8 @@
   }
 
   // Apply the filter to chroma
-  for (uv_row = 0; uv_row < (int)uv_block_height; uv_row++) {
-    for (uv_col = 0; uv_col < (int)uv_block_width; uv_col++) {
+  for (uv_row = 0; uv_row < uv_block_height; uv_row++) {
+    for (uv_col = 0; uv_col < uv_block_width; uv_col++) {
       const int y_row = uv_row << ss_y;
       const int y_col = uv_col << ss_x;
       const int filter_weight = get_filter_weight(