mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
Fix scaling bug
BUG=none TEST=none R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/3979007 git-svn-id: http://libyuv.googlecode.com/svn/trunk@864 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
9cfb3a8b3a
commit
431f5f0388
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 863
|
Version: 864
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 863
|
#define LIBYUV_VERSION 864
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -870,7 +870,7 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bilinear row filtering combines 2x1 -> 1x1. SSSE3 version.
|
// Bilinear column filtering. SSSE3 version.
|
||||||
// TODO(fbarchard): Port to Neon
|
// TODO(fbarchard): Port to Neon
|
||||||
|
|
||||||
#define HAS_SCALEFILTERCOLS_SSSE3
|
#define HAS_SCALEFILTERCOLS_SSSE3
|
||||||
@ -1681,7 +1681,7 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bilinear row filtering combines 4x2 -> 4x1. SSSE3 version
|
// Bilinear column filtering. SSSE3 version.
|
||||||
#define HAS_SCALEFILTERCOLS_SSSE3
|
#define HAS_SCALEFILTERCOLS_SSSE3
|
||||||
static void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
|
static void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
|
||||||
int dst_width, int x, int dx) {
|
int dst_width, int x, int dx) {
|
||||||
@ -1730,10 +1730,10 @@ static void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
|
|||||||
"jl 99f \n"
|
"jl 99f \n"
|
||||||
"movzwl (%1,%3,1),%k2 \n"
|
"movzwl (%1,%3,1),%k2 \n"
|
||||||
"movd %k2,%%xmm0 \n"
|
"movd %k2,%%xmm0 \n"
|
||||||
"psrlw $0x9,%%xmm1 \n"
|
"psrlw $0x9,%%xmm2 \n"
|
||||||
"pshufb %%xmm5,%%xmm1 \n"
|
"pshufb %%xmm5,%%xmm2 \n"
|
||||||
"pxor %%xmm6,%%xmm1 \n"
|
"pxor %%xmm6,%%xmm2 \n"
|
||||||
"pmaddubsw %%xmm1,%%xmm0 \n"
|
"pmaddubsw %%xmm2,%%xmm0 \n"
|
||||||
"psrlw $0x7,%%xmm0 \n"
|
"psrlw $0x7,%%xmm0 \n"
|
||||||
"packuswb %%xmm0,%%xmm0 \n"
|
"packuswb %%xmm0,%%xmm0 \n"
|
||||||
"movd %%xmm0,%k2 \n"
|
"movd %%xmm0,%k2 \n"
|
||||||
|
|||||||
@ -218,15 +218,15 @@ static int ARGBClipTestFilter(int src_width, int src_height,
|
|||||||
TEST_FACTOR1(name, Bilinear, hfactor, vfactor, 2)
|
TEST_FACTOR1(name, Bilinear, hfactor, vfactor, 2)
|
||||||
|
|
||||||
// TODO(fbarchard): ScaleDownBy1 should be lossless, but Box has error of 2.
|
// TODO(fbarchard): ScaleDownBy1 should be lossless, but Box has error of 2.
|
||||||
// TEST_FACTOR(1, 1 / 1, 1 / 1)
|
TEST_FACTOR(1, 1 / 1, 1 / 1)
|
||||||
TEST_FACTOR(2, 1 / 2, 1 / 2)
|
TEST_FACTOR(2, 1 / 2, 1 / 2)
|
||||||
// TEST_FACTOR(4, 1 / 4, 1 / 4)
|
TEST_FACTOR(4, 1 / 4, 1 / 4)
|
||||||
// TEST_FACTOR(8, 1 / 8, 1 / 8)
|
TEST_FACTOR(8, 1 / 8, 1 / 8)
|
||||||
// TEST_FACTOR(16, 1 / 16, 1 / 16)
|
TEST_FACTOR(16, 1 / 16, 1 / 16)
|
||||||
// TEST_FACTOR(2by3, 2 / 3, 2 / 3)
|
TEST_FACTOR(2by3, 2 / 3, 2 / 3)
|
||||||
// TEST_FACTOR(3by4, 3 / 4, 3 / 4)
|
TEST_FACTOR(3by4, 3 / 4, 3 / 4)
|
||||||
// TEST_FACTOR(3by8, 3 / 8, 3 / 8)
|
TEST_FACTOR(3by8, 3 / 8, 3 / 8)
|
||||||
// TEST_FACTOR(Vertical2by3, 1, 2 / 3)
|
TEST_FACTOR(Vertical2by3, 1, 2 / 3)
|
||||||
#undef TEST_FACTOR1
|
#undef TEST_FACTOR1
|
||||||
#undef TEST_FACTOR
|
#undef TEST_FACTOR
|
||||||
|
|
||||||
@ -262,11 +262,11 @@ TEST_FACTOR(2, 1 / 2, 1 / 2)
|
|||||||
TEST_SCALETO1(name, width, height, Linear, 2) \
|
TEST_SCALETO1(name, width, height, Linear, 2) \
|
||||||
TEST_SCALETO1(name, width, height, Bilinear, 2)
|
TEST_SCALETO1(name, width, height, Bilinear, 2)
|
||||||
|
|
||||||
TEST_SCALETO(DISABLED_ARGBScale, 640, 360)
|
TEST_SCALETO(ARGBScale, 640, 360)
|
||||||
TEST_SCALETO(DISABLED_ARGBScale, 853, 480)
|
TEST_SCALETO(ARGBScale, 853, 480)
|
||||||
TEST_SCALETO(ARGBScale, 1280, 720)
|
TEST_SCALETO(ARGBScale, 1280, 720)
|
||||||
TEST_SCALETO(DISABLED_ARGBScale, 1280, 800)
|
TEST_SCALETO(ARGBScale, 1280, 800)
|
||||||
TEST_SCALETO(DISABLED_ARGBScale, 1366, 768)
|
TEST_SCALETO(ARGBScale, 1366, 768)
|
||||||
TEST_SCALETO(ARGBScale, 1920, 1080)
|
TEST_SCALETO(ARGBScale, 1920, 1080)
|
||||||
#undef TEST_SCALETO1
|
#undef TEST_SCALETO1
|
||||||
#undef TEST_SCALETO
|
#undef TEST_SCALETO
|
||||||
|
|||||||
@ -150,15 +150,15 @@ static int TestFilter(int src_width, int src_height,
|
|||||||
TEST_FACTOR1(name, Box, hfactor, vfactor, 3) \
|
TEST_FACTOR1(name, Box, hfactor, vfactor, 3) \
|
||||||
|
|
||||||
// TODO(fbarchard): ScaleDownBy1 should be lossless, but Box has error of 2.
|
// TODO(fbarchard): ScaleDownBy1 should be lossless, but Box has error of 2.
|
||||||
// TEST_FACTOR(1, 1 / 1, 1 / 1)
|
TEST_FACTOR(1, 1 / 1, 1 / 1)
|
||||||
TEST_FACTOR(2, 1 / 2, 1 / 2)
|
TEST_FACTOR(2, 1 / 2, 1 / 2)
|
||||||
// TEST_FACTOR(4, 1 / 4, 1 / 4)
|
TEST_FACTOR(4, 1 / 4, 1 / 4)
|
||||||
// TEST_FACTOR(8, 1 / 8, 1 / 8)
|
TEST_FACTOR(8, 1 / 8, 1 / 8)
|
||||||
// TEST_FACTOR(16, 1 / 16, 1 / 16)
|
TEST_FACTOR(16, 1 / 16, 1 / 16)
|
||||||
// TEST_FACTOR(2by3, 2 / 3, 2 / 3)
|
TEST_FACTOR(2by3, 2 / 3, 2 / 3)
|
||||||
// TEST_FACTOR(3by4, 3 / 4, 3 / 4)
|
TEST_FACTOR(3by4, 3 / 4, 3 / 4)
|
||||||
// TEST_FACTOR(3by8, 3 / 8, 3 / 8)
|
TEST_FACTOR(3by8, 3 / 8, 3 / 8)
|
||||||
// TEST_FACTOR(Vertical2by3, 1, 2 / 3)
|
TEST_FACTOR(Vertical2by3, 1, 2 / 3)
|
||||||
#undef TEST_FACTOR1
|
#undef TEST_FACTOR1
|
||||||
#undef TEST_FACTOR
|
#undef TEST_FACTOR
|
||||||
|
|
||||||
@ -183,12 +183,12 @@ TEST_FACTOR(2, 1 / 2, 1 / 2)
|
|||||||
TEST_SCALETO1(name, width, height, Bilinear, 3) \
|
TEST_SCALETO1(name, width, height, Bilinear, 3) \
|
||||||
TEST_SCALETO1(name, width, height, Box, 3)
|
TEST_SCALETO1(name, width, height, Box, 3)
|
||||||
|
|
||||||
TEST_SCALETO(DISABLED_Scale, 640, 360)
|
TEST_SCALETO(Scale, 640, 360)
|
||||||
TEST_SCALETO(DISABLED_Scale, 853, 480)
|
TEST_SCALETO(Scale, 853, 480)
|
||||||
TEST_SCALETO(Scale, 1280, 720)
|
TEST_SCALETO(Scale, 1280, 720)
|
||||||
TEST_SCALETO(DISABLED_Scale, 1280, 800)
|
TEST_SCALETO(Scale, 1280, 800)
|
||||||
TEST_SCALETO(DISABLED_Scale, 1366, 768)
|
TEST_SCALETO(Scale, 1366, 768)
|
||||||
TEST_SCALETO(DISABLED_Scale, 1920, 1080)
|
TEST_SCALETO(Scale, 1920, 1080)
|
||||||
#undef TEST_SCALETO1
|
#undef TEST_SCALETO1
|
||||||
#undef TEST_SCALETO
|
#undef TEST_SCALETO
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user