diff options
author | Vinil Cheeramvelil <vinil.cheeramvelil@intel.com> | 2015-06-30 15:05:06 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2015-07-10 08:13:33 -0700 |
commit | 8e103bbca35f013a21b7a4c0c771dfeb65464554 (patch) | |
tree | 6dd66c094d0d47706afea211f9b6acce793be99d | |
parent | b3318c81c14988e7d3a00df087741dd376765868 (diff) | |
download | libmix-8e103bbca35f013a21b7a4c0c771dfeb65464554.tar.gz |
Align stride for encoder surfaces to 64 pixels/ bytes
There was an error that caused stride to be 32 pixels aligned.
This caused a double blit just to update the stride. By
aligning to 64 bytes/ the RGB->NV12 blit only happens once.
Bug: 22335388
Change-Id: Ie412983f9efce570899e07404c91fcbdd3e2b835
Signed-off-by: hding3 <haitao.ding@intel.com>
-rw-r--r-- | videoencoder/VideoEncoderUtils.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/videoencoder/VideoEncoderUtils.cpp b/videoencoder/VideoEncoderUtils.cpp index 067e9e7..f5aeeeb 100644 --- a/videoencoder/VideoEncoderUtils.cpp +++ b/videoencoder/VideoEncoderUtils.cpp @@ -201,10 +201,7 @@ Encode_Status GetGfxBufferInfo(intptr_t handle, ValueInfo& vinfo){ if (h->iFormat == HAL_PIXEL_FORMAT_NV12) { #ifdef MRFLD_GFX - if((h->usage & GRALLOC_USAGE_HW_CAMERA_READ) || (h->usage & GRALLOC_USAGE_HW_CAMERA_WRITE) ) - vinfo.lumaStride = (h->iWidth + 63) & ~63; //64 aligned - else - vinfo.lumaStride = (h->iWidth + 31) & ~31; //32 aligned + vinfo.lumaStride = (h->iWidth + 63) & ~63; //64 aligned #else //on CTP if (h->iWidth > 512) vinfo.lumaStride = (h->iWidth + 63) & ~63; //64 aligned |