aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Wang <xin1.wang@intel.com>2016-05-05 20:31:46 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-05-05 20:31:46 +0000
commit3f126cb2b3e3a159202d6c7cb27b12cee41a80ce (patch)
tree8331bd409bbaa27d9f29ca11b5c02eaddd4ceb3b
parentda06e1cef842bd333f0675b49890c3b54c915242 (diff)
parentd56bef8039bfbf39f00eaa3436bf12371c409755 (diff)
downloadlibmix-3f126cb2b3e3a159202d6c7cb27b12cee41a80ce.tar.gz
Merge "Fix cts h264 test error" into nyc-dev am: 88cd7d22d5 am: f1d1ee5cb3
am: d56bef8039 * commit 'd56bef8039bfbf39f00eaa3436bf12371c409755': Fix cts h264 test error Change-Id: If991c6cc26930c0dab24eea13c7254f7f8e79f7f
-rw-r--r--videodecoder/VideoDecoderAVC.cpp2
-rw-r--r--videodecoder/VideoDecoderBase.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/videodecoder/VideoDecoderAVC.cpp b/videodecoder/VideoDecoderAVC.cpp
index 2b0fdf7..ca4b123 100644
--- a/videodecoder/VideoDecoderAVC.cpp
+++ b/videodecoder/VideoDecoderAVC.cpp
@@ -695,7 +695,7 @@ Decode_Status VideoDecoderAVC::startVA(vbp_data_h264 *data) {
// for 1080p, limit the total surface to 19, according the hardware limitation
// change the max surface number from 19->10 to workaround memory shortage
// remove the workaround
- if(mVideoFormatInfo.height == 1088 && DPBSize + AVC_EXTRA_SURFACE_NUMBER > 19) {
+ if(mVideoFormatInfo.surfaceHeight == 1088 && DPBSize + AVC_EXTRA_SURFACE_NUMBER > 19) {
DPBSize = 19 - AVC_EXTRA_SURFACE_NUMBER;
}
diff --git a/videodecoder/VideoDecoderBase.cpp b/videodecoder/VideoDecoderBase.cpp
index 399bc6c..ceb7b60 100644
--- a/videodecoder/VideoDecoderBase.cpp
+++ b/videodecoder/VideoDecoderBase.cpp
@@ -1218,6 +1218,10 @@ Decode_Status VideoDecoderBase::getRawDataFromSurface(VideoRenderBuffer *renderB
// size in NV12 format
uint32_t cropWidth = mVideoFormatInfo.width - (mVideoFormatInfo.cropLeft + mVideoFormatInfo.cropRight);
uint32_t cropHeight = mVideoFormatInfo.height - (mVideoFormatInfo.cropBottom + mVideoFormatInfo.cropTop);
+ if (strcasecmp(mVideoFormatInfo.mimeType,"video/avc") == 0 ||
+ strcasecmp(mVideoFormatInfo.mimeType,"video/h264") == 0) {
+ cropHeight = mVideoFormatInfo.height;
+ }
int32_t size = cropWidth * cropHeight * 3 / 2;
if (internal) {
@@ -1647,6 +1651,10 @@ void VideoDecoderBase::setRenderRect() {
rect.y = mVideoFormatInfo.cropTop;
rect.width = mVideoFormatInfo.width - (mVideoFormatInfo.cropLeft + mVideoFormatInfo.cropRight);
rect.height = mVideoFormatInfo.height - (mVideoFormatInfo.cropBottom + mVideoFormatInfo.cropTop);
+ if (strcasecmp(mVideoFormatInfo.mimeType,"video/avc") == 0 ||
+ strcasecmp(mVideoFormatInfo.mimeType,"video/h264") == 0) {
+ rect.height = mVideoFormatInfo.height;
+ }
VADisplayAttribute render_rect;
render_rect.type = VADisplayAttribRenderRect;