Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
3a7d467d
Commit
3a7d467d
authored
Aug 10, 2014
by
James Zern
Browse files
libyuv: update to r1041
Change-Id: I38dad398844ee424a7a92a745ab703645018d02b
parent
ccddd5d0
Changes
57
Hide whitespace changes
Inline
Side-by-side
examples.mk
View file @
3a7d467d
...
...
@@ -9,8 +9,12 @@
##
LIBYUV_SRCS
+=
third_party/libyuv/include/libyuv/basic_types.h
\
third_party/libyuv/include/libyuv/convert.h
\
third_party/libyuv/include/libyuv/convert_argb.h
\
third_party/libyuv/include/libyuv/convert_from.h
\
third_party/libyuv/include/libyuv/cpu_id.h
\
third_party/libyuv/include/libyuv/planar_functions.h
\
third_party/libyuv/include/libyuv/rotate.h
\
third_party/libyuv/include/libyuv/row.h
\
third_party/libyuv/include/libyuv/scale.h
\
third_party/libyuv/include/libyuv/scale_row.h
\
...
...
@@ -20,14 +24,15 @@ LIBYUV_SRCS += third_party/libyuv/include/libyuv/basic_types.h \
third_party/libyuv/source/row_common.cc
\
third_party/libyuv/source/row_mips.cc
\
third_party/libyuv/source/row_neon.cc
\
third_party/libyuv/source/row_neon64.cc
\
third_party/libyuv/source/row_posix.cc
\
third_party/libyuv/source/row_win.cc
\
third_party/libyuv/source/scale.cc
\
third_party/libyuv/source/scale.cc
\
third_party/libyuv/source/scale_common.cc
\
third_party/libyuv/source/scale_mips.cc
\
third_party/libyuv/source/scale_neon.cc
\
third_party/libyuv/source/scale_posix.cc
\
third_party/libyuv/source/scale_win.cc
third_party/libyuv/source/scale_win.cc
\
LIBWEBM_MUXER_SRCS
+=
third_party/libwebm/mkvmuxer.cpp
\
third_party/libwebm/mkvmuxerutil.cpp
\
...
...
@@ -210,17 +215,18 @@ endif
# from an installed tree or a version controlled tree. Determine
# the proper paths.
ifeq
($(HAVE_ALT_TREE_LAYOUT),yes)
LIB_PATH
:=
$(SRC_PATH_BARE)
/../lib
INC_PATH
:=
$(SRC_PATH_BARE)
/../include
LIB_PATH
-yes
:=
$(SRC_PATH_BARE)
/../lib
INC_PATH
-yes
:=
$(SRC_PATH_BARE)
/../include
else
LIB_PATH-yes
+=
$(
if
$(BUILD_PFX)
,
$(BUILD_PFX)
,.
)
INC_PATH-$(CONFIG_VP8_DECODER)
+=
$(SRC_PATH_BARE)
/vp8
INC_PATH-$(CONFIG_VP8_ENCODER)
+=
$(SRC_PATH_BARE)
/vp8
INC_PATH-$(CONFIG_VP9_DECODER)
+=
$(SRC_PATH_BARE)
/vp9
INC_PATH-$(CONFIG_VP9_ENCODER)
+=
$(SRC_PATH_BARE)
/vp9
LIB_PATH
:=
$(
call
enabled,LIB_PATH
)
INC_PATH
:=
$(
call
enabled,INC_PATH
)
endif
INC_PATH-$(CONFIG_LIBYUV)
+=
$(SRC_PATH_BARE)
/third_party/libyuv/include
LIB_PATH
:=
$(
call
enabled,LIB_PATH
)
INC_PATH
:=
$(
call
enabled,INC_PATH
)
INTERNAL_CFLAGS
=
$(
addprefix
-I
,
$(INC_PATH)
)
INTERNAL_LDFLAGS
+=
$(
addprefix
-L
,
$(LIB_PATH)
)
...
...
third_party/libyuv/README.libvpx
View file @
3a7d467d
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 10
05
Version: 10
41
License: BSD
License File: LICENSE
...
...
@@ -13,5 +13,4 @@ which down-samples the original input video (f.g. 1280x720) a number of times
in order to encode multiple resolution bit streams.
Local Modifications:
Modified the original scaler code minimally with include file changes to fit
in our current build system.
None.
third_party/libyuv/include/libyuv/compare.h
0 → 100644
View file @
3a7d467d
/*
* 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.
*/
#ifndef INCLUDE_LIBYUV_COMPARE_H_ // NOLINT
#define INCLUDE_LIBYUV_COMPARE_H_
#include "libyuv/basic_types.h"
#ifdef __cplusplus
namespace
libyuv
{
extern
"C"
{
#endif
// Compute a hash for specified memory. Seed of 5381 recommended.
LIBYUV_API
uint32
HashDjb2
(
const
uint8
*
src
,
uint64
count
,
uint32
seed
);
// Sum Square Error - used to compute Mean Square Error or PSNR.
LIBYUV_API
uint64
ComputeSumSquareError
(
const
uint8
*
src_a
,
const
uint8
*
src_b
,
int
count
);
LIBYUV_API
uint64
ComputeSumSquareErrorPlane
(
const
uint8
*
src_a
,
int
stride_a
,
const
uint8
*
src_b
,
int
stride_b
,
int
width
,
int
height
);
static
const
int
kMaxPsnr
=
128
;
LIBYUV_API
double
SumSquareErrorToPsnr
(
uint64
sse
,
uint64
count
);
LIBYUV_API
double
CalcFramePsnr
(
const
uint8
*
src_a
,
int
stride_a
,
const
uint8
*
src_b
,
int
stride_b
,
int
width
,
int
height
);
LIBYUV_API
double
I420Psnr
(
const
uint8
*
src_y_a
,
int
stride_y_a
,
const
uint8
*
src_u_a
,
int
stride_u_a
,
const
uint8
*
src_v_a
,
int
stride_v_a
,
const
uint8
*
src_y_b
,
int
stride_y_b
,
const
uint8
*
src_u_b
,
int
stride_u_b
,
const
uint8
*
src_v_b
,
int
stride_v_b
,
int
width
,
int
height
);
LIBYUV_API
double
CalcFrameSsim
(
const
uint8
*
src_a
,
int
stride_a
,
const
uint8
*
src_b
,
int
stride_b
,
int
width
,
int
height
);
LIBYUV_API
double
I420Ssim
(
const
uint8
*
src_y_a
,
int
stride_y_a
,
const
uint8
*
src_u_a
,
int
stride_u_a
,
const
uint8
*
src_v_a
,
int
stride_v_a
,
const
uint8
*
src_y_b
,
int
stride_y_b
,
const
uint8
*
src_u_b
,
int
stride_u_b
,
const
uint8
*
src_v_b
,
int
stride_v_b
,
int
width
,
int
height
);
#ifdef __cplusplus
}
// extern "C"
}
// namespace libyuv
#endif
#endif // INCLUDE_LIBYUV_COMPARE_H_ NOLINT
third_party/libyuv/include/libyuv/convert.h
0 → 100644
View file @
3a7d467d
/*
* 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.
*/
#ifndef INCLUDE_LIBYUV_CONVERT_H_ // NOLINT
#define INCLUDE_LIBYUV_CONVERT_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"
#ifdef __cplusplus
namespace
libyuv
{
extern
"C"
{
#endif
// Convert I444 to I420.
LIBYUV_API
int
I444ToI420
(
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_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert I422 to I420.
LIBYUV_API
int
I422ToI420
(
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_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert I411 to I420.
LIBYUV_API
int
I411ToI420
(
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_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Copy I420 to I420.
#define I420ToI420 I420Copy
LIBYUV_API
int
I420Copy
(
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_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert I400 (grey) to I420.
LIBYUV_API
int
I400ToI420
(
const
uint8
*
src_y
,
int
src_stride_y
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert NV12 to I420.
LIBYUV_API
int
NV12ToI420
(
const
uint8
*
src_y
,
int
src_stride_y
,
const
uint8
*
src_uv
,
int
src_stride_uv
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert NV21 to I420.
LIBYUV_API
int
NV21ToI420
(
const
uint8
*
src_y
,
int
src_stride_y
,
const
uint8
*
src_vu
,
int
src_stride_vu
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert YUY2 to I420.
LIBYUV_API
int
YUY2ToI420
(
const
uint8
*
src_yuy2
,
int
src_stride_yuy2
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert UYVY to I420.
LIBYUV_API
int
UYVYToI420
(
const
uint8
*
src_uyvy
,
int
src_stride_uyvy
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert M420 to I420.
LIBYUV_API
int
M420ToI420
(
const
uint8
*
src_m420
,
int
src_stride_m420
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// Convert Q420 to I420.
LIBYUV_API
int
Q420ToI420
(
const
uint8
*
src_y
,
int
src_stride_y
,
const
uint8
*
src_yuy2
,
int
src_stride_yuy2
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// ARGB little endian (bgra in memory) to I420.
LIBYUV_API
int
ARGBToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// BGRA little endian (argb in memory) to I420.
LIBYUV_API
int
BGRAToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// ABGR little endian (rgba in memory) to I420.
LIBYUV_API
int
ABGRToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// RGBA little endian (abgr in memory) to I420.
LIBYUV_API
int
RGBAToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// RGB little endian (bgr in memory) to I420.
LIBYUV_API
int
RGB24ToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// RGB big endian (rgb in memory) to I420.
LIBYUV_API
int
RAWToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// RGB16 (RGBP fourcc) little endian to I420.
LIBYUV_API
int
RGB565ToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// RGB15 (RGBO fourcc) little endian to I420.
LIBYUV_API
int
ARGB1555ToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
// RGB12 (R444 fourcc) little endian to I420.
LIBYUV_API
int
ARGB4444ToI420
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
width
,
int
height
);
#ifdef HAVE_JPEG
// src_width/height provided by capture.
// dst_width/height for clipping determine final size.
LIBYUV_API
int
MJPGToI420
(
const
uint8
*
sample
,
size_t
sample_size
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
src_width
,
int
src_height
,
int
dst_width
,
int
dst_height
);
// Query size of MJPG in pixels.
LIBYUV_API
int
MJPGSize
(
const
uint8
*
sample
,
size_t
sample_size
,
int
*
width
,
int
*
height
);
#endif
// Note Bayer formats (BGGR) To I420 are in format_conversion.h
// Convert camera sample to I420 with cropping, rotation and vertical flip.
// "src_size" is needed to parse MJPG.
// "dst_stride_y" number of bytes in a row of the dst_y 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.
// "crop_width" / "crop_height" is the size to crop the src 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.
LIBYUV_API
int
ConvertToI420
(
const
uint8
*
src_frame
,
size_t
src_size
,
uint8
*
dst_y
,
int
dst_stride_y
,
uint8
*
dst_u
,
int
dst_stride_u
,
uint8
*
dst_v
,
int
dst_stride_v
,
int
crop_x
,
int
crop_y
,
int
src_width
,
int
src_height
,
int
crop_width
,
int
crop_height
,
enum
RotationMode
rotation
,
uint32
format
);
#ifdef __cplusplus
}
// extern "C"
}
// namespace libyuv
#endif
#endif // INCLUDE_LIBYUV_CONVERT_H_ NOLINT
third_party/libyuv/include/libyuv/convert_argb.h
0 → 100644
View file @
3a7d467d
/*
* Copyright 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 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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
int
I400ToARGB
(
const
uint8
*
src_y
,
int
src_stride_y
,
uint8
*
dst_argb
,
int
dst_stride_argb
,
int
width
,
int
height
);
// Alias.
#define YToARGB I400ToARGB_Reference
// Convert I400 to ARGB. Reverse of ARGBToI400.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
// LIBYUV_API
// 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.
LIBYUV_API
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.
LIBYUV_API
int
UYVYToARGB
(
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.
LIBYUV_API
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.
LIBYUV_API
int
ABGRToARGB
(
const
uint8
*
src_frame
,
int
src_stride_frame
,
uint8
*
dst_argb
,
int
dst_stride_argb
,
int
width
,
int
height
);
// RGBA little endian (abgr in memory) to ARGB.
LIBYUV_API
int
RGBAToARGB
(
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
LIBYUV_API
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.
// "crop_width" / "crop_height" is the size to crop the src to.