| 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 |
| 11 | 11 |
| 12 #include "libyuv/video_common.h" | 12 #include "libyuv/video_common.h" |
| 13 | 13 |
| 14 #ifdef __cplusplus | 14 #ifdef __cplusplus |
| 15 namespace libyuv { | 15 namespace libyuv { |
| 16 extern "C" { | 16 extern "C" { |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 #define ARRAY_SIZE(x) (int)(sizeof(x) / sizeof(x[0])) | 19 #define ARRAY_SIZE(x) (int)(sizeof(x) / sizeof(x[0])) |
| 20 | 20 |
| 21 struct FourCCAliasEntry { | 21 struct FourCCAliasEntry { |
| 22 uint32 alias; | 22 uint32 alias; |
| 23 uint32 canonical; | 23 uint32 canonical; |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 static const struct FourCCAliasEntry kFourCCAliases[] = { | 26 static const struct FourCCAliasEntry kFourCCAliases[] = { |
| 27 {FOURCC_IYUV, FOURCC_I420}, | 27 {FOURCC_IYUV, FOURCC_I420}, |
| 28 {FOURCC_YU12, FOURCC_I420}, |
| 28 {FOURCC_YU16, FOURCC_I422}, | 29 {FOURCC_YU16, FOURCC_I422}, |
| 29 {FOURCC_YU24, FOURCC_I444}, | 30 {FOURCC_YU24, FOURCC_I444}, |
| 30 {FOURCC_YUYV, FOURCC_YUY2}, | 31 {FOURCC_YUYV, FOURCC_YUY2}, |
| 31 {FOURCC_YUVS, FOURCC_YUY2}, // kCMPixelFormat_422YpCbCr8_yuvs | 32 {FOURCC_YUVS, FOURCC_YUY2}, // kCMPixelFormat_422YpCbCr8_yuvs |
| 32 {FOURCC_HDYC, FOURCC_UYVY}, | 33 {FOURCC_HDYC, FOURCC_UYVY}, |
| 33 {FOURCC_2VUY, FOURCC_UYVY}, // kCMPixelFormat_422YpCbCr8 | 34 {FOURCC_2VUY, FOURCC_UYVY}, // kCMPixelFormat_422YpCbCr8 |
| 34 {FOURCC_JPEG, FOURCC_MJPG}, // Note: JPEG has DHT while MJPG does not. | 35 {FOURCC_JPEG, FOURCC_MJPG}, // Note: JPEG has DHT while MJPG does not. |
| 35 {FOURCC_DMB1, FOURCC_MJPG}, | 36 {FOURCC_DMB1, FOURCC_MJPG}, |
| 36 {FOURCC_BA81, FOURCC_BGGR}, // deprecated. | 37 {FOURCC_BA81, FOURCC_BGGR}, // deprecated. |
| 37 {FOURCC_RGB3, FOURCC_RAW }, | 38 {FOURCC_RGB3, FOURCC_RAW }, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 55 } | 56 } |
| 56 // Not an alias, so return it as-is. | 57 // Not an alias, so return it as-is. |
| 57 return fourcc; | 58 return fourcc; |
| 58 } | 59 } |
| 59 | 60 |
| 60 #ifdef __cplusplus | 61 #ifdef __cplusplus |
| 61 } // extern "C" | 62 } // extern "C" |
| 62 } // namespace libyuv | 63 } // namespace libyuv |
| 63 #endif | 64 #endif |
| 64 | 65 |
| OLD | NEW |