Ignore:
Timestamp:
Nov 21, 2017 9:25:11 AM (3 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/compare_common.cc

    r5633 r5699  
    1919 
    2020#if ORIGINAL_OPT 
    21 uint32 HammingDistance_C(const uint8* src_a, const uint8* src_b, int count) { 
     21uint32 HammingDistance_C1(const uint8* src_a, const uint8* src_b, int count) { 
    2222  uint32 diff = 0u; 
    2323 
     
    5959    src_b += 4; 
    6060  } 
     61 
     62  for (; i < count; ++i) { 
     63    uint32 x = *src_a ^ *src_b; 
     64    uint32 u = x - ((x >> 1) & 0x55); 
     65    u = ((u >> 2) & 0x33) + (u & 0x33); 
     66    diff += (u + (u >> 4)) & 0x0f; 
     67    src_a += 1; 
     68    src_b += 1; 
     69  } 
     70 
    6171  return diff; 
    6272} 
Note: See TracChangeset for help on using the changeset viewer.