Skip to content

Commit

Permalink
Merge ca5553f on remote branch
Browse files Browse the repository at this point in the history
Change-Id: I2d5ccda545397c067ae61537c61ee2a61afad54c
  • Loading branch information
Linux Build Service Account committed Feb 10, 2019
2 parents 5064a04 + ca5553f commit 54eff12
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 20 deletions.
18 changes: 1 addition & 17 deletions mm-core/src/qcs605/registry_table_android.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
Copyright (c) 2016-2019, 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
Expand Down Expand Up @@ -713,22 +713,6 @@ omx_core_cb_type core[] =
"audio_decoder.aac"
}
},
{
"AIV.play.generic",
NULL, // Create instance function
// Unique instance handle
{
NULL,
NULL,
NULL,
NULL
},
NULL, // Shared object library handle
"libAivPlay.so",
{
"AIV.play.role.generic"
}
},
{
"OMX.QCOM.CUST.COMP.START",
NULL, //Create instance function
Expand Down
12 changes: 10 additions & 2 deletions mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,18 @@ void* async_message_thread (void *input)
* let's handle as Sufficient. Ex : 1080 & 1088 or 2160 & 2176.
* When FBD comes, component updates the clients with actual
* resolution through set_buffer_geometry.
* As the LCU size for HEVC is 32bit, we need 32 pixel alignment
* for HEVC. For others, it should be 16.
*/

event_fields_changed |= (omx->drv_ctx.video_resolution.frame_height != ptr[7]);
event_fields_changed |= (omx->drv_ctx.video_resolution.frame_width != ptr[8]);
uint32_t pixel_align = (codec == V4L2_PIX_FMT_HEVC? 32:16);

event_fields_changed |= (ALIGN(omx->drv_ctx.video_resolution.frame_height,
pixel_align) !=
ALIGN(ptr[0], pixel_align));
event_fields_changed |= (ALIGN(omx->drv_ctx.video_resolution.frame_width,
pixel_align) !=
ALIGN(ptr[1], pixel_align));

if ((codec == V4L2_PIX_FMT_H264) ||
(codec == V4L2_PIX_FMT_HEVC)) {
Expand Down
1 change: 1 addition & 0 deletions mm-video-v4l2/vidc/venc/inc/omx_video_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ class omx_video: public qc_omx_component
OMX_VIDEO_PARAM_H263TYPE m_sParamH263;
OMX_VIDEO_PARAM_AVCTYPE m_sParamAVC;
OMX_VIDEO_PARAM_VP8TYPE m_sParamVP8;
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE m_sParamVP8Encoder;
OMX_VIDEO_PARAM_HEVCTYPE m_sParamHEVC;
QOMX_VIDEO_PARAM_TMETYPE m_sParamTME;
OMX_U32 tme_payload_version;
Expand Down
8 changes: 8 additions & 0 deletions mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,14 @@ OMX_ERRORTYPE omx_video::get_parameter(OMX_IN OMX_HANDLETYPE hComp,
memcpy(pDownScalarParam, &m_sParamDownScalar, sizeof(m_sParamDownScalar));
break;
}
case OMX_IndexParamVideoAndroidVp8Encoder:
{
VALIDATE_OMX_PARAM_DATA(paramData, OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE);
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE *pVp8Params =
reinterpret_cast<OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE*>(paramData);
memcpy(pVp8Params,&m_sParamVP8Encoder,sizeof(m_sParamVP8Encoder));
break;
}
case OMX_IndexParamConsumerUsageBits:
{
if (paramData == NULL) { return OMX_ErrorBadParameter; }
Expand Down
20 changes: 19 additions & 1 deletion mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ OMX_ERRORTYPE omx_venc::component_init(OMX_STRING role)
m_sParamVP8.nDCTPartitions = 0;
m_sParamVP8.bErrorResilientMode = OMX_FALSE;

OMX_INIT_STRUCT(&m_sParamVP8Encoder,OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE);
m_sParamVP8Encoder.nPortIndex = (OMX_U32) PORT_INDEX_OUT;
m_sParamVP8Encoder.nKeyFrameInterval = 30;

// HEVC specific init
OMX_INIT_STRUCT(&m_sParamHEVC, OMX_VIDEO_PARAM_HEVCTYPE);
m_sParamHEVC.nPortIndex = (OMX_U32) PORT_INDEX_OUT;
Expand Down Expand Up @@ -883,7 +887,21 @@ OMX_ERRORTYPE omx_venc::set_parameter(OMX_IN OMX_HANDLETYPE hComp,
memcpy(&m_sParamVP8,pParam, sizeof(struct OMX_VIDEO_PARAM_VP8TYPE));
break;
}
case (OMX_INDEXTYPE)OMX_IndexParamVideoHevc:
case (OMX_INDEXTYPE)OMX_IndexParamVideoAndroidVp8Encoder:
{
VALIDATE_OMX_PARAM_DATA(paramData, OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE);
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE* pParam = (OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE*)paramData;
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE vp8_param;
DEBUG_PRINT_LOW("set_parameter: OMX_IndexParamVideoAndroidVp8Encoder");

memcpy(&vp8_param, pParam, sizeof( struct OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE));
if (handle->venc_set_param(&vp8_param, (OMX_INDEXTYPE)OMX_IndexParamVideoAndroidVp8Encoder) != true) {
return OMX_ErrorUnsupportedSetting;
}
memcpy(&m_sParamVP8Encoder, &vp8_param, sizeof(struct OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE));
break;
}
case (OMX_INDEXTYPE)OMX_IndexParamVideoHevc:
{
VALIDATE_OMX_PARAM_DATA(paramData, OMX_VIDEO_PARAM_HEVCTYPE);
OMX_VIDEO_PARAM_HEVCTYPE* pParam = (OMX_VIDEO_PARAM_HEVCTYPE*)paramData;
Expand Down
18 changes: 18 additions & 0 deletions mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,24 @@ bool venc_dev::venc_set_param(void *paramData, OMX_INDEXTYPE index)

break;
}
case OMX_IndexParamVideoAndroidVp8Encoder:
{
DEBUG_PRINT_LOW("venc_set_param: OMX_IndexParamVideoAndroidVp8Encoder");
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE *vp8EncodeParams =
(OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE *)paramData;

if (vp8EncodeParams->nPortIndex == (OMX_U32) PORT_INDEX_OUT) {
int pFrames = vp8EncodeParams->nKeyFrameInterval - 1;
if (venc_set_intra_period(pFrames, 0) == false) {
DEBUG_PRINT_ERROR("ERROR: Request for setting intra period failed");
return false;
}

} else {
DEBUG_PRINT_ERROR("ERROR: Invalid Port Index for OMX_IndexParamVideoAndroidVp8Encoder");
}
break;
}
case OMX_IndexParamVideoErrorCorrection:
{
DEBUG_PRINT_LOW("venc_set_param:OMX_IndexParamVideoErrorCorrection");
Expand Down

0 comments on commit 54eff12

Please sign in to comment.