Fix for issue 4133431 "Remove OSAL layer" in engine part
Change-Id: I9e2e142bcdf3153c529b790e368caea4fdb65ac8
diff --git a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
index 5dc3970..2fbb573 100755
--- a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
+++ b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
@@ -585,8 +585,8 @@
&ptFrame, &bgFrame, &mixFrame);
// Overwrite the decoded buffer
- M4OSA_memcpy((M4OSA_MemAddr8)ptr,
- (M4OSA_MemAddr8)mixFrame.m_dataAddress, len);
+ memcpy((void *)ptr,
+ (void *)mixFrame.m_dataAddress, len);
}
}
} else if (mAudioMixSettings->bLoop){
diff --git a/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp b/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp
index 28208d1..9368d54 100755
--- a/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp
+++ b/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp
@@ -74,8 +74,8 @@
pMixedOutBuffer->m_bufferSize = pPrimaryTrack->m_bufferSize;
// Before mixing, we need to have only PT as out buffer
- M4OSA_memcpy((M4OSA_MemAddr8)pMixedOutBuffer->m_dataAddress,
- (M4OSA_MemAddr8)pPrimaryTrack->m_dataAddress, pMixedOutBuffer->m_bufferSize);
+ memcpy((void *)pMixedOutBuffer->m_dataAddress,
+ (void *)pPrimaryTrack->m_dataAddress, pMixedOutBuffer->m_bufferSize);
// Initially contains the input primary track
pPTMdata2 = (M4OSA_Int16*)pMixedOutBuffer->m_dataAddress;
@@ -210,8 +210,8 @@
pPTMdata2++;
}
//LOGV("VideoEditorBGAudioProcessing:: Copy final out ");
- M4OSA_memcpy((M4OSA_MemAddr8)pMixedOutBuffer->m_dataAddress,
- (M4OSA_MemAddr8)pBackgroundTrack->m_dataAddress,
+ memcpy((void *)pMixedOutBuffer->m_dataAddress,
+ (void *)pBackgroundTrack->m_dataAddress,
pBackgroundTrack->m_bufferSize);
LOGV("VideoEditorBGAudioProcessing::lvProcessAudioMixNDuck EXIT");
diff --git a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
index c9da6b0..164e2b3 100755
--- a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
@@ -217,8 +217,8 @@
LOGE("loadEditSettings: Malloc error");
return M4ERR_ALLOC;
}
- M4OSA_memset((M4OSA_MemAddr8)mClipList,
- sizeof(M4VSS3GPP_ClipSettings*)*pSettings->uiClipNumber, 0);
+ memset((void *)mClipList,0,
+ sizeof(M4VSS3GPP_ClipSettings*)*pSettings->uiClipNumber);
for(i=0;i<pSettings->uiClipNumber;i++) {
@@ -233,8 +233,8 @@
return M4ERR_ALLOC;
}
// Copy plain structure
- M4OSA_memcpy((M4OSA_MemAddr8)mClipList[i],
- (M4OSA_MemAddr8)pSettings->pClipList[i],
+ memcpy((void *)mClipList[i],
+ (void *)pSettings->pClipList[i],
sizeof(M4VSS3GPP_ClipSettings));
if(NULL != pSettings->pClipList[i]->pFile) {
@@ -248,8 +248,8 @@
return M4ERR_ALLOC;
}
- M4OSA_memcpy((M4OSA_MemAddr8)mClipList[i]->pFile,
- (M4OSA_MemAddr8)pSettings->pClipList[i]->pFile,
+ memcpy((void *)mClipList[i]->pFile,
+ (void *)pSettings->pClipList[i]->pFile,
pSettings->pClipList[i]->filePathSize);
}
else {
@@ -279,8 +279,8 @@
return M4ERR_ALLOC;
}
- M4OSA_memset((M4OSA_MemAddr8)mEffectsSettings,
- mNumberEffects*sizeof(M4VSS3GPP_EffectSettings), 0);
+ memset((void *)mEffectsSettings,0,
+ mNumberEffects*sizeof(M4VSS3GPP_EffectSettings));
for(i=0;i<mNumberEffects;i++) {
@@ -288,8 +288,8 @@
mEffectsSettings[i].xVSS.pFramingBuffer = NULL;
mEffectsSettings[i].xVSS.pTextBuffer = NULL;
- M4OSA_memcpy((M4OSA_MemAddr8)&(mEffectsSettings[i]),
- (M4OSA_MemAddr8)&(pSettings->Effects[i]),
+ memcpy((void *)&(mEffectsSettings[i]),
+ (void *)&(pSettings->Effects[i]),
sizeof(M4VSS3GPP_EffectSettings));
if(pSettings->Effects[i].VideoEffectType ==
@@ -367,9 +367,9 @@
pSettings->Effects[i].xVSS.uialphaBlendingFadeOutTime;
// Copy the pFraming data
- M4OSA_memcpy((M4OSA_MemAddr8)
+ memcpy((void *)
mEffectsSettings[i].xVSS.pFramingBuffer->pac_data,
- (M4OSA_MemAddr8)pSettings->Effects[i].xVSS.pFramingBuffer->pac_data,
+ (void *)pSettings->Effects[i].xVSS.pFramingBuffer->pac_data,
rgbSize);
mEffectsSettings[i].xVSS.rgbType =
@@ -390,8 +390,8 @@
return M4ERR_ALLOC;
}
- M4OSA_memset((M4OSA_MemAddr8)mBackgroundAudioSetting, sizeof(M4xVSS_AudioMixingSettings*), 0);
- M4OSA_memcpy((M4OSA_MemAddr8)mBackgroundAudioSetting, (M4OSA_MemAddr8)bgmSettings, sizeof(M4xVSS_AudioMixingSettings));
+ memset((void *)mBackgroundAudioSetting, 0,sizeof(M4xVSS_AudioMixingSettings*));
+ memcpy((void *)mBackgroundAudioSetting, (void *)bgmSettings, sizeof(M4xVSS_AudioMixingSettings));
if ( mBackgroundAudioSetting->pFile != M4OSA_NULL ) {
@@ -770,12 +770,12 @@
(M4OSA_UInt32)outBufferStride, (M4VIFI_UInt8 *)outBuffer);
/* Fill the surface with black frame */
- M4OSA_memset((M4OSA_MemAddr8)planeOut[0].pac_data,planeOut[0].u_width *
- planeOut[0].u_height * 1.5,0x00);
- M4OSA_memset((M4OSA_MemAddr8)planeOut[1].pac_data,planeOut[1].u_width *
- planeOut[1].u_height,128);
- M4OSA_memset((M4OSA_MemAddr8)planeOut[2].pac_data,planeOut[2].u_width *
- planeOut[2].u_height,128);
+ memset((void *)planeOut[0].pac_data,0x00,planeOut[0].u_width *
+ planeOut[0].u_height * 1.5);
+ memset((void *)planeOut[1].pac_data,128,planeOut[1].u_width *
+ planeOut[1].u_height);
+ memset((void *)planeOut[2].pac_data,128,planeOut[2].u_width *
+ planeOut[2].u_height);
mTarget->renderYV12();
return err;
diff --git a/libvideoeditor/lvpp/VideoEditorTools.cpp b/libvideoeditor/lvpp/VideoEditorTools.cpp
index c0be4dd..6e86139 100755
--- a/libvideoeditor/lvpp/VideoEditorTools.cpp
+++ b/libvideoeditor/lvpp/VideoEditorTools.cpp
@@ -282,7 +282,7 @@
/* The input Y Plane is the same as the output Y Plane */
p_buf_src = &(PlaneIn[0].pac_data[PlaneIn[0].u_topleft]);
p_buf_dest = &(PlaneOut[0].pac_data[PlaneOut[0].u_topleft]);
- M4OSA_memcpy((M4OSA_Int8*)p_buf_dest,(M4OSA_Int8*)p_buf_src ,
+ memcpy((void *)p_buf_dest,(void *)p_buf_src ,
PlaneOut[0].u_width * PlaneOut[0].u_height);
/* The U and V components are planar. The need to be made interleaved */
@@ -313,7 +313,7 @@
/* The input Y Plane is the same as the output Y Plane */
p_buf_src = &(PlaneIn[0].pac_data[PlaneIn[0].u_topleft]);
p_buf_dest = &(PlaneOut[0].pac_data[PlaneOut[0].u_topleft]);
- M4OSA_memcpy((M4OSA_Int8*)p_buf_dest,(M4OSA_Int8*)p_buf_src ,
+ memcpy((void *)p_buf_dest,(void *)p_buf_src ,
PlaneOut[0].u_width * PlaneOut[0].u_height);
/* The U and V components are planar. The need to be made interleaved */
@@ -375,32 +375,32 @@
switch (ColorContext->colorEffectType)
{
case M4xVSS_kVideoEffectType_BlackAndWhite:
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, 128);
+ memset((void *)p_buf_dest,128,
+ PlaneIn[plane_number].u_width);
break;
case M4xVSS_kVideoEffectType_Pink:
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, 255);
+ memset((void *)p_buf_dest,255,
+ PlaneIn[plane_number].u_width);
break;
case M4xVSS_kVideoEffectType_Green:
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, 0);
+ memset((void *)p_buf_dest,0,
+ PlaneIn[plane_number].u_width);
break;
case M4xVSS_kVideoEffectType_Sepia:
if(plane_number==1)
{
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, 117);
+ memset((void *)p_buf_dest,117,
+ PlaneIn[plane_number].u_width);
}
else
{
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, 139);
+ memset((void *)p_buf_dest,139,
+ PlaneIn[plane_number].u_width);
}
break;
case M4xVSS_kVideoEffectType_Negative:
- M4OSA_memcpy((M4OSA_MemAddr8)p_buf_dest,
- (M4OSA_MemAddr8)p_buf_src ,PlaneOut[plane_number].u_width);
+ memcpy((void *)p_buf_dest,
+ (void *)p_buf_src ,PlaneOut[plane_number].u_width);
break;
case M4xVSS_kVideoEffectType_ColorRGB16:
@@ -417,15 +417,15 @@
{
/*then convert to u*/
u = U16(r, g, b);
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, (M4OSA_UInt8)u);
+ memset((void *)p_buf_dest,(M4OSA_UInt8)u,
+ PlaneIn[plane_number].u_width);
}
if(plane_number==2)
{
/*then convert to v*/
v = V16(r, g, b);
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, (M4OSA_UInt8)v);
+ memset((void *)p_buf_dest,(M4OSA_UInt8)v,
+ PlaneIn[plane_number].u_width);
}
}
break;
@@ -448,15 +448,15 @@
{
/*then convert to u*/
u = U16(r, g, b);
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, (M4OSA_UInt8)u);
+ memset((void *)p_buf_dest,(M4OSA_UInt8)u,
+ PlaneIn[plane_number].u_width);
}
if(plane_number==2)
{
/*then convert to v*/
v = V16(r, g, b);
- M4OSA_memset((M4OSA_MemAddr8)p_buf_dest,
- PlaneIn[plane_number].u_width, (M4OSA_UInt8)v);
+ memset((void *)p_buf_dest,(M4OSA_UInt8)v,
+ PlaneIn[plane_number].u_width);
}
}
break;
@@ -478,8 +478,8 @@
}
break;
default:
- M4OSA_memcpy((M4OSA_MemAddr8)p_buf_dest,
- (M4OSA_MemAddr8)p_buf_src ,PlaneOut[plane_number].u_width);
+ memcpy((void *)p_buf_dest,
+ (void *)p_buf_src ,PlaneOut[plane_number].u_width);
break;
}
}
@@ -780,9 +780,9 @@
for (x = 0; x < pPlaneOut[plane_number].u_height; x++)
{
if (1 == plane_number)
- M4OSA_memset((M4OSA_MemAddr8)pOutCr, pPlaneIn[plane_number].u_width, 117); /* U value */
+ memset((void *)pOutCr, 117,pPlaneIn[plane_number].u_width); /* U value */
else
- M4OSA_memset((M4OSA_MemAddr8)pOutCr, pPlaneIn[plane_number].u_width, 139); /* V value */
+ memset((void *)pOutCr, 139,pPlaneIn[plane_number].u_width); /* V value */
pInCr += pPlaneIn[plane_number].u_stride;
pOutCr += pPlaneOut[plane_number].u_stride;
@@ -860,8 +860,8 @@
{
for (i = u_width; i != 0; i--)
{
- M4OSA_memcpy((M4OSA_MemAddr8)p_cdest_line, (M4OSA_MemAddr8)p_csrc_line, u_width);
- M4OSA_memcpy((M4OSA_MemAddr8)p_cdest, (M4OSA_MemAddr8)p_csrc, u_width);
+ memcpy((void *)p_cdest_line, (void *)p_csrc_line, u_width);
+ memcpy((void *)p_cdest, (void *)p_csrc, u_width);
}
p_cdest_line += u_stride_out;
p_cdest += u_stride_out;
@@ -975,12 +975,12 @@
/* write black lines */
for (j = (nb_black_lines >> 1); j != 0; j--)
{
- M4OSA_memset((M4OSA_MemAddr8)p_dest, u_width, 0);
+ memset((void *)p_dest, 0,u_width);
p_dest += u_stride_out;
- M4OSA_memset((M4OSA_MemAddr8)p_dest, u_width, 0);
+ memset((void *)p_dest, 0,u_width);
p_dest += u_stride_out;
- M4OSA_memset((M4OSA_MemAddr8)p_destu, u_widthuv, 128);
- M4OSA_memset((M4OSA_MemAddr8)p_destv, u_widthuv, 128);
+ memset((void *)p_destu, 128,u_widthuv);
+ memset((void *)p_destv, 128,u_widthuv);
p_destu += u_stride_out_uv;
p_destv += u_stride_out_uv;
}
@@ -988,14 +988,14 @@
/* copy from source image */
for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
{
- M4OSA_memcpy((M4OSA_MemAddr8)p_dest, (M4OSA_MemAddr8)p_src, u_width);
+ memcpy((void *)p_dest, (void *)p_src, u_width);
p_dest += u_stride_out;
p_src += u_stride;
- M4OSA_memcpy((M4OSA_MemAddr8)p_dest, (M4OSA_MemAddr8)p_src, u_width);
+ memcpy((void *)p_dest, (void *)p_src, u_width);
p_dest += u_stride_out;
p_src += u_stride;
- M4OSA_memcpy((M4OSA_MemAddr8)p_destu, (M4OSA_MemAddr8)p_srcu, u_widthuv);
- M4OSA_memcpy((M4OSA_MemAddr8)p_destv, (M4OSA_MemAddr8)p_srcv, u_widthuv);
+ memcpy((void *)p_destu, (void *)p_srcu, u_widthuv);
+ memcpy((void *)p_destv, (void *)p_srcv, u_widthuv);
p_destu += u_stride_out_uv;
p_destv += u_stride_out_uv;
p_srcu += u_stride_uv;
@@ -1012,14 +1012,14 @@
/* copy from source image image */
for (j = (nb_black_lines >> 1); j != 0; j--)
{
- M4OSA_memcpy((M4OSA_MemAddr8)p_dest, (M4OSA_MemAddr8)p_src, u_width);
+ memcpy((void *)p_dest, (void *)p_src, u_width);
p_dest += u_stride_out;
p_src += u_stride;
- M4OSA_memcpy((M4OSA_MemAddr8)p_dest, (M4OSA_MemAddr8)p_src, u_width);
+ memcpy((void *)p_dest, (void *)p_src, u_width);
p_dest += u_stride_out;
p_src += u_stride;
- M4OSA_memcpy((M4OSA_MemAddr8)p_destu, (M4OSA_MemAddr8)p_srcu, u_widthuv);
- M4OSA_memcpy((M4OSA_MemAddr8)p_destv, (M4OSA_MemAddr8)p_srcv, u_widthuv);
+ memcpy((void *)p_destu, (void *)p_srcu, u_widthuv);
+ memcpy((void *)p_destv, (void *)p_srcv, u_widthuv);
p_destu += u_stride_out_uv;
p_destv += u_stride_out_uv;
p_srcu += u_stride_uv;
@@ -1030,12 +1030,12 @@
/* the pointers to p_dest, p_destu and p_destv are used through the two loops "for" */
for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
{
- M4OSA_memset((M4OSA_MemAddr8)p_dest, u_width, 0);
+ memset((void *)p_dest, 0,u_width);
p_dest += u_stride_out;
- M4OSA_memset((M4OSA_MemAddr8)p_dest, u_width, 0);
+ memset((void *)p_dest, 0,u_width);
p_dest += u_stride_out;
- M4OSA_memset((M4OSA_MemAddr8)p_destu, u_widthuv, 128);
- M4OSA_memset((M4OSA_MemAddr8)p_destv, u_widthuv, 128);
+ memset((void *)p_destu, 128,u_widthuv);
+ memset((void *)p_destv, 128,u_widthuv);
p_destu += u_stride_out_uv;
p_destv += u_stride_out_uv;
}
@@ -1573,7 +1573,7 @@
p_buf_dest = &(PlaneOut[plane_number].pac_data[PlaneOut[plane_number].u_topleft]);
for (i = 0; i < PlaneOut[plane_number].u_height; i++)
{
- M4OSA_memcpy((M4OSA_MemAddr8)p_buf_dest, (M4OSA_MemAddr8)p_buf_src ,PlaneOut[plane_number].u_width);
+ memcpy((void *)p_buf_dest, (void *)p_buf_src ,PlaneOut[plane_number].u_width);
p_buf_src += PlaneIn[plane_number].u_stride;
p_buf_dest += PlaneOut[plane_number].u_stride;
}
@@ -1877,9 +1877,9 @@
Media rendering: Black borders*/
if(mediaRendering == M4xVSS_kBlackBorders)
{
- M4OSA_memset((M4OSA_MemAddr8)pPlaneOut[0].pac_data,(pPlaneOut[0].u_height*pPlaneOut[0].u_stride),Y_PLANE_BORDER_VALUE);
- M4OSA_memset((M4OSA_MemAddr8)pPlaneOut[1].pac_data,(pPlaneOut[1].u_height*pPlaneOut[1].u_stride),U_PLANE_BORDER_VALUE);
- M4OSA_memset((M4OSA_MemAddr8)pPlaneOut[2].pac_data,(pPlaneOut[2].u_height*pPlaneOut[2].u_stride),V_PLANE_BORDER_VALUE);
+ memset((void *)pPlaneOut[0].pac_data,Y_PLANE_BORDER_VALUE,(pPlaneOut[0].u_height*pPlaneOut[0].u_stride));
+ memset((void *)pPlaneOut[1].pac_data,U_PLANE_BORDER_VALUE,(pPlaneOut[1].u_height*pPlaneOut[1].u_stride));
+ memset((void *)pPlaneOut[2].pac_data,V_PLANE_BORDER_VALUE,(pPlaneOut[2].u_height*pPlaneOut[2].u_stride));
pImagePlanesTemp[0].u_width = pPlaneOut[0].u_width;
pImagePlanesTemp[0].u_height = pPlaneOut[0].u_height;
@@ -1925,9 +1925,9 @@
pInPlaneU = pImagePlanesTemp[1].pac_data ;
pInPlaneV = pImagePlanesTemp[2].pac_data ;
- M4OSA_memset((M4OSA_MemAddr8)pImagePlanesTemp[0].pac_data,(pImagePlanesTemp[0].u_height*pImagePlanesTemp[0].u_stride),Y_PLANE_BORDER_VALUE);
- M4OSA_memset((M4OSA_MemAddr8)pImagePlanesTemp[1].pac_data,(pImagePlanesTemp[1].u_height*pImagePlanesTemp[1].u_stride),U_PLANE_BORDER_VALUE);
- M4OSA_memset((M4OSA_MemAddr8)pImagePlanesTemp[2].pac_data,(pImagePlanesTemp[2].u_height*pImagePlanesTemp[2].u_stride),V_PLANE_BORDER_VALUE);
+ memset((void *)pImagePlanesTemp[0].pac_data,Y_PLANE_BORDER_VALUE,(pImagePlanesTemp[0].u_height*pImagePlanesTemp[0].u_stride));
+ memset((void *)pImagePlanesTemp[1].pac_data,U_PLANE_BORDER_VALUE,(pImagePlanesTemp[1].u_height*pImagePlanesTemp[1].u_stride));
+ memset((void *)pImagePlanesTemp[2].pac_data,V_PLANE_BORDER_VALUE,(pImagePlanesTemp[2].u_height*pImagePlanesTemp[2].u_stride));
if((M4OSA_UInt32)((pPlaneIn->u_height * pPlaneOut->u_width) /pPlaneIn->u_width) <= pPlaneOut->u_height)//Params.m_inputSize.m_height < Params.m_inputSize.m_width)
{
@@ -2061,19 +2061,19 @@
{
for(i=0; i<pPlaneOut[0].u_height; i++)
{
- M4OSA_memcpy((M4OSA_MemAddr8)pOutPlaneY, (M4OSA_MemAddr8)pInPlaneY, pPlaneOut[0].u_width);
+ memcpy((void *)pOutPlaneY, (void *)pInPlaneY, pPlaneOut[0].u_width);
pInPlaneY += pPlaneOut[0].u_width;
pOutPlaneY += pPlaneOut[0].u_stride;
}
for(i=0; i<pPlaneOut[1].u_height; i++)
{
- M4OSA_memcpy((M4OSA_MemAddr8)pOutPlaneU, (M4OSA_MemAddr8)pInPlaneU, pPlaneOut[1].u_width);
+ memcpy((void *)pOutPlaneU, (void *)pInPlaneU, pPlaneOut[1].u_width);
pInPlaneU += pPlaneOut[1].u_width;
pOutPlaneU += pPlaneOut[1].u_stride;
}
for(i=0; i<pPlaneOut[2].u_height; i++)
{
- M4OSA_memcpy((M4OSA_MemAddr8)pOutPlaneV, (M4OSA_MemAddr8)pInPlaneV, pPlaneOut[2].u_width);
+ memcpy((void *)pOutPlaneV, (void *)pInPlaneV, pPlaneOut[2].u_width);
pInPlaneV += pPlaneOut[2].u_width;
pOutPlaneV += pPlaneOut[2].u_stride;
}
@@ -2580,7 +2580,7 @@
for (j=0; j<loc_height; j++)
{
/**< Copy one whole line */
- memcpy((M4OSA_MemAddr8)pu8_data_out, (M4OSA_MemAddr8)pu8_data_in, loc_width);
+ memcpy((void *)pu8_data_out, (void *)pu8_data_in, loc_width);
/**< Update pointers */
pu8_data_out += pOut[i].u_stride;