summaryrefslogtreecommitdiffstats
path: root/mm-video-v4l2/vidc/vdec
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-09-23 09:28:46 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-09-23 09:28:46 -0700
commit50ef54fa059f7ca1e862126a044e2de8f8c135e9 (patch)
tree54d3c2d3c80c62160c0b63146256c8e4e50d5ba8 /mm-video-v4l2/vidc/vdec
parent64fbe8e77b83c8d867382874760a1ba41ba8df6b (diff)
parentafb146951b471aaac1fefd72bff89492a0aaff3b (diff)
downloadandroid_hardware_qcom_media-50ef54fa059f7ca1e862126a044e2de8f8c135e9.tar.gz
android_hardware_qcom_media-50ef54fa059f7ca1e862126a044e2de8f8c135e9.tar.bz2
android_hardware_qcom_media-50ef54fa059f7ca1e862126a044e2de8f8c135e9.zip
Merge "mm-video-v4l2: Fix downscalar issue"
Diffstat (limited to 'mm-video-v4l2/vidc/vdec')
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
index 53081a98..3145a236 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
@@ -940,14 +940,20 @@ int omx_vdec::decide_downscalar()
rc = enable_downscalar();
if (rc < 0)
return rc;
- rc = update_resolution(m_downscalar_width, m_downscalar_height, m_downscalar_width, m_downscalar_height);
+ OMX_U32 width = m_downscalar_width > fmt.fmt.pix_mp.width ?
+ fmt.fmt.pix_mp.width : m_downscalar_width;
+ OMX_U32 height = m_downscalar_height > fmt.fmt.pix_mp.height ?
+ fmt.fmt.pix_mp.height : m_downscalar_height;
+ rc = update_resolution(width, height,
+ VENUS_Y_STRIDE(COLOR_FMT_NV12, width), VENUS_Y_SCANLINES(COLOR_FMT_NV12, height));
if (rc < 0)
return rc;
} else {
rc = disable_downscalar();
if (rc < 0)
return rc;
- rc = update_resolution(fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, fmt.fmt.pix_mp.plane_fmt[0].bytesperline, fmt.fmt.pix_mp.plane_fmt[0].reserved[0]);
+ rc = update_resolution(fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height,
+ fmt.fmt.pix_mp.plane_fmt[0].bytesperline, fmt.fmt.pix_mp.plane_fmt[0].reserved[0]);
if (rc < 0)
return rc;
}