diff --git a/README.chromium b/README.chromium index 2564fcc8d..86583e0d7 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 140 +Version: 141 License: BSD License File: LICENSE diff --git a/include/libyuv/convert.h b/include/libyuv/convert.h index 1c5191c4b..053745588 100644 --- a/include/libyuv/convert.h +++ b/include/libyuv/convert.h @@ -155,23 +155,15 @@ int ConvertToI420(const uint8* src_frame, size_t src_size, uint32 format); // Convert I420 to specified format. +// "dst_sample_stride" is bytes in a row for the destination. Pass 0 if the +// buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. int ConvertFromI420(const uint8* y, int y_stride, const uint8* u, int u_stride, const uint8* v, int v_stride, - uint8* dst_sample, size_t dst_sample_size, + uint8* dst_sample, int dst_sample_stride, int width, int height, uint32 format); -// Convert I420 to specified format with stride. -// stride applies to first plane. If zero, width is used to compute stride. -int ConvertFromI420Stride(const uint8* y, int y_stride, - const uint8* u, int u_stride, - const uint8* v, int v_stride, - uint8* dst_sample, size_t dst_sample_stride, - size_t dst_sample_size, - int width, int height, - uint32 format); - #ifdef __cplusplus } // extern "C" } // namespace libyuv diff --git a/source/convertfrom.cc b/source/convertfrom.cc index 486305dd4..9c1f8d292 100644 --- a/source/convertfrom.cc +++ b/source/convertfrom.cc @@ -21,18 +21,12 @@ extern "C" { #endif // Convert I420 to specified format -// TODO(fbarchard): sample_size should be used to ensure the low levels do -// not read outside the buffer provided. It is measured in bytes and is the -// size of the frame. With MJPEG it is the compressed size of the frame. -// dst_sample_stride is bytes in a row for the destination. Pass 0 if the -// buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. -int ConvertFromI420Stride(const uint8* y, int y_stride, - const uint8* u, int u_stride, - const uint8* v, int v_stride, - uint8* dst_sample, size_t dst_sample_stride, - size_t /*dst_sample_size*/, - int width, int height, - uint32 format) { +int ConvertFromI420(const uint8* y, int y_stride, + const uint8* u, int u_stride, + const uint8* v, int v_stride, + uint8* dst_sample, int dst_sample_stride, + int width, int height, + uint32 format) { if (y == NULL || u == NULL || v == NULL || dst_sample == NULL) { return -1; @@ -212,20 +206,6 @@ int ConvertFromI420Stride(const uint8* y, int y_stride, return 0; } -// Convert I420 to specified format. -int ConvertFromI420(const uint8* y, int y_stride, - const uint8* u, int u_stride, - const uint8* v, int v_stride, - uint8* dst_sample, size_t dst_sample_size, - int width, int height, - uint32 format) { - return ConvertFromI420Stride(y, y_stride, - u, u_stride, - v, v_stride, - dst_sample, 0, dst_sample_size, - width, height, format); -} - #ifdef __cplusplus } // extern "C" } // namespace libyuv