[UT] Test generic downsampling routines with a wider variety of width ratios
Get coverage of all code paths for routines that branch to different paths for different scaling ratios.
This commit is contained in:
parent
e490215990
commit
4fec6d581e
@ -296,11 +296,12 @@ TEST (DownSampleTest, func) { \
|
||||
int src_stride_a; \
|
||||
int src_width_a; \
|
||||
int src_height_a; \
|
||||
for (int i = 0; i < 5; i++) { \
|
||||
dst_stride_c = dst_stride_a = 320; \
|
||||
src_stride_c = src_stride_a = 320; \
|
||||
src_width_c = src_width_a = 320; \
|
||||
src_height_c = src_height_a = 180; \
|
||||
dst_width_c = dst_width_a = 300; \
|
||||
dst_width_c = dst_width_a = (src_width_c >> (i + 1)) + rand() % (src_width_c >> (i + 1)); \
|
||||
dst_height_c = dst_height_a = 160; \
|
||||
for (int j = 0; j < 70000; j++) { \
|
||||
dst_c[j] = dst_a[j] = rand() % 256; \
|
||||
@ -313,6 +314,7 @@ TEST (DownSampleTest, func) { \
|
||||
ASSERT_EQ (dst_c[m + j * dst_stride_c], dst_a[m + j * dst_stride_a]); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user