summaryrefslogtreecommitdiff
path: root/mm-video-v4l2
diff options
context:
space:
mode:
authorSaurabh Kothawade <skothawa@codeaurora.org>2017-06-28 18:38:46 -0700
committerSaurabh Kothawade <skothawa@codeaurora.org>2017-06-29 11:16:28 -0700
commit712d68ad5752a7f6e29d6737c61cb3f2a2d4d364 (patch)
tree0536c0cc10fd1cdcffdeaa3b53715e8746c208e8 /mm-video-v4l2
parent8a75b6afbb04d44fde6bd48ab9e3289c8357f76b (diff)
downloadmedia-712d68ad5752a7f6e29d6737c61cb3f2a2d4d364.tar.gz
mm-video-v4l2: vidc: Remove stale code
Clean up encoder and decoder code to remove handling for unsupported old platform. CRs-Fixed: 2068885 Change-Id: Ied8f7cc3ce25521aa0e354610d39497c0eacc88b
Diffstat (limited to 'mm-video-v4l2')
-rw-r--r--mm-video-v4l2/vidc/vdec/inc/omx_vdec.h1
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp36
-rw-r--r--mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h1
-rw-r--r--mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp20
4 files changed, 4 insertions, 54 deletions
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index 863a8132..3856176e 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -1194,7 +1194,6 @@ class omx_vdec: public qc_omx_component
OMX_U32 m_smoothstreaming_height;
OMX_ERRORTYPE enable_smoothstreaming();
OMX_ERRORTYPE enable_adaptive_playback(unsigned long width, unsigned long height);
- bool is_thulium_v1;
bool m_disable_ubwc_mode;
bool m_disable_split_mode;
bool m_enable_downscalar;
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index e7e624b0..f19769a9 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -2188,24 +2188,6 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role)
}
#endif
- is_thulium_v1 = false;
- soc_file = fopen("/sys/devices/soc0/soc_id", "r");
- if (soc_file) {
- fread(buffer, 1, 4, soc_file);
- fclose(soc_file);
- if (atoi(buffer) == 246) {
- soc_file = fopen("/sys/devices/soc0/revision", "r");
- if (soc_file) {
- fread(buffer, 1, 4, soc_file);
- fclose(soc_file);
- if (atoi(buffer) == 1) {
- is_thulium_v1 = true;
- DEBUG_PRINT_HIGH("is_thulium_v1 = TRUE");
- }
- }
- }
- }
-
if (!strncmp(role, "OMX.qcom.video.decoder.avc.secure",
OMX_MAX_STRINGNAME_SIZE)) {
secure_mode = true;
@@ -2446,14 +2428,6 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role)
}
}
- if (is_thulium_v1) {
- eRet = enable_smoothstreaming();
- if (eRet != OMX_ErrorNone) {
- DEBUG_PRINT_ERROR("Failed to enable smooth streaming on driver");
- return eRet;
- }
- }
-
/*Get the Buffer requirements for input and output ports*/
drv_ctx.ip_buf.buffer_type = VDEC_BUFFER_TYPE_INPUT;
drv_ctx.op_buf.buffer_type = VDEC_BUFFER_TYPE_OUTPUT;
@@ -3455,13 +3429,9 @@ OMX_ERRORTYPE omx_vdec::get_parameter(OMX_IN OMX_HANDLETYPE hComp,
#if defined(_ANDROID_) && !defined(FLEXYUV_SUPPORTED)
useNonSurfaceMode = (m_enable_android_native_buffers == OMX_FALSE);
#endif
- if (is_thulium_v1) {
- portFmt->eColorFormat = getPreferredColorFormatDefaultMode(portFmt->nIndex);
- } else {
- portFmt->eColorFormat = useNonSurfaceMode ?
- getPreferredColorFormatNonSurfaceMode(portFmt->nIndex) :
- getPreferredColorFormatDefaultMode(portFmt->nIndex);
- }
+ portFmt->eColorFormat = useNonSurfaceMode ?
+ getPreferredColorFormatNonSurfaceMode(portFmt->nIndex) :
+ getPreferredColorFormatDefaultMode(portFmt->nIndex);
if (portFmt->eColorFormat == OMX_COLOR_FormatMax ) {
eRet = OMX_ErrorNoMore;
diff --git a/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h b/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
index 620fd816..53ff0375 100644
--- a/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
+++ b/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
@@ -569,7 +569,6 @@ class venc_dev
bool is_searchrange_set;
bool enable_mv_narrow_searchrange;
int supported_rc_modes;
- bool is_thulium_v1;
bool camera_mode_enabled;
struct roidata {
bool dirty;
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 5bf3fba8..1dd39cb7 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
@@ -1305,24 +1305,6 @@ bool venc_dev::venc_open(OMX_U32 codec)
fdesc.index++;
}
- is_thulium_v1 = false;
- soc_file= fopen("/sys/devices/soc0/soc_id", "r");
- if (soc_file) {
- fread(buffer, 1, 4, soc_file);
- fclose(soc_file);
- if (atoi(buffer) == 246) {
- soc_file = fopen("/sys/devices/soc0/revision", "r");
- if (soc_file) {
- fread(buffer, 1, 4, soc_file);
- fclose(soc_file);
- if (atoi(buffer) == 1) {
- is_thulium_v1 = true;
- DEBUG_PRINT_HIGH("is_thulium_v1 = TRUE");
- }
- }
- }
- }
-
if (venc_handle->is_secure_session()) {
m_sOutput_buff_property.alignment = SZ_1M;
m_sInput_buff_property.alignment = SZ_1M;
@@ -4837,7 +4819,7 @@ bool venc_dev::venc_set_intra_period(OMX_U32 nPFrames, OMX_U32 nBFrames)
intra_period.num_pframes = nPFrames;
intra_period.num_bframes = nBFrames;
- if (!venc_calibrate_gop() && !is_thulium_v1)
+ if (!venc_calibrate_gop())
{
DEBUG_PRINT_ERROR("Invalid settings, Hybrid HP enabled with LTR OR Hier-pLayers OR bframes");
return false;