aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Wang <xin1.wang@intel.com>2016-06-22 17:14:57 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-06-22 17:14:57 +0000
commited101382e82b7171630bf9ecef773b2b30f69e32 (patch)
treee7b2513ce6f57ef0f22761ce6087ae417134f372
parent7fa710ee9dbb0d97b4d2155a56ba8b5b2f0a13a7 (diff)
parentdd20107a9932203f96b4a3059739dc92029ab1ce (diff)
downloadlibmix-ed101382e82b7171630bf9ecef773b2b30f69e32.tar.gz
Change AVC width got from header to match with framework. am: 8008c14104
am: dd20107a99 Change-Id: I55f44b398ca9450aff8268a6a34ca5157fc3bd4f
-rw-r--r--videodecoder/VideoDecoderAVC.cpp6
-rw-r--r--videodecoder/VideoDecoderBase.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/videodecoder/VideoDecoderAVC.cpp b/videodecoder/VideoDecoderAVC.cpp
index 077710c..283442e 100644
--- a/videodecoder/VideoDecoderAVC.cpp
+++ b/videodecoder/VideoDecoderAVC.cpp
@@ -722,6 +722,12 @@ void VideoDecoderAVC::updateFormatInfo(vbp_data_h264 *data) {
if (data->codec_data->crop_bottom > 0)
height -= data->codec_data->crop_bottom;
+ if(data->codec_data->crop_left > 0)
+ width -= data->codec_data->crop_left;
+
+ if(data->codec_data->crop_right > 0)
+ width -= data->codec_data->crop_right;
+
ITRACE("updateFormatInfo: current size: %d x %d, new size: %d x %d",
mVideoFormatInfo.width, mVideoFormatInfo.height, width, height);
diff --git a/videodecoder/VideoDecoderBase.cpp b/videodecoder/VideoDecoderBase.cpp
index 6d214bb..9de8631 100644
--- a/videodecoder/VideoDecoderBase.cpp
+++ b/videodecoder/VideoDecoderBase.cpp
@@ -1221,6 +1221,7 @@ Decode_Status VideoDecoderBase::getRawDataFromSurface(VideoRenderBuffer *renderB
if (strcasecmp(mVideoFormatInfo.mimeType,"video/avc") == 0 ||
strcasecmp(mVideoFormatInfo.mimeType,"video/h264") == 0) {
cropHeight = mVideoFormatInfo.height;
+ cropWidth = mVideoFormatInfo.width;
}
int32_t size = cropWidth * cropHeight * 3 / 2;
@@ -1654,6 +1655,7 @@ void VideoDecoderBase::setRenderRect() {
if (strcasecmp(mVideoFormatInfo.mimeType,"video/avc") == 0 ||
strcasecmp(mVideoFormatInfo.mimeType,"video/h264") == 0) {
rect.height = mVideoFormatInfo.height;
+ rect.width = mVideoFormatInfo.width;
}
VADisplayAttribute render_rect;