mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
update libyuv to hash bcd8238 from https://chromium.googlesource.com/libyuv/libyuv/
This commit is contained in:
@@ -25,6 +25,10 @@ static int TestFilter(int src_width, int src_height,
|
||||
int dst_width, int dst_height,
|
||||
FilterMode f, int benchmark_iterations,
|
||||
int disable_cpu_flags, int benchmark_cpu_info) {
|
||||
if (!SizeValid(src_width, src_height, dst_width, dst_height)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int i, j;
|
||||
const int b = 0; // 128 to test for padding/stride.
|
||||
int src_width_uv = (Abs(src_width) + 1) >> 1;
|
||||
@@ -148,6 +152,10 @@ static int TestFilter(int src_width, int src_height,
|
||||
static int TestFilter_16(int src_width, int src_height,
|
||||
int dst_width, int dst_height,
|
||||
FilterMode f, int benchmark_iterations) {
|
||||
if (!SizeValid(src_width, src_height, dst_width, dst_height)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int i, j;
|
||||
const int b = 0; // 128 to test for padding/stride.
|
||||
int src_width_uv = (Abs(src_width) + 1) >> 1;
|
||||
@@ -274,8 +282,8 @@ static int TestFilter_16(int src_width, int src_height,
|
||||
// The following adjustments in dimensions ensure the scale factor will be
|
||||
// exactly achieved.
|
||||
// 2 is chroma subsample
|
||||
#define DX(x, nom, denom) static_cast<int>((Abs(x) / nom / 2) * nom * 2)
|
||||
#define SX(x, nom, denom) static_cast<int>((x / nom / 2) * denom * 2)
|
||||
#define DX(x, nom, denom) static_cast<int>(((Abs(x) / nom + 1) / 2) * nom * 2)
|
||||
#define SX(x, nom, denom) static_cast<int>(((x / nom + 1) / 2) * denom * 2)
|
||||
|
||||
#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \
|
||||
TEST_F(LibYUVScaleTest, ScaleDownBy##name##_##filter) { \
|
||||
@@ -306,10 +314,10 @@ static int TestFilter_16(int src_width, int src_height,
|
||||
|
||||
TEST_FACTOR(2, 1, 2, 0)
|
||||
TEST_FACTOR(4, 1, 4, 0)
|
||||
TEST_FACTOR(8, 1, 8, 3)
|
||||
TEST_FACTOR(8, 1, 8, 0)
|
||||
TEST_FACTOR(3by4, 3, 4, 1)
|
||||
TEST_FACTOR(3by8, 3, 8, 1)
|
||||
TEST_FACTOR(3, 1, 3, 3)
|
||||
TEST_FACTOR(3, 1, 3, 0)
|
||||
#undef TEST_FACTOR1
|
||||
#undef TEST_FACTOR
|
||||
#undef SX
|
||||
@@ -348,9 +356,9 @@ TEST_FACTOR(3, 1, 3, 3)
|
||||
// Test scale to a specified size with all 4 filters.
|
||||
#define TEST_SCALETO(name, width, height) \
|
||||
TEST_SCALETO1(name, width, height, None, 0) \
|
||||
TEST_SCALETO1(name, width, height, Linear, 3) \
|
||||
TEST_SCALETO1(name, width, height, Bilinear, 3) \
|
||||
TEST_SCALETO1(name, width, height, Box, 3)
|
||||
TEST_SCALETO1(name, width, height, Linear, 0) \
|
||||
TEST_SCALETO1(name, width, height, Bilinear, 0) \
|
||||
TEST_SCALETO1(name, width, height, Box, 0)
|
||||
|
||||
TEST_SCALETO(Scale, 1, 1)
|
||||
TEST_SCALETO(Scale, 320, 240)
|
||||
|
Reference in New Issue
Block a user