summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-09-22 01:02:25 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-09-22 01:02:25 -0700
commit64fbe8e77b83c8d867382874760a1ba41ba8df6b (patch)
tree917dbaceb7304bc0f5afd81e03d6eee01c067e2f
parent476a163c0673843776801744e82370332ddf6e99 (diff)
parent1fc82f09876df1839bca2d29aaba0b10a1d66be8 (diff)
downloadandroid_hardware_qcom_media-64fbe8e77b83c8d867382874760a1ba41ba8df6b.tar.gz
android_hardware_qcom_media-64fbe8e77b83c8d867382874760a1ba41ba8df6b.tar.bz2
android_hardware_qcom_media-64fbe8e77b83c8d867382874760a1ba41ba8df6b.zip
Merge "mm-video: Disable downscalar for non-display usecase"
-rw-r--r--mm-video-v4l2/vidc/vdec/inc/omx_vdec.h1
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp19
2 files changed, 16 insertions, 4 deletions
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index 1b11cc04..e44802ac 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -1076,6 +1076,7 @@ class omx_vdec: public qc_omx_component
OMX_TICKS m_last_rendered_TS;
volatile int32_t m_queued_codec_config_count;
bool secure_scaling_to_non_secure_opb;
+ bool m_is_display_session;
class perf_lock {
private:
pthread_mutex_t mlock;
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 7abb3e48..53081a98 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
@@ -66,6 +66,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#include <qdMetaData.h>
+#include <gralloc_priv.h>
#ifdef ANDROID_JELLYBEAN_MR2
#include "QComOMXMetadata.h"
@@ -594,7 +595,8 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
stereo_output_mode(HAL_NO_3D),
m_last_rendered_TS(-1),
m_queued_codec_config_count(0),
- secure_scaling_to_non_secure_opb(false)
+ secure_scaling_to_non_secure_opb(false),
+ m_is_display_session(false)
{
/* Assumption is that , to begin with , we have all the frames with decoder */
DEBUG_PRINT_HIGH("In %u bit OMX vdec Constructor", (unsigned int)sizeof(long) * 8);
@@ -930,10 +932,11 @@ int omx_vdec::decide_downscalar()
return rc;
}
- DEBUG_PRINT_HIGH("%s: driver wxh = %dx%d, downscalar wxh = %dx%d", __func__,
- fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, m_downscalar_width, m_downscalar_height);
+ DEBUG_PRINT_HIGH("%s: driver wxh = %dx%d, downscalar wxh = %dx%d m_is_display_session = %d", __func__,
+ fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, m_downscalar_width, m_downscalar_height, m_is_display_session);
- if (fmt.fmt.pix_mp.width * fmt.fmt.pix_mp.height > m_downscalar_width * m_downscalar_height) {
+ if ((fmt.fmt.pix_mp.width * fmt.fmt.pix_mp.height > m_downscalar_width * m_downscalar_height) &&
+ m_is_display_session) {
rc = enable_downscalar();
if (rc < 0)
return rc;
@@ -6546,6 +6549,14 @@ OMX_ERRORTYPE omx_vdec::fill_this_buffer(OMX_IN OMX_HANDLETYPE hComp,
//We'll restore this size later on, so that it's transparent to client
buffer->nFilledLen = 0;
buffer->nAllocLen = handle->size;
+
+ if (handle->flags & private_handle_t::PRIV_FLAGS_DISP_CONSUMER) {
+ m_is_display_session = true;
+ } else {
+ m_is_display_session = false;
+ }
+ DEBUG_PRINT_LOW("%s: m_is_display_session = %d", __func__, m_is_display_session);
+
}