diff options
author | Chong Zhang <chz@google.com> | 2019-06-27 14:28:37 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2019-06-27 16:38:44 -0700 |
commit | ab123ac62c872f89e20f10c96e651ead21414ffc (patch) | |
tree | 61f45a95ef42e952ec121583ed73b8649e058bc1 /files/util/compare.cc | |
parent | ad97fd58c110036d9dfcdce8bf98282e92707a89 (diff) | |
download | libyuv-ab123ac62c872f89e20f10c96e651ead21414ffc.tar.gz |
libyuv roll to r1722 to pick up a few methods
that we've been manually cherry-picking.
bug: 132357297
test: MediaMetadataRetriever test; manual testing
thumbnails in Photos.
Exempt-From-Owner-Approval:
files/infra/config/OWNERS owner names are not in android
gerrit, CL fail to push with these. Delete of file need
to bypass owner.
Change-Id: Ic22346e45671452429716be8b0a1999eeaea0d7b
Diffstat (limited to 'files/util/compare.cc')
-rw-r--r-- | files/util/compare.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/files/util/compare.cc b/files/util/compare.cc index ef0beefa..a16613ee 100644 --- a/files/util/compare.cc +++ b/files/util/compare.cc @@ -29,22 +29,24 @@ int main(int argc, char** argv) { FILE* fin2 = name2 ? fopen(name2, "rb") : NULL; const int kBlockSize = 32768; - uint8 buf1[kBlockSize]; - uint8 buf2[kBlockSize]; - uint32 hash1 = 5381; - uint32 hash2 = 5381; - uint64 sum_square_err = 0; - uint64 size_min = 0; + uint8_t buf1[kBlockSize]; + uint8_t buf2[kBlockSize]; + uint32_t hash1 = 5381; + uint32_t hash2 = 5381; + uint64_t sum_square_err = 0; + uint64_t size_min = 0; int amt1 = 0; int amt2 = 0; do { amt1 = static_cast<int>(fread(buf1, 1, kBlockSize, fin1)); - if (amt1 > 0) + if (amt1 > 0) { hash1 = libyuv::HashDjb2(buf1, amt1, hash1); + } if (fin2) { amt2 = static_cast<int>(fread(buf2, 1, kBlockSize, fin2)); - if (amt2 > 0) + if (amt2 > 0) { hash2 = libyuv::HashDjb2(buf2, amt2, hash2); + } int amt_min = (amt1 < amt2) ? amt1 : amt2; size_min += amt_min; sum_square_err += libyuv::ComputeSumSquareError(buf1, buf2, amt_min); |