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/avc/enc/SoftAVCEncoder.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/avc/enc/SoftAVCEncoder.cpp')
-rw-r--r-- | media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp index ed3dca0..bb55871 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp @@ -575,9 +575,13 @@ OMX_ERRORTYPE SoftAVCEncoder::internalSetParameter( &editPortInfo(0)->mDef; portDef->format.video.nFrameWidth = mVideoWidth; portDef->format.video.nFrameHeight = mVideoHeight; + portDef->format.video.nStride = portDef->format.video.nFrameWidth; + portDef->format.video.nSliceHeight = portDef->format.video.nFrameHeight; portDef->format.video.xFramerate = def->format.video.xFramerate; portDef->format.video.eColorFormat = (OMX_COLOR_FORMATTYPE) mVideoColorFormat; + portDef->nBufferSize = + (portDef->format.video.nStride * portDef->format.video.nSliceHeight * 3) / 2; portDef = &editPortInfo(1)->mDef; portDef->format.video.nFrameWidth = mVideoWidth; portDef->format.video.nFrameHeight = mVideoHeight; |