1 /* 2 * Copyright (c) 2011 The LibYuv project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 #ifndef INCLUDE_LIBYUV_FORMATCONVERSION_H_ 13 #define INCLUDE_LIBYUV_FORMATCONVERSION_H_ 14 15 #include "libyuv/basic_types.h" 16 17 namespace libyuv { 18 19 // Converts any Bayer RGB format to I420. 20 int BayerRGBToI420(const uint8* src_bayer, int src_stride_bayer, 21 uint32 src_fourcc_bayer, 22 uint8* dst_y, int dst_stride_y, 23 uint8* dst_u, int dst_stride_u, 24 uint8* dst_v, int dst_stride_v, 25 int width, int height); 26 27 // Converts any Bayer RGB format to ARGB. 28 int BayerRGBToARGB(const uint8* src_bayer, int src_stride_bayer, 29 uint32 src_fourcc_bayer, 30 uint8* dst_rgb, int dst_stride_rgb, 31 int width, int height); 32 33 // Converts ARGB to any Bayer RGB format. 34 int ARGBToBayerRGB(const uint8* src_rgb, int src_stride_rgb, 35 uint8* dst_bayer, int dst_stride_bayer, 36 uint32 dst_fourcc_bayer, 37 int width, int height); 38 39 } // namespace libyuv 40 41 #endif // INCLUDE_LIBYUV_FORMATCONVERSION_H_ 42