aboutsummaryrefslogtreecommitdiff
path: root/files/source/video_common.cc
diff options
context:
space:
mode:
authorSadaf Ebrahimi <sadafebrahimi@google.com>2023-08-25 16:27:50 +0000
committerSadaf Ebrahimi <sadafebrahimi@google.com>2023-08-25 16:27:50 +0000
commit678702573531f19ae36847a6a07257aaae623fbe (patch)
tree5d9b28c2e73f9d5e76d9556181a6cf73ac4bd182 /files/source/video_common.cc
parent8ef2efc6534659701bc7114e57133207547f60e7 (diff)
downloadlibyuv-678702573531f19ae36847a6a07257aaae623fbe.tar.gz
Move libyuv/files/ directly under libyuv
Test: TreeHugger Merged-In: I773d1ae01539cc5d200768b526f10b2922567f72 Change-Id: I4ba1f1e781d7fd3ad96639dfdc08f654e45ae3d3
Diffstat (limited to 'files/source/video_common.cc')
-rw-r--r--files/source/video_common.cc62
1 files changed, 0 insertions, 62 deletions
diff --git a/files/source/video_common.cc b/files/source/video_common.cc
deleted file mode 100644
index 92384c05..00000000
--- a/files/source/video_common.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2011 The LibYuv Project Authors. All rights reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "libyuv/video_common.h"
-
-#ifdef __cplusplus
-namespace libyuv {
-extern "C" {
-#endif
-
-struct FourCCAliasEntry {
- uint32_t alias;
- uint32_t canonical;
-};
-
-#define NUM_ALIASES 18
-static const struct FourCCAliasEntry kFourCCAliases[NUM_ALIASES] = {
- {FOURCC_IYUV, FOURCC_I420},
- {FOURCC_YU12, FOURCC_I420},
- {FOURCC_YU16, FOURCC_I422},
- {FOURCC_YU24, FOURCC_I444},
- {FOURCC_YUYV, FOURCC_YUY2},
- {FOURCC_YUVS, FOURCC_YUY2}, // kCMPixelFormat_422YpCbCr8_yuvs
- {FOURCC_HDYC, FOURCC_UYVY},
- {FOURCC_2VUY, FOURCC_UYVY}, // kCMPixelFormat_422YpCbCr8
- {FOURCC_JPEG, FOURCC_MJPG}, // Note: JPEG has DHT while MJPG does not.
- {FOURCC_DMB1, FOURCC_MJPG},
- {FOURCC_BA81, FOURCC_BGGR}, // deprecated.
- {FOURCC_RGB3, FOURCC_RAW},
- {FOURCC_BGR3, FOURCC_24BG},
- {FOURCC_CM32, FOURCC_BGRA}, // kCMPixelFormat_32ARGB
- {FOURCC_CM24, FOURCC_RAW}, // kCMPixelFormat_24RGB
- {FOURCC_L555, FOURCC_RGBO}, // kCMPixelFormat_16LE555
- {FOURCC_L565, FOURCC_RGBP}, // kCMPixelFormat_16LE565
- {FOURCC_5551, FOURCC_RGBO}, // kCMPixelFormat_16LE5551
-};
-// TODO(fbarchard): Consider mapping kCMPixelFormat_32BGRA to FOURCC_ARGB.
-// {FOURCC_BGRA, FOURCC_ARGB}, // kCMPixelFormat_32BGRA
-
-LIBYUV_API
-uint32_t CanonicalFourCC(uint32_t fourcc) {
- int i;
- for (i = 0; i < NUM_ALIASES; ++i) {
- if (kFourCCAliases[i].alias == fourcc) {
- return kFourCCAliases[i].canonical;
- }
- }
- // Not an alias, so return it as-is.
- return fourcc;
-}
-
-#ifdef __cplusplus
-} // extern "C"
-} // namespace libyuv
-#endif