Commit 280f4fd8 authored by mikhal@webrtc.org's avatar mikhal@webrtc.org

LibYuv: Updating convert file: 1. Adding RawToI420 2. Adding support for odd…

LibYuv: Updating convert file: 1. Adding RawToI420 2. Adding support for odd dimensions 3. Removing I420ToRGB565Android and updating I420ToRGB565 to support negative height as invert 4. Adding convert class 5. Removing YV12 functionality 6. Adding I420ToBGRA 7. Coding style updates
Review URL: http://webrtc-codereview.appspot.com/214006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@20 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent ea0cff02
...@@ -16,154 +16,109 @@ ...@@ -16,154 +16,109 @@
namespace libyuv namespace libyuv
{ {
class Convert {
int public:
ConvertI420ToRGB24(const uint8* src_yplane, int src_ystride, static int
const uint8* src_uplane, int src_ustride, I420ToRGB24(const uint8* src_yplane, int src_ystride,
const uint8* src_vplane, int src_vstride, const uint8* src_uplane, int src_ustride,
uint8* dst_frame, int dst_stride, const uint8* src_vplane, int src_vstride,
int src_width, uint8* dst_frame, int dst_stride,
int src_height int src_width, int src_height);
);
static int
int I420ToARGB(const uint8* src_yplane, int src_ystride,
ConvertI420ToARGB(const uint8* src_yplane, int src_ystride, const uint8* src_uplane, int src_ustride,
const uint8* src_uplane, int src_ustride, const uint8* src_vplane, int src_vstride,
const uint8* src_vplane, int src_vstride, uint8* dst_frame, int dst_stride,
uint8* dst_frame, int dst_stride, int src_width, int src_height);
int src_width,
int src_height static int
); I420ToARGB4444(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride,
int const uint8* src_vplane, int src_vstride,
ConvertI420ToARGB4444(const uint8* src_yplane, int src_ystride, uint8* dst_frame, int dst_stride,
const uint8* src_uplane, int src_ustride, int src_width, int src_height);
const uint8* src_vplane, int src_vstride,
uint8* dst_frame, int dst_stride, static int
int src_width, I420ToRGB565(const uint8* src_yplane, int src_ystride,
int src_height const uint8* src_uplane, int src_ustride,
); const uint8* src_vplane, int src_vstride,
uint8* dst_frame, int dst_stride,
int int src_width, int src_height);
ConvertI420ToRGB565(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride, static int
const uint8* src_vplane, int src_vstride, I420ToARGB1555(const uint8* src_yplane, int src_ystride,
uint8* dst_frame, int dst_stride, const uint8* src_uplane, int src_ustride,
int src_width, const uint8* src_vplane, int src_vstride,
int src_height uint8* dst_frame, int dst_stride,
); int src_width, int src_height);
int static int
ConvertI420ToRGB565Android(const uint8* src_yplane, int src_ystride, I420ToYUY2(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride, const uint8* src_uplane, int src_ustride,
const uint8* src_vplane, int src_vstride, const uint8* src_vplane, int src_vstride,
uint8* dst_frame, int dst_stride, uint8* dst_frame, int dst_stride,
int src_width, int src_width, int src_height);
int src_height static int
); I420ToUYVY(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride,
int const uint8* src_vplane, int src_vstride,
ConvertI420ToARGB1555(const uint8* src_yplane, int src_ystride, uint8* dst_frame, int dst_stride,
const uint8* src_uplane, int src_ustride, int src_width, int src_height);
const uint8* src_vplane, int src_vstride, static int
uint8* dst_frame, int dst_stride, UYVYToI420(const uint8* src_frame, int src_stride,
int src_width, uint8* dst_yplane, int dst_ystride,
int src_height uint8* dst_uplane, int dst_ustride,
); uint8* dst_vplane, int dst_vstride,
int src_width, int src_height);
int
ConvertYV12ToARGB(const uint8* src_yplane, int src_ystride, static int
const uint8* src_uplane, int src_ustride, RGB24ToARGB(const uint8* src_frame, int src_stride,
const uint8* src_vplane, int src_vstride, uint8* dst_frame, int dst_stride,
uint8* dst_frame, int dst_stride, int src_width, int src_height);
int src_width,
int src_height static int
); RGB24ToI420(const uint8* src_frame, int src_stride,
uint8* dst_yplane, int dst_ystride,
uint8* dst_uplane, int dst_ustride,
int uint8* dst_vplane, int dst_vstride,
ConvertYV12ToRGBA(const uint8* src_yplane, int src_ystride, int src_width, int src_height);
const uint8* src_uplane, int src_ustride,
const uint8* src_vplane, int src_vstride, static int
uint8* dst_frame, int dst_stride, RAWToI420(const uint8* src_frame, int src_stride,
int src_width, uint8* dst_yplane, int dst_ystride,
int src_height uint8* dst_uplane, int dst_ustride,
); uint8* dst_vplane, int dst_vstride,
int src_width, int src_height);
int
ConvertI420ToYUY2(const uint8* src_yplane, int src_ystride, static int
const uint8* src_uplane, int src_ustride, ABGRToI420(const uint8* src_frame, int src_stride,
const uint8* src_vplane, int src_vstride, uint8* dst_yplane, int dst_ystride,
uint8* dst_frame, int dst_stride, uint8* dst_uplane, int dst_ustride,
int src_width, uint8* dst_vplane, int dst_vstride,
int src_height int src_width, int src_height);
); static int
int I420ToABGR(const uint8* src_yplane, int src_ystride,
ConvertUYVYToI420(const uint8* src_frame, int src_stride, const uint8* src_uplane, int src_ustride,
uint8* dst_yplane, int dst_ystride, const uint8* src_vplane, int src_vstride,
uint8* dst_uplane, int dst_ustride, uint8* dst_frame, int dst_stride,
uint8* dst_vplane, int dst_vstride, int src_width, int src_height);
int src_width, int
int src_height); I420ToBGRA(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride,
int const uint8* src_vplane, int src_vstride,
ConvertI420ToYUY2(const uint8* src_yplane, int src_ystride, uint8* dst_frame, int dst_stride,
const uint8* src_uplane, int src_ustride, int src_width, int src_height);
const uint8* src_vplane, int src_vstride,
uint8* dst_frame, int dst_stride, static int
int src_width, NV12ToRGB565(const uint8* src_yplane, int src_ystride,
int src_height const uint8* src_uvplane, int src_uvstride,
); uint8* dst_frame, int dst_stride,
int int src_width, int src_height);
ConvertI420ToYV12(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride, DISALLOW_IMPLICIT_CONSTRUCTORS(Convert);
const uint8* src_vplane, int src_vstride,
uint8* dst_frame, int dst_stride, };
int src_width,
int src_height
);
int
ConvertRGB24ToARGB(const uint8* src_frame, int src_stride,
uint8* dst_frame, int dst_stride,
int src_width, int src_height
);
int
ConvertRGB24ToI420(const uint8* src_frame, int src_stride,
uint8* dst_yplane, int dst_ystride,
uint8* dst_uplane, int dst_ustride,
uint8* dst_vplane, int dst_vstride,
int src_width,
int src_height
);
int
ConvertABGRToI420(const uint8* src_frame, int src_stride,
uint8* dst_yplane, int dst_ystride,
uint8* dst_uplane, int dst_ustride,
uint8* dst_vplane, int dst_vstride,
int src_width,
int src_height
);
int
ConvertNv12ToRGB565(const uint8* src_yplane, int src_ystride,
const uint8* src_uvplane, int src_uvstride,
uint8* dst_frame, int dst_stride,
int src_width,
int src_height
);
int
ConvertI420ToABGR(const uint8* src_yplane, int src_ystride,
const uint8* src_uplane, int src_ustride,
const uint8* src_vplane, int src_vstride,
uint8* dst_frame, int dst_stride,
int src_width,
int src_height
);
} // namespace libyuv } // namespace libyuv
#endif // LIBYUV_INCLUDE_CONVERT_H_ #endif // LIBYUV_INCLUDE_CONVERT_H_
This diff is collapsed.
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