Commit 2a35da39 authored by fbarchard@google.com's avatar fbarchard@google.com

Add ARGBToABGR and ARGBToBGRA as actual functions instead of macros.

BUG=334
TESTED=libyuv unittests pass
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/12659006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1008 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 40a1d855
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1007
Version: 1008
License: BSD
License File: LICENSE
......
......@@ -25,24 +25,22 @@ int ARGBCopy(const uint8* src_argb, int src_stride_argb,
uint8* dst_argb, int dst_stride_argb,
int width, int height);
// Convert ARGB To BGRA. (alias)
#define ARGBToBGRA BGRAToARGB
// Convert ARGB To BGRA.
LIBYUV_API
int BGRAToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int ARGBToBGRA(const uint8* src_argb, int src_stride_argb,
uint8* dst_bgra, int dst_stride_bgra,
int width, int height);
// Convert ARGB To ABGR. (alias)
#define ARGBToABGR ABGRToARGB
// Convert ARGB To ABGR.
LIBYUV_API
int ABGRToARGB(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int ARGBToABGR(const uint8* src_argb, int src_stride_argb,
uint8* dst_abgr, int dst_stride_abgr,
int width, int height);
// Convert ARGB To RGBA.
LIBYUV_API
int ARGBToRGBA(const uint8* src_frame, int src_stride_frame,
uint8* dst_argb, int dst_stride_argb,
int ARGBToRGBA(const uint8* src_argb, int src_stride_argb,
uint8* dst_rgba, int dst_stride_rgba,
int width, int height);
// Convert ARGB To RGB24.
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1007
#define LIBYUV_VERSION 1008
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -372,6 +372,17 @@ int BGRAToARGB(const uint8* src_bgra, int src_stride_bgra,
width, height);
}
// Convert ARGB to BGRA (same as BGRAToARGB).
LIBYUV_API
int ARGBToBGRA(const uint8* src_bgra, int src_stride_bgra,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
return ARGBShuffle(src_bgra, src_stride_bgra,
dst_argb, dst_stride_argb,
(const uint8*)(&kShuffleMaskBGRAToARGB),
width, height);
}
// Convert ABGR to ARGB.
LIBYUV_API
int ABGRToARGB(const uint8* src_abgr, int src_stride_abgr,
......@@ -383,6 +394,17 @@ int ABGRToARGB(const uint8* src_abgr, int src_stride_abgr,
width, height);
}
// Convert ARGB to ABGR to (same as ABGRToARGB).
LIBYUV_API
int ARGBToABGR(const uint8* src_abgr, int src_stride_abgr,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
return ARGBShuffle(src_abgr, src_stride_abgr,
dst_argb, dst_stride_argb,
(const uint8*)(&kShuffleMaskABGRToARGB),
width, height);
}
// Convert RGBA to ARGB.
LIBYUV_API
int RGBAToARGB(const uint8* src_rgba, int src_stride_rgba,
......
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