diff options
author | Frank Barchard <fbarchard@chromium.org> | 2018-10-03 12:10:41 -0700 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2018-10-03 19:14:01 +0000 |
commit | 20bf569a049bc5f4a4954c401cc6fff11d453274 (patch) | |
tree | aa0bab8e93be70010f58328d98362433be03cf95 /source/cpu_id.cc | |
parent | 9a07219dc8fbf2b77e390d16bd24809444838a91 (diff) | |
download | libyuv-20bf569a049bc5f4a4954c401cc6fff11d453274.tar.gz |
Fix ConvertToI420() for odd crop_y
The original src_u calculation of FOURCC_I420 shifted half width if
crop_y is odd.
This CL fixs the problem and also add a test case for it.
Bug: b:115278653
Test: pass libyuv_unittest
Change-Id: Ia9732d22e64e13de26df47726ba44ad1c5a06484
Reviewed-on: https://chromium-review.googlesource.com/c/1258743
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/cpu_id.cc')
-rw-r--r-- | source/cpu_id.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 2283db6a..48e2b615 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -188,7 +188,7 @@ LIBYUV_API SAFEBUFFERS int MipsCpuCaps(const char* cpuinfo_name, } return 0; } - } else if(memcmp(cpuinfo_line, "cpu model", 9) == 0) { + } else if (memcmp(cpuinfo_line, "cpu model", 9) == 0) { char* p = strstr(cpuinfo_line, "Loongson-3"); if (p) { fclose(f); |