查看了vx_types.h,似乎没有YUV420P的格式选择。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我将您的问题升级到了英文论坛,请关注以下帖子的回复:
e2e.ti.com/.../tda4vm-can-ldc-convert-yuv420p-image-into-nv12-yuv420sp-image
好的,那请问有没有什么模块可以满足我的需求,将YUV420P转为NV12?
参考英文论坛给出的建议:
But how do you get YUV420 planar data? Is it semi-planar data?
I really dont thing any module in the TDA4 supports this format.
我们通过网络获取H264数据,解码后得到了YUV420P。由于算法需要YUV420SP,为了保证实时性,所以需要了解是否有个模块可以支持转换。
如果可能的话,你能从H264解码阶段得到YUV420SP吗?如果可行,那么我们可以使用 TDA4 SoC 中的其他模块。
应该是解码阶段获得YUV420P吧?我们可以获取到解码后的YUV420P图像。
YUV420P(YUV420 complete planar)不能在任何模块中处理或转换。建议从解码器中获取 YUV420 SP (YUV420 Semi Planar) ,大多数模块都支持 YUV420SP。
我们需要的就是YUV420SP的数据,如果没有模块可以将YUV420P转化为YUV420SP,那我们只能用ffmpeg去转了。
请参考:
But which module decodes incoming h.264 stream? Is the TI decoder? Because if it is, then this decoder supports YUV420SP output format.
Yes, there is no HW module to convert from YUV420P to YUV420SP format. You would probably have to use DMA, but i think it would be inefficient.
我们是通过自己写的库经过网络输入h264流,解码器是基于ffmpeg实现的,不是基于gstreamer,因为在使用v4l2h264dec模块的时候存在一些问题,关于v4l2h264dec的问题我有另提:e2e.ti.com/.../tda4vm-v4l2h264dec-decode-issue。
因此没有使用ti的硬件模块解码,导致目前帧率勉强达到要求。
昨天使用ffmpeg转换,耗时大概1-2ms,我们决定继续使用ffmpeg。这个问题可以关闭了,谢谢。