qcom2 init hevc tier correctly (#19496)

* qcom2 init tier correctly

* need to cast

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1c21fc100d
This commit is contained in:
ZwX1616 2020-12-14 16:24:49 -08:00 committed by GitHub
parent 02a2f9ca15
commit 1f99fdfc50
1 changed files with 8 additions and 4 deletions

View File

@ -288,22 +288,26 @@ void encoder_init(EncoderState *s, const char* filename, int width, int height,
assert(err == OMX_ErrorNone);
if (h265) {
#ifndef QCOM2
// setup HEVC
#ifndef QCOM2
OMX_VIDEO_PARAM_HEVCTYPE hecv_type = {0};
OMX_INDEXTYPE index_type = (OMX_INDEXTYPE) OMX_IndexParamVideoHevc;
#else
OMX_VIDEO_PARAM_PROFILELEVELTYPE hecv_type = {0};
OMX_INDEXTYPE index_type = OMX_IndexParamVideoProfileLevelCurrent;
#endif
hecv_type.nSize = sizeof(hecv_type);
hecv_type.nPortIndex = (OMX_U32) PORT_INDEX_OUT;
err = OMX_GetParameter(s->handle, (OMX_INDEXTYPE)OMX_IndexParamVideoHevc,
err = OMX_GetParameter(s->handle, index_type,
(OMX_PTR) &hecv_type);
assert(err == OMX_ErrorNone);
hecv_type.eProfile = OMX_VIDEO_HEVCProfileMain;
hecv_type.eLevel = OMX_VIDEO_HEVCHighTierLevel5;
err = OMX_SetParameter(s->handle, (OMX_INDEXTYPE)OMX_IndexParamVideoHevc,
err = OMX_SetParameter(s->handle, index_type,
(OMX_PTR) &hecv_type);
assert(err == OMX_ErrorNone);
#endif
} else {
// setup h264
OMX_VIDEO_PARAM_AVCTYPE avc = { 0 };