Ignore:
Timestamp:
Nov 21, 2017 9:25:11 AM (6 years ago)
Author:
riza
Message:

Close #2065: Update libyuv to fix linker error when building libyuv as dll on Visual Studio 2015.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/yuv/source/scale_common.cc

    r5633 r5699  
    13071307#undef CENTERSTART 
    13081308 
     1309// Read 8x2 upsample with filtering and write 16x1. 
     1310// actually reads an extra pixel, so 9x2. 
     1311void ScaleRowUp2_16_C(const uint16* src_ptr, 
     1312                      ptrdiff_t src_stride, 
     1313                      uint16* dst, 
     1314                      int dst_width) { 
     1315  const uint16* src2 = src_ptr + src_stride; 
     1316 
     1317  int x; 
     1318  for (x = 0; x < dst_width - 1; x += 2) { 
     1319    uint16 p0 = src_ptr[0]; 
     1320    uint16 p1 = src_ptr[1]; 
     1321    uint16 p2 = src2[0]; 
     1322    uint16 p3 = src2[1]; 
     1323    dst[0] = (p0 * 9 + p1 * 3 + p2 * 3 + p3 + 8) >> 4; 
     1324    dst[1] = (p0 * 3 + p1 * 9 + p2 + p3 * 3 + 8) >> 4; 
     1325    ++src_ptr; 
     1326    ++src2; 
     1327    dst += 2; 
     1328  } 
     1329  if (dst_width & 1) { 
     1330    uint16 p0 = src_ptr[0]; 
     1331    uint16 p1 = src_ptr[1]; 
     1332    uint16 p2 = src2[0]; 
     1333    uint16 p3 = src2[1]; 
     1334    dst[0] = (p0 * 9 + p1 * 3 + p2 * 3 + p3 + 8) >> 4; 
     1335  } 
     1336} 
     1337 
    13091338#ifdef __cplusplus 
    13101339}  // extern "C" 
Note: See TracChangeset for help on using the changeset viewer.