Changeset 5699 for pjproject/trunk/third_party/yuv/source/scale.cc
- Timestamp:
- Nov 21, 2017 9:25:11 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/yuv/source/scale.cc
r5633 r5699 372 372 } 373 373 #endif 374 #if defined(HAS_SCALEROWDOWN34_MSA) 375 if (TestCpuFlag(kCpuHasMSA)) { 376 if (!filtering) { 377 ScaleRowDown34_0 = ScaleRowDown34_Any_MSA; 378 ScaleRowDown34_1 = ScaleRowDown34_Any_MSA; 379 } else { 380 ScaleRowDown34_0 = ScaleRowDown34_0_Box_Any_MSA; 381 ScaleRowDown34_1 = ScaleRowDown34_1_Box_Any_MSA; 382 } 383 if (dst_width % 48 == 0) { 384 if (!filtering) { 385 ScaleRowDown34_0 = ScaleRowDown34_MSA; 386 ScaleRowDown34_1 = ScaleRowDown34_MSA; 387 } else { 388 ScaleRowDown34_0 = ScaleRowDown34_0_Box_MSA; 389 ScaleRowDown34_1 = ScaleRowDown34_1_Box_MSA; 390 } 391 } 392 } 393 #endif 374 394 #if defined(HAS_SCALEROWDOWN34_SSSE3) 375 395 if (TestCpuFlag(kCpuHasSSSE3)) { … … 803 823 int boxheight, 804 824 int x, 805 int ,825 int dx, 806 826 const uint16* src_ptr, 807 827 uint8* dst_ptr) { 808 828 int scaleval = 65536 / boxheight; 809 829 int i; 830 (void)dx; 810 831 src_ptr += (x >> 16); 811 832 for (i = 0; i < dst_width; ++i) { … … 1080 1101 } 1081 1102 #endif 1103 #if defined(HAS_SCALEFILTERCOLS_MSA) 1104 if (TestCpuFlag(kCpuHasMSA) && src_width < 32768) { 1105 ScaleFilterCols = ScaleFilterCols_Any_MSA; 1106 if (IS_ALIGNED(dst_width, 16)) { 1107 ScaleFilterCols = ScaleFilterCols_MSA; 1108 } 1109 } 1110 #endif 1082 1111 if (y > max_y) { 1083 1112 y = max_y; … … 1278 1307 } 1279 1308 #endif 1309 #if defined(HAS_SCALEFILTERCOLS_MSA) 1310 if (filtering && TestCpuFlag(kCpuHasMSA) && src_width < 32768) { 1311 ScaleFilterCols = ScaleFilterCols_Any_MSA; 1312 if (IS_ALIGNED(dst_width, 16)) { 1313 ScaleFilterCols = ScaleFilterCols_MSA; 1314 } 1315 } 1316 #endif 1280 1317 if (!filtering && src_width * 2 == dst_width && x < 0x8000) { 1281 1318 ScaleFilterCols = ScaleColsUp2_C; … … 1664 1701 return; 1665 1702 } 1666 if (dst_width == src_width ) {1703 if (dst_width == src_width && filtering != kFilterBox) { 1667 1704 int dy = FixedDiv(src_height, dst_height); 1668 1705 // Arbitrary scale vertically, but unscaled vertically. … … 1693 1730 } 1694 1731 if (4 * dst_width == src_width && 4 * dst_height == src_height && 1695 filtering != kFilterBilinear) {1732 (filtering == kFilterBox || filtering == kFilterNone)) { 1696 1733 // optimized, 1/4 1697 1734 ScalePlaneDown4_16(src_width, src_height, dst_width, dst_height,
Note: See TracChangeset
for help on using the changeset viewer.