2586
- 收藏
- 点赞
- 分享
- 举报
音频丢帧
3556v200平台,在音频自环的时候,设定的音频参数时采样率8000,帧长320,精度16位,应该帧率为25帧,但实际帧率只有20、21,每秒丢了4、5帧
liteos端
[AI] Version: [Hi3559V200_MPP_V1.0.1.5 B010 Release], Build Time: [Sep 19 2019, 09:26:48]
-----AI DEV ATTR----------------------------------------------------------------
AiDev WorkMod SampR BitWid ChnCnt ClkSel SoundMod PoiNum ExFlag FrmNum
0 i2s_mas 8kHz 16bit 2 0 mono 320 0 5
-----AI DEV STATUS0-------------------------------------------------------------
AiDev IntCnt fifoCnt buffInt FrmTime MaxFrmTime TranLen IsrTi****tt:40073
me
0 1672 mapi_acap.c:959
0 0 40001 40108 1280 130
-----AI DEV STATUS1-------------------------------------------------------------
AiDev MaxIsrTime CBPhy CBSize ROffSet WOffSet
0 157****tt:40244
864dd000 3840 500 0
-----AI DEV EXTEND STATUS-------------------------------------------------------
AiDev enTrack bMute Volume
0 0 N 0
-----AI CHN STATUS--------------------------------------------------------------
AiDev AiChn State Mode BufFul UsrQueLost UsrFrmDepth u32Data0 u32Data1 UserGet UserRls
0 0 enable normal 0 0 5 1 1 1653 1579
-----AI CHN RESAMPL****tt:39687
E STATUS-----------------------------------------------------
AiDev AiChn State bResmp PoiNum InSampR OutSampR
0 0 enable N 0 (null) (null)
-----AI CHN VQE STATUS0---------------------------------------------------------
AiDev AiChn State bVqe workmod RATE PoiNum bAgc bEq bHpf bRnr bHdr bDrc WrFile
0 0 enable Y comm 8kHz 320 Y N Y N N N N
-----AI CHN VQE STATUS1---------------------------------------------------------
AiDev AiChn State bAnr bUsrmod NrIntensity NoiseDbThr SpProSwi
0 0 enable Y Y 10 50 0
-----AI CHN VQE STATUS2---------------------------------------------------------
AiDev AiChn State bA****tt:40028
gc bUsrmod NoiseSupSwi AdjustSpeed ImproveSNR MaxGain NoiseFloor OutputMode TargetLevel UseHPF
0 0 enable Y N 1 1 1 20 -40 1 -10 1
-----AI CHN VQE STATUS3---------------------------------------------------------
AiDev AiChn State bHpf bUsrmod HpfFreq
0 0 enable Y Y 80
-----AI CHN VQE STATUS4---------------------------------------------------------
AiDev AiChn State bAec bUsrmod****tt:80028
CngMode DTHnlStQTh NrAlPsEngy NrClnSupEngy AecAo AecFail
0 0 enable mapi_acap.c:959
Y N open 16384 1 2 ( 0, 0) 1597
-----AI CHN VQE STATUS5---------------------------------------------------------****tt:39980
linux端函数:
while(1)
{
gettimeofday(&end, NULL);
s32Ret = HI_MAPI_ACAP_GetFrame(acapHdl, acapChnHdl, &stFrm, &stAecFrm);
if (s32Ret != HI_SUCCESS) {
printf("-------HI_MAPI_ACAP_GetFrame error:0x%x\n", s32Ret);
continue;
}
s32Ret = HI_MAPI_AO_SendFrame(hAoHdl, hAoChnHdl, &stFrm, 500);
if (s32Ret != HI_SUCCESS) {
printf("HI_MAPI_AO_SendFrame error:0x%x\n", s32Ret);
}
s32Ret = HI_MAPI_ACAP_ReleaseFrame(acapHdl, acapChnHdl, &stFrm, &stAecFrm);
if (s32Ret != HI_SUCCESS) {
printf("HI_MAPI_ACAP_ReleaseFrame error:0x%x\n", s32Ret);
}
n_start++;
tt = (end.tv_sec-start.tv_sec) * 1000000 + (end.tv_usec - start.tv_usec);
if (end.tv_sec-start.tv_sec > 0)
{
printf("111111111 tt:%d\n", n_start - n_end);
n_end = n_start;
}
printf("****tt:%d\n",tt);
start = end;
},
HI_MAPI_ACAP_GetFrame()调用
{
s32Ret = HI_MPI_AI_GetFrame(AcapHdl, AcapChnHdl, &stFrm, &stAecFrm, -1);
}
HI_MPI_AI_GetFrame是阻塞的,
测试结果如下:
mapi_acap.c:959
111111111 tt:21
****tt:39680
mapi_acap.c:959
****tt:40073
mapi_acap.c:959
****tt:40335
mapi_acap.c:959
****tt:39608
mapi_acap.c:959
****tt:80277
mapi_acap.c:959
****tt:39715
mapi_acap.c:959
****tt:40118
mapi_acap.c:959
****tt:40166
mapi_acap.c:959
****tt:39721
mapi_acap.c:959
****tt:80301
mapi_acap.c:959
****tt:39682
mapi_acap.c:959
****tt:40035
mapi_acap.c:959
****tt:40272
mapi_acap.c:959
****tt:39694
mapi_acap.c:959
****tt:80307
mapi_acap.c:959
****tt:39714
mapi_acap.c:959
****tt:39998
mapi_acap.c:959
****tt:40280
mapi_acap.c:959
****tt:39745
mapi_acap.c:959
****tt:80256
mapi_acap.c:959
****tt:39726
mapi_acap.c:959
111111111 tt:21
****tt:40003
mapi_acap.c:959
****tt:40305
mapi_acap.c:959
****tt:39651
mapi_acap.c:959
****tt:80318
mapi_acap.c:959
****tt:39705
mapi_acap.c:959
****tt:40018
mapi_acap.c:959
****tt:40299
mapi_acap.c:959
****tt:39682
mapi_acap.c:959
****tt:80334
mapi_acap.c:959
****tt:39689
mapi_acap.c:959
****tt:39972
mapi_acap.c:959
****tt:40309
mapi_acap.c:959
****tt:39701
mapi_acap.c:959
****tt:80304
mapi_acap.c:959
****tt:39694
mapi_acap.c:959
****tt:40037
mapi_acap.c:959
****tt:40248
mapi_acap.c:959
****tt:39825
mapi_acap.c:959
****tt:80183
mapi_acap.c:959
****tt:39713
mapi_acap.c:959
****tt:40025
mapi_acap.c:959
111111111 tt:21
HI_MAPI_ACAP_GetFrame函数也没有报错,但就是少了帧数,还是很均匀的
liteos端
[AI] Version: [Hi3559V200_MPP_V1.0.1.5 B010 Release], Build Time: [Sep 19 2019, 09:26:48]
-----AI DEV ATTR----------------------------------------------------------------
AiDev WorkMod SampR BitWid ChnCnt ClkSel SoundMod PoiNum ExFlag FrmNum
0 i2s_mas 8kHz 16bit 2 0 mono 320 0 5
-----AI DEV STATUS0-------------------------------------------------------------
AiDev IntCnt fifoCnt buffInt FrmTime MaxFrmTime TranLen IsrTi****tt:40073
me
0 1672 mapi_acap.c:959
0 0 40001 40108 1280 130
-----AI DEV STATUS1-------------------------------------------------------------
AiDev MaxIsrTime CBPhy CBSize ROffSet WOffSet
0 157****tt:40244
864dd000 3840 500 0
-----AI DEV EXTEND STATUS-------------------------------------------------------
AiDev enTrack bMute Volume
0 0 N 0
-----AI CHN STATUS--------------------------------------------------------------
AiDev AiChn State Mode BufFul UsrQueLost UsrFrmDepth u32Data0 u32Data1 UserGet UserRls
0 0 enable normal 0 0 5 1 1 1653 1579
-----AI CHN RESAMPL****tt:39687
E STATUS-----------------------------------------------------
AiDev AiChn State bResmp PoiNum InSampR OutSampR
0 0 enable N 0 (null) (null)
-----AI CHN VQE STATUS0---------------------------------------------------------
AiDev AiChn State bVqe workmod RATE PoiNum bAgc bEq bHpf bRnr bHdr bDrc WrFile
0 0 enable Y comm 8kHz 320 Y N Y N N N N
-----AI CHN VQE STATUS1---------------------------------------------------------
AiDev AiChn State bAnr bUsrmod NrIntensity NoiseDbThr SpProSwi
0 0 enable Y Y 10 50 0
-----AI CHN VQE STATUS2---------------------------------------------------------
AiDev AiChn State bA****tt:40028
gc bUsrmod NoiseSupSwi AdjustSpeed ImproveSNR MaxGain NoiseFloor OutputMode TargetLevel UseHPF
0 0 enable Y N 1 1 1 20 -40 1 -10 1
-----AI CHN VQE STATUS3---------------------------------------------------------
AiDev AiChn State bHpf bUsrmod HpfFreq
0 0 enable Y Y 80
-----AI CHN VQE STATUS4---------------------------------------------------------
AiDev AiChn State bAec bUsrmod****tt:80028
CngMode DTHnlStQTh NrAlPsEngy NrClnSupEngy AecAo AecFail
0 0 enable mapi_acap.c:959
Y N open 16384 1 2 ( 0, 0) 1597
-----AI CHN VQE STATUS5---------------------------------------------------------****tt:39980
linux端函数:
while(1)
{
gettimeofday(&end, NULL);
s32Ret = HI_MAPI_ACAP_GetFrame(acapHdl, acapChnHdl, &stFrm, &stAecFrm);
if (s32Ret != HI_SUCCESS) {
printf("-------HI_MAPI_ACAP_GetFrame error:0x%x\n", s32Ret);
continue;
}
s32Ret = HI_MAPI_AO_SendFrame(hAoHdl, hAoChnHdl, &stFrm, 500);
if (s32Ret != HI_SUCCESS) {
printf("HI_MAPI_AO_SendFrame error:0x%x\n", s32Ret);
}
s32Ret = HI_MAPI_ACAP_ReleaseFrame(acapHdl, acapChnHdl, &stFrm, &stAecFrm);
if (s32Ret != HI_SUCCESS) {
printf("HI_MAPI_ACAP_ReleaseFrame error:0x%x\n", s32Ret);
}
n_start++;
tt = (end.tv_sec-start.tv_sec) * 1000000 + (end.tv_usec - start.tv_usec);
if (end.tv_sec-start.tv_sec > 0)
{
printf("111111111 tt:%d\n", n_start - n_end);
n_end = n_start;
}
printf("****tt:%d\n",tt);
start = end;
},
HI_MAPI_ACAP_GetFrame()调用
{
s32Ret = HI_MPI_AI_GetFrame(AcapHdl, AcapChnHdl, &stFrm, &stAecFrm, -1);
}
HI_MPI_AI_GetFrame是阻塞的,
测试结果如下:
mapi_acap.c:959
111111111 tt:21
****tt:39680
mapi_acap.c:959
****tt:40073
mapi_acap.c:959
****tt:40335
mapi_acap.c:959
****tt:39608
mapi_acap.c:959
****tt:80277
mapi_acap.c:959
****tt:39715
mapi_acap.c:959
****tt:40118
mapi_acap.c:959
****tt:40166
mapi_acap.c:959
****tt:39721
mapi_acap.c:959
****tt:80301
mapi_acap.c:959
****tt:39682
mapi_acap.c:959
****tt:40035
mapi_acap.c:959
****tt:40272
mapi_acap.c:959
****tt:39694
mapi_acap.c:959
****tt:80307
mapi_acap.c:959
****tt:39714
mapi_acap.c:959
****tt:39998
mapi_acap.c:959
****tt:40280
mapi_acap.c:959
****tt:39745
mapi_acap.c:959
****tt:80256
mapi_acap.c:959
****tt:39726
mapi_acap.c:959
111111111 tt:21
****tt:40003
mapi_acap.c:959
****tt:40305
mapi_acap.c:959
****tt:39651
mapi_acap.c:959
****tt:80318
mapi_acap.c:959
****tt:39705
mapi_acap.c:959
****tt:40018
mapi_acap.c:959
****tt:40299
mapi_acap.c:959
****tt:39682
mapi_acap.c:959
****tt:80334
mapi_acap.c:959
****tt:39689
mapi_acap.c:959
****tt:39972
mapi_acap.c:959
****tt:40309
mapi_acap.c:959
****tt:39701
mapi_acap.c:959
****tt:80304
mapi_acap.c:959
****tt:39694
mapi_acap.c:959
****tt:40037
mapi_acap.c:959
****tt:40248
mapi_acap.c:959
****tt:39825
mapi_acap.c:959
****tt:80183
mapi_acap.c:959
****tt:39713
mapi_acap.c:959
****tt:40025
mapi_acap.c:959
111111111 tt:21
HI_MAPI_ACAP_GetFrame函数也没有报错,但就是少了帧数,还是很均匀的
我来回答
回答1个
时间排序
认可量排序
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2016-09-14 12:22:26
-
02017-07-07 15:26:50
-
2019-12-12 20:49:42
-
2017-11-16 09:27:54
-
2018-09-15 15:25:08
-
2016-08-29 09:32:15
-
2014-10-27 09:38:10
-
2023-11-16 11:29:47
-
2017-07-18 10:26:45
-
2017-09-19 15:06:39
-
2014-05-08 14:44:14
-
2018-07-05 14:05:32
-
2014-04-01 09:14:23
-
2014-07-14 17:35:53
-
2024-10-17 17:52:30
-
2017-01-06 08:51:41
-
2017-06-20 12:28:47
-
2017-09-04 11:31:38
-
2017-05-05 17:23:26
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
-
10求HI3519DV500_SDK_V2.0.1.1
-
5有偿求HI3516DV500 + OV5647驱动
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认