Fix Windows x64 errors in video_codecs_test_framework
Fixed a few size_t converted to int warnings (interpreted as errors). Fixed cpplint warnings. BUG=webrtc:1323 TEST=manual compile on Windows with GYP_DEFINES=target_arch=x64 and ninja -C out\Debug_x64 (also compiled with Release_x64) Review URL: https://webrtc-codereview.appspot.com/1097011 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3507 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
6388c3e2fd
commit
9c4e662ea8
@ -13,6 +13,7 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include "system_wrappers/interface/cpu_info.h"
|
||||
|
||||
@ -59,7 +60,7 @@ bool VideoProcessorImpl::Init() {
|
||||
bit_rate_factor_ = config_.codec_settings->maxFramerate * 0.001 * 8; // bits
|
||||
|
||||
// Initialize data structures used by the encoder/decoder APIs
|
||||
int frame_length_in_bytes = frame_reader_->FrameLength();
|
||||
size_t frame_length_in_bytes = frame_reader_->FrameLength();
|
||||
source_buffer_ = new WebRtc_UWord8[frame_length_in_bytes];
|
||||
last_successful_frame_buffer_ = new WebRtc_UWord8[frame_length_in_bytes];
|
||||
// Set fixed properties common for all frames.
|
||||
@ -325,7 +326,7 @@ void VideoProcessorImpl::FrameDecoded(const I420VideoFrame& image) {
|
||||
} else { // No resize.
|
||||
// Update our copy of the last successful frame:
|
||||
// TODO(mikhal): Add as a member function, so won't be allocated per frame.
|
||||
int length = CalcBufferSize(kI420,image.width(), image.height());
|
||||
int length = CalcBufferSize(kI420, image.width(), image.height());
|
||||
scoped_array<uint8_t> image_buffer(new uint8_t[length]);
|
||||
length = ExtractBuffer(image, length, image_buffer.get());
|
||||
assert(length > 0);
|
||||
|
@ -12,13 +12,13 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
FrameReaderImpl::FrameReaderImpl(std::string input_filename,
|
||||
int frame_length_in_bytes)
|
||||
size_t frame_length_in_bytes)
|
||||
: input_filename_(input_filename),
|
||||
frame_length_in_bytes_(frame_length_in_bytes),
|
||||
input_file_(NULL) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -52,7 +52,7 @@ class FrameReaderImpl : public FrameReader {
|
||||
// input_filename The file to read from.
|
||||
// frame_length_in_bytes The size of each frame.
|
||||
// For YUV this is 3 * width * height / 2
|
||||
FrameReaderImpl(std::string input_filename, int frame_length_in_bytes);
|
||||
FrameReaderImpl(std::string input_filename, size_t frame_length_in_bytes);
|
||||
virtual ~FrameReaderImpl();
|
||||
bool Init();
|
||||
bool ReadFrame(WebRtc_UWord8* source_buffer);
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "testsupport/frame_writer.h"
|
||||
#include "webrtc/test/testsupport/frame_writer.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
@ -16,7 +16,7 @@ namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
FrameWriterImpl::FrameWriterImpl(std::string output_filename,
|
||||
int frame_length_in_bytes)
|
||||
size_t frame_length_in_bytes)
|
||||
: output_filename_(output_filename),
|
||||
frame_length_in_bytes_(frame_length_in_bytes),
|
||||
output_file_(NULL) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -50,7 +50,7 @@ class FrameWriterImpl : public FrameWriter {
|
||||
// existing.
|
||||
// frame_length_in_bytes The size of each frame.
|
||||
// For YUV: 3*width*height/2
|
||||
FrameWriterImpl(std::string output_filename, int frame_length_in_bytes);
|
||||
FrameWriterImpl(std::string output_filename, size_t frame_length_in_bytes);
|
||||
virtual ~FrameWriterImpl();
|
||||
bool Init();
|
||||
bool WriteFrame(WebRtc_UWord8* frame_buffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user