Other Parts Discussed in Thread: AM5728
工具/软件:Linux
我需要将2个从 AM5728上的2个不同 VIP 端口捕获的 DMABUF 复合数据。 我使用 ti-gc320-tests git 存储库和 Vivante GC320 PDF 文档作为示例。
到目前为止、我可以将 VIP 的 DMABUF 馈送到 GC320、并成功执行像素格式转换、缩放和旋转等操作。 我现在需要做的是合成。
具体而言、我正在研究中的示例代码:
TI-gc320-test/tests/src/test/hal/common/UnitTest/units/gal2d/MultiSourceBlitRotation/101/101.c
当我在我的现有测试应用程序中实施此代码时、当我调用 gco2D_MultiSourceBlit 时、我始终会收到错误"gcvSTATUS_not _supported"。 以下是我的测试应用中的函数:
/** * gc320 renderCompositeFrames() *用途:执行一个渲染周期来组合2个输入 rame * *@param inputBuffer1 - DMABUF 类型输入缓冲 器*@param DMABUF 类型输入缓冲器 * *@return inputer2 - return bool succeed 或 failure */ gpdomabol Gc320:* dCompositef bufferbumpuedBuffer2 ****** gceSTATUS 状态; //目标矩形 gcsRECT targetRect; gcsRECT sourceVLRect; gcsRECT sourceIRRect; //目标矩形 targetRect.Left = 0; targetRect.top = 0; targetRect.right = frame_width;//这些会影响输出图像(目标矩形) targetRect.bottom = frame_height;//这些会影响输出图像(目标矩形) // VL Source Rectangle sourceVLRect.left = 0; sourceVLRect.top = 0; sourceVLRect.right = frame_width;//这些会影响输入图像(源矩形) sourceVLRect.bottom = frame_height;//这些会影响输入图像(源矩形) // IR 源矩形 sourceIRRect.left = 0; sourceIRRect.top = 0; sourceIRRect.right = frame_width;//这些会影响输入图像(源矩形) sourceIRRect.bottom = frame_height;//这些会影响输入图像(源矩形) //为 VL 设置底层缓冲区 void *VLDataPtr = OMA_BO_MAP (inputBuffer1->bo[0]);// mmap the DMABUF configureYuvSourceSurfaceForVL (VLDataPtr); //为 IR 设置底层缓冲区 void * IRDataPtr = OMA_BO_MAP (inputBuffer2->bo[0]);// mmap the DMABUF configureYvSourceSurfaceForIR (IRDataPtr); //用灰色清除目标温度 gcmONERROR (Gal2DCleanSurface (m_Hal、m_TempDstSurf、color_ARGB8 (0x00、0x80、0x80、 0x80))); // VL 的索引1和 IR 的索引2 ////////////////////////////////////////// VL ////////////////////////////////////////////////////////////////////////////// gcmONERROR (gco2D_SetCurrentSourceIndex (m_Engine2d、0)); gcmONERROR (gco2D_SetGenericSource ( M_Engine2d、 (gctuint32_ptr)&m_VLSrcVirtAddr、1、 (gctuint32_ptr)&m_VLSrcStride、1、 GcvLINEAR、 M_VLSrcFormat、 gcvSURF_0_degree, (gctuint32)inputBuffer1->width, (gctuint32)inputBuffer1->height); gcmONERROR (gcode_SetSource (m_Engine2d、&sourceVLRect)); gcmONERROR (gco2D_SetROP (m_Engine2d、0xCC、0xCC)); //禁用镜像 gcmONERROR (gco2D_SetBitBlitMirror (m_Engine2d、gcvFALSE、gcvFALSE)); ////////////////////////////////////////// IR//////////////////////////////////////////////////////////////////////////////////////////// gcmONERROR (gco2D_SetCurrentSourceIndex (m_Engine2d、1)); gcmONERROR (gco2D_SetGenericSource ( M_Engine2d、 (gctuint32_ptr)&m_IRSrcVirtAddr、1、 (gctuint32_ptr)&m_IRSrcStride、1、 GcvLINEAR、 M_IRSrcFormat、 gcvSURF_0_degree, (gctuint32)inputBuffer2->width, (gctuint32)inputBuffer2->height); gcmONERROR (gco2D_SetSource (m_Engine2d、&sourceIRRect)); gcmONERROR (gco2D_SetROP (m_Engine2d、0xCC、0xCC)); //禁用镜像 gcmONERROR (gco2D_SetBitBlitMirror (m_Engine2d、gcvFALSE、gcvFALSE)); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //禁用镜像 gcmONERROR (gco2D_SetBitBlitMirror (m_Engine2d、gcvFALSE、gcvFALSE)); gcmONERROR (gco2D_SetClipping (m_Engine2d、&targetRect)); gcmONERROR (gco2D_SetGenericTarget ( M_Engine2d、 (gctuint32_ptr)&m_TempDstPhysAddr、1、 (gctuint32_ptr)&m_TempDstStride、1、 GcvLINEAR、 M_TempDstFormat、 gcvSURF_0_degree, M_TempDstWidth、 M_TempDstHeight); gcmONERROR (gco2D_MultiSourceBlit (m_Engine2d、0xF、&targetRect、1)); //禁用镜像 gcmONERROR (gco2D_SetBitBlitMirror (m_Engine2d、gcvFALSE、gcvFALSE)); gcmONERROR (gcode_Flush (m_Engine2d)); /*绘制结果以显示曲面。 * gcmONERROR (gco2D_SetGenericSource ( M_Engine2d、 (gctuint32_ptr)&m_TempDstPhysAddr、1、 (gctuint32_ptr)&m_TempDstStride、1、 GcvLINEAR、 M_TempDstFormat、 gcvSURF_0_degree, M_TempDstWidth、 M_TempDstHeight); gcmONERROR (gcode_SetSource (m_Engine2d、&targetRect)); gcmONERROR (gco2D_SetGenericTarget ( M_Engine2d、 (gctuint32_ptr)&m_TempDstPhysAddr、1、 (gctuint32_ptr)&m_TempDstStride、1、 GcvLINEAR、 M_TempDstFormat、 gcvSURF_0_degree, M_TempDstWidth、 M_TempDstHeight); gcmONERROR (gco2D_SetStretchRectFactors ( M_Engine2d、 目标矩形(&T)、 目标矩形(&T) )); gcmONERROR (gcod2D_StretchBlit ( M_Engine2d、 1、 目标矩形(&T)、 0xCC、0xCC、 M_DstFormat )); gcmONERROR (gcode_Flush (m_Engine2d)); gcmONERROR (gcHAL_commit (m_hal、gcvTRUE)); 返回 gcvTRUE; OnError: fprintf (stderr、"%s"(%d)失败:%s\n"、__function__、__line__、gcos_DebugStatus2Name (status); 返回 gcvFALSE; }
是否不支持多源代码点蚀? 如果是、上面的代码有什么问题? 感谢您的支持。
该文档指出:
Linux 内核版本:
uname -r 4.4.41
gal 版本:
GC320 IRQ:304 Galcore 版本5.0.11.33433
GC320 IRQ: 304
[318156.999191] Galcore version 5.0.11.33433

