器件型号:PROCESSOR-SDK-DRA8X-TDA4X
您好!
我已在标量器节点之后将编码器节点添加 到现有 的 usecase app_single_cam 中。
但当我尝试调用 tivxVideoEncoderNode()函数时,它会在运行时提供以下错误。
[MCU2_1] 62.718570 s:超时:TOPADD_WAIT_ON_SYNC 超时、等待写回0x05a80000。
[MCU2_1] 82.984741 s:appHwaVideoCodecMemAlloc:错误:Alloc 失败!!!
这是代码片段:-
--------------------------------------
if ((image_width!= obj->display_params.outWidth)||(image_height!= obj->display_params.outHeight))
{
vx_uint16 scaler_out_w、scaler_out_h;
obj->scaler_enable = vx_tru_e;
appIssGetResizeParams (image_width、image_height、obj->display_params.outWidth、obj->display_params.outHeight、&scaler_out_w、 标量器_out_h)(&S);
obj->scaler_out_img = vxCreateImage (obj->context、scaler_out_w、scaler_out_h、vx_DF_image_NV12);
obj->scalerNode = tivxVpacMscScaleNode (obj->graph, obj->Y8_R8_C2、obj->scaler_out_img、NULL、 空、空);
TIVxSetNodeParameterNumBufByIndex (obj->scalerNode、1U、obj->num_cap_buf);
vxSetNodeTarget (obj->scalerNode、vx_target_string、TIVX_TARGET_VPAC_MSC1);
obj->display_params.outHeight = scaler_out_h;
obj->display_params.outWidth = scaler_out_w;
display_image = obj->scaler_out_img;
assert_vx_object (obj->configuration_obj = vxCreateUserDataObject (obj->context、"tivx_video_encoder_params_t"、sizeof (tivx_video_encoder_params_t)、NULL)、
(enum vx_type_e) vx_type_user_data_object);
vx_call (vxCopyUserDataObject (obj->configuration_obj、0、sizeof (tivx_video_encoder_params_t)、&obj->params、vx_write_only、 vx_memory_type_host);
printf("\t 复制用户创建的初始化...! \n");
obj->max_bitstream_size =((uint32_t)(scaler_out_w / 16)
*(uint32_t)(scaler_out_w / 16)*最差_QP_size)
+((scaler_out_h >> 4)* coded_buffer_info_section_size);
assert_vx_object (obj->bitstream_obj = vxCreateUserDataObject (obj->上下文、"tivx_video_bitstream_t"、sizeof (uint8_t)* obj->max_bitstream_size、NULL)、
(enum vx_type_e) vx_type_user_data_object);
assert_vx_object (obj->node_encode = tivxVideoEncoderNode (obj->graph、obj->configuration_obj、display_image、obj->bitstream_obj)、vx_type_node);
vx_status = vxGetStatus ((vx_reference) obj->node_encode);
如果(vx_Success = status)
{
printf ("成功 d\n"、status);
}
//tivxSetNodeParameterNumBufByIndex (obj->node_encode、3U、obj->num_cap_buf
vx_call (vxSetNodeTarget (obj->node_encode、vx_target_string、TIVX_TARGET_VENC1));
如果 我在这里遗漏了一些东西、请为我提供帮助。
谢谢、此致
Mausam Sinha