Commit 74534808 authored by mikhal@webrtc.org's avatar mikhal@webrtc.org

libyuv: reverting last update to general.h + renaming cut to crop

Review URL: http://webrtc-codereview.appspot.com/225001

git-svn-id: http://libyuv.googlecode.com/svn/trunk@27 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent e5e5d54e
...@@ -9,128 +9,50 @@ ...@@ -9,128 +9,50 @@
*/ */
#ifndef LIBYUV_INCLUDE_PLANAR_FUNCTIONS_H_ /*
#define LIBYUV_INCLUDE_PLANAR_FUNCTIONS_H_ * General operations on YUV images.
*/
#ifndef LIBYUV_INCLUDE_GENERAL_H_
#define LIBYUV_INCLUDE_GENERAL_H_
#include "basic_types.h" #include "basic_types.h"
namespace libyuv { namespace libyuv {
// Copy I420 to I420. // Supported rotation
void I420Copy(const uint8* src_y, int src_pitch_y, enum VideoRotationMode
const uint8* src_u, int src_pitch_u, {
const uint8* src_v, int src_pitch_v, kRotateNone = 0,
uint8* dst_y, int dst_pitch_y, kRotateClockwise = 90,
uint8* dst_u, int dst_pitch_u, kRotateCounterClockwise = -90,
uint8* dst_v, int dst_pitch_v, kRotate180 = 180,
int width, int height); };
// Convert I422 to I420. Used by MJPG. // I420 mirror
void I422ToI420(const uint8* src_y, int src_pitch_y, int
const uint8* src_u, int src_pitch_u, I420Mirror(const uint8* src_yplane, int src_ystride,
const uint8* src_v, int src_pitch_v, const uint8* src_uplane, int src_ustride,
uint8* dst_y, int dst_pitch_y, const uint8* src_vplane, int src_vstride,
uint8* dst_u, int dst_pitch_u, uint8* dst_yplane, int dst_ystride,
uint8* dst_v, int dst_pitch_v, uint8* dst_uplane, int dst_ustride,
int width, int height); uint8* dst_vplane, int dst_vstride,
int width, int height);
// Convert M420 to I420.
void M420ToI420(const uint8* src_m420, int src_pitch_m420, // Crop/Pad I420 frame to match required dimensions.
uint8* dst_y, int dst_pitch_y, int
uint8* dst_u, int dst_pitch_u, I420CropPad(const uint8* src_frame, int src_width,
uint8* dst_v, int dst_pitch_v, int src_height, uint8* dst_frame,
int width, int height); int dst_width, int dst_height);
// Convert Q420 to I420. // I420 Crop - make a center cut
void Q420ToI420(const uint8* src_y, int src_pitch_y, int
const uint8* src_yuy2, int src_pitch_yuy2, I420Crop(uint8* frame,
uint8* dst_y, int dst_pitch_y, int src_width, int src_height,
uint8* dst_u, int dst_pitch_u, int dst_width, int dst_height);
uint8* dst_v, int dst_pitch_v,
int width, int height);
} // namespace libyuv
// Convert NV12 to I420. Also used for NV21.
void NV12ToI420(const uint8* src_y,
const uint8* src_uv, int src_pitch, #endif // LIBYUV_INCLUDE_GENERAL_H_
uint8* dst_y, int dst_pitch_y,
uint8* dst_u, int dst_pitch_u,
uint8* dst_v, int dst_pitch_v,
int width, int height);
// Convert YUY2 to I420.
void YUY2ToI420(const uint8* src_yuy2, int src_pitch_yuy2,
uint8* dst_y, int dst_pitch_y,
uint8* dst_u, int dst_pitch_u,
uint8* dst_v, int dst_pitch_v,
int width, int height);
// Convert UYVY to I420.
void UYVYToI420(const uint8* src_uyvy, int src_pitch_uyvy,
uint8* dst_y, int dst_pitch_y,
uint8* dst_u, int dst_pitch_u,
uint8* dst_v, int dst_pitch_v,
int width, int height);
// Convert I420 to ARGB.
void I420ToARGB(const uint8* src_y, int src_pitch_y,
const uint8* src_u, int src_pitch_u,
const uint8* src_v, int src_pitch_v,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert I420 to BGRA.
void I420ToBGRA(const uint8* src_y, int src_pitch_y,
const uint8* src_u, int src_pitch_u,
const uint8* src_v, int src_pitch_v,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert I420 to ABGR.
void I420ToABGR(const uint8* src_y, int src_pitch_y,
const uint8* src_u, int src_pitch_u,
const uint8* src_v, int src_pitch_v,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert I422 to ARGB.
void I422ToARGB(const uint8* src_y, int src_pitch_y,
const uint8* src_u, int src_pitch_u,
const uint8* src_v, int src_pitch_v,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert I444 to ARGB.
void I444ToARGB(const uint8* src_y, int src_pitch_y,
const uint8* src_u, int src_pitch_u,
const uint8* src_v, int src_pitch_v,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert I400 to ARGB.
void I400ToARGB(const uint8* src_y, int src_pitch_y,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert I400 to ARGB.
void I400ToARGB_Reference(const uint8* src_y, int src_pitch_y,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert RAW to ARGB.
void RAWToARGB(const uint8* src_raw, int src_pitch_raw,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert BG24 to ARGB.
void BG24ToARGB(const uint8* src_bg24, int src_pitch_bg24,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
// Convert ABGR to ARGB.
void ABGRToARGB(const uint8* src_abgr, int src_pitch_abgr,
uint8* dst_argb, int dst_pitch_argb,
int width, int height);
} // namespace libyuv
#endif // LIBYUV_INCLUDE_PLANAR_FUNCTIONS_H_
...@@ -68,9 +68,9 @@ I420Mirror(const uint8* src_yplane, int src_ystride, ...@@ -68,9 +68,9 @@ I420Mirror(const uint8* src_yplane, int src_ystride,
// Make a center cut // Make a center cut
int int
I420Cut(uint8* frame, I420Crop(uint8* frame,
int src_width, int src_height, int src_width, int src_height,
int dst_width, int dst_height) int dst_width, int dst_height)
{ {
if (frame == NULL) if (frame == NULL)
return -1; return -1;
......
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