OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 } | 446 } |
447 r1 += pitch1; | 447 r1 += pitch1; |
448 r2 += pitch2; | 448 r2 += pitch2; |
449 } | 449 } |
450 return true; | 450 return true; |
451 } | 451 } |
452 | 452 |
453 static bool IsEqual(const cricket::VideoFrame& frame, | 453 static bool IsEqual(const cricket::VideoFrame& frame, |
454 int width, | 454 int width, |
455 int height, | 455 int height, |
| 456 int64_t timestamp_us, |
456 const uint8_t* y, | 457 const uint8_t* y, |
457 uint32_t ypitch, | 458 uint32_t ypitch, |
458 const uint8_t* u, | 459 const uint8_t* u, |
459 uint32_t upitch, | 460 uint32_t upitch, |
460 const uint8_t* v, | 461 const uint8_t* v, |
461 uint32_t vpitch, | 462 uint32_t vpitch, |
462 int max_error) { | 463 int max_error) { |
463 return IsSize(frame, width, height) && | 464 return IsSize(frame, width, height) && |
| 465 frame.timestamp_us() == timestamp_us && |
464 IsPlaneEqual("y", frame.video_frame_buffer()->DataY(), | 466 IsPlaneEqual("y", frame.video_frame_buffer()->DataY(), |
465 frame.video_frame_buffer()->StrideY(), y, ypitch, | 467 frame.video_frame_buffer()->StrideY(), y, ypitch, |
466 static_cast<uint32_t>(width), | 468 static_cast<uint32_t>(width), |
467 static_cast<uint32_t>(height), max_error) && | 469 static_cast<uint32_t>(height), max_error) && |
468 IsPlaneEqual("u", frame.video_frame_buffer()->DataU(), | 470 IsPlaneEqual("u", frame.video_frame_buffer()->DataU(), |
469 frame.video_frame_buffer()->StrideU(), u, upitch, | 471 frame.video_frame_buffer()->StrideU(), u, upitch, |
470 static_cast<uint32_t>((width + 1) / 2), | 472 static_cast<uint32_t>((width + 1) / 2), |
471 static_cast<uint32_t>((height + 1) / 2), max_error) && | 473 static_cast<uint32_t>((height + 1) / 2), max_error) && |
472 IsPlaneEqual("v", frame.video_frame_buffer()->DataV(), | 474 IsPlaneEqual("v", frame.video_frame_buffer()->DataV(), |
473 frame.video_frame_buffer()->StrideV(), v, vpitch, | 475 frame.video_frame_buffer()->StrideV(), v, vpitch, |
474 static_cast<uint32_t>((width + 1) / 2), | 476 static_cast<uint32_t>((width + 1) / 2), |
475 static_cast<uint32_t>((height + 1) / 2), max_error); | 477 static_cast<uint32_t>((height + 1) / 2), max_error); |
476 } | 478 } |
477 | 479 |
478 static bool IsEqual(const cricket::VideoFrame& frame1, | 480 static bool IsEqual(const cricket::VideoFrame& frame1, |
479 const cricket::VideoFrame& frame2, | 481 const cricket::VideoFrame& frame2, |
480 int max_error) { | 482 int max_error) { |
481 return frame1.timestamp_us() == frame2.timestamp_us() && | 483 return IsEqual(frame1, |
482 IsEqual(frame1, | |
483 frame2.width(), frame2.height(), | 484 frame2.width(), frame2.height(), |
| 485 frame2.timestamp_us(), |
484 frame2.video_frame_buffer()->DataY(), | 486 frame2.video_frame_buffer()->DataY(), |
485 frame2.video_frame_buffer()->StrideY(), | 487 frame2.video_frame_buffer()->StrideY(), |
486 frame2.video_frame_buffer()->DataU(), | 488 frame2.video_frame_buffer()->DataU(), |
487 frame2.video_frame_buffer()->StrideU(), | 489 frame2.video_frame_buffer()->StrideU(), |
488 frame2.video_frame_buffer()->DataV(), | 490 frame2.video_frame_buffer()->DataV(), |
489 frame2.video_frame_buffer()->StrideV(), max_error); | 491 frame2.video_frame_buffer()->StrideV(), |
490 } | |
491 | |
492 static bool IsEqual( | |
493 const cricket::VideoFrame& frame1, | |
494 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, | |
495 int max_error) { | |
496 return IsEqual(frame1, buffer->width(), buffer->height(), | |
497 buffer->DataY(), buffer->StrideY(), | |
498 buffer->DataU(), buffer->StrideU(), | |
499 buffer->DataV(), buffer->StrideV(), | |
500 max_error); | 492 max_error); |
501 } | 493 } |
502 | 494 |
503 static bool IsEqualWithCrop(const cricket::VideoFrame& frame1, | 495 static bool IsEqualWithCrop(const cricket::VideoFrame& frame1, |
504 const cricket::VideoFrame& frame2, | 496 const cricket::VideoFrame& frame2, |
505 int hcrop, int vcrop, int max_error) { | 497 int hcrop, int vcrop, int max_error) { |
506 return frame1.width() <= frame2.width() && | 498 return frame1.width() <= frame2.width() && |
507 frame1.height() <= frame2.height() && | 499 frame1.height() <= frame2.height() && |
508 frame1.timestamp_us() == frame2.timestamp_us() && | |
509 IsEqual(frame1, | 500 IsEqual(frame1, |
510 frame2.width() - hcrop * 2, | 501 frame2.width() - hcrop * 2, |
511 frame2.height() - vcrop * 2, | 502 frame2.height() - vcrop * 2, |
| 503 frame2.timestamp_us(), |
512 frame2.video_frame_buffer()->DataY() | 504 frame2.video_frame_buffer()->DataY() |
513 + vcrop * frame2.video_frame_buffer()->StrideY() | 505 + vcrop * frame2.video_frame_buffer()->StrideY() |
514 + hcrop, | 506 + hcrop, |
515 frame2.video_frame_buffer()->StrideY(), | 507 frame2.video_frame_buffer()->StrideY(), |
516 frame2.video_frame_buffer()->DataU() | 508 frame2.video_frame_buffer()->DataU() |
517 + vcrop * frame2.video_frame_buffer()->StrideU() / 2 | 509 + vcrop * frame2.video_frame_buffer()->StrideU() / 2 |
518 + hcrop / 2, | 510 + hcrop / 2, |
519 frame2.video_frame_buffer()->StrideU(), | 511 frame2.video_frame_buffer()->StrideU(), |
520 frame2.video_frame_buffer()->DataV() | 512 frame2.video_frame_buffer()->DataV() |
521 + vcrop * frame2.video_frame_buffer()->StrideV() / 2 | 513 + vcrop * frame2.video_frame_buffer()->StrideV() / 2 |
(...skipping 18 matching lines...) Expand all Loading... |
540 T frame; | 532 T frame; |
541 EXPECT_TRUE(IsNull(frame)); | 533 EXPECT_TRUE(IsNull(frame)); |
542 std::unique_ptr<rtc::MemoryStream> ms( | 534 std::unique_ptr<rtc::MemoryStream> ms( |
543 CreateYuvSample(kWidth, kHeight, 12)); | 535 CreateYuvSample(kWidth, kHeight, 12)); |
544 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_I420, | 536 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_I420, |
545 kWidth, kHeight, &frame)); | 537 kWidth, kHeight, &frame)); |
546 | 538 |
547 const uint8_t* y = reinterpret_cast<uint8_t*>(ms.get()->GetBuffer()); | 539 const uint8_t* y = reinterpret_cast<uint8_t*>(ms.get()->GetBuffer()); |
548 const uint8_t* u = y + kWidth * kHeight; | 540 const uint8_t* u = y + kWidth * kHeight; |
549 const uint8_t* v = u + kWidth * kHeight / 4; | 541 const uint8_t* v = u + kWidth * kHeight / 4; |
550 EXPECT_TRUE(IsEqual(frame, kWidth, kHeight, y, kWidth, u, kWidth / 2, v, | 542 EXPECT_TRUE(IsEqual(frame, kWidth, kHeight, 0, y, kWidth, u, |
551 kWidth / 2, 0)); | 543 kWidth / 2, v, kWidth / 2, 0)); |
552 } | 544 } |
553 | 545 |
554 // Test constructing an image from a YV12 buffer. | 546 // Test constructing an image from a YV12 buffer. |
555 void ConstructYV12() { | 547 void ConstructYV12() { |
556 T frame; | 548 T frame; |
557 std::unique_ptr<rtc::MemoryStream> ms( | 549 std::unique_ptr<rtc::MemoryStream> ms( |
558 CreateYuvSample(kWidth, kHeight, 12)); | 550 CreateYuvSample(kWidth, kHeight, 12)); |
559 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_YV12, | 551 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_YV12, |
560 kWidth, kHeight, &frame)); | 552 kWidth, kHeight, &frame)); |
561 | 553 |
562 const uint8_t* y = reinterpret_cast<uint8_t*>(ms.get()->GetBuffer()); | 554 const uint8_t* y = reinterpret_cast<uint8_t*>(ms.get()->GetBuffer()); |
563 const uint8_t* v = y + kWidth * kHeight; | 555 const uint8_t* v = y + kWidth * kHeight; |
564 const uint8_t* u = v + kWidth * kHeight / 4; | 556 const uint8_t* u = v + kWidth * kHeight / 4; |
565 EXPECT_TRUE(IsEqual(frame, kWidth, kHeight, y, kWidth, u, kWidth / 2, v, | 557 EXPECT_TRUE(IsEqual(frame, kWidth, kHeight, 0, y, kWidth, u, |
566 kWidth / 2, 0)); | 558 kWidth / 2, v, kWidth / 2, 0)); |
567 } | 559 } |
568 | 560 |
569 // Test constructing an image from a I422 buffer. | 561 // Test constructing an image from a I422 buffer. |
570 void ConstructI422() { | 562 void ConstructI422() { |
571 T frame1, frame2; | 563 T frame1, frame2; |
572 ASSERT_TRUE(LoadFrameNoRepeat(&frame1)); | 564 ASSERT_TRUE(LoadFrameNoRepeat(&frame1)); |
573 size_t buf_size = kWidth * kHeight * 2; | 565 size_t buf_size = kWidth * kHeight * 2; |
574 std::unique_ptr<uint8_t[]> buf(new uint8_t[buf_size + kAlignment]); | 566 std::unique_ptr<uint8_t[]> buf(new uint8_t[buf_size + kAlignment]); |
575 uint8_t* y = ALIGNP(buf.get(), kAlignment); | 567 uint8_t* y = ALIGNP(buf.get(), kAlignment); |
576 uint8_t* u = y + kWidth * kHeight; | 568 uint8_t* u = y + kWidth * kHeight; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 ASSERT_TRUE(frame1); | 765 ASSERT_TRUE(frame1); |
774 T frame2; | 766 T frame2; |
775 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_RAW, | 767 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_RAW, |
776 kWidth, kHeight, &frame2)); | 768 kWidth, kHeight, &frame2)); |
777 EXPECT_TRUE(IsEqual(*frame1, frame2, 2)); | 769 EXPECT_TRUE(IsEqual(*frame1, frame2, 2)); |
778 } | 770 } |
779 | 771 |
780 // Macro to help test different rotations | 772 // Macro to help test different rotations |
781 #define TEST_MIRROR(FOURCC, BPP) \ | 773 #define TEST_MIRROR(FOURCC, BPP) \ |
782 void Construct##FOURCC##Mirror() { \ | 774 void Construct##FOURCC##Mirror() { \ |
783 T frame1, frame2; \ | 775 T frame1, frame2, frame3; \ |
784 rtc::scoped_refptr<webrtc::I420Buffer> res_buffer; \ | |
785 std::unique_ptr<rtc::MemoryStream> ms( \ | 776 std::unique_ptr<rtc::MemoryStream> ms( \ |
786 CreateYuvSample(kWidth, kHeight, BPP)); \ | 777 CreateYuvSample(kWidth, kHeight, BPP)); \ |
787 ASSERT_TRUE(ms.get() != NULL); \ | 778 ASSERT_TRUE(ms.get() != NULL); \ |
788 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_##FOURCC, kWidth, \ | 779 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_##FOURCC, kWidth, \ |
789 -kHeight, kWidth, kHeight, \ | 780 -kHeight, kWidth, kHeight, \ |
790 webrtc::kVideoRotation_180, &frame1)); \ | 781 webrtc::kVideoRotation_180, &frame1)); \ |
791 size_t data_size; \ | 782 size_t data_size; \ |
792 bool ret = ms->GetSize(&data_size); \ | 783 bool ret = ms->GetSize(&data_size); \ |
793 EXPECT_TRUE(ret); \ | 784 EXPECT_TRUE(ret); \ |
794 EXPECT_TRUE(frame2.Init(cricket::FOURCC_##FOURCC, kWidth, kHeight, kWidth, \ | 785 EXPECT_TRUE(frame2.Init(cricket::FOURCC_##FOURCC, kWidth, kHeight, kWidth, \ |
795 kHeight, \ | 786 kHeight, \ |
796 reinterpret_cast<uint8_t*>(ms->GetBuffer()), \ | 787 reinterpret_cast<uint8_t*>(ms->GetBuffer()), \ |
797 data_size, 0, webrtc::kVideoRotation_0)); \ | 788 data_size, 0, webrtc::kVideoRotation_0)); \ |
798 int width_rotate = frame1.width(); \ | 789 int width_rotate = frame1.width(); \ |
799 int height_rotate = frame1.height(); \ | 790 int height_rotate = frame1.height(); \ |
800 res_buffer = webrtc::I420Buffer::Create(width_rotate, height_rotate); \ | 791 frame3.InitToEmptyBuffer(width_rotate, height_rotate); \ |
801 libyuv::I420Mirror(frame2.video_frame_buffer()->DataY(), \ | 792 libyuv::I420Mirror(frame2.video_frame_buffer()->DataY(), \ |
802 frame2.video_frame_buffer()->StrideY(), \ | 793 frame2.video_frame_buffer()->StrideY(), \ |
803 frame2.video_frame_buffer()->DataU(), \ | 794 frame2.video_frame_buffer()->DataU(), \ |
804 frame2.video_frame_buffer()->StrideU(), \ | 795 frame2.video_frame_buffer()->StrideU(), \ |
805 frame2.video_frame_buffer()->DataV(), \ | 796 frame2.video_frame_buffer()->DataV(), \ |
806 frame2.video_frame_buffer()->StrideV(), \ | 797 frame2.video_frame_buffer()->StrideV(), \ |
807 res_buffer->MutableDataY(), res_buffer->StrideY(), \ | 798 frame3.video_frame_buffer()->MutableDataY(), \ |
808 res_buffer->MutableDataU(), res_buffer->StrideU(), \ | 799 frame3.video_frame_buffer()->StrideY(), \ |
809 res_buffer->MutableDataV(), res_buffer->StrideV(), \ | 800 frame3.video_frame_buffer()->MutableDataU(), \ |
810 kWidth, kHeight); \ | 801 frame3.video_frame_buffer()->StrideU(), \ |
811 EXPECT_TRUE(IsEqual(frame1, res_buffer, 0)); \ | 802 frame3.video_frame_buffer()->MutableDataV(), \ |
| 803 frame3.video_frame_buffer()->StrideV(), kWidth, \ |
| 804 kHeight); \ |
| 805 EXPECT_TRUE(IsEqual(frame1, frame3, 0)); \ |
812 } | 806 } |
813 | 807 |
814 TEST_MIRROR(I420, 420) | 808 TEST_MIRROR(I420, 420) |
815 | 809 |
816 // Macro to help test different rotations | 810 // Macro to help test different rotations |
817 #define TEST_ROTATE(FOURCC, BPP, ROTATE) \ | 811 #define TEST_ROTATE(FOURCC, BPP, ROTATE) \ |
818 void Construct##FOURCC##Rotate##ROTATE() { \ | 812 void Construct##FOURCC##Rotate##ROTATE() { \ |
819 T frame1, frame2; \ | 813 T frame1, frame2, frame3; \ |
820 rtc::scoped_refptr<webrtc::I420Buffer> res_buffer; \ | |
821 std::unique_ptr<rtc::MemoryStream> ms( \ | 814 std::unique_ptr<rtc::MemoryStream> ms( \ |
822 CreateYuvSample(kWidth, kHeight, BPP)); \ | 815 CreateYuvSample(kWidth, kHeight, BPP)); \ |
823 ASSERT_TRUE(ms.get() != NULL); \ | 816 ASSERT_TRUE(ms.get() != NULL); \ |
824 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_##FOURCC, kWidth, kHeight, \ | 817 EXPECT_TRUE(LoadFrame(ms.get(), cricket::FOURCC_##FOURCC, kWidth, kHeight, \ |
825 kWidth, kHeight, webrtc::kVideoRotation_##ROTATE, \ | 818 kWidth, kHeight, webrtc::kVideoRotation_##ROTATE, \ |
826 &frame1)); \ | 819 &frame1)); \ |
827 size_t data_size; \ | 820 size_t data_size; \ |
828 bool ret = ms->GetSize(&data_size); \ | 821 bool ret = ms->GetSize(&data_size); \ |
829 EXPECT_TRUE(ret); \ | 822 EXPECT_TRUE(ret); \ |
830 EXPECT_TRUE(frame2.Init(cricket::FOURCC_##FOURCC, kWidth, kHeight, kWidth, \ | 823 EXPECT_TRUE(frame2.Init(cricket::FOURCC_##FOURCC, kWidth, kHeight, kWidth, \ |
831 kHeight, \ | 824 kHeight, \ |
832 reinterpret_cast<uint8_t*>(ms->GetBuffer()), \ | 825 reinterpret_cast<uint8_t*>(ms->GetBuffer()), \ |
833 data_size, 0, webrtc::kVideoRotation_0)); \ | 826 data_size, 0, webrtc::kVideoRotation_0)); \ |
834 int width_rotate = frame1.width(); \ | 827 int width_rotate = frame1.width(); \ |
835 int height_rotate = frame1.height(); \ | 828 int height_rotate = frame1.height(); \ |
836 res_buffer = webrtc::I420Buffer::Create(width_rotate, height_rotate); \ | 829 frame3.InitToEmptyBuffer(width_rotate, height_rotate); \ |
837 libyuv::I420Rotate(frame2.video_frame_buffer()->DataY(), \ | 830 libyuv::I420Rotate(frame2.video_frame_buffer()->DataY(), \ |
838 frame2.video_frame_buffer()->StrideY(), \ | 831 frame2.video_frame_buffer()->StrideY(), \ |
839 frame2.video_frame_buffer()->DataU(), \ | 832 frame2.video_frame_buffer()->DataU(), \ |
840 frame2.video_frame_buffer()->StrideU(), \ | 833 frame2.video_frame_buffer()->StrideU(), \ |
841 frame2.video_frame_buffer()->DataV(), \ | 834 frame2.video_frame_buffer()->DataV(), \ |
842 frame2.video_frame_buffer()->StrideV(), \ | 835 frame2.video_frame_buffer()->StrideV(), \ |
843 res_buffer->MutableDataY(), res_buffer->StrideY(), \ | 836 frame3.video_frame_buffer()->MutableDataY(), \ |
844 res_buffer->MutableDataU(), res_buffer->StrideU(), \ | 837 frame3.video_frame_buffer()->StrideY(), \ |
845 res_buffer->MutableDataV(), res_buffer->StrideV(), \ | 838 frame3.video_frame_buffer()->MutableDataU(), \ |
846 kWidth, kHeight, libyuv::kRotate##ROTATE); \ | 839 frame3.video_frame_buffer()->StrideU(), \ |
847 EXPECT_TRUE(IsEqual(frame1, res_buffer, 0)); \ | 840 frame3.video_frame_buffer()->MutableDataV(), \ |
| 841 frame3.video_frame_buffer()->StrideV(), kWidth, \ |
| 842 kHeight, libyuv::kRotate##ROTATE); \ |
| 843 EXPECT_TRUE(IsEqual(frame1, frame3, 0)); \ |
848 } | 844 } |
849 | 845 |
850 // Test constructing an image with rotation. | 846 // Test constructing an image with rotation. |
851 TEST_ROTATE(I420, 12, 0) | 847 TEST_ROTATE(I420, 12, 0) |
852 TEST_ROTATE(I420, 12, 90) | 848 TEST_ROTATE(I420, 12, 90) |
853 TEST_ROTATE(I420, 12, 180) | 849 TEST_ROTATE(I420, 12, 180) |
854 TEST_ROTATE(I420, 12, 270) | 850 TEST_ROTATE(I420, 12, 270) |
855 TEST_ROTATE(YV12, 12, 0) | 851 TEST_ROTATE(YV12, 12, 0) |
856 TEST_ROTATE(YV12, 12, 90) | 852 TEST_ROTATE(YV12, 12, 90) |
857 TEST_ROTATE(YV12, 12, 180) | 853 TEST_ROTATE(YV12, 12, 180) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 void ConstructI4201Pixel() { | 937 void ConstructI4201Pixel() { |
942 T frame; | 938 T frame; |
943 uint8_t pixel[3] = {1, 2, 3}; | 939 uint8_t pixel[3] = {1, 2, 3}; |
944 for (int i = 0; i < repeat_; ++i) { | 940 for (int i = 0; i < repeat_; ++i) { |
945 EXPECT_TRUE(frame.Init(cricket::FOURCC_I420, 1, 1, 1, 1, pixel, | 941 EXPECT_TRUE(frame.Init(cricket::FOURCC_I420, 1, 1, 1, 1, pixel, |
946 sizeof(pixel), 0, webrtc::kVideoRotation_0)); | 942 sizeof(pixel), 0, webrtc::kVideoRotation_0)); |
947 } | 943 } |
948 const uint8_t* y = pixel; | 944 const uint8_t* y = pixel; |
949 const uint8_t* u = y + 1; | 945 const uint8_t* u = y + 1; |
950 const uint8_t* v = u + 1; | 946 const uint8_t* v = u + 1; |
951 EXPECT_TRUE(IsEqual(frame, 1, 1, y, 1, u, 1, v, 1, 0)); | 947 EXPECT_TRUE(IsEqual(frame, 1, 1, 0, y, 1, u, 1, v, 1, 0)); |
952 } | 948 } |
953 | 949 |
954 // Test 5 pixel edge case image. | 950 // Test 5 pixel edge case image. |
955 void ConstructI4205Pixel() { | 951 void ConstructI4205Pixel() { |
956 T frame; | 952 T frame; |
957 uint8_t pixels5x5[5 * 5 + ((5 + 1) / 2 * (5 + 1) / 2) * 2]; | 953 uint8_t pixels5x5[5 * 5 + ((5 + 1) / 2 * (5 + 1) / 2) * 2]; |
958 memset(pixels5x5, 1, 5 * 5 + ((5 + 1) / 2 * (5 + 1) / 2) * 2); | 954 memset(pixels5x5, 1, 5 * 5 + ((5 + 1) / 2 * (5 + 1) / 2) * 2); |
959 for (int i = 0; i < repeat_; ++i) { | 955 for (int i = 0; i < repeat_; ++i) { |
960 EXPECT_TRUE(frame.Init(cricket::FOURCC_I420, 5, 5, 5, 5, pixels5x5, | 956 EXPECT_TRUE(frame.Init(cricket::FOURCC_I420, 5, 5, 5, 5, pixels5x5, |
961 sizeof(pixels5x5), 0, | 957 sizeof(pixels5x5), 0, |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 EXPECT_TRUE(frame2.Init(cricket::FOURCC_I422, kWidth, kHeight, kWidth, | 1356 EXPECT_TRUE(frame2.Init(cricket::FOURCC_I422, kWidth, kHeight, kWidth, |
1361 kHeight, y, out_size, 1, 1, 0, | 1357 kHeight, y, out_size, 1, 1, 0, |
1362 webrtc::kVideoRotation_0)); | 1358 webrtc::kVideoRotation_0)); |
1363 EXPECT_TRUE(IsEqual(frame1, frame2, 1)); | 1359 EXPECT_TRUE(IsEqual(frame1, frame2, 1)); |
1364 } | 1360 } |
1365 | 1361 |
1366 int repeat_; | 1362 int repeat_; |
1367 }; | 1363 }; |
1368 | 1364 |
1369 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_UNITTEST_H_ | 1365 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_UNITTEST_H_ |
OLD | NEW |