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/include/libyuv/compare.h | |
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/include/libyuv/compare.h')
-rw-r--r-- | files/include/libyuv/compare.h | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/files/include/libyuv/compare.h b/files/include/libyuv/compare.h index 4deca97f..3353ad71 100644 --- a/files/include/libyuv/compare.h +++ b/files/include/libyuv/compare.h @@ -20,74 +20,85 @@ extern "C" { // Compute a hash for specified memory. Seed of 5381 recommended. LIBYUV_API -uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed); +uint32_t HashDjb2(const uint8_t* src, uint64_t count, uint32_t seed); + +// Hamming Distance +LIBYUV_API +uint64_t ComputeHammingDistance(const uint8_t* src_a, + const uint8_t* src_b, + int count); // Scan an opaque argb image and return fourcc based on alpha offset. // Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown. LIBYUV_API -uint32 ARGBDetect(const uint8* argb, int stride_argb, int width, int height); +uint32_t ARGBDetect(const uint8_t* argb, + int stride_argb, + int width, + int height); // Sum Square Error - used to compute Mean Square Error or PSNR. LIBYUV_API -uint64 ComputeSumSquareError(const uint8* src_a, const uint8* src_b, int count); +uint64_t ComputeSumSquareError(const uint8_t* src_a, + const uint8_t* src_b, + int count); LIBYUV_API -uint64 ComputeSumSquareErrorPlane(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); +uint64_t ComputeSumSquareErrorPlane(const uint8_t* src_a, + int stride_a, + const uint8_t* src_b, + int stride_b, + int width, + int height); static const int kMaxPsnr = 128; LIBYUV_API -double SumSquareErrorToPsnr(uint64 sse, uint64 count); +double SumSquareErrorToPsnr(uint64_t sse, uint64_t count); LIBYUV_API -double CalcFramePsnr(const uint8* src_a, +double CalcFramePsnr(const uint8_t* src_a, int stride_a, - const uint8* src_b, + const uint8_t* src_b, int stride_b, int width, int height); LIBYUV_API -double I420Psnr(const uint8* src_y_a, +double I420Psnr(const uint8_t* src_y_a, int stride_y_a, - const uint8* src_u_a, + const uint8_t* src_u_a, int stride_u_a, - const uint8* src_v_a, + const uint8_t* src_v_a, int stride_v_a, - const uint8* src_y_b, + const uint8_t* src_y_b, int stride_y_b, - const uint8* src_u_b, + const uint8_t* src_u_b, int stride_u_b, - const uint8* src_v_b, + const uint8_t* src_v_b, int stride_v_b, int width, int height); LIBYUV_API -double CalcFrameSsim(const uint8* src_a, +double CalcFrameSsim(const uint8_t* src_a, int stride_a, - const uint8* src_b, + const uint8_t* src_b, int stride_b, int width, int height); LIBYUV_API -double I420Ssim(const uint8* src_y_a, +double I420Ssim(const uint8_t* src_y_a, int stride_y_a, - const uint8* src_u_a, + const uint8_t* src_u_a, int stride_u_a, - const uint8* src_v_a, + const uint8_t* src_v_a, int stride_v_a, - const uint8* src_y_b, + const uint8_t* src_y_b, int stride_y_b, - const uint8* src_u_b, + const uint8_t* src_u_b, int stride_u_b, - const uint8* src_v_b, + const uint8_t* src_v_b, int stride_v_b, int width, int height); |