diff options
author | Lajos Molnar <lajos@google.com> | 2014-09-25 18:32:06 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-25 18:32:06 +0000 |
commit | 96d35b5a993436bdb59e12b3fb1406c206b7e682 (patch) | |
tree | a73b4a6287d0334d64f610fc86e5f5880c1b4fa5 /media | |
parent | 8ef929fe7128a3813b18174711903e62e2a96488 (diff) | |
parent | 4a34b9a4759d7dcc2d2ad5bd96ea8477915dd67a (diff) | |
download | frameworks_av-96d35b5a993436bdb59e12b3fb1406c206b7e682.zip frameworks_av-96d35b5a993436bdb59e12b3fb1406c206b7e682.tar.gz frameworks_av-96d35b5a993436bdb59e12b3fb1406c206b7e682.tar.bz2 |
am 4a34b9a4: Merge "stagefright: use frame height if slice height is 0" into lmp-dev
* commit '4a34b9a4759d7dcc2d2ad5bd96ea8477915dd67a':
stagefright: use frame height if slice height is 0
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index cea8300..32365b8 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -2933,13 +2933,6 @@ bool ACodec::describeDefaultColorFormat(DescribeColorFormatParams ¶ms) { image.mNumPlanes = 0; const OMX_COLOR_FORMATTYPE fmt = params.eColorFormat; - // we need stride and slice-height to be non-zero - if (params.nStride == 0 || params.nSliceHeight == 0) { - ALOGW("cannot describe color format 0x%x = %d with stride=%u and sliceHeight=%u", - fmt, fmt, params.nStride, params.nSliceHeight); - return false; - } - image.mWidth = params.nFrameWidth; image.mHeight = params.nFrameHeight; @@ -2952,6 +2945,20 @@ bool ACodec::describeDefaultColorFormat(DescribeColorFormatParams ¶ms) { return false; } + // TEMPORARY FIX for some vendors that advertise sliceHeight as 0 + if (params.nStride != 0 && params.nSliceHeight == 0) { + ALOGW("using sliceHeight=%u instead of what codec advertised (=0)", + params.nFrameHeight); + params.nSliceHeight = params.nFrameHeight; + } + + // we need stride and slice-height to be non-zero + if (params.nStride == 0 || params.nSliceHeight == 0) { + ALOGW("cannot describe color format 0x%x = %d with stride=%u and sliceHeight=%u", + fmt, fmt, params.nStride, params.nSliceHeight); + return false; + } + // set-up YUV format image.mType = MediaImage::MEDIA_IMAGE_TYPE_YUV; image.mNumPlanes = 3; |