summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2016-10-13 21:27:56 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-10-13 21:27:56 +0000
commitd51e46d21c47d6bd5c2d5a23018e00ffae329a3e (patch)
tree42a786724b81af7473f002d71ba59629f8116bb2
parentd82d51df802e25f7cab3c8a01d8e5973cafb9291 (diff)
parentd2bfc978bc0988b3a5ca83b89fb0fa3c293f8e35 (diff)
downloadandroid_hardware_qcom_media-d51e46d21c47d6bd5c2d5a23018e00ffae329a3e.tar.gz
android_hardware_qcom_media-d51e46d21c47d6bd5c2d5a23018e00ffae329a3e.tar.bz2
android_hardware_qcom_media-d51e46d21c47d6bd5c2d5a23018e00ffae329a3e.zip
msmcobalt: Update to 07.00.00.253.032
am: d2bfc978bc Change-Id: I128479d1cc2063efb151f6ad70b7256a928d87b3
-rw-r--r--msmcobalt/Android.mk16
-rw-r--r--msmcobalt/mm-core/src/8084/qc_registry_table.c18
-rw-r--r--msmcobalt/mm-core/src/8084/qc_registry_table_android.c18
-rw-r--r--msmcobalt/mm-core/src/msm8992/registry_table.c18
-rw-r--r--msmcobalt/mm-core/src/msm8992/registry_table_android.c18
-rw-r--r--msmcobalt/mm-core/src/msm8994/registry_table.c18
-rw-r--r--msmcobalt/mm-core/src/msm8994/registry_table_android.c18
-rw-r--r--msmcobalt/mm-core/src/msm8996/registry_table.c18
-rw-r--r--msmcobalt/mm-core/src/msm8996/registry_table_android.c18
-rw-r--r--msmcobalt/mm-core/src/msmcobalt/registry_table.c16
-rw-r--r--msmcobalt/mm-core/src/msmcobalt/registry_table_android.c16
-rw-r--r--msmcobalt/mm-video-v4l2/vidc/vdec/Android.mk44
-rw-r--r--msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp16
-rw-r--r--msmcobalt/mm-video-v4l2/vidc/venc/Android.mk28
-rw-r--r--msmcobalt/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp1
-rw-r--r--msmcobalt/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp11
16 files changed, 39 insertions, 253 deletions
diff --git a/msmcobalt/Android.mk b/msmcobalt/Android.mk
new file mode 100644
index 00000000..2e7f2c49
--- /dev/null
+++ b/msmcobalt/Android.mk
@@ -0,0 +1,16 @@
+QCOM_MEDIA_ROOT := $(call my-dir)
+
+#Compile these for all targets under QCOM_BOARD_PLATFORMS list.
+ifeq ($(call is-board-platform-in-list, $(QCOM_BOARD_PLATFORMS)),true)
+include $(QCOM_MEDIA_ROOT)/mm-core/Android.mk
+include $(QCOM_MEDIA_ROOT)/libstagefrighthw/Android.mk
+endif
+
+ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)),true)
+include $(QCOM_MEDIA_ROOT)/mm-video-v4l2/Android.mk
+
+ifeq ($(BOARD_USES_ADRENO), true)
+include $(QCOM_MEDIA_ROOT)/libc2dcolorconvert/Android.mk
+endif
+
+endif
diff --git a/msmcobalt/mm-core/src/8084/qc_registry_table.c b/msmcobalt/mm-core/src/8084/qc_registry_table.c
index d1e62375..ce5fc563 100644
--- a/msmcobalt/mm-core/src/8084/qc_registry_table.c
+++ b/msmcobalt/mm-core/src/8084/qc_registry_table.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+Copyright (c) 2012-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
@@ -456,22 +456,6 @@ omx_core_cb_type core[] =
"audio_decoder.aac"
}
},
- {
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- }
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
diff --git a/msmcobalt/mm-core/src/8084/qc_registry_table_android.c b/msmcobalt/mm-core/src/8084/qc_registry_table_android.c
index 798f3a51..278b36fa 100644
--- a/msmcobalt/mm-core/src/8084/qc_registry_table_android.c
+++ b/msmcobalt/mm-core/src/8084/qc_registry_table_android.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2012 - 2013, The Linux Foundation. All rights reserved.
+Copyright (c) 2012 - 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
@@ -567,22 +567,6 @@ omx_core_cb_type core[] =
"container_muxer.mp2"
}
},
- {
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- }
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
diff --git a/msmcobalt/mm-core/src/msm8992/registry_table.c b/msmcobalt/mm-core/src/msm8992/registry_table.c
index f7883226..27cb90ff 100644
--- a/msmcobalt/mm-core/src/msm8992/registry_table.c
+++ b/msmcobalt/mm-core/src/msm8992/registry_table.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014, The Linux Foundation. All rights reserved.
+Copyright (c) 2014 - 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
@@ -472,22 +472,6 @@ omx_core_cb_type core[] =
"audio_decoder.aac"
}
},
- {
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- }
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
diff --git a/msmcobalt/mm-core/src/msm8992/registry_table_android.c b/msmcobalt/mm-core/src/msm8992/registry_table_android.c
index 1b547b8b..425e3f9a 100644
--- a/msmcobalt/mm-core/src/msm8992/registry_table_android.c
+++ b/msmcobalt/mm-core/src/msm8992/registry_table_android.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014, The Linux Foundation. All rights reserved.
+Copyright (c) 2014 - 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
@@ -567,22 +567,6 @@ omx_core_cb_type core[] =
"container_muxer.mp2"
}
},
- {
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- }
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
diff --git a/msmcobalt/mm-core/src/msm8994/registry_table.c b/msmcobalt/mm-core/src/msm8994/registry_table.c
index 93e44e94..eb1d824b 100644
--- a/msmcobalt/mm-core/src/msm8994/registry_table.c
+++ b/msmcobalt/mm-core/src/msm8994/registry_table.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014, The Linux Foundation. All rights reserved.
+Copyright (c) 2014 - 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
@@ -456,22 +456,6 @@ omx_core_cb_type core[] =
"audio_decoder.aac"
}
},
- {
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- }
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
diff --git a/msmcobalt/mm-core/src/msm8994/registry_table_android.c b/msmcobalt/mm-core/src/msm8994/registry_table_android.c
index 7be7a34d..9bcdbc2a 100644
--- a/msmcobalt/mm-core/src/msm8994/registry_table_android.c
+++ b/msmcobalt/mm-core/src/msm8994/registry_table_android.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014, The Linux Foundation. All rights reserved.
+Copyright (c) 2014 - 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
@@ -631,22 +631,6 @@ omx_core_cb_type core[] =
"container_muxer.mp2"
}
},
- {
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- }
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
diff --git a/msmcobalt/mm-core/src/msm8996/registry_table.c b/msmcobalt/mm-core/src/msm8996/registry_table.c
index 6d6415d0..fbfe2c88 100644
--- a/msmcobalt/mm-core/src/msm8996/registry_table.c
+++ b/msmcobalt/mm-core/src/msm8996/registry_table.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+Copyright (c) 2014-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
@@ -551,22 +551,6 @@ omx_core_cb_type core[] =
}
},
{
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- },
- {
"OMX.qti.vdec.vpp",
NULL, // Create instance function
// Unique instance handle
diff --git a/msmcobalt/mm-core/src/msm8996/registry_table_android.c b/msmcobalt/mm-core/src/msm8996/registry_table_android.c
index 7ff3ce3e..f574ad42 100644
--- a/msmcobalt/mm-core/src/msm8996/registry_table_android.c
+++ b/msmcobalt/mm-core/src/msm8996/registry_table_android.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+Copyright (c) 2014-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
@@ -775,22 +775,6 @@ omx_core_cb_type core[] =
}
},
{
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- },
- {
"OMX.qti.vdec.vpp",
NULL, // Create instance function
// Unique instance handle
diff --git a/msmcobalt/mm-core/src/msmcobalt/registry_table.c b/msmcobalt/mm-core/src/msmcobalt/registry_table.c
index c35ac9b7..627d1e77 100644
--- a/msmcobalt/mm-core/src/msmcobalt/registry_table.c
+++ b/msmcobalt/mm-core/src/msmcobalt/registry_table.c
@@ -537,22 +537,6 @@ omx_core_cb_type core[] =
}
},
{
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- },
- {
"OMX.qti.vdec.vpp",
NULL, // Create instance function
// Unique instance handle
diff --git a/msmcobalt/mm-core/src/msmcobalt/registry_table_android.c b/msmcobalt/mm-core/src/msmcobalt/registry_table_android.c
index 1da53e66..fbd98292 100644
--- a/msmcobalt/mm-core/src/msmcobalt/registry_table_android.c
+++ b/msmcobalt/mm-core/src/msmcobalt/registry_table_android.c
@@ -791,22 +791,6 @@ omx_core_cb_type core[] =
}
},
{
- "OMX.qcom.video.postprocessing",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL,
- NULL,
- NULL,
- NULL
- },
- NULL, // Shared object library handle
- "libOmxVdpp.so",
- {
- "videopostprocessing"
- }
- },
- {
"OMX.qti.vdec.vpp",
NULL, // Create instance function
// Unique instance handle
diff --git a/msmcobalt/mm-video-v4l2/vidc/vdec/Android.mk b/msmcobalt/mm-video-v4l2/vidc/vdec/Android.mk
index 1b516ab1..287bba75 100644
--- a/msmcobalt/mm-video-v4l2/vidc/vdec/Android.mk
+++ b/msmcobalt/mm-video-v4l2/vidc/vdec/Android.mk
@@ -28,8 +28,6 @@ libmm-vdec-def += -DMAX_RES_1080P_EBI
TARGETS_THAT_USE_HEVC_ADSP_HEAP := msm8226 msm8974
TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996
-TARGETS_THAT_NEED_HEVC_LIB := msm8974 msm8610 msm8226 msm8916
-TARGETS_THAT_NEED_SW_HEVC := msm8974 msm8226 msm8916
TARGETS_THAT_SUPPORT_UBWC := msm8996 msm8953 msmcobalt
TARGETS_THAT_NEED_SW_VDEC := msm8937
@@ -132,47 +130,6 @@ LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp
include $(BUILD_SHARED_LIBRARY)
-# ---------------------------------------------------------------------------------
-# Make the Shared library (libOmxVdecHevc)
-# ---------------------------------------------------------------------------------
-
-include $(CLEAR_VARS)
-
-# libOmxVdecHevc library is not built for OSS builds as QCPATH is null in OSS builds.
-
-ifneq "$(wildcard $(QCPATH) )" ""
-ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_HEVC_LIB)),true)
-
-LOCAL_MODULE := libOmxVdecHevc
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := $(libmm-vdec-def)
-LOCAL_C_INCLUDES += $(libmm-vdec-inc)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep)
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils libdl
-
-LOCAL_SHARED_LIBRARIES += libqdMetaData
-
-LOCAL_SRC_FILES := src/frameparser.cpp
-LOCAL_SRC_FILES += src/h264_utils.cpp
-LOCAL_SRC_FILES += src/ts_parser.cpp
-LOCAL_SRC_FILES += src/mp4_utils.cpp
-
-ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_HEVC)),true)
-LOCAL_SHARED_LIBRARIES += libHevcSwDecoder
-LOCAL_SRC_FILES += src/omx_vdec_hevc_swvdec.cpp
-else
-LOCAL_SRC_FILES += src/omx_vdec_hevc.cpp
-endif
-
-LOCAL_SRC_FILES += src/hevc_utils.cpp
-
-LOCAL_STATIC_LIBRARIES := libOmxVidcCommon
-
-include $(BUILD_SHARED_LIBRARY)
-endif
-endif
# ---------------------------------------------------------------------------------
# Make the Shared library (libOmxSwVdec)
@@ -199,7 +156,6 @@ include $(BUILD_SHARED_LIBRARY)
endif
endif
-
# ---------------------------------------------------------------------------------
# END
# ---------------------------------------------------------------------------------
diff --git a/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index 3eecba46..a2772bbb 100644
--- a/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/msmcobalt/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -3371,21 +3371,17 @@ OMX_ERRORTYPE omx_vdec::get_supported_profile_level(OMX_VIDEO_PARAM_PROFILELEVEL
if (profileLevelType->nPortIndex == 0) {
if (!strncmp(drv_ctx.kind, "OMX.qcom.video.decoder.avc",OMX_MAX_STRINGNAME_SIZE)) {
+ profileLevelType->eLevel = OMX_VIDEO_AVCLevel52;
if (profileLevelType->nProfileIndex == 0) {
profileLevelType->eProfile = OMX_VIDEO_AVCProfileBaseline;
- profileLevelType->eLevel = OMX_VIDEO_AVCLevel51;
} else if (profileLevelType->nProfileIndex == 1) {
profileLevelType->eProfile = OMX_VIDEO_AVCProfileMain;
- profileLevelType->eLevel = OMX_VIDEO_AVCLevel52;
} else if (profileLevelType->nProfileIndex == 2) {
profileLevelType->eProfile = OMX_VIDEO_AVCProfileHigh;
- profileLevelType->eLevel = OMX_VIDEO_AVCLevel52;
} else if (profileLevelType->nProfileIndex == 3) {
profileLevelType->eProfile = QOMX_VIDEO_AVCProfileConstrainedBaseline;
- profileLevelType->eLevel = OMX_VIDEO_AVCLevel52;
} else if (profileLevelType->nProfileIndex == 4) {
profileLevelType->eProfile = QOMX_VIDEO_AVCProfileConstrainedHigh;
- profileLevelType->eLevel = OMX_VIDEO_AVCLevel52;
} else {
DEBUG_PRINT_LOW("get_parameter: OMX_IndexParamVideoProfileLevelQuerySupported nProfileIndex ret NoMore %u",
(unsigned int)profileLevelType->nProfileIndex);
@@ -3807,6 +3803,7 @@ OMX_ERRORTYPE omx_vdec::get_parameter(OMX_IN OMX_HANDLETYPE hComp,
break;
case V4L2_MPEG_VIDEO_H264_LEVEL_5_1:
pParam->eLevel = OMX_VIDEO_AVCLevel51;
+ break;
case V4L2_MPEG_VIDEO_H264_LEVEL_5_2:
pParam->eLevel = OMX_VIDEO_AVCLevel52;
break;
@@ -6063,13 +6060,18 @@ OMX_ERRORTYPE omx_vdec::free_input_buffer(OMX_BUFFERHEADERTYPE *bufferHdr)
drv_ctx.ptr_inputbuffer[index].bufferaddr);
munmap (drv_ctx.ptr_inputbuffer[index].bufferaddr,
drv_ctx.ptr_inputbuffer[index].mmaped_size);
- close (drv_ctx.ptr_inputbuffer[index].pmem_fd);
- } else if (allocate_native_handle){
+ }
+
+ if (allocate_native_handle){
native_handle_t *nh = (native_handle_t *)bufferHdr->pBuffer;
native_handle_close(nh);
native_handle_delete(nh);
+ } else {
+ // Close fd for non-secure and secure non-native-handle case
+ close(drv_ctx.ptr_inputbuffer[index].pmem_fd);
}
drv_ctx.ptr_inputbuffer[index].pmem_fd = -1;
+
if (m_desc_buffer_ptr && m_desc_buffer_ptr[index].buf_addr) {
free(m_desc_buffer_ptr[index].buf_addr);
m_desc_buffer_ptr[index].buf_addr = NULL;
diff --git a/msmcobalt/mm-video-v4l2/vidc/venc/Android.mk b/msmcobalt/mm-video-v4l2/vidc/venc/Android.mk
index a1a6fdc7..06306f84 100644
--- a/msmcobalt/mm-video-v4l2/vidc/venc/Android.mk
+++ b/msmcobalt/mm-video-v4l2/vidc/venc/Android.mk
@@ -150,34 +150,6 @@ LOCAL_SRC_FILES += src/omx_swvenc_mpeg4.cpp
include $(BUILD_SHARED_LIBRARY)
endif
-ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VENC_HEVC)),true)
-# ---------------------------------------------------------------------------------
-# Make the Shared library (libOmxSwVenc)
-# ---------------------------------------------------------------------------------
-include $(CLEAR_VARS)
-
-libmm-venc-inc += $(TARGET_OUT_HEADERS)/mm-video/swVenc
-
-LOCAL_MODULE := libOmxSwVencHevc
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := $(libmm-venc-def)
-LOCAL_C_INCLUDES := $(libmm-venc-inc)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep)
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils \
- libdl libgui
-LOCAL_SHARED_LIBRARIES += libHevcSwEncoder
-ifeq ($(BOARD_USES_ADRENO), true)
-LOCAL_SHARED_LIBRARIES += libc2dcolorconvert
-endif # ($(BOARD_USES_ADRENO), true)
-LOCAL_STATIC_LIBRARIES := libOmxVidcCommon
-
-LOCAL_SRC_FILES := src/omx_video_base.cpp
-LOCAL_SRC_FILES += src/omx_swvenc_hevc.cpp
-
-include $(BUILD_SHARED_LIBRARY)
-endif
# ---------------------------------------------------------------------------------
# END
diff --git a/msmcobalt/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp b/msmcobalt/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
index 79079fd5..52d5340c 100644
--- a/msmcobalt/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
+++ b/msmcobalt/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
@@ -1603,6 +1603,7 @@ OMX_ERRORTYPE omx_venc::set_config
}
default:
DEBUG_PRINT_ERROR("ERROR: unsupported index %d", (int) configIndex);
+ RETURN(OMX_ErrorUnsupportedSetting);
break;
}
diff --git a/msmcobalt/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/msmcobalt/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index 90d01ca2..b2a00cd9 100644
--- a/msmcobalt/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/msmcobalt/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -50,6 +50,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <qdMetaData.h>
+#define YUV_STATS_LIBRARY_NAME "libgpustats.so" // UBWC case: use GPU library
+
#define ALIGN(x, to_align) ((((unsigned long) x) + (to_align - 1)) & ~(to_align - 1))
#define EXTRADATA_IDX(__num_planes) ((__num_planes) ? (__num_planes) - 1 : 0)
#define MAXDPB 16
@@ -353,11 +355,6 @@ venc_dev::venc_dev(class omx_venc *venc_class)
} else {
is_pq_force_disable = 0;
}
- #ifdef _UBWC_
- #define YUV_STATS_LIBRARY_NAME "libgpustats.so" // UBWC case: use GPU library
- #else // _UBWC_
- // Non UBWC case. May be CPU
- #endif // _UBWC_
#endif // _PQ_
snprintf(m_debug.log_loc, PROPERTY_VALUE_MAX,
@@ -7896,7 +7893,9 @@ void venc_dev::venc_try_enable_pq(void)
codec_supported = m_sVenc_cfg.codectype == V4L2_PIX_FMT_H264;
- rc_mode_supported = rate_ctrl.rcmode == V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_CFR;
+ rc_mode_supported = (rate_ctrl.rcmode == V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_CFR) ||
+ (rate_ctrl.rcmode == V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_CFR) ||
+ (rate_ctrl.rcmode == V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_VFR);
resolution_supported = m_sVenc_cfg.input_height * m_sVenc_cfg.input_width <=
m_pq.caps.max_width * m_pq.caps.max_height;