Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: content/common/gpu/media/video_encode_accelerator_unittest.cc

Issue 318833002: fix sign-compare warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/memory_mapped_file.h" 9 #include "base/files/memory_mapped_file.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // Without it, AppendToFile() will not work. 526 // Without it, AppendToFile() will not work.
527 EXPECT_EQ(0, base::WriteFile(out_filename, NULL, 0)); 527 EXPECT_EQ(0, base::WriteFile(out_filename, NULL, 0));
528 } 528 }
529 529
530 input_buffer_size_ = 530 input_buffer_size_ =
531 media::VideoFrame::AllocationSize(kInputFormat, test_stream.size); 531 media::VideoFrame::AllocationSize(kInputFormat, test_stream.size);
532 CHECK_GT(input_buffer_size_, 0UL); 532 CHECK_GT(input_buffer_size_, 0UL);
533 533
534 // Calculate the number of frames in the input stream by dividing its length 534 // Calculate the number of frames in the input stream by dividing its length
535 // in bytes by frame size in bytes. 535 // in bytes by frame size in bytes.
536 CHECK_EQ(test_stream_.input_file.length() % input_buffer_size_, 0) 536 CHECK_EQ(test_stream_.input_file.length() % input_buffer_size_, 0U)
537 << "Stream byte size is not a product of calculated frame byte size"; 537 << "Stream byte size is not a product of calculated frame byte size";
538 num_frames_in_stream_ = test_stream_.input_file.length() / input_buffer_size_; 538 num_frames_in_stream_ = test_stream_.input_file.length() / input_buffer_size_;
539 CHECK_GT(num_frames_in_stream_, 0UL); 539 CHECK_GT(num_frames_in_stream_, 0UL);
540 CHECK_LE(num_frames_in_stream_, kMaxFrameNum); 540 CHECK_LE(num_frames_in_stream_, kMaxFrameNum);
541 541
542 // We may need to loop over the stream more than once if more frames than 542 // We may need to loop over the stream more than once if more frames than
543 // provided is required for bitrate tests. 543 // provided is required for bitrate tests.
544 if (force_bitrate_ && num_frames_in_stream_ < kMinFramesForBitrateTests) { 544 if (force_bitrate_ && num_frames_in_stream_ < kMinFramesForBitrateTests) {
545 DVLOG(1) << "Stream too short for bitrate test (" << num_frames_in_stream_ 545 DVLOG(1) << "Stream too short for bitrate test (" << num_frames_in_stream_
546 << " frames), will loop it to reach " << kMinFramesForBitrateTests 546 << " frames), will loop it to reach " << kMinFramesForBitrateTests
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 test_stream_data->assign(it->second.c_str()); 1018 test_stream_data->assign(it->second.c_str());
1019 continue; 1019 continue;
1020 } 1020 }
1021 if (it->first == "v" || it->first == "vmodule") 1021 if (it->first == "v" || it->first == "vmodule")
1022 continue; 1022 continue;
1023 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; 1023 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
1024 } 1024 }
1025 1025
1026 return RUN_ALL_TESTS(); 1026 return RUN_ALL_TESTS();
1027 } 1027 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698