diff options
author | Lajos Molnar <lajos@google.com> | 2014-10-25 01:30:12 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-10-25 01:37:38 -0700 |
commit | a32d5435d9585794b72dd12546054f13adb845f2 (patch) | |
tree | 131bc4020f517611b9809c2090f214c1df600e37 /media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp | |
parent | 8bfa96c2f7c098550b00b84677088f84e81f4ed4 (diff) | |
download | frameworks_av-a32d5435d9585794b72dd12546054f13adb845f2.zip frameworks_av-a32d5435d9585794b72dd12546054f13adb845f2.tar.gz frameworks_av-a32d5435d9585794b72dd12546054f13adb845f2.tar.bz2 |
libstagefright: set actual stride info for SW encoder input port
This fixes encoding flexible YUV content using SW encoders.
Also skip setting input color format if it is flexible YUV, as it
has already been translated to a color format supported by the codec.
Bug: 18124320
Change-Id: I423782936986f4d6cf65ea9ef89ae77a92e30140
Diffstat (limited to 'media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp')
-rw-r--r-- | media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp b/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp index eb621d5..0285feb 100644 --- a/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp +++ b/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp @@ -805,8 +805,12 @@ OMX_ERRORTYPE SoftVPXEncoder::internalSetPortParams( OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(kInputPortIndex)->mDef; def->format.video.nFrameWidth = mWidth; def->format.video.nFrameHeight = mHeight; + def->format.video.nStride = def->format.video.nFrameWidth; + def->format.video.nSliceHeight = def->format.video.nFrameHeight; def->format.video.xFramerate = mFramerate; def->format.video.eColorFormat = mColorFormat; + def->nBufferSize = + (def->format.video.nStride * def->format.video.nSliceHeight * 3) / 2; def = &editPortInfo(kOutputPortIndex)->mDef; def->format.video.nFrameWidth = mWidth; def->format.video.nFrameHeight = mHeight; |