mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-16 23:29:52 +08:00
ConvertFrom remove sample size and add stride
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/356001 git-svn-id: http://libyuv.googlecode.com/svn/trunk@141 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
24d2656b65
commit
1eb4034778
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 140
|
Version: 141
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -155,23 +155,15 @@ int ConvertToI420(const uint8* src_frame, size_t src_size,
|
|||||||
uint32 format);
|
uint32 format);
|
||||||
|
|
||||||
// Convert I420 to specified 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,
|
int ConvertFromI420(const uint8* y, int y_stride,
|
||||||
const uint8* u, int u_stride,
|
const uint8* u, int u_stride,
|
||||||
const uint8* v, int v_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,
|
int width, int height,
|
||||||
uint32 format);
|
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
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
} // namespace libyuv
|
} // namespace libyuv
|
||||||
|
|||||||
@ -21,18 +21,12 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Convert I420 to specified format
|
// Convert I420 to specified format
|
||||||
// TODO(fbarchard): sample_size should be used to ensure the low levels do
|
int ConvertFromI420(const uint8* y, int y_stride,
|
||||||
// not read outside the buffer provided. It is measured in bytes and is the
|
const uint8* u, int u_stride,
|
||||||
// size of the frame. With MJPEG it is the compressed size of the frame.
|
const uint8* v, int v_stride,
|
||||||
// dst_sample_stride is bytes in a row for the destination. Pass 0 if the
|
uint8* dst_sample, int dst_sample_stride,
|
||||||
// buffer has contiguous rows. Can be negative. A multiple of 16 is optimal.
|
int width, int height,
|
||||||
int ConvertFromI420Stride(const uint8* y, int y_stride,
|
uint32 format) {
|
||||||
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) {
|
|
||||||
|
|
||||||
if (y == NULL || u == NULL || v == NULL || dst_sample == NULL) {
|
if (y == NULL || u == NULL || v == NULL || dst_sample == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -212,20 +206,6 @@ int ConvertFromI420Stride(const uint8* y, int y_stride,
|
|||||||
return 0;
|
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
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
} // namespace libyuv
|
} // namespace libyuv
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user