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

Side by Side Diff: unit_test/video_common_test.cc

Issue 2020193002: Treat YU12 as an alias for I420. Simplify setting of inv_crop_height. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Update ConvertFromI420, ConvertToARGB and TestCanonicalFourCC for YU12 being an alias. Created 4 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 | « source/video_common.cc ('k') | 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 /* 1 /*
2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2012 The LibYuv 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 25 matching lines...) Expand all
36 return false; 36 return false;
37 } 37 }
38 if (bpp < 0 || bpp > 32) { 38 if (bpp < 0 || bpp > 32) {
39 return false; 39 return false;
40 } 40 }
41 return true; 41 return true;
42 } 42 }
43 43
44 TEST_F(LibYUVBaseTest, TestCanonicalFourCC) { 44 TEST_F(LibYUVBaseTest, TestCanonicalFourCC) {
45 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_IYUV)); 45 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_IYUV));
46 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_YU12));
46 EXPECT_EQ(FOURCC_I422, CanonicalFourCC(FOURCC_YU16)); 47 EXPECT_EQ(FOURCC_I422, CanonicalFourCC(FOURCC_YU16));
47 EXPECT_EQ(FOURCC_I444, CanonicalFourCC(FOURCC_YU24)); 48 EXPECT_EQ(FOURCC_I444, CanonicalFourCC(FOURCC_YU24));
48 EXPECT_EQ(FOURCC_YUY2, CanonicalFourCC(FOURCC_YUYV)); 49 EXPECT_EQ(FOURCC_YUY2, CanonicalFourCC(FOURCC_YUYV));
49 EXPECT_EQ(FOURCC_YUY2, CanonicalFourCC(FOURCC_YUVS)); 50 EXPECT_EQ(FOURCC_YUY2, CanonicalFourCC(FOURCC_YUVS));
50 EXPECT_EQ(FOURCC_UYVY, CanonicalFourCC(FOURCC_HDYC)); 51 EXPECT_EQ(FOURCC_UYVY, CanonicalFourCC(FOURCC_HDYC));
51 EXPECT_EQ(FOURCC_UYVY, CanonicalFourCC(FOURCC_2VUY)); 52 EXPECT_EQ(FOURCC_UYVY, CanonicalFourCC(FOURCC_2VUY));
52 EXPECT_EQ(FOURCC_MJPG, CanonicalFourCC(FOURCC_JPEG)); 53 EXPECT_EQ(FOURCC_MJPG, CanonicalFourCC(FOURCC_JPEG));
53 EXPECT_EQ(FOURCC_MJPG, CanonicalFourCC(FOURCC_DMB1)); 54 EXPECT_EQ(FOURCC_MJPG, CanonicalFourCC(FOURCC_DMB1));
54 EXPECT_EQ(FOURCC_RAW, CanonicalFourCC(FOURCC_RGB3)); 55 EXPECT_EQ(FOURCC_RAW, CanonicalFourCC(FOURCC_RGB3));
55 EXPECT_EQ(FOURCC_24BG, CanonicalFourCC(FOURCC_BGR3)); 56 EXPECT_EQ(FOURCC_24BG, CanonicalFourCC(FOURCC_BGR3));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 EXPECT_TRUE(TestValidFourCC(FOURCC_JPEG, FOURCC_BPP_JPEG)); 98 EXPECT_TRUE(TestValidFourCC(FOURCC_JPEG, FOURCC_BPP_JPEG));
98 EXPECT_TRUE(TestValidFourCC(FOURCC_DMB1, FOURCC_BPP_DMB1)); 99 EXPECT_TRUE(TestValidFourCC(FOURCC_DMB1, FOURCC_BPP_DMB1));
99 EXPECT_TRUE(TestValidFourCC(FOURCC_BA81, FOURCC_BPP_BA81)); 100 EXPECT_TRUE(TestValidFourCC(FOURCC_BA81, FOURCC_BPP_BA81));
100 EXPECT_TRUE(TestValidFourCC(FOURCC_RGB3, FOURCC_BPP_RGB3)); 101 EXPECT_TRUE(TestValidFourCC(FOURCC_RGB3, FOURCC_BPP_RGB3));
101 EXPECT_TRUE(TestValidFourCC(FOURCC_BGR3, FOURCC_BPP_BGR3)); 102 EXPECT_TRUE(TestValidFourCC(FOURCC_BGR3, FOURCC_BPP_BGR3));
102 EXPECT_TRUE(TestValidFourCC(FOURCC_H264, FOURCC_BPP_H264)); 103 EXPECT_TRUE(TestValidFourCC(FOURCC_H264, FOURCC_BPP_H264));
103 EXPECT_TRUE(TestValidFourCC(FOURCC_ANY, FOURCC_BPP_ANY)); 104 EXPECT_TRUE(TestValidFourCC(FOURCC_ANY, FOURCC_BPP_ANY));
104 } 105 }
105 106
106 } // namespace libyuv 107 } // namespace libyuv
OLDNEW
« no previous file with comments | « source/video_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698