diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-10-27 03:45:14 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-27 03:45:14 -0700 |
commit | 1f5b6a1f764243dce658ef28abda7e539a20c515 (patch) | |
tree | deb374f182984ec9ec477abb207db278f1bf792a | |
parent | 49a4a5c7472fe713939bf76e430425388d488c0b (diff) | |
parent | 7c8667529da317c4fe1aa268a6e19472f032c8b0 (diff) | |
download | android_hardware_qcom_media-1f5b6a1f764243dce658ef28abda7e539a20c515.tar.gz android_hardware_qcom_media-1f5b6a1f764243dce658ef28abda7e539a20c515.tar.bz2 android_hardware_qcom_media-1f5b6a1f764243dce658ef28abda7e539a20c515.zip |
Merge "libc2dcolorconvert: Modified stride and size calculation"
-rw-r--r-- | libc2dcolorconvert/C2DColorConverter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libc2dcolorconvert/C2DColorConverter.cpp b/libc2dcolorconvert/C2DColorConverter.cpp index 6414fac7..0bc72bf5 100644 --- a/libc2dcolorconvert/C2DColorConverter.cpp +++ b/libc2dcolorconvert/C2DColorConverter.cpp @@ -405,7 +405,7 @@ size_t C2DColorConverter::calcStride(ColorConvertFormat format, size_t width) case NV12_128m: return ALIGN(width, ALIGN128); case YCbCr420P: - return width; + return ALIGN(width, ALIGN16); case YCrCb420P: return ALIGN(width, ALIGN16); default: @@ -419,7 +419,7 @@ size_t C2DColorConverter::calcYSize(ColorConvertFormat format, size_t width, siz case YCbCr420SP: return (ALIGN(width, ALIGN16) * height); case YCbCr420P: - return width * height; + return ALIGN(width, ALIGN16) * height; case YCrCb420P: return ALIGN(width, ALIGN16) * height; case YCbCr420Tile: @@ -459,7 +459,8 @@ size_t C2DColorConverter::calcSize(ColorConvertFormat format, size_t width, size size = ALIGN((alignedw * height) + (ALIGN(width/2, ALIGN32) * (height/2) * 2), ALIGN4K); break; case YCbCr420P: - size = ALIGN((width * height * 3 / 2), ALIGN4K); + alignedw = ALIGN(width, ALIGN16); + size = ALIGN((alignedw * height) + (ALIGN(width/2, ALIGN16) * (height/2) * 2), ALIGN4K); break; case YCrCb420P: alignedw = ALIGN(width, ALIGN16); |