msm8998: Update to 07.00.00.279.240

msm8998:  from hardware/qcom/media
  9290486d video: add vendor prefix to properties
  19da8f80 Merge "mm-video-v4l2: vdec: Fix reporting change in color-space to the client"
  fa17158f Merge "libc2dcolorconvert: Fix address in unmap call"
  ffdc4909 Merge "mm-video-v4l2: venc: WA: ignore colorspace set by client when executing"
  ebedc974 mm-video-v4l2: vdec: Fix reporting change in color-space to the client
  2d4e855a libc2dcolorconvert: Fix address in unmap call
  bb45d359 mm-video-v4l2: venc: WA: ignore colorspace set by client when executing
  aa97b82e mm-video-v4l2: vdec: Allocate input(bitstream) buffers as uncached

Test: build, boot, sanity checks
Bug: 62817801
Change-Id: I98cb6b897cda51363c807ae0365c2139e7d578e9
Signed-off-by: Thierry Strudel <tstrudel@google.com>
This commit is contained in:
Thierry Strudel 2017-06-24 18:07:02 -07:00
parent 53801229e1
commit 68225548f6
9 changed files with 112 additions and 94 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012 - 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012 - 2017, 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
@ -65,8 +65,8 @@ protected:
private:
bool isYUVSurface(ColorConvertFormat format);
void *getDummySurfaceDef(ColorConvertFormat format, size_t width, size_t height, bool isSource);
C2D_STATUS updateYUVSurfaceDef(int fd, void *base, void * data, bool isSource);
C2D_STATUS updateRGBSurfaceDef(int fd, void * data, bool isSource);
C2D_STATUS updateYUVSurfaceDef(uint8_t *addr, void *base, void * data, bool isSource);
C2D_STATUS updateRGBSurfaceDef(uint8_t *addr, void * data, bool isSource);
uint32_t getC2DFormat(ColorConvertFormat format);
size_t calcStride(ColorConvertFormat format, size_t width);
size_t calcYSize(ColorConvertFormat format, size_t width, size_t height);
@ -222,6 +222,8 @@ C2DColorConverter::~C2DColorConverter()
int C2DColorConverter::convertC2D(int srcFd, void *srcBase, void * srcData, int dstFd, void *dstBase, void * dstData)
{
C2D_STATUS ret;
uint8_t *srcMappedGpuAddr = nullptr;
uint8_t *dstMappedGpuAddr = nullptr;
if (mError) {
ALOGE("C2D library initialization failed\n");
@ -233,25 +235,38 @@ int C2DColorConverter::convertC2D(int srcFd, void *srcBase, void * srcData, int
return -1;
}
srcMappedGpuAddr = (uint8_t *)getMappedGPUAddr(srcFd, srcData, mSrcSize);
if (!srcMappedGpuAddr)
return -1;
if (isYUVSurface(mSrcFormat)) {
ret = updateYUVSurfaceDef(srcFd, srcBase, srcData, true);
ret = updateYUVSurfaceDef(srcMappedGpuAddr, srcBase, srcData, true);
} else {
ret = updateRGBSurfaceDef(srcFd, srcData, true);
ret = updateRGBSurfaceDef(srcMappedGpuAddr, srcData, true);
}
if (ret != C2D_STATUS_OK) {
ALOGE("Update src surface def failed\n");
unmapGPUAddr((unsigned long)srcMappedGpuAddr);
return -ret;
}
dstMappedGpuAddr = (uint8_t *)getMappedGPUAddr(dstFd, dstData, mDstSize);
if (!dstMappedGpuAddr) {
unmapGPUAddr((unsigned long)srcMappedGpuAddr);
return -1;
}
if (isYUVSurface(mDstFormat)) {
ret = updateYUVSurfaceDef(dstFd, dstBase, dstData, false);
ret = updateYUVSurfaceDef(dstMappedGpuAddr, dstBase, dstData, false);
} else {
ret = updateRGBSurfaceDef(dstFd, dstData, false);
ret = updateRGBSurfaceDef(dstMappedGpuAddr, dstData, false);
}
if (ret != C2D_STATUS_OK) {
ALOGE("Update dst surface def failed\n");
unmapGPUAddr((unsigned long)srcMappedGpuAddr);
unmapGPUAddr((unsigned long)dstMappedGpuAddr);
return -ret;
}
@ -260,18 +275,10 @@ int C2DColorConverter::convertC2D(int srcFd, void *srcBase, void * srcData, int
mC2DFinish(mDstSurface);
bool unmappedSrcSuccess;
if (isYUVSurface(mSrcFormat)) {
unmappedSrcSuccess = unmapGPUAddr((unsigned long)((C2D_YUV_SURFACE_DEF *)mSrcSurfaceDef)->phys0);
} else {
unmappedSrcSuccess = unmapGPUAddr((unsigned long)((C2D_RGB_SURFACE_DEF *)mSrcSurfaceDef)->phys);
}
unmappedSrcSuccess = unmapGPUAddr((unsigned long)srcMappedGpuAddr);
bool unmappedDstSuccess;
if (isYUVSurface(mDstFormat)) {
unmappedDstSuccess = unmapGPUAddr((unsigned long)((C2D_YUV_SURFACE_DEF *)mDstSurfaceDef)->phys0);
} else {
unmappedDstSuccess = unmapGPUAddr((unsigned long)((C2D_RGB_SURFACE_DEF *)mDstSurfaceDef)->phys);
}
unmappedDstSuccess = unmapGPUAddr((unsigned long)dstMappedGpuAddr);
if (ret != C2D_STATUS_OK) {
ALOGE("C2D Draw failed\n");
@ -348,12 +355,12 @@ void* C2DColorConverter::getDummySurfaceDef(ColorConvertFormat format, size_t wi
}
}
C2D_STATUS C2DColorConverter::updateYUVSurfaceDef(int fd, void *base, void *data, bool isSource)
C2D_STATUS C2DColorConverter::updateYUVSurfaceDef(uint8_t *gpuAddr, void *base, void *data, bool isSource)
{
if (isSource) {
C2D_YUV_SURFACE_DEF * srcSurfaceDef = (C2D_YUV_SURFACE_DEF *)mSrcSurfaceDef;
srcSurfaceDef->plane0 = data;
srcSurfaceDef->phys0 = (uint8_t *)getMappedGPUAddr(fd, data, mSrcSize) + ((uint8_t *)data - (uint8_t *)base);
srcSurfaceDef->phys0 = gpuAddr + ((uint8_t *)data - (uint8_t *)base);
srcSurfaceDef->plane1 = (uint8_t *)data + mSrcYSize;
srcSurfaceDef->phys1 = (uint8_t *)srcSurfaceDef->phys0 + mSrcYSize;
if (srcSurfaceDef->format & C2D_COLOR_FORMAT_420_I420 ||
@ -367,7 +374,7 @@ C2D_STATUS C2DColorConverter::updateYUVSurfaceDef(int fd, void *base, void *data
} else {
C2D_YUV_SURFACE_DEF * dstSurfaceDef = (C2D_YUV_SURFACE_DEF *)mDstSurfaceDef;
dstSurfaceDef->plane0 = data;
dstSurfaceDef->phys0 = (uint8_t *)getMappedGPUAddr(fd, data, mDstSize) + ((uint8_t *)data - (uint8_t *)base);
dstSurfaceDef->phys0 = gpuAddr + ((uint8_t *)data - (uint8_t *)base);
dstSurfaceDef->plane1 = (uint8_t *)data + mDstYSize;
dstSurfaceDef->phys1 = (uint8_t *)dstSurfaceDef->phys0 + mDstYSize;
if (dstSurfaceDef->format & C2D_COLOR_FORMAT_420_I420 ||
@ -382,12 +389,12 @@ C2D_STATUS C2DColorConverter::updateYUVSurfaceDef(int fd, void *base, void *data
}
}
C2D_STATUS C2DColorConverter::updateRGBSurfaceDef(int fd, void * data, bool isSource)
C2D_STATUS C2DColorConverter::updateRGBSurfaceDef(uint8_t *gpuAddr, void * data, bool isSource)
{
if (isSource) {
C2D_RGB_SURFACE_DEF * srcSurfaceDef = (C2D_RGB_SURFACE_DEF *)mSrcSurfaceDef;
srcSurfaceDef->buffer = data;
srcSurfaceDef->phys = getMappedGPUAddr(fd, data, mSrcSize);
srcSurfaceDef->phys = gpuAddr;
return mC2DUpdateSurface(mSrcSurface, C2D_SOURCE,
(C2D_SURFACE_TYPE)(C2D_SURFACE_RGB_HOST | C2D_SURFACE_WITH_PHYS),
&(*srcSurfaceDef));
@ -395,7 +402,7 @@ C2D_STATUS C2DColorConverter::updateRGBSurfaceDef(int fd, void * data, bool isSo
C2D_RGB_SURFACE_DEF * dstSurfaceDef = (C2D_RGB_SURFACE_DEF *)mDstSurfaceDef;
dstSurfaceDef->buffer = data;
ALOGV("dstSurfaceDef->buffer = %p\n", data);
dstSurfaceDef->phys = getMappedGPUAddr(fd, data, mDstSize);
dstSurfaceDef->phys = gpuAddr;
return mC2DUpdateSurface(mDstSurface, C2D_TARGET,
(C2D_SURFACE_TYPE)(C2D_SURFACE_RGB_HOST | C2D_SURFACE_WITH_PHYS),
&(*dstSurfaceDef));

View file

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2009, 2015, The Linux Foundation. All rights reserved.
Copyright (c) 2009, 2015, 2017 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:
@ -463,7 +463,7 @@ OMX_GetHandle(OMX_OUT OMX_HANDLETYPE* handle,
// Load VPP omx component for decoder if vpp
// property is enabled
if ((property_get("media.vpp.enable", value, NULL))
if ((property_get("vendor.media.vpp.enable", value, NULL))
&& (!strcmp("1", value) || !strcmp("true", value))) {
DEBUG_PRINT("VPP property is enabled");
if (!strcmp(core[cmp_index].so_lib_name, "libOmxVdec.so")) {

View file

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2010 - 2013, The Linux Foundation. All rights reserved.
Copyright (c) 2010 - 2017, 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:
@ -906,7 +906,7 @@ void h264_stream_parser::sei_pan_scan()
#ifdef _ANDROID_
char property_value[PROPERTY_VALUE_MAX] = {0};
OMX_S32 enable_panscan_log = 0;
property_get("vidc.dec.debug.panframedata", property_value, "0");
property_get("vendor.vidc.dec.debug.panframedata", property_value, "0");
enable_panscan_log = atoi(property_value);
#endif
#ifdef PANSCAN_HDLR
@ -1195,7 +1195,7 @@ void h264_stream_parser::parse_frame_pack()
char property_value[PROPERTY_VALUE_MAX] = {0};
OMX_S32 enable_framepack_log = 0;
property_get("vidc.dec.debug.panframedata", property_value, "0");
property_get("vendor.vidc.dec.debug.panframedata", property_value, "0");
enable_framepack_log = atoi(property_value);
#endif
ALOGV("%s:%d parse_frame_pack", __func__, __LINE__);

View file

@ -1,7 +1,7 @@
/**
* @copyright
*
* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2017, 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:
@ -147,7 +147,7 @@ OMX_ERRORTYPE omx_swvdec::component_init(OMX_STRING cmp_name)
{
char property_value[PROPERTY_VALUE_MAX] = {0};
if (property_get("omx_swvdec.meta_buffer.disable",
if (property_get("vendor.omx_swvdec.meta_buffer.disable",
property_value,
NULL))
{

View file

@ -1,7 +1,7 @@
/**
* @copyright
*
* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2017, 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:
@ -61,7 +61,7 @@ void omx_swvdec_log_init()
char property_value[PROPERTY_VALUE_MAX] = {0};
if (property_get("omx_swvdec.log.level", property_value, NULL))
if (property_get("vendor.omx_swvdec.log.level", property_value, NULL))
{
omx_swvdec_loglevel = atoi(property_value);
@ -76,7 +76,7 @@ void omx_swvdec_log_init()
}
OMX_SWVDEC_LOG_HIGH(
"omx_swvdec.log.level: %d; %s",
"vendor.omx_swvdec.log.level: %d; %s",
omx_swvdec_loglevel,
(omx_swvdec_loglevel == 3) ? "error, high, & low logs" :
((omx_swvdec_loglevel == 2) ? "error & high logs" :
@ -198,21 +198,21 @@ omx_swvdec_diag::omx_swvdec_diag():
DIAG_FILE_PATH,
time_string);
if (property_get("omx_swvdec.dump.ip", property_value, NULL))
if (property_get("vendor.omx_swvdec.dump.ip", property_value, NULL))
{
m_dump_ip = atoi(property_value);
OMX_SWVDEC_LOG_HIGH("omx_swvdec.dump.ip: %d", m_dump_ip);
OMX_SWVDEC_LOG_HIGH("vendor.omx_swvdec.dump.ip: %d", m_dump_ip);
}
if (property_get("omx_swvdec.dump.op", property_value, NULL))
if (property_get("vendor.omx_swvdec.dump.op", property_value, NULL))
{
m_dump_op = atoi(property_value);
OMX_SWVDEC_LOG_HIGH("omx_swvdec.dump.op: %d", m_dump_op);
OMX_SWVDEC_LOG_HIGH("vendor.omx_swvdec.dump.op: %d", m_dump_op);
}
if (m_dump_ip && property_get("omx_swvdec.filename.ip",
if (m_dump_ip && property_get("vendor.omx_swvdec.filename.ip",
property_value,
filename_ip) && (strlen(property_value) > 0 ) )
{
@ -228,7 +228,7 @@ omx_swvdec_diag::omx_swvdec_diag():
else
{
strlcpy(m_filename_ip, property_value,m_filename_ip_size);
OMX_SWVDEC_LOG_HIGH("omx_swvdec.filename.ip: %s", m_filename_ip);
OMX_SWVDEC_LOG_HIGH("vendor.omx_swvdec.filename.ip: %s", m_filename_ip);
if ((m_file_ip = fopen(m_filename_ip, "wb")) == NULL)
{
OMX_SWVDEC_LOG_ERROR("cannot open input file '%s' logging erro is : %d",
@ -237,7 +237,7 @@ omx_swvdec_diag::omx_swvdec_diag():
}
}
if (m_dump_op && property_get("omx_swvdec.filename.op",
if (m_dump_op && property_get("vendor.omx_swvdec.filename.op",
property_value,
filename_op) && (strlen(property_value) > 0 ))
{
@ -253,7 +253,7 @@ omx_swvdec_diag::omx_swvdec_diag():
else
{
strlcpy(m_filename_op, property_value,m_filename_op_size);
OMX_SWVDEC_LOG_HIGH("omx_swvdec.filename.op: %s", m_filename_op);
OMX_SWVDEC_LOG_HIGH("vendor.omx_swvdec.filename.op: %s", m_filename_op);
if ((m_file_op = fopen(m_filename_op, "wb")) == NULL)
{
OMX_SWVDEC_LOG_ERROR("cannot open output file '%s' logging error : %d",

View file

@ -679,13 +679,13 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
memset(&m_debug,0,sizeof(m_debug));
#ifdef _ANDROID_
char property_value[PROPERTY_VALUE_MAX] = {0};
property_get("vidc.debug.level", property_value, "1");
property_get("vendor.vidc.debug.level", property_value, "1");
debug_level = strtoul(property_value, NULL, 16);
property_value[0] = '\0';
DEBUG_PRINT_HIGH("In OMX vdec Constructor");
property_get("vidc.dec.debug.perf", property_value, "0");
property_get("vendor.vidc.dec.debug.perf", property_value, "0");
perf_flag = atoi(property_value);
if (perf_flag) {
DEBUG_PRINT_HIGH("vidc.dec.debug.perf is %d", perf_flag);
@ -694,7 +694,7 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
proc_frms = latency = 0;
prev_n_filled_len = 0;
property_value[0] = '\0';
property_get("vidc.dec.debug.ts", property_value, "0");
property_get("vendor.vidc.dec.debug.ts", property_value, "0");
m_debug_timestamp = atoi(property_value);
DEBUG_PRINT_HIGH("vidc.dec.debug.ts value is %d",m_debug_timestamp);
if (m_debug_timestamp) {
@ -703,36 +703,36 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
}
property_value[0] = '\0';
property_get("vidc.dec.debug.concealedmb", property_value, "0");
property_get("vendor.vidc.dec.debug.concealedmb", property_value, "0");
m_debug_concealedmb = atoi(property_value);
DEBUG_PRINT_HIGH("vidc.dec.debug.concealedmb value is %d",m_debug_concealedmb);
property_value[0] = '\0';
property_get("vidc.dec.profile.check", property_value, "0");
property_get("vendor.vidc.dec.profile.check", property_value, "0");
m_reject_avc_1080p_mp = atoi(property_value);
DEBUG_PRINT_HIGH("vidc.dec.profile.check value is %d",m_reject_avc_1080p_mp);
DEBUG_PRINT_HIGH("vendor.vidc.dec.profile.check value is %d",m_reject_avc_1080p_mp);
property_value[0] = '\0';
property_get("vidc.dec.log.in", property_value, "0");
property_get("vendor.vidc.dec.log.in", property_value, "0");
m_debug.in_buffer_log = atoi(property_value);
property_value[0] = '\0';
property_get("vidc.dec.log.out", property_value, "0");
property_get("vendor.vidc.dec.log.out", property_value, "0");
m_debug.out_buffer_log = atoi(property_value);
snprintf(m_debug.log_loc, PROPERTY_VALUE_MAX, "%s", BUFFER_LOG_LOC);
property_value[0] = '\0';
property_get("vidc.dec.meta.log.out", property_value, "0");
property_get("vendor.vidc.dec.meta.log.out", property_value, "0");
m_debug.out_meta_buffer_log = atoi(property_value);
snprintf(m_debug.log_loc, PROPERTY_VALUE_MAX, "%s", BUFFER_LOG_LOC);
property_value[0] = '\0';
property_get("vidc.log.loc", property_value, "");
property_get("vendor.vidc.log.loc", property_value, "");
if (*property_value)
strlcpy(m_debug.log_loc, property_value, PROPERTY_VALUE_MAX);
property_value[0] = '\0';
property_get("vidc.dec.120fps.enabled", property_value, "0");
property_get("vendor.vidc.dec.120fps.enabled", property_value, "0");
//if this feature is not enabled then reset this value -ve
if(atoi(property_value)) {
@ -741,12 +741,12 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
}
property_value[0] = '\0';
property_get("vidc.dec.debug.dyn.disabled", property_value, "0");
property_get("vendor.vidc.dec.debug.dyn.disabled", property_value, "0");
m_disable_dynamic_buf_mode = atoi(property_value);
DEBUG_PRINT_HIGH("vidc.dec.debug.dyn.disabled value is %d",m_disable_dynamic_buf_mode);
property_value[0] = '\0';
property_get("vidc.dec.drc.enable", property_value, "0");
property_get("vendor.vidc.dec.drc.enable", property_value, "0");
if (atoi(property_value)) {
m_drc_enable = true;
DEBUG_PRINT_HIGH("DRC enabled");
@ -800,9 +800,9 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
streaming[OUTPUT_PORT] = false;
#ifdef _ANDROID_
char extradata_value[PROPERTY_VALUE_MAX] = {0};
property_get("vidc.dec.debug.extradata", extradata_value, "0");
property_get("vendor.vidc.dec.debug.extradata", extradata_value, "0");
m_debug_extradata = atoi(extradata_value);
DEBUG_PRINT_HIGH("vidc.dec.debug.extradata value is %d",m_debug_extradata);
DEBUG_PRINT_HIGH("vendor.vidc.dec.debug.extradata value is %d",m_debug_extradata);
#endif
m_fill_output_msg = OMX_COMPONENT_GENERATE_FTB;
client_buffers.set_vdec_client(this);
@ -842,7 +842,7 @@ omx_vdec::omx_vdec(): m_error_propogated(false),
pthread_mutex_init(&m_hdr_info_client_lock, NULL);
char dither_value[PROPERTY_VALUE_MAX] = {0};
property_get("vidc.dec.dither", dither_value, "0");
property_get("vendor.vidc.dec.dither", dither_value, "0");
if ((atoi(dither_value) > DITHER_ALL_COLORSPACE) ||
(atoi(dither_value) < DITHER_DISABLE)) {
m_dither_config = DITHER_ALL_COLORSPACE;
@ -2272,7 +2272,7 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role)
* Clients may configure OMX_QCOM_FramePacking_Arbitrary to enable this mode
*/
arbitrary_bytes = false;
property_get("vidc.dec.debug.arbitrarybytes.mode", property_value, "0");
property_get("vendor.vidc.dec.debug.arbitrarybytes.mode", property_value, "0");
if (atoi(property_value)) {
DEBUG_PRINT_HIGH("arbitrary_bytes mode enabled via property command");
arbitrary_bytes = true;
@ -2578,7 +2578,7 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role)
}
}
property_get("persist.vidc.dec.conceal_color", property_value, DEFAULT_CONCEAL_COLOR);
property_get("persist.vendor.vidc.dec.conceal_color", property_value, DEFAULT_CONCEAL_COLOR);
m_conceal_color= atoi(property_value);
DEBUG_PRINT_HIGH("trying to set 0x%u as conceal color\n", (unsigned int)m_conceal_color);
control.id = V4L2_CID_MPEG_VIDC_VIDEO_CONCEAL_COLOR;
@ -2674,14 +2674,14 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role)
drv_ctx.idr_only_decoding = 0;
#ifdef _ANDROID_
property_get("vidc.dec.enable.downscalar",property_value,"0");
property_get("vendor.vidc.dec.enable.downscalar",property_value,"0");
if (atoi(property_value)) {
m_enable_downscalar = atoi(property_value);
property_get("vidc.dec.downscalar_width",property_value,"0");
property_get("vendor.vidc.dec.downscalar_width",property_value,"0");
if (atoi(property_value)) {
m_downscalar_width = atoi(property_value);
}
property_get("vidc.dec.downscalar_height",property_value,"0");
property_get("vendor.vidc.dec.downscalar_height",property_value,"0");
if (atoi(property_value)) {
m_downscalar_height = atoi(property_value);
}
@ -2695,7 +2695,7 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role)
DEBUG_PRINT_LOW("Downscaler configured WxH %dx%d\n",
m_downscalar_width, m_downscalar_height);
}
property_get("vidc.disable.split.mode",property_value,"0");
property_get("vendor.vidc.disable.split.mode",property_value,"0");
m_disable_split_mode = atoi(property_value);
DEBUG_PRINT_HIGH("split mode is %s", m_disable_split_mode ? "disabled" : "enabled");
#endif
@ -4558,7 +4558,7 @@ OMX_ERRORTYPE omx_vdec::set_parameter(OMX_IN OMX_HANDLETYPE hComp,
OMX_QCOM_FramePacking_OnlyOneCompleteFrame) {
arbitrary_bytes = false;
#ifdef _ANDROID_
property_get("vidc.dec.debug.arbitrarybytes.mode", property_value, "0");
property_get("vendor.vidc.dec.debug.arbitrarybytes.mode", property_value, "0");
if (atoi(property_value)) {
DEBUG_PRINT_HIGH("arbitrary_bytes enabled via property command");
arbitrary_bytes = true;
@ -5422,17 +5422,26 @@ OMX_ERRORTYPE omx_vdec::get_config(OMX_IN OMX_HANDLETYPE hComp,
print_debug_color_aspects(&(m_client_color_space.sAspects), "GetConfig Client");
print_debug_color_aspects(&(m_internal_color_space.sAspects), "GetConfig Internal");
const ColorAspects &streamColor = m_internal_color_space.sAspects;
const ColorAspects &defaultColor = m_client_color_space.sAspects;
// For VPX, use client-color if specified.
// For the rest, try to use the stream-color if present
bool preferClientColor = (output_capability == V4L2_PIX_FMT_VP8 ||
output_capability == V4L2_PIX_FMT_VP9);
params->sAspects.mPrimaries = streamColor.mPrimaries != ColorAspects::PrimariesUnspecified ?
streamColor.mPrimaries : defaultColor.mPrimaries;
params->sAspects.mTransfer = streamColor.mTransfer != ColorAspects::TransferUnspecified ?
streamColor.mTransfer : defaultColor.mTransfer;
params->sAspects.mMatrixCoeffs = streamColor.mMatrixCoeffs != ColorAspects::MatrixUnspecified ?
streamColor.mMatrixCoeffs : defaultColor.mMatrixCoeffs;
params->sAspects.mRange = streamColor.mRange != ColorAspects::RangeUnspecified ?
streamColor.mRange : defaultColor.mRange;
const ColorAspects &preferredColor = preferClientColor ?
m_client_color_space.sAspects : m_internal_color_space.sAspects;
const ColorAspects &defaultColor = preferClientColor ?
m_internal_color_space.sAspects : m_client_color_space.sAspects;
params->sAspects.mPrimaries = preferredColor.mPrimaries != ColorAspects::PrimariesUnspecified ?
preferredColor.mPrimaries : defaultColor.mPrimaries;
params->sAspects.mTransfer = preferredColor.mTransfer != ColorAspects::TransferUnspecified ?
preferredColor.mTransfer : defaultColor.mTransfer;
params->sAspects.mMatrixCoeffs = preferredColor.mMatrixCoeffs != ColorAspects::MatrixUnspecified ?
preferredColor.mMatrixCoeffs : defaultColor.mMatrixCoeffs;
params->sAspects.mRange = preferredColor.mRange != ColorAspects::RangeUnspecified ?
preferredColor.mRange : defaultColor.mRange;
print_debug_color_aspects(&(params->sAspects), "GetConfig");
break;
}
@ -11134,6 +11143,8 @@ bool omx_vdec::handle_color_space_info(void *data,
if (vpx_color_space_payload->color_space == 0) {
*color_space = ITU_R_601;
aspects->mPrimaries = ColorAspects::PrimariesBT601_6_525;
aspects->mRange = ColorAspects::RangeLimited;
} else {
DEBUG_PRINT_ERROR("Unsupported Color space for VP8");
break;
@ -12502,7 +12513,7 @@ void omx_vdec::request_perf_level(enum vidc_perf_level perf_level)
struct v4l2_control control;
char property_value[PROPERTY_VALUE_MAX] = {0};
property_get("vidc.debug.turbo", property_value, "0");
property_get("vendor.vidc.debug.turbo", property_value, "0");
memset(&control, 0, sizeof(v4l2_control));
control.id = V4L2_CID_MPEG_VIDC_SET_PERF_LEVEL;
switch (perf_level) {

View file

@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
Copyright (c) 2014-2017, 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:
@ -68,20 +68,20 @@ omx_venc::omx_venc()
memset(&m_debug,0,sizeof(m_debug));
property_value[0] = '\0';
property_get("vidc.debug.level", property_value, "1");
property_get("vendor.vidc.debug.level", property_value, "1");
debug_level = atoi(property_value);
property_value[0] = '\0';
property_get("vidc.enc.log.in", property_value, "0");
property_get("vendor.vidc.enc.log.in", property_value, "0");
m_debug.in_buffer_log = atoi(property_value);
property_value[0] = '\0';
property_get("vidc.enc.log.out", property_value, "0");
property_get("vendor.vidc.enc.log.out", property_value, "0");
m_debug.out_buffer_log = atoi(property_value);
snprintf(m_debug.log_loc, PROPERTY_VALUE_MAX, "%s", BUFFER_LOG_LOC);
property_value[0] = '\0';
property_get("vidc.log.loc", property_value, "");
property_get("vendor.vidc.log.loc", property_value, "");
if (*property_value)
{
strlcpy(m_debug.log_loc, property_value, PROPERTY_VALUE_MAX);

View file

@ -139,20 +139,20 @@ omx_venc::omx_venc()
#endif
bframes = entropy = 0;
char property_value[PROPERTY_VALUE_MAX] = {0};
property_get("vidc.debug.level", property_value, "1");
property_get("vendor.vidc.debug.level", property_value, "1");
debug_level = strtoul(property_value, NULL, 16);
property_value[0] = '\0';
property_get("vidc.debug.bframes", property_value, "0");
property_get("vendor.vidc.debug.bframes", property_value, "0");
bframes = atoi(property_value);
property_value[0] = '\0';
property_get("vidc.debug.entropy", property_value, "1");
property_get("vendor.vidc.debug.entropy", property_value, "1");
entropy = !!atoi(property_value);
property_value[0] = '\0';
property_get("vidc.debug.perf.mode", property_value, "0");
property_get("vendor.vidc.debug.perf.mode", property_value, "0");
perfmode = atoi(property_value);
property_value[0] = '\0';
handle = NULL;
property_get("vidc.debug.lowlatency", property_value, "0");
property_get("vendor.vidc.debug.lowlatency", property_value, "0");
lowlatency = atoi(property_value);
property_value[0] = '\0';
m_perf_control.send_hint_to_mpctl(true);

View file

@ -230,13 +230,13 @@ venc_dev::venc_dev(class omx_venc *venc_class)
memset(&temporal_layers_config, 0x0, sizeof(temporal_layers_config));
char property_value[PROPERTY_VALUE_MAX] = {0};
property_get("vidc.enc.log.in", property_value, "0");
property_get("vendor.vidc.enc.log.in", property_value, "0");
m_debug.in_buffer_log = atoi(property_value);
property_get("vidc.enc.log.out", property_value, "0");
property_get("vendor.vidc.enc.log.out", property_value, "0");
m_debug.out_buffer_log = atoi(property_value);
property_get("vidc.enc.log.extradata", property_value, "0");
property_get("vendor.vidc.enc.log.extradata", property_value, "0");
m_debug.extradata_log = atoi(property_value);
#ifdef _UBWC_
@ -251,7 +251,7 @@ venc_dev::venc_dev(class omx_venc *venc_class)
is_gralloc_source_ubwc = 0;
#endif
property_get("persist.vidc.enc.csc.enable", property_value, "0");
property_get("persist.vendor.vidc.enc.csc.enable", property_value, "0");
if(!(strncmp(property_value, "1", PROPERTY_VALUE_MAX)) ||
!(strncmp(property_value, "true", PROPERTY_VALUE_MAX))) {
is_csc_enabled = 1;
@ -260,7 +260,7 @@ venc_dev::venc_dev(class omx_venc *venc_class)
}
#ifdef _PQ_
property_get("vidc.enc.disable.pq", property_value, "0");
property_get("vendor.vidc.enc.disable.pq", property_value, "0");
if(!(strncmp(property_value, "1", PROPERTY_VALUE_MAX)) ||
!(strncmp(property_value, "true", PROPERTY_VALUE_MAX))) {
m_pq.is_pq_force_disable = 1;
@ -1279,7 +1279,7 @@ bool venc_dev::venc_open(OMX_U32 codec)
char buffer[10];
property_get("ro.board.platform", platform_name, "0");
property_get("vidc.enc.narrow.searchrange", property_value, "0");
property_get("vendor.vidc.enc.narrow.searchrange", property_value, "0");
enable_mv_narrow_searchrange = atoi(property_value);
if (!strncmp(platform_name, "msm8610", 7)) {
@ -1507,7 +1507,7 @@ bool venc_dev::venc_open(OMX_U32 codec)
DEBUG_PRINT_ERROR("Failed to set V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAME\n");
}
property_get("vidc.debug.turbo", property_value, "0");
property_get("vendor.vidc.debug.turbo", property_value, "0");
if (atoi(property_value)) {
DEBUG_PRINT_HIGH("Turbo mode debug property enabled");
control.id = V4L2_CID_MPEG_VIDC_SET_PERF_LEVEL;
@ -5432,7 +5432,7 @@ bool venc_dev::venc_set_intra_period(OMX_U32 nPFrames, OMX_U32 nBFrames)
}
if (m_sVenc_cfg.input_width * m_sVenc_cfg.input_height >= 3840 * 2160 &&
(property_get("vidc.enc.disable_bframes", property_value, "0") && atoi(property_value))) {
(property_get("vendor.vidc.enc.disable_bframes", property_value, "0") && atoi(property_value))) {
intra_period.num_pframes = intra_period.num_pframes + intra_period.num_bframes;
intra_period.num_bframes = 0;
DEBUG_PRINT_LOW("Warning: Disabling B frames for UHD recording pFrames = %lu bFrames = %lu",
@ -5440,7 +5440,7 @@ bool venc_dev::venc_set_intra_period(OMX_U32 nPFrames, OMX_U32 nBFrames)
}
if (m_sVenc_cfg.input_width * m_sVenc_cfg.input_height >= 5376 * 2688 &&
(property_get("vidc.enc.disable_pframes", property_value, "0") && atoi(property_value))) {
(property_get("vendor.vidc.enc.disable_pframes", property_value, "0") && atoi(property_value))) {
intra_period.num_pframes = 0;
DEBUG_PRINT_LOW("Warning: Disabling P frames for 5k/6k resolutions pFrames = %lu bFrames = %lu",
intra_period.num_pframes, intra_period.num_bframes);