diff options
author | Gu, Wangyi <wangyi.gu@intel.com> | 2015-07-07 12:32:24 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2015-07-10 08:16:46 -0700 |
commit | d22539f0a4952ec4a631d603a6e737d98ea16ea0 (patch) | |
tree | e4c753db6beab711161a6d32be3bb0ea3acd7b76 | |
parent | 4671addc0e10b5d30163630d6fd8eaf3a84b7779 (diff) | |
download | android_hardware_intel_common_omx-components-d22539f0a4952ec4a631d603a6e737d98ea16ea0.tar.gz android_hardware_intel_common_omx-components-d22539f0a4952ec4a631d603a6e737d98ea16ea0.tar.bz2 android_hardware_intel_common_omx-components-d22539f0a4952ec4a631d603a6e737d98ea16ea0.zip |
align the yv12 stride to 64bit for vp9 hybrid
Bug: 19197299
Change-Id: Iebe2487bb2b2f761b7412d6b802ff545961551b1
Signed-off-by: Gu, Wangyi <wangyi.gu@intel.com>
-rw-r--r-- | videocodec/OMXVideoDecoderVP9Hybrid.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.cpp b/videocodec/OMXVideoDecoderVP9Hybrid.cpp index 81e4f3f..ce7f988 100644 --- a/videocodec/OMXVideoDecoderVP9Hybrid.cpp +++ b/videocodec/OMXVideoDecoderVP9Hybrid.cpp @@ -25,6 +25,7 @@ #include <hardware/gralloc.h> #include <system/graphics.h> +#define VP9_YV12_ALIGN (64-1) static const char* VP9_MIME_TYPE = "video/x-vnd.on2.vp9"; OMXVideoDecoderVP9Hybrid::OMXVideoDecoderVP9Hybrid() { @@ -86,7 +87,7 @@ OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::ProcessorInit(void) { mOMXBufferHeaderTypePtrNum = 0; mGraphicBufferParam.graphicBufferColorFormat = def_output->format.video.eColorFormat; - mGraphicBufferParam.graphicBufferStride = (def_output->format.video.nFrameWidth + 0x7f) & ~0x7f; + mGraphicBufferParam.graphicBufferStride = (def_output->format.video.nFrameWidth + VP9_YV12_ALIGN) & ~VP9_YV12_ALIGN; mGraphicBufferParam.graphicBufferWidth = def_output->format.video.nFrameWidth; mGraphicBufferParam.graphicBufferHeight = (def_output->format.video.nFrameHeight + 0x1f) & ~0x1f; mDecodedImageWidth = def_output->format.video.nFrameWidth; @@ -162,7 +163,7 @@ OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::ProcessorReset(void) mOMXBufferHeaderTypePtrNum = 0; mGraphicBufferParam.graphicBufferColorFormat = def_output->format.video.eColorFormat; - mGraphicBufferParam.graphicBufferStride = (def_output->format.video.nFrameWidth + 0x7f) & ~0x7f; + mGraphicBufferParam.graphicBufferStride = (def_output->format.video.nFrameWidth + VP9_YV12_ALIGN) & ~VP9_YV12_ALIGN; mGraphicBufferParam.graphicBufferWidth = def_output->format.video.nFrameWidth; mGraphicBufferParam.graphicBufferHeight = (def_output->format.video.nFrameHeight + 0x1f) & ~0x1f; } else{ |