mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/428009 git-svn-id: http://libyuv.googlecode.com/svn/trunk@203 16f28f9a-4ce2-e073-06de-1de4eb20be90
159 lines
5.5 KiB
C++
159 lines
5.5 KiB
C++
/*
|
|
* Copyright (c) 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_PLANAR_FUNCTIONS_H_
|
|
#define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_
|
|
|
|
#include "libyuv/basic_types.h"
|
|
|
|
// TODO(fbarchard): Remove the following headers includes
|
|
#include "libyuv/convert.h"
|
|
#include "libyuv/planar_functions.h"
|
|
|
|
#ifdef __cplusplus
|
|
namespace libyuv {
|
|
extern "C" {
|
|
#endif
|
|
|
|
void SetPlane(uint8* dst_y, int dst_stride_y,
|
|
int width, int height,
|
|
uint32 value);
|
|
|
|
// Copy a plane of data (I420 to I400)
|
|
void CopyPlane(const uint8* src_y, int src_stride_y,
|
|
uint8* dst_y, int dst_stride_y,
|
|
int width, int height);
|
|
|
|
// I420 mirror
|
|
int I420Mirror(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 NV12 to ARGB. Also used for NV21.
|
|
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 NV12 to RGB565. Also used for NV21.
|
|
int NV12ToRGB565(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 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 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);
|
|
|
|
// 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);
|
|
|
|
// Deprecated function name
|
|
#define BG24ToARGB RGB24ToARGB
|
|
|
|
// 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);
|
|
|
|
// 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.
|
|
int ARGBToRGB24(const uint8* src_argb, int src_stride_argb,
|
|
uint8* dst_rgb24, int dst_stride_rgb24,
|
|
int width, int height);
|
|
|
|
// Convert ARGB To RAW.
|
|
int ARGBToRAW(const uint8* src_argb, int src_stride_argb,
|
|
uint8* dst_rgb, int dst_stride_rgb,
|
|
int width, int height);
|
|
|
|
// Convert ARGB to I400.
|
|
int ARGBToI400(const uint8* src_argb, int src_stride_argb,
|
|
uint8* dst_y, int dst_stride_y,
|
|
int width, int height);
|
|
|
|
// Draw a rectangle into I420
|
|
int I420Rect(uint8* dst_y, int dst_stride_y,
|
|
uint8* dst_u, int dst_stride_u,
|
|
uint8* dst_v, int dst_stride_v,
|
|
int x, int y,
|
|
int width, int height,
|
|
int value_y, int value_u, int value_v);
|
|
|
|
// Draw a rectangle into ARGB
|
|
int ARGBRect(uint8* dst_argb, int dst_stride_argb,
|
|
int x, int y,
|
|
int width, int height,
|
|
uint32 value);
|
|
|
|
// 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);
|
|
|
|
// Alpha Blend ARGB
|
|
int ARGBBlend(const uint8* src_argb, int src_stride_argb,
|
|
uint8* dst_argb, int dst_stride_argb,
|
|
int width, int height);
|
|
|
|
int I422ToYUY2(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_frame, int dst_stride_frame,
|
|
int width, int height);
|
|
|
|
int I422ToUYVY(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_frame, int dst_stride_frame,
|
|
int width, int height);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
} // namespace libyuv
|
|
#endif
|
|
|
|
#endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_
|