[UT] Test VAA routines with a wider variety of resolutions
Test even and odd multiples of 32 width because some AVX2 routines have conditional logic based on that.
This commit is contained in:
parent
57fc3e9917
commit
93db6511a8
@ -590,7 +590,8 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
int32_t pic_height_a; \
|
int32_t pic_height_a; \
|
||||||
int32_t pic_stride_a; \
|
int32_t pic_stride_a; \
|
||||||
int32_t psadframe_a; \
|
int32_t psadframe_a; \
|
||||||
pic_width_c = pic_width_a = 320-16; \
|
for (int i=0; i<4; i++) { \
|
||||||
|
pic_width_c = pic_width_a = 320-16*i; \
|
||||||
pic_height_c = pic_height_a = 320; \
|
pic_height_c = pic_height_a = 320; \
|
||||||
pic_stride_c = pic_stride_a = 320; \
|
pic_stride_c = pic_stride_a = 320; \
|
||||||
psadframe_c = psadframe_a = 0; \
|
psadframe_c = psadframe_a = 0; \
|
||||||
@ -604,6 +605,7 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
ASSERT_EQ (psadframe_a, psadframe_c); \
|
ASSERT_EQ (psadframe_a, psadframe_c); \
|
||||||
for (int j=0; j<(BUFFER_SIZE/64); j++) \
|
for (int j=0; j<(BUFFER_SIZE/64); j++) \
|
||||||
ASSERT_EQ (psad8x8_a[j], psad8x8_c[j]); \
|
ASSERT_EQ (psad8x8_a[j], psad8x8_c[j]); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -633,7 +635,8 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
int32_t pic_height_a; \
|
int32_t pic_height_a; \
|
||||||
int32_t pic_stride_a; \
|
int32_t pic_stride_a; \
|
||||||
int32_t psadframe_a; \
|
int32_t psadframe_a; \
|
||||||
pic_width_c = pic_width_a = 320-16; \
|
for (int i=0; i<4; i++) { \
|
||||||
|
pic_width_c = pic_width_a = 320-16*i; \
|
||||||
pic_height_c = pic_height_a = 320; \
|
pic_height_c = pic_height_a = 320; \
|
||||||
pic_stride_c = pic_stride_a = 320; \
|
pic_stride_c = pic_stride_a = 320; \
|
||||||
psadframe_c = psadframe_a = 0; \
|
psadframe_c = psadframe_a = 0; \
|
||||||
@ -652,6 +655,7 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
ASSERT_EQ (psd8x8_a[j], psd8x8_c[j]); \
|
ASSERT_EQ (psd8x8_a[j], psd8x8_c[j]); \
|
||||||
ASSERT_EQ (pmad8x8_a[j], pmad8x8_c[j]); \
|
ASSERT_EQ (pmad8x8_a[j], pmad8x8_c[j]); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GENERATE_VAACalcSadSsd_UT(func, ASM, CPUFLAGS) \
|
#define GENERATE_VAACalcSadSsd_UT(func, ASM, CPUFLAGS) \
|
||||||
@ -682,7 +686,8 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
int32_t pic_height_a; \
|
int32_t pic_height_a; \
|
||||||
int32_t pic_stride_a; \
|
int32_t pic_stride_a; \
|
||||||
int32_t psadframe_a; \
|
int32_t psadframe_a; \
|
||||||
pic_width_c = pic_width_a = 320-16; \
|
for (int i=0; i<4; i++) { \
|
||||||
|
pic_width_c = pic_width_a = 320-16*i; \
|
||||||
pic_height_c = pic_height_a = 320; \
|
pic_height_c = pic_height_a = 320; \
|
||||||
pic_stride_c = pic_stride_a = 320; \
|
pic_stride_c = pic_stride_a = 320; \
|
||||||
psadframe_c = psadframe_a = 0; \
|
psadframe_c = psadframe_a = 0; \
|
||||||
@ -705,6 +710,7 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
ASSERT_EQ (psqsum16x16_a[j], psqsum16x16_c[j]); \
|
ASSERT_EQ (psqsum16x16_a[j], psqsum16x16_c[j]); \
|
||||||
ASSERT_EQ (psqdiff16x16_a[j], psqdiff16x16_c[j]); \
|
ASSERT_EQ (psqdiff16x16_a[j], psqdiff16x16_c[j]); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GENERATE_VAACalcSadVar_UT(func, ASM, CPUFLAGS) \
|
#define GENERATE_VAACalcSadVar_UT(func, ASM, CPUFLAGS) \
|
||||||
@ -733,7 +739,8 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
int32_t pic_height_a; \
|
int32_t pic_height_a; \
|
||||||
int32_t pic_stride_a; \
|
int32_t pic_stride_a; \
|
||||||
int32_t psadframe_a; \
|
int32_t psadframe_a; \
|
||||||
pic_width_c = pic_width_a = 320-16; \
|
for (int i=0; i<4; i++) { \
|
||||||
|
pic_width_c = pic_width_a = 320-16*i; \
|
||||||
pic_height_c = pic_height_a = 320; \
|
pic_height_c = pic_height_a = 320; \
|
||||||
pic_stride_c = pic_stride_a = 320; \
|
pic_stride_c = pic_stride_a = 320; \
|
||||||
psadframe_c = psadframe_a = 0; \
|
psadframe_c = psadframe_a = 0; \
|
||||||
@ -754,6 +761,7 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
ASSERT_EQ (psum16x16_a[j], psum16x16_c[j]); \
|
ASSERT_EQ (psum16x16_a[j], psum16x16_c[j]); \
|
||||||
ASSERT_EQ (psqsum16x16_a[j], psqsum16x16_c[j]); \
|
ASSERT_EQ (psqsum16x16_a[j], psqsum16x16_c[j]); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GENERATE_VAACalcSadSsdBgd_UT(func, ASM, CPUFLAGS) \
|
#define GENERATE_VAACalcSadSsdBgd_UT(func, ASM, CPUFLAGS) \
|
||||||
@ -788,7 +796,8 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
int32_t pic_height_a; \
|
int32_t pic_height_a; \
|
||||||
int32_t pic_stride_a; \
|
int32_t pic_stride_a; \
|
||||||
int32_t psadframe_a; \
|
int32_t psadframe_a; \
|
||||||
pic_width_c = pic_width_a = 320-16; \
|
for (int i=0; i<4; i++) { \
|
||||||
|
pic_width_c = pic_width_a = 320-16*i; \
|
||||||
pic_height_c = pic_height_a = 320; \
|
pic_height_c = pic_height_a = 320; \
|
||||||
pic_stride_c = pic_stride_a = 320; \
|
pic_stride_c = pic_stride_a = 320; \
|
||||||
psadframe_c = psadframe_a = 0; \
|
psadframe_c = psadframe_a = 0; \
|
||||||
@ -815,6 +824,7 @@ TEST (VAACalcFuncTest, func) { \
|
|||||||
ASSERT_EQ (psqsum16x16_a[j], psqsum16x16_c[j]); \
|
ASSERT_EQ (psqsum16x16_a[j], psqsum16x16_c[j]); \
|
||||||
ASSERT_EQ (psqdiff16x16_a[j], psqdiff16x16_c[j]); \
|
ASSERT_EQ (psqdiff16x16_a[j], psqdiff16x16_c[j]); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
GENERATE_VAACalcSad_UT (VAACalcSad_c, 0, 0)
|
GENERATE_VAACalcSad_UT (VAACalcSad_c, 0, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user