diff options
author | Shyam Pallapothu <shyamp@google.com> | 2011-04-20 21:00:48 -0700 |
---|---|---|
committer | Shyam Pallapothu <shyamp@google.com> | 2011-04-20 21:00:48 -0700 |
commit | 32ed3f4dad00f8a65f7e6b38402c70d5341c57eb (patch) | |
tree | bb31aab34aa099ce0db6bdeefa72a0acab3b6e74 /libvideoeditor/osal | |
parent | 947721ba962c19913b76658cdbb19ae8c77c9c50 (diff) | |
download | frameworks_av-32ed3f4dad00f8a65f7e6b38402c70d5341c57eb.zip frameworks_av-32ed3f4dad00f8a65f7e6b38402c70d5341c57eb.tar.gz frameworks_av-32ed3f4dad00f8a65f7e6b38402c70d5341c57eb.tar.bz2 |
Fix for issue 4133431 "Remove OSAL layer" in engine part
Change-Id: I9e2e142bcdf3153c529b790e368caea4fdb65ac8
Diffstat (limited to 'libvideoeditor/osal')
-rwxr-xr-x | libvideoeditor/osal/inc/M4OSA_Memory.h | 13 | ||||
-rwxr-xr-x | libvideoeditor/osal/src/LVOSA_FileReader_optim.c | 2 | ||||
-rwxr-xr-x | libvideoeditor/osal/src/M4OSA_Thread.c | 2 | ||||
-rwxr-xr-x | libvideoeditor/osal/src/M4PSW_MemoryInterface.c | 95 |
4 files changed, 2 insertions, 110 deletions
diff --git a/libvideoeditor/osal/inc/M4OSA_Memory.h b/libvideoeditor/osal/inc/M4OSA_Memory.h index d0bb49c..d060602 100755 --- a/libvideoeditor/osal/inc/M4OSA_Memory.h +++ b/libvideoeditor/osal/inc/M4OSA_Memory.h @@ -45,19 +45,6 @@ M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_MemAddr32 M4OSA_malloc (M4OSA_UInt32 size M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_Void M4OSA_free (M4OSA_MemAddr32 address); -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_Void M4OSA_memset (M4OSA_MemAddr8 address, - M4OSA_UInt32 size, - M4OSA_UInt8 value); - -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_Void M4OSA_memcpy (M4OSA_MemAddr8 outputBlock, - M4OSA_MemAddr8 inputBlock, M4OSA_UInt32 size); - -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_MemAddr8 M4OSA_memmove(M4OSA_MemAddr8 outputBlock, - M4OSA_MemAddr8 inputBlock, - M4OSA_UInt32 size); - -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_Int32 M4OSA_memcmp (M4OSA_MemAddr8 address1, - M4OSA_MemAddr8 address2, M4OSA_UInt32 size); M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_ERR M4OSA_randInit(void); diff --git a/libvideoeditor/osal/src/LVOSA_FileReader_optim.c b/libvideoeditor/osal/src/LVOSA_FileReader_optim.c index 4cf5fd8..dd4d269 100755 --- a/libvideoeditor/osal/src/LVOSA_FileReader_optim.c +++ b/libvideoeditor/osal/src/LVOSA_FileReader_optim.c @@ -207,7 +207,7 @@ M4OSA_FilePosition M4OSA_FileReader_BufferCopy(M4OSA_FileReader_Context_optim* a copysize = apContext->buffer[i].size - offset; copysize = (size < copysize) ? size : copysize; - M4OSA_memcpy(pData, apContext->buffer[i].data + offset, copysize); + memcpy((void *)pData, (void *)(apContext->buffer[i].data + offset), copysize); apContext->buffer[i].remain -= copysize; apContext->buffer[i].nbFillSinceLastAcess = 0; diff --git a/libvideoeditor/osal/src/M4OSA_Thread.c b/libvideoeditor/osal/src/M4OSA_Thread.c index 08a25fc..c17ddf4 100755 --- a/libvideoeditor/osal/src/M4OSA_Thread.c +++ b/libvideoeditor/osal/src/M4OSA_Thread.c @@ -646,7 +646,7 @@ M4OSA_ERR M4OSA_SetThreadSyncName(M4OSA_Context context, return M4ERR_ALLOC; } - M4OSA_memcpy((M4OSA_MemAddr8)threadContext->name, (M4OSA_MemAddr8)name, + memcpy((void *)threadContext->name, (void *)name, nameSize); } diff --git a/libvideoeditor/osal/src/M4PSW_MemoryInterface.c b/libvideoeditor/osal/src/M4PSW_MemoryInterface.c index 1dd4d3a..3128de2 100755 --- a/libvideoeditor/osal/src/M4PSW_MemoryInterface.c +++ b/libvideoeditor/osal/src/M4PSW_MemoryInterface.c @@ -84,100 +84,5 @@ M4OSA_Void M4OSA_free (M4OSA_MemAddr32 address) free(address); } - -/** - ************************************************************************ - * @fn M4OSA_Void M4OSA_memset(M4OSA_MemAddr8 block, - * M4OSA_UInt32 size, - * M4OSA_UInt8 value) - * @brief this function initializes the provided memory block with value - * @note - * @param block (IN): address of block to fill - * @param size (IN): size of the provided block - * @param value (IN): value used for initialization - * @return none - ************************************************************************ -*/ - -M4OSA_Void M4OSA_memset(M4OSA_MemAddr8 block, - M4OSA_UInt32 size, - M4OSA_UInt8 value) -{ - memset((void*)block, value, size); -} - - -/** - ************************************************************************ - * @fn M4OSA_Void M4OSA_memcpy(M4OSA_MemAddr8 outputBlock, - * M4OSA_MemAddr8 inputBlock, - * M4OSA_UInt32 size) - * @brief this function copies 'size' bytes from inputBlock to outputBlock - * @note - * @param outputBlock (IN): address of block to fill - * @param inputBlock (IN): address of the input block - * @param size (IN): size of the block to copy (in bytes) - * @return none - ************************************************************************ -*/ - -M4OSA_Void M4OSA_memcpy(M4OSA_MemAddr8 outputBlock, - M4OSA_MemAddr8 inputBlock, - M4OSA_UInt32 size) -{ - memcpy((void*)outputBlock, (void*)inputBlock, size); -} - -/** - ************************************************************************ - * @fn M4OSA_MemAddr8 M4OSA_memmove(M4OSA_MemAddr8 outputBlock, M4OSA_MemAddr8 inputBlock, M4OSA_UInt32 size) - * @brief this function moves 'size' bytes from inputBlock to outputBlock - * unlike M4OSA_memcpy, the two buffers can have an overlap. - * @note increment memcpy byte number (François VALETTE) - * @param outputBlock (IN): address of block to fill - * @param inputBlock (IN): address of the input block - * @param size (IN): size of the block to copy (in bytes) - * @return address of the output block, i.e. the first parameter - ************************************************************************ -*/ -M4OSA_MemAddr8 M4OSA_memmove(M4OSA_MemAddr8 outputBlock, - M4OSA_MemAddr8 inputBlock, - M4OSA_UInt32 size) -{ - return memmove((void*)outputBlock, (void*)inputBlock, size); -} - -/** - ************************************************************************ - * @fn M4OSA_Int32 M4OSA_memcmp(M4OSA_MemAddr8 address1, M4OSA_MemAddr8 address2, M4OSA_UInt32 size) - * @brief this function compares the first 'size' bytes of address1 and - 'address2' and return a value indicating their relationship. - * @note - * @param address1 (IN): memory address 1 - * @param address2 (IN): memory address 2 - * @param size (IN): size of the block to compare (in bytes) - * @return +1, if first bytes of adress1 are smaller than those of address2 - * @return 0, if both blocks are identical - * @return -1, if first bytes of address1 are bigger than those of address2 - ************************************************************************ -*/ - -M4OSA_Int32 M4OSA_memcmp(M4OSA_MemAddr8 address1, - M4OSA_MemAddr8 address2, - M4OSA_UInt32 size) -{ - M4OSA_Int32 i32_result = memcmp(address1, address2, size); - if (i32_result > 0) { - return 1; - } - else if (i32_result < 0) { - return((M4OSA_Int32)-1); - } - return 0; -} - - - - #endif |