diff options
author | Praneeth Paladugu <ppaladug@codeaurora.org> | 2016-03-23 07:00:38 -0700 |
---|---|---|
committer | Praneeth Paladugu <ppaladug@codeaurora.org> | 2016-03-25 17:10:24 -0700 |
commit | 2a3c3fc282dfb883ff53f06c4a746e7a91ff725a (patch) | |
tree | c98f9f3f7e527d0b6961a8c272e3707f9819932c | |
parent | 14a416b22723ff4000345eee78cabd1273b014f2 (diff) | |
download | android_hardware_qcom_media-2a3c3fc282dfb883ff53f06c4a746e7a91ff725a.tar.gz android_hardware_qcom_media-2a3c3fc282dfb883ff53f06c4a746e7a91ff725a.tar.bz2 android_hardware_qcom_media-2a3c3fc282dfb883ff53f06c4a746e7a91ff725a.zip |
mm-video-v4l2: vidc: venc: Fix rotation issue
Currently OMX component swapping dimensions irrespective of
rotation angle. This makes 0 and 180 to fail. Hence add check
to swap dimensions only for 90 and 270.
Change-Id: I802b88f4564ca1abfc1ca6cab4a9ea172f34e321
-rw-r--r-- | mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp index ceafc1dc..9728e04d 100644 --- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp +++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------------- -Copyright (c) 2010-2015, The Linux Foundation. All rights reserved. +Copyright (c) 2010-2016, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -234,6 +234,7 @@ venc_dev::venc_dev(class omx_venc *venc_class):mInputExtradata(venc_class), mOut color_format = 0; hw_overload = false; mBatchSize = 0; + deinterlace_enabled = false; pthread_mutex_init(&pause_resume_mlock, NULL); pthread_cond_init(&pause_resume_cond, NULL); memset(&idrperiod, 0, sizeof(idrperiod)); @@ -2396,11 +2397,12 @@ bool venc_dev::venc_set_config(void *configData, OMX_INDEXTYPE index) DEBUG_PRINT_ERROR("ERROR: Rotation is not supported with deinterlacing"); return false; } - DEBUG_PRINT_HIGH("venc_set_config: updating the new Dims"); - nFrameWidth = m_sVenc_cfg.dvs_width; - m_sVenc_cfg.dvs_width = m_sVenc_cfg.dvs_height; - m_sVenc_cfg.dvs_height = nFrameWidth; - + if (config_rotation->nRotation == 90 || config_rotation->nRotation == 270) { + DEBUG_PRINT_HIGH("venc_set_config: updating the new Dims"); + nFrameWidth = m_sVenc_cfg.dvs_width; + m_sVenc_cfg.dvs_width = m_sVenc_cfg.dvs_height; + m_sVenc_cfg.dvs_height = nFrameWidth; + } if(venc_set_vpe_rotation(config_rotation->nRotation) == false) { DEBUG_PRINT_ERROR("ERROR: Dimension Change for Rotation failed"); return false; |