mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 17:26:49 +08:00
memset v210 destination buffer to 0 to attempt valgrind fix.
BUG=91 TEST=I420ToV210 Review URL: https://webrtc-codereview.appspot.com/872008 git-svn-id: http://libyuv.googlecode.com/svn/trunk@407 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
ff6a756a09
commit
0cbbdde3d5
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 406
|
||||
Version: 407
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -46,8 +46,8 @@ int ArmCpuCaps(const char* cpuinfo_name);
|
||||
// Detect CPU has SSE2 etc.
|
||||
// Test_flag parameter should be one of kCpuHas constants above.
|
||||
// returns non-zero if instruction set is detected
|
||||
LIBYUV_API extern int cpu_info_;
|
||||
static __inline int TestCpuFlag(int test_flag) {
|
||||
LIBYUV_API extern int cpu_info_;
|
||||
return (cpu_info_ ? cpu_info_ : InitCpuFlags()) & test_flag;
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 406
|
||||
#define LIBYUV_VERSION 407
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -765,7 +765,7 @@ static void V210ToUYVYRow_C(const uint8* src_v210, uint8* dst_uyvy, int width) {
|
||||
|
||||
// Convert V210 to I420.
|
||||
// V210 is 10 bit version of UYVY. 16 bytes to store 6 pixels.
|
||||
// With is multiple of 48.
|
||||
// Width is multiple of 48 pixels = 128 bytes.
|
||||
LIBYUV_API
|
||||
int V210ToI420(const uint8* src_v210, int src_stride_v210,
|
||||
uint8* dst_y, int dst_stride_y,
|
||||
|
||||
@ -143,15 +143,20 @@ TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##N) { \
|
||||
align_buffer_16(src_v, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y); \
|
||||
align_buffer_16(dst_argb_c, kStrideB * kHeight); \
|
||||
align_buffer_16(dst_argb_opt, kStrideB * kHeight); \
|
||||
memset(dst_argb_c, 0, kStrideB * kHeight); \
|
||||
memset(dst_argb_opt, 0, kStrideB * kHeight); \
|
||||
srandom(time(NULL)); \
|
||||
for (int i = 0; i < kHeight; ++i) \
|
||||
for (int j = 0; j < kWidth; ++j) \
|
||||
for (int i = 0; i < kHeight; ++i) { \
|
||||
for (int j = 0; j < kWidth; ++j) { \
|
||||
src_y[(i * kWidth) + j] = (random() & 0xff); \
|
||||
for (int i = 0; i < kHeight / SUBSAMP_Y; ++i) \
|
||||
} \
|
||||
} \
|
||||
for (int i = 0; i < kHeight / SUBSAMP_Y; ++i) { \
|
||||
for (int j = 0; j < kWidth / SUBSAMP_X; ++j) { \
|
||||
src_u[(i * kWidth / SUBSAMP_X) + j] = (random() & 0xff); \
|
||||
src_v[(i * kWidth / SUBSAMP_X) + j] = (random() & 0xff); \
|
||||
} \
|
||||
} \
|
||||
MaskCpuFlags(kCpuInitialized); \
|
||||
FMT_PLANAR##To##FMT_B(src_y, kWidth, \
|
||||
src_u, kWidth / SUBSAMP_X, \
|
||||
@ -208,9 +213,9 @@ TESTPLANARTOB(I422, 2, 1, ABGR, 4, 4)
|
||||
TESTPLANARTOB(I422, 2, 1, RGBA, 4, 4)
|
||||
TESTPLANARTOB(I411, 4, 1, ARGB, 4, 4)
|
||||
TESTPLANARTOB(I444, 1, 1, ARGB, 4, 4)
|
||||
TESTPLANARTOB(I420, 2, 2, V210, 16 / 6, 128)
|
||||
TESTPLANARTOB(I420, 2, 2, YUY2, 2, 4)
|
||||
TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4)
|
||||
TESTPLANARTOB(I420, 2, 2, V210, 16 / 6, 128)
|
||||
TESTPLANARTOB(I420, 2, 2, I400, 1, 1)
|
||||
TESTPLANARTOB(I420, 2, 2, BayerBGGR, 1, 1)
|
||||
TESTPLANARTOB(I420, 2, 2, BayerRGGB, 1, 1)
|
||||
@ -372,11 +377,11 @@ TESTATOPLANAR(ARGB4444, 2, I420, 2, 2)
|
||||
TESTATOPLANAR(ARGB, 4, I422, 2, 1)
|
||||
// TESTATOPLANAR(ARGB, 4, I444, 1, 1)
|
||||
// TODO(fbarchard): Implement and test 411 and 444
|
||||
TESTATOPLANAR(V210, 16 / 6, I420, 2, 2)
|
||||
TESTATOPLANAR(YUY2, 2, I420, 2, 2)
|
||||
TESTATOPLANAR(UYVY, 2, I420, 2, 2)
|
||||
TESTATOPLANAR(YUY2, 2, I422, 2, 1)
|
||||
TESTATOPLANAR(UYVY, 2, I422, 2, 1)
|
||||
TESTATOPLANAR(V210, 16 / 6, I420, 2, 2)
|
||||
TESTATOPLANAR(I400, 1, I420, 2, 2)
|
||||
TESTATOPLANAR(BayerBGGR, 1, I420, 2, 2)
|
||||
TESTATOPLANAR(BayerRGGB, 1, I420, 2, 2)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user