Commit c4500c9f authored by fbarchard@google.com's avatar fbarchard@google.com

ConvertToARGB

BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/673007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@297 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent a537bbdc
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 296 Version: 297
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "libyuv/basic_types.h" #include "libyuv/basic_types.h"
#include "libyuv/compare.h" #include "libyuv/compare.h"
#include "libyuv/convert.h" #include "libyuv/convert.h"
#include "libyuv/convert_argb.h"
#include "libyuv/convert_from.h" #include "libyuv/convert_from.h"
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/format_conversion.h" #include "libyuv/format_conversion.h"
......
/*
* Copyright (c) 2012 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.
*/
#ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ // NOLINT
#define INCLUDE_LIBYUV_CONVERT_ARGB_H_
#include "libyuv/basic_types.h"
// TODO(fbarchard): Remove the following headers includes
#include "libyuv/convert_from.h"
#include "libyuv/planar_functions.h"
#include "libyuv/rotate.h"
// TODO(fbarchard): This set of functions should exactly match convert.h
// Add missing V210 and Q420.
// TODO(fbarchard): Add tests. Create random content of right size and convert
// with C vs Opt and or to I420 and compare.
// TODO(fbarchard): Some of these functions lack parameter setting.
#ifdef __cplusplus
namespace libyuv {
extern "C" {
#endif
// Alias
#define ARGBToARGB ARGBCopy
// Copy ARGB to ARGB.
int ARGBCopy(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I420 to ARGB.
int I420ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I422 to ARGB.
int I422ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I444 to ARGB.
int I444ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I411 to ARGB.
int I411ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I400 (grey) to ARGB.
int I400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I400 to ARGB. Reverse of ARGBToI400.
int I400ToARGB_Reference(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert NV12 to ARGB.
int NV12ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_uv, int src_stride_uv,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert NV21 to ARGB.
int NV21ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_vu, int src_stride_vu,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert M420 to ARGB.
int M420ToARGB(const uint8* src_m420, int src_stride_m420,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// TODO(fbarchard): Convert Q420 to ARGB.
// int Q420ToARGB(const uint8* src_y, int src_stride_y,
// const uint8* src_yuy2, int src_stride_yuy2,
// uint8* dst_argb, int dst_stride_argb,
// int width, int height);
// Convert YUY2 to ARGB.
int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert UYVY to ARGB.
int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// TODO(fbarchard): Convert V210 to ARGB.
// int V210ToARGB(const uint8* src_uyvy, int src_stride_uyvy,
// uint8* dst_argb, int dst_stride_argb,
// int width, int height);
// BGRA little endian (argb in memory) to ARGB
int BGRAToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// ABGR little endian (rgba in memory) to ARGB
int ABGRToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Deprecated function name.
#define BG24ToARGB RGB24ToARGB
// RGB little endian (bgr in memory) to ARGB
int RGB24ToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// RGB big endian (rgb in memory) to ARGB
int RAWToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// RGB16 (RGBP fourcc) little endian to ARGB
int RGB565ToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// RGB15 (RGBO fourcc) little endian to ARGB
int ARGB1555ToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// RGB12 (R444 fourcc) little endian to ARGB
int ARGB4444ToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
#ifdef HAVE_JPEG
// src_width/height provided by capture
// dst_width/height for clipping determine final size.
int MJPGToARGB(const uint8* sample, size_t sample_size,
uint8* dst_argb, int dst_stride_argb,
int src_width, int src_height,
int dst_width, int dst_height);
#endif
// Note Bayer formats (BGGR) to ARGB are in format_conversion.h
// Convert camera sample to ARGB with cropping, rotation and vertical flip.
// "src_size" is needed to parse MJPG.
// "dst_stride_argb" number of bytes in a row of the dst_argb plane.
// Normally this would be the same as dst_width, with recommended alignment
// to 16 bytes for better efficiency.
// If rotation of 90 or 270 is used, stride is affected. The caller should
// allocate the I420 buffer according to rotation.
// "dst_stride_u" number of bytes in a row of the dst_u plane.
// Normally this would be the same as (dst_width + 1) / 2, with
// recommended alignment to 16 bytes for better efficiency.
// If rotation of 90 or 270 is used, stride is affected.
// "crop_x" and "crop_y" are starting position for cropping.
// To center, crop_x = (src_width - dst_width) / 2
// crop_y = (src_height - dst_height) / 2
// "src_width" / "src_height" is size of src_frame in pixels.
// "src_height" can be negative indicating a vertically flipped image source.
// "dst_width" / "dst_height" is size of destination to crop to.
// Must be less than or equal to src_width/src_height
// Cropping parameters are pre-rotation.
// "rotation" can be 0, 90, 180 or 270.
// "format" is a fourcc. ie 'I420', 'YUY2'
// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure.
int ConvertToARGB(const uint8* src_frame, size_t src_size,
uint8* dst_argb, int dst_stride_argb,
int crop_x, int crop_y,
int src_width, int src_height,
int dst_width, int dst_height,
RotationMode rotation,
uint32 format);
#ifdef __cplusplus
} // extern "C"
} // namespace libyuv
#endif
#endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_ NOLINT
...@@ -52,23 +52,6 @@ int ARGBMirror(const uint8* src_argb, int src_stride_argb, ...@@ -52,23 +52,6 @@ int ARGBMirror(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height); int width, int height);
// Convert NV12 to ARGB.
int NV12ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_uv, int src_stride_uv,
uint8* dst_frame, int dst_stride_frame,
int width, int height);
// Convert NV21 to ARGB.
int NV21ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_vu, int src_stride_vu,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert M420 to ARGB.
int M420ToARGB(const uint8* src_m420, int src_stride_m420,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert NV12 to RGB565. // Convert NV12 to RGB565.
int NV12ToRGB565(const uint8* src_y, int src_stride_y, int NV12ToRGB565(const uint8* src_y, int src_stride_y,
const uint8* src_uv, int src_stride_uv, const uint8* src_uv, int src_stride_uv,
...@@ -81,74 +64,9 @@ int NV21ToRGB565(const uint8* src_y, int src_stride_y, ...@@ -81,74 +64,9 @@ int NV21ToRGB565(const uint8* src_y, int src_stride_y,
uint8* dst_rgb565, int dst_stride_rgb565, uint8* dst_rgb565, int dst_stride_rgb565,
int width, int height); int width, int height);
// Convert YUY2 to ARGB.
int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert UYVY to ARGB.
int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I444 to ARGB.
int I444ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I422 to ARGB.
int I422ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I411 to ARGB.
int I411ToARGB(const uint8* src_y, int src_stride_y,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I400 to ARGB.
int I400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert I400 to ARGB. Reverse of ARGBToI400.
int I400ToARGB_Reference(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert RAW to ARGB.
int RAWToARGB(const uint8* src_raw, int src_stride_raw,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Deprecated function name.
#define BG24ToARGB RGB24ToARGB
// Convert RGB24 to ARGB.
int RGB24ToARGB(const uint8* src_bg24, int src_stride_bg24,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert ABGR to ARGB. Also used for ARGB to ABGR.
int ABGRToARGB(const uint8* src_abgr, int src_stride_abgr,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Aliases. // Aliases.
#define ARGBToBGRA BGRAToARGB #define ARGBToBGRA BGRAToARGB
#define ARGBToABGR ABGRToARGB #define ARGBToABGR ABGRToARGB
#define ARGBToARGB ARGBCopy
// Convert BGRA to ARGB. Also used for ARGB to BGRA.
int BGRAToARGB(const uint8* src_bgra, int src_stride_bgra,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert ARGB To RGB24. // Convert ARGB To RGB24.
int ARGBToRGB24(const uint8* src_argb, int src_stride_argb, int ARGBToRGB24(const uint8* src_argb, int src_stride_argb,
...@@ -175,21 +93,6 @@ int ARGBToARGB4444(const uint8* src_argb, int src_stride_argb, ...@@ -175,21 +93,6 @@ int ARGBToARGB4444(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb4444, int dst_stride_argb4444, uint8* dst_argb4444, int dst_stride_argb4444,
int width, int height); int width, int height);
// Convert RGB565 To ARGB.
int RGB565ToARGB(const uint8* src_rgb565, int src_stride_rgb565,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert ARGB1555 To ARGB.
int ARGB1555ToARGB(const uint8* src_argb1555, int src_stride_argb1555,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert ARGB4444 To ARGB.
int ARGB4444ToARGB(const uint8* src_argb4444, int src_stride_argb4444,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert ARGB to I400. // Convert ARGB to I400.
int ARGBToI400(const uint8* src_argb, int src_stride_argb, int ARGBToI400(const uint8* src_argb, int src_stride_argb,
uint8* dst_y, int dst_stride_y, uint8* dst_y, int dst_stride_y,
...@@ -285,6 +188,11 @@ int ARGBUnattenuate(const uint8* src_argb, int src_stride_argb, ...@@ -285,6 +188,11 @@ int ARGBUnattenuate(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height); int width, int height);
// Multiply ARGB image by ARGB value.
int ARGBShade(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb, int dst_stride_argb,
int width, int height, uint32 value);
// Convert MJPG to ARGB. // Convert MJPG to ARGB.
int MJPGToARGB(const uint8* sample, size_t sample_size, int MJPGToARGB(const uint8* sample, size_t sample_size,
uint8* argb, int argb_stride, uint8* argb, int argb_stride,
......
...@@ -18,14 +18,14 @@ namespace libyuv { ...@@ -18,14 +18,14 @@ namespace libyuv {
extern "C" { extern "C" {
#endif #endif
// Supported rotation // Supported rotation.
enum RotationMode { enum RotationMode {
kRotate0 = 0, // No rotation kRotate0 = 0, // No rotation.
kRotate90 = 90, // Rotate 90 degrees clockwise kRotate90 = 90, // Rotate 90 degrees clockwise.
kRotate180 = 180, // Rotate 180 degrees kRotate180 = 180, // Rotate 180 degrees.
kRotate270 = 270, // Rotate 270 degrees clockwise kRotate270 = 270, // Rotate 270 degrees clockwise.
// Deprecated // Deprecated.
kRotateNone = 0, kRotateNone = 0,
kRotateClockwise = 90, kRotateClockwise = 90,
kRotateCounterClockwise = 270, kRotateCounterClockwise = 270,
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 296 #define LIBYUV_VERSION 297
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -35,7 +35,7 @@ extern "C" { ...@@ -35,7 +35,7 @@ extern "C" {
// http://www.fourcc.org/yuv.php // http://www.fourcc.org/yuv.php
// http://v4l2spec.bytesex.org/spec/book1.htm // http://v4l2spec.bytesex.org/spec/book1.htm
// http://developer.apple.com/quicktime/icefloe/dispatch020.html // http://developer.apple.com/quicktime/icefloe/dispatch020.html
// http://msdn.microsoft.com/en-us/library/windows/desktop/dd206750(v=vs.85).aspx#nv12 // http://msdn.microsoft.com/library/windows/desktop/dd206750.aspx#nv12
enum FourCC { enum FourCC {
// Canonical fourcc codes used in our code. // Canonical fourcc codes used in our code.
...@@ -56,9 +56,9 @@ enum FourCC { ...@@ -56,9 +56,9 @@ enum FourCC {
FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'), FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'),
FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'), FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'),
FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'), FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'),
FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // bgr565 FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // bgr565.
FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // abgr1555 FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // abgr1555.
FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444 FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444.
FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'),
FOURCC_RAW = FOURCC('r', 'a', 'w', ' '), FOURCC_RAW = FOURCC('r', 'a', 'w', ' '),
FOURCC_NV21 = FOURCC('N', 'V', '2', '1'), FOURCC_NV21 = FOURCC('N', 'V', '2', '1'),
...@@ -72,19 +72,19 @@ enum FourCC { ...@@ -72,19 +72,19 @@ enum FourCC {
// Aliases for canonical fourcc codes, replaced with their canonical // Aliases for canonical fourcc codes, replaced with their canonical
// equivalents by CanonicalFourCC(). // equivalents by CanonicalFourCC().
FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420 FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420.
FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'), // Alias for I420 FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'), // Alias for I420.
FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'), // Alias for I422 FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'), // Alias for I422.
FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'), // Alias for I444 FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'), // Alias for I444.
FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'), // Alias for YUY2 FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'), // Alias for YUY2.
FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'), // Alias for YUY2 on Mac FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'), // Alias for YUY2 on Mac.
FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'), // Alias for UYVY FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'), // Alias for UYVY.
FOURCC_2VUY = FOURCC('2', 'v', 'u', 'y'), // Alias for UYVY FOURCC_2VUY = FOURCC('2', 'v', 'u', 'y'), // Alias for UYVY.
FOURCC_JPEG = FOURCC('J', 'P', 'E', 'G'), // Alias for MJPG FOURCC_JPEG = FOURCC('J', 'P', 'E', 'G'), // Alias for MJPG.
FOURCC_DMB1 = FOURCC('d', 'm', 'b', '1'), // Alias for MJPG on Mac FOURCC_DMB1 = FOURCC('d', 'm', 'b', '1'), // Alias for MJPG on Mac.
FOURCC_BA81 = FOURCC('B', 'A', '8', '1'), // Alias for BGGR FOURCC_BA81 = FOURCC('B', 'A', '8', '1'), // Alias for BGGR.
FOURCC_RGB3 = FOURCC('R', 'G', 'B', '3'), // Alias for RAW FOURCC_RGB3 = FOURCC('R', 'G', 'B', '3'), // Alias for RAW.
FOURCC_BGR3 = FOURCC('B', 'G', 'R', '3'), // Alias for 24BG FOURCC_BGR3 = FOURCC('B', 'G', 'R', '3'), // Alias for 24BG.
// Match any fourcc. // Match any fourcc.
FOURCC_ANY = 0xFFFFFFFF, FOURCC_ANY = 0xFFFFFFFF,
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
'include/libyuv/basic_types.h', 'include/libyuv/basic_types.h',
'include/libyuv/compare.h', 'include/libyuv/compare.h',
'include/libyuv/convert.h', 'include/libyuv/convert.h',
'include/libyuv/convert_argb.h',
'include/libyuv/convert_from.h', 'include/libyuv/convert_from.h',
'include/libyuv/cpu_id.h', 'include/libyuv/cpu_id.h',
'include/libyuv/format_conversion.h', 'include/libyuv/format_conversion.h',
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
# sources. # sources.
'source/compare.cc', 'source/compare.cc',
'source/convert.cc', 'source/convert.cc',
'source/convert_argb.cc',
'source/convert_from.cc', 'source/convert_from.cc',
'source/cpu_id.cc', 'source/cpu_id.cc',
'source/format_conversion.cc', 'source/format_conversion.cc',
......
...@@ -784,14 +784,12 @@ int UYVYToI420(const uint8* src_uyvy, int src_stride_uyvy, ...@@ -784,14 +784,12 @@ int UYVYToI420(const uint8* src_uyvy, int src_stride_uyvy,
return 0; return 0;
} }
// gcc provided macros // Visual C for x86 defines these.
#if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) #if defined(_M_X64) || defined(_M_IX86)
#if __BYTE_ORDER == __LITTLE_ENDIAN #define LIBYUV_LITTLE_ENDIAN
#define INCLUDE_LIBYUV_LITTLE_ENDIAN // GCC provided macros.
#endif #elif __BYTE_ORDER == __ORDER_LITTLE_ENDIAN__ || __BYTE_ORDER == __LITTLE_ENDIAN
// Visual C for x86 defines these #define LIBYUV_LITTLE_ENDIAN
#elif defined(_M_X64) || defined(_M_IX86)
#define INCLUDE_LIBYUV_LITTLE_ENDIAN
#endif #endif
#ifdef LIBYUV_LITTLE_ENDIAN #ifdef LIBYUV_LITTLE_ENDIAN
......
This diff is collapsed.
...@@ -401,14 +401,12 @@ static void I42xToUYVYRow_C(const uint8* src_y, ...@@ -401,14 +401,12 @@ static void I42xToUYVYRow_C(const uint8* src_y,
} }
} }
// gcc provided macros // Visual C for x86 defines these.
#if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) #if defined(_M_X64) || defined(_M_IX86)
#if __BYTE_ORDER == __LITTLE_ENDIAN #define LIBYUV_LITTLE_ENDIAN
#define INCLUDE_LIBYUV_LITTLE_ENDIAN // GCC provided macros.
#endif #elif __BYTE_ORDER == __ORDER_LITTLE_ENDIAN__ || __BYTE_ORDER == __LITTLE_ENDIAN
// Visual C for x86 defines these #define LIBYUV_LITTLE_ENDIAN
#elif defined(_M_X64) || defined(_M_IX86)
#define INCLUDE_LIBYUV_LITTLE_ENDIAN
#endif #endif
#ifdef LIBYUV_LITTLE_ENDIAN #ifdef LIBYUV_LITTLE_ENDIAN
......
This diff is collapsed.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "libyuv/convert_from.h" #include "libyuv/convert_from.h"
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/convert_argb.h"
#include "libyuv/planar_functions.h" #include "libyuv/planar_functions.h"
#include "libyuv/rotate.h" #include "libyuv/rotate.h"
#include "unit_test/unit_test.h" #include "unit_test/unit_test.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment