[DOC] Update ReadMe ReadMe now contains: 1. Build Information for QNX 2. Build Information for Linux 3. API Information 4. API call flow 5. Version Info of headers in packages folder. Change-Id: If76f6bae18bfac0cb9c6d918d365f5263c539d0d Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[LIBDCE] Update packages with XDAIS, FC Headers This patch adds XDAIS, FC headers included by the codec header files and makes necessary build changes to include them. Change-Id: I6de3988291e6f4fa229b47a119431d83be1025c2 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[QNX-MAKE] QNX Build system changes The changes include: 1. Redirecting Include Path to packages/ folder for the CE, XDAIS, XDCTOOLS and IVAHD_CODECS. 2. Since xdc_target_types__ is defined as gnu/targets/std.h in libdce.h, the definition has been removed rom the common.mk files. This helps as the client application need not define xdc_target_types__ as a compiler option. 3. Since xdc/std.h is included in libdce.h, it is being removed from the test applications. 4. Adding trace variables to libdce make. Change-Id: I1e2675901340daefefe865a03757459e41f1d837 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[TRACE] Debug Log levels enabled This patch adds debug log levels to libdce. To enable traces, set the DCE_DEBUG_ENABLE. The trace level can be changed by setting DCE_DEBUG_LEVEL= [1/2/3] during compile time. Change-Id: I4bed53cc6e3af938c02221376662318e3a1b8ec4 Signed-off-by: Sathishkumar <x0203598@ti.com>
[LINUX] Fix for make install This patch fixes make install. All the required headers are copied to $(includedir)/dce on make install. Unused variables(X11 and WAYLAND) are removed in Makefile.am and pkg-config on libmmrpc is removed as no libmmrpc.pc is available. xdc_target_types__=gnu/targets/std.h is added to libdce.h, so that applications need not do it when using libdce.h. Change-Id: I8cc70aa2102becdbdc4c6b1e38e2aaa91739c4cc Signed-off-by: Sathishkumar <x0203598@ti.com>
[LIBDCE] Add function descriptor in libdce header file This patch adds function descriptors in the libdce.h. The xdc/std.h inclusion is shifted from libdce.c to libdce.h to remove the need of client application including xdc/std.h. Change-Id: I4b9e6f12643b130a2cf1d317c4fed595008c7812 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[QNX-MAKE] Include XDC, CE, XDAIS, IVAHD Headers from packages This patch adds std.h from GNU and it directs the build system to include Codec Engine, XDCTools, XDAIS and IVAHD Codec Header files from the packages/ folder. This removes the need for libdce users to install these tools. Change-Id: I368a5aaff4c1edeaf6eae794bea9971787e036e3 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[LIBDCE] Added codec, xdais and xdctools headers This patch adds codec,xdais and xdctools headers for libdce compilation at HLOS level. Since HLOS code doesn't refer to the tools directly, this patch provides copy for all the required headers. Note# These headers need to be updated for every release if the tools versions are changed. Version Info of the added Headers: Tools: XDC version : xdctools_3_25_02_70 CE version : codec_engine_3_24_00_08 XDAIS version : xdais_7_24_00_04 IVAHD_Codecs: H.264 Dec : 02.00.13.00 MJPEG Dec : 01.00.11.01 MPEG-4 Dec : 01.00.13.00 VC-1 Dec : 01.00.00.11 MPEG-2 Dec : 01.00.12.00 SVC Dec : 00.06.00.00 H.264 Enc : 02.00.06.01 MJPEG Enc : 01.00.02.01 SVC Enc : 00.02.00.05 Change-Id: Id2307e2376d3ba0c13464c1b21cdba53d8f997f2 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
[LIBDCE] Mutual exclusion of Engine_open and Engine_close This patch uses semaphores to mutually exclude: 1. dce_init() and Engine_open() IPU call. This solves a hang on IPU side during multiple instances. pthread mutex used within dce_init is replaced with semaphores as mutex is valid only across threads and not processes. 2. dce_deinit() and Engine_close(). This solves a hang on IPU side during multiple instances. Change-Id: Ia4d31582ebf0536142dee389e9601eae0169fb22 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[LINUX] Moving Linux specific functions to new c file This patch moves Linux specific functions to libdce_linux.c. It also takes in the DRM Initialization cleanup changes in dce_init from: https://gerrit.ext.ti.com/gerrit/omap/#/c/12888 Change-Id: I570341c8dfbe1d120bc89071a86020b6ba5d4cac Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[LINUX] Expose dce_init and dce_deinit calls to user This patch changes the declaration of dce_init() and dce_deinit() to what is expected by Gstreamer for GLP and exposes it. This involves returning a struct omap_device pointer as void * during dce_init() and receiving a struct omap_device during dce_deinit(). The IPC initialization/deinitialization has been separated out of dce_init()/dce_deinit() into two static functions dce_ipc_init(), dce_ipc_deinit(). These functions are now included within Engine_open(), Engine_close() for all OSs. Change-Id: I86f4778cbd80f0a83aa3c39d8183bb3155a2a391 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[LINUX] Expose API to lock and Unlock IO Buffers This patch exposes APIs: dce_buf_lock(int num, size_t *handle) dce_buf_unlock(int num, size_t *handle) to lock and unlock the Input/Output Buffers respectively. The change is specific to GLP. The DRM driver pins and unpins tiler address for the IO Buffers whenever the rpmsg_rpc driver calls map_attachment and unmap_attachment() respectively. As the rpmsg_rpc driver invokes these calls during every process call, the reference buffer addresses (address of past locked buffers) held by the codec gets invalidated. That is, these addresses will not continue to map to the same memory region (YUV reference buffer) as before. Most often, these virtual addresses may point to the next YUV Buffer translated from the MPU. These APIs put a condition on the map and unmap() within rpmsg_rpc. The expectation from the application is to call dce_buf_lock() for the inArgs.inputID buffer and dce_buf_unlock() for the outArgs.freeBufID buffer. Change-Id: Ic749c6b18385f9052a2eeb4e16959063c5efab5e Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[DCE] Align MmRpc offset setting with GLP Rpmsg_rpc This patch aligns setting translation[i].offset field of MmRpc Translation Array (XltAry) with the understanding of rpmsg_rpc of GLP. Rpmsg_rpc of GLP calculates: primary_offset as mmrpc_params.addr - mmprc_params.base and secondary_offset as translation[i].offset and sums both to get to the location of the address to be translated. Whereas in QNX rpmsg_rpc, the primary offset was subtracted from the secondary offset. This logic has now been modified in IPC_03_10_00_07_eng to align with the rpmsg_rpc of GLP. Change-Id: Ied11e78891119312f35162e336cd3dded9e8997a Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[GLP] Enable DMA Buf Handle This patch converts all MmRpc_Pointer_Param call to MmRpc_OffsetPointer_Param to take care of MemHeader. This is not needed from a QNX perspective but is needed from a Linux perspective. There should no added latency is QNX due to this change as the rpmsg_rpc kernel path is still the same. This patch invokes memplugin_share() for the buffers allocated through DCE to get the corresponding DMA Buf Handles for GLP. For QNX, the return value is expected to be 0. For linux, the patch adds the logic for Single vs Multiplanar buffers. For linux, the memplugin_share() logic is modified to store and retireve the same dma_buf_fd rather than getting a dup() each time. These changes makes the following assumptions: 1. All the parameter buffers are allocated through DCE/MemPlugin. 2. The CLient passes Virtual pointers, rather than DMA Buf Handles to libdce for parameter buffers. 3. For IO Buffers, the client passes DMA Buf Handles and are not allocated using DCE/MemPlugin. This patch assumes MmRpc is exposing translation[i].base. Change-Id: I7d13f4a4d69fbe8b6dd0317e2a860f0df2061ef9 Signed-off-by: Sunita Nadampalli <sunitan@ti.com> Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
[LIBDCE] Adding dce_enc_test Adding dce_enc_test for H.264 baseline and High Profile. Adding MPEG4/H263 simple Profile. Change-Id: I29b5043210d3a79e5ab859c5781bb89584714dfa Signed-off-by: Buddy Liong <a0270631@ti.com>