| Index: media/cast/test/utility/video_utility.cc
|
| diff --git a/media/cast/test/utility/video_utility.cc b/media/cast/test/utility/video_utility.cc
|
| index a11de5f43fdee6ec56b82cee6054b8ff5da84697..a63d7cf2b74a9c900e09a0b0f041da0e96d7b8da 100644
|
| --- a/media/cast/test/utility/video_utility.cc
|
| +++ b/media/cast/test/utility/video_utility.cc
|
| @@ -66,12 +66,12 @@ void PopulateVideoFrame(VideoFrame* frame, int start_value) {
|
| // Set Y.
|
| const int height = frame_size.height();
|
| const int stride_y = frame->stride(VideoFrame::kYPlane);
|
| - uint8* y_plane = frame->data(VideoFrame::kYPlane);
|
| + uint8_t* y_plane = frame->data(VideoFrame::kYPlane);
|
| for (int j = 0; j < height; ++j) {
|
| const int stripe_j = (j / stripe_size) * stripe_size;
|
| for (int i = 0; i < stride_y; ++i) {
|
| const int stripe_i = (i / stripe_size) * stripe_size;
|
| - *y_plane = static_cast<uint8>(start_value + stripe_i + stripe_j);
|
| + *y_plane = static_cast<uint8_t>(start_value + stripe_i + stripe_j);
|
| ++y_plane;
|
| }
|
| }
|
| @@ -79,7 +79,7 @@ void PopulateVideoFrame(VideoFrame* frame, int start_value) {
|
| const int half_height = (height + 1) / 2;
|
| if (frame->format() == PIXEL_FORMAT_NV12) {
|
| const int stride_uv = frame->stride(VideoFrame::kUVPlane);
|
| - uint8* uv_plane = frame->data(VideoFrame::kUVPlane);
|
| + uint8_t* uv_plane = frame->data(VideoFrame::kUVPlane);
|
|
|
| // Set U and V.
|
| for (int j = 0; j < half_height; ++j) {
|
| @@ -87,7 +87,7 @@ void PopulateVideoFrame(VideoFrame* frame, int start_value) {
|
| for (int i = 0; i < stride_uv; i += 2) {
|
| const int stripe_i = (i / stripe_size) * stripe_size;
|
| *uv_plane = *(uv_plane + 1) =
|
| - static_cast<uint8>(start_value + stripe_i + stripe_j);
|
| + static_cast<uint8_t>(start_value + stripe_i + stripe_j);
|
| uv_plane += 2;
|
| }
|
| }
|
| @@ -96,15 +96,15 @@ void PopulateVideoFrame(VideoFrame* frame, int start_value) {
|
| frame->format() == PIXEL_FORMAT_YV12);
|
| const int stride_u = frame->stride(VideoFrame::kUPlane);
|
| const int stride_v = frame->stride(VideoFrame::kVPlane);
|
| - uint8* u_plane = frame->data(VideoFrame::kUPlane);
|
| - uint8* v_plane = frame->data(VideoFrame::kVPlane);
|
| + uint8_t* u_plane = frame->data(VideoFrame::kUPlane);
|
| + uint8_t* v_plane = frame->data(VideoFrame::kVPlane);
|
|
|
| // Set U.
|
| for (int j = 0; j < half_height; ++j) {
|
| const int stripe_j = (j / stripe_size) * stripe_size;
|
| for (int i = 0; i < stride_u; ++i) {
|
| const int stripe_i = (i / stripe_size) * stripe_size;
|
| - *u_plane = static_cast<uint8>(start_value + stripe_i + stripe_j);
|
| + *u_plane = static_cast<uint8_t>(start_value + stripe_i + stripe_j);
|
| ++u_plane;
|
| }
|
| }
|
| @@ -114,7 +114,7 @@ void PopulateVideoFrame(VideoFrame* frame, int start_value) {
|
| const int stripe_j = (j / stripe_size) * stripe_size;
|
| for (int i = 0; i < stride_v; ++i) {
|
| const int stripe_i = (i / stripe_size) * stripe_size;
|
| - *v_plane = static_cast<uint8>(start_value + stripe_i + stripe_j);
|
| + *v_plane = static_cast<uint8_t>(start_value + stripe_i + stripe_j);
|
| ++v_plane;
|
| }
|
| }
|
| @@ -127,9 +127,9 @@ void PopulateVideoFrameWithNoise(VideoFrame* frame) {
|
| const int stride_u = frame->stride(VideoFrame::kUPlane);
|
| const int stride_v = frame->stride(VideoFrame::kVPlane);
|
| const int half_height = (height + 1) / 2;
|
| - uint8* const y_plane = frame->data(VideoFrame::kYPlane);
|
| - uint8* const u_plane = frame->data(VideoFrame::kUPlane);
|
| - uint8* const v_plane = frame->data(VideoFrame::kVPlane);
|
| + uint8_t* const y_plane = frame->data(VideoFrame::kYPlane);
|
| + uint8_t* const u_plane = frame->data(VideoFrame::kUPlane);
|
| + uint8_t* const v_plane = frame->data(VideoFrame::kVPlane);
|
|
|
| base::RandBytes(y_plane, height * stride_y);
|
| base::RandBytes(u_plane, half_height * stride_u);
|
| @@ -142,11 +142,11 @@ bool PopulateVideoFrameFromFile(VideoFrame* frame, FILE* video_file) {
|
| const int half_width = (width + 1) / 2;
|
| const int half_height = (height + 1) / 2;
|
| const size_t frame_size = width * height + 2 * half_width * half_height;
|
| - uint8* const y_plane = frame->data(VideoFrame::kYPlane);
|
| - uint8* const u_plane = frame->data(VideoFrame::kUPlane);
|
| - uint8* const v_plane = frame->data(VideoFrame::kVPlane);
|
| + uint8_t* const y_plane = frame->data(VideoFrame::kYPlane);
|
| + uint8_t* const u_plane = frame->data(VideoFrame::kUPlane);
|
| + uint8_t* const v_plane = frame->data(VideoFrame::kVPlane);
|
|
|
| - uint8* const raw_data = new uint8[frame_size];
|
| + uint8_t* const raw_data = new uint8_t[frame_size];
|
| const size_t count = fread(raw_data, 1, frame_size, video_file);
|
| if (count != frame_size)
|
| return false;
|
|
|