OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 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 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1918 src[0] = 0x11000000; | 1918 src[0] = 0x11000000; |
1919 src[1] = 0x00450000; | 1919 src[1] = 0x00450000; |
1920 src[2] = 0x00009f00; | 1920 src[2] = 0x00009f00; |
1921 src[3] = 0x000000ff; | 1921 src[3] = 0x000000ff; |
1922 // zeros on destination | 1922 // zeros on destination |
1923 dst[0] = 0x00000000; | 1923 dst[0] = 0x00000000; |
1924 dst[1] = 0x00000000; | 1924 dst[1] = 0x00000000; |
1925 dst[2] = 0x00000000; | 1925 dst[2] = 0x00000000; |
1926 dst[3] = 0x00000000; | 1926 dst[3] = 0x00000000; |
1927 | 1927 |
1928 int r = ConvertToARGB( | 1928 int r = ConvertToARGB(reinterpret_cast<uint8_t*>(src), |
fbarchard1
2017/01/13 02:14:43
ditto... just clang-formatted.
| |
1929 reinterpret_cast<uint8_t*>(src), | 1929 16, // input size |
1930 16, // input size | 1930 reinterpret_cast<uint8_t*>(dst), |
1931 reinterpret_cast<uint8_t*>(dst), | 1931 8, // destination stride |
1932 8, // destination stride | 1932 0, // crop_x |
1933 0, // crop_x | 1933 0, // crop_y |
1934 0, // crop_y | 1934 2, // width |
1935 2, // width | 1935 2, // height |
1936 2, // height | 1936 2, // crop width |
1937 2, // crop width | 1937 2, // crop height |
1938 2, // crop height | 1938 kRotate90, FOURCC_ARGB); |
1939 kRotate90, FOURCC_ARGB); | |
1940 | 1939 |
1941 EXPECT_EQ(r, 0); | 1940 EXPECT_EQ(r, 0); |
1942 // 90 degrees rotation, no conversion | 1941 // 90 degrees rotation, no conversion |
1943 EXPECT_EQ(dst[0], src[2]); | 1942 EXPECT_EQ(dst[0], src[2]); |
1944 EXPECT_EQ(dst[1], src[0]); | 1943 EXPECT_EQ(dst[1], src[0]); |
1945 EXPECT_EQ(dst[2], src[3]); | 1944 EXPECT_EQ(dst[2], src[3]); |
1946 EXPECT_EQ(dst[3], src[1]); | 1945 EXPECT_EQ(dst[3], src[1]); |
1947 } | 1946 } |
1948 | 1947 |
1949 } // namespace libyuv | 1948 } // namespace libyuv |
OLD | NEW |