summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibvideoeditor/lvpp/PreviewPlayer.cpp8
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPreviewController.cpp8
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorTools.cpp210
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorTools.h7
-rwxr-xr-xlibvideoeditor/vss/common/inc/M4VFL_transition.h36
-rwxr-xr-xlibvideoeditor/vss/inc/M4VSS3GPP_API.h2
-rwxr-xr-xlibvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h3
-rwxr-xr-xlibvideoeditor/vss/src/M4VSS3GPP_EditVideo.c55
-rwxr-xr-xlibvideoeditor/vss/video_filters/src/M4VFL_transition.c302
9 files changed, 0 insertions, 631 deletions
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp
index e6a7934..f94e2b3 100755
--- a/libvideoeditor/lvpp/PreviewPlayer.cpp
+++ b/libvideoeditor/lvpp/PreviewPlayer.cpp
@@ -1839,14 +1839,6 @@ void PreviewPlayer::setVideoPostProcessingNode(
effect = VIDEO_EFFECT_FADETOBLACK;
break;
- case M4VSS3GPP_kVideoEffectType_CurtainOpening:
- effect = VIDEO_EFFECT_CURTAINOPEN;
- break;
-
- case M4VSS3GPP_kVideoEffectType_CurtainClosing:
- effect = VIDEO_EFFECT_CURTAINCLOSE;
- break;
-
case M4xVSS_kVideoEffectType_BlackAndWhite:
effect = VIDEO_EFFECT_BLACKANDWHITE;
break;
diff --git a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
index ee1dc60..c174585 100755
--- a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
@@ -1282,14 +1282,6 @@ void VideoEditorPreviewController::setVideoEffectType(
effect = VIDEO_EFFECT_FADETOBLACK;
break;
- case M4VSS3GPP_kVideoEffectType_CurtainOpening:
- effect = VIDEO_EFFECT_CURTAINOPEN;
- break;
-
- case M4VSS3GPP_kVideoEffectType_CurtainClosing:
- effect = VIDEO_EFFECT_CURTAINCLOSE;
- break;
-
case M4xVSS_kVideoEffectType_BlackAndWhite:
effect = VIDEO_EFFECT_BLACKANDWHITE;
break;
diff --git a/libvideoeditor/lvpp/VideoEditorTools.cpp b/libvideoeditor/lvpp/VideoEditorTools.cpp
index 73f81a8..3394b64 100755
--- a/libvideoeditor/lvpp/VideoEditorTools.cpp
+++ b/libvideoeditor/lvpp/VideoEditorTools.cpp
@@ -927,123 +927,6 @@ unsigned char M4VFL_modifyLumaWithScale(M4ViComImagePlane *plane_in,
return 0;
}
-/**
- ******************************************************************************
- * unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out, M4VFL_CurtainParam *curtain_factor, void *user_data)
- * @author Beatrice Nezot (PHILIPS Software Vision)
- * @brief This function applies a black curtain onto a YUV420 image.
- * @note THis function writes black lines either at the top of the image or at
- * the bottom of the image. The other lines are copied from the source image.
- * First the number of black lines is compted and is rounded to an even integer.
- * @param plane_in: (IN) pointer to the 3 image planes of the source image
- * @param plane_out: (OUT) pointer to the 3 image planes of the destination image
- * @param user_data: (IN) pointer to some user_data
- * @param curtain_factor: (IN) structure with the parameters of the curtain (nb of black lines and if at the top/bottom of the image)
- * @return 0: there is no error
- ******************************************************************************
-*/
-unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out, M4VFL_CurtainParam *curtain_factor, void *user_data)
-{
- unsigned char *p_src, *p_srcu, *p_srcv,*p_dest, *p_destu, *p_destv;
- unsigned long u_width, u_widthuv, u_stride_out, u_stride_out_uv,u_stride, u_stride_uv,u_height;
- long j;
- unsigned long nb_black_lines;
-
- u_width = plane_in[0].u_width;
- u_height = plane_in[0].u_height;
- u_stride_out = plane_out[0].u_stride ;
- u_stride_out_uv = plane_out[1].u_stride;
- p_dest = (unsigned char *) &plane_out[0].pac_data[plane_out[0].u_topleft];
- p_destu = (unsigned char *) &plane_out[1].pac_data[plane_out[1].u_topleft];
- p_destv = (unsigned char *) &plane_out[2].pac_data[plane_out[2].u_topleft];
- u_widthuv = u_width >> 1;
- u_stride = plane_in[0].u_stride ;
- u_stride_uv = plane_in[1].u_stride;
-
- /* nb_black_lines is even */
- nb_black_lines = (unsigned long) ((curtain_factor->nb_black_lines >> 1) << 1);
-
- if (curtain_factor->top_is_black)
- {
- /* black lines first */
- /* compute index of of first source pixels (Y, U and V) to copy after the black lines */
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft + ((nb_black_lines) * plane_in[0].u_stride)];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft + (((nb_black_lines) * plane_in[1].u_stride) >> 1)];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft+ (((nb_black_lines) * plane_in[2].u_stride) >> 1)];
-
- /* write black lines */
- for (j = (nb_black_lines >> 1); j != 0; j--)
- {
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- 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;
- }
-
- /* copy from source image */
- for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
- {
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
- }
- else
- {
- /* black lines at the bottom of the image */
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft];
-
- /* copy from source image image */
- for (j = (nb_black_lines >> 1); j != 0; j--)
- {
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
-
- /* write black lines*/
- /* 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--)
- {
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- 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;
- }
- }
-
- return 0;
-}
-
-
/******************************************************************************
* prototype M4OSA_ERR M4xVSS_internalConvertRGBtoYUV(M4xVSS_FramingStruct* framingCtx)
* @brief This function converts an RGB565 plane to YUV420 planar
@@ -3386,37 +3269,6 @@ M4OSA_ERR applyLumaEffect(M4VSS3GPP_VideoEffectType videoEffect,
return err;
}
-M4OSA_ERR applyCurtainEffect(M4VSS3GPP_VideoEffectType videoEffect,
- M4VIFI_ImagePlane *planeIn, M4VIFI_ImagePlane *planeOut,
- M4VIFI_UInt8 *buffer1, M4VIFI_UInt8 *buffer2,
- M4VFL_CurtainParam* curtainParams) {
-
- M4OSA_ERR err = M4NO_ERROR;
-
- // Apply the curtain effect
- err = M4VFL_applyCurtain( (M4ViComImagePlane*)planeIn,
- (M4ViComImagePlane*)planeOut, curtainParams, NULL);
- if(err != M4NO_ERROR) {
- LOGE("M4VFL_applyCurtain(%d) error %d", videoEffect, (int)err);
-
- if(NULL != buffer1) {
- free(buffer1);
- buffer1= NULL;
- }
- if(NULL != buffer2) {
- free(buffer2);
- buffer2 = NULL;
- }
- return err;
- }
-
- // The out plane now becomes the in plane for adding other effects
- swapImagePlanes(planeIn, planeOut,(M4VIFI_UInt8 *)buffer1,
- (M4VIFI_UInt8 *)buffer2);
-
- return err;
-}
-
M4OSA_ERR applyEffectsAndRenderingMode(vePostProcessParams *params,
M4OSA_UInt32 reportedWidth, M4OSA_UInt32 reportedHeight) {
@@ -3425,7 +3277,6 @@ M4OSA_ERR applyEffectsAndRenderingMode(vePostProcessParams *params,
M4VIFI_UInt8 *finalOutputBuffer = NULL, *tempOutputBuffer= NULL;
M4OSA_Double percentageDone =0;
M4OSA_Int32 lum_factor;
- M4VFL_CurtainParam curtainParams;
M4VSS3GPP_ExternalProgress extProgress;
M4xVSS_FiftiesStruct fiftiesCtx;
M4OSA_UInt32 frameSize = 0, i=0;
@@ -3694,67 +3545,6 @@ M4OSA_ERR applyEffectsAndRenderingMode(vePostProcessParams *params,
}
}
- if(params->currentVideoEffect & VIDEO_EFFECT_CURTAINOPEN) {
- // Find the effect in effectSettings array
- for(i=0;i<params->numberEffects;i++) {
- if(params->effectsSettings[i].VideoEffectType ==
- M4VSS3GPP_kVideoEffectType_CurtainOpening)
- break;
- }
- if(i < params->numberEffects) {
- computePercentageDone(params->timeMs,
- params->effectsSettings[i].uiStartTime,
- params->effectsSettings[i].uiDuration, &percentageDone);
-
- // Compute where we are in the effect (scale is 0->height).
- // It is done with floats because tmp x height
- // can be very large (with long clips).
- curtainParams.nb_black_lines =
- (M4OSA_UInt16)((1.0 - percentageDone) * planeIn[0].u_height );
- // The curtain is hanged on the ceiling
- curtainParams.top_is_black = 1;
-
- // Apply the curtain effect
- err = applyCurtainEffect(M4VSS3GPP_kVideoEffectType_CurtainOpening,
- planeIn, planeOut, (M4VIFI_UInt8 *)finalOutputBuffer,
- (M4VIFI_UInt8 *)tempOutputBuffer, &curtainParams);
- if(err != M4NO_ERROR) {
- return err;
- }
- }
- }
-
- if(params->currentVideoEffect & VIDEO_EFFECT_CURTAINCLOSE) {
- // Find the effect in effectSettings array
- for(i=0;i<params->numberEffects;i++) {
- if(params->effectsSettings[i].VideoEffectType ==
- M4VSS3GPP_kVideoEffectType_CurtainClosing)
- break;
- }
- if(i < params->numberEffects) {
- computePercentageDone(params->timeMs,
- params->effectsSettings[i].uiStartTime,
- params->effectsSettings[i].uiDuration, &percentageDone);
-
- // Compute where we are in the effect (scale is 0->height).
- // It is done with floats because
- // tmp x height can be very large (with long clips).
- curtainParams.nb_black_lines =
- (M4OSA_UInt16)(percentageDone * planeIn[0].u_height );
-
- // The curtain is hanged on the ceiling
- curtainParams.top_is_black = 1;
-
- // Apply the curtain effect
- err = applyCurtainEffect(M4VSS3GPP_kVideoEffectType_CurtainClosing,
- planeIn, planeOut, (M4VIFI_UInt8 *)finalOutputBuffer,
- (M4VIFI_UInt8 *)tempOutputBuffer, &curtainParams);
- if(err != M4NO_ERROR) {
- return err;
- }
- }
- }
-
LOGV("doMediaRendering CALL getBuffer()");
// Set the output YUV420 plane to be compatible with YV12 format
// W & H even
diff --git a/libvideoeditor/lvpp/VideoEditorTools.h b/libvideoeditor/lvpp/VideoEditorTools.h
index 36d286e..0552799 100755
--- a/libvideoeditor/lvpp/VideoEditorTools.h
+++ b/libvideoeditor/lvpp/VideoEditorTools.h
@@ -48,9 +48,7 @@ enum {
VIDEO_EFFECT_COLOR_RGB16 = 128,
VIDEO_EFFECT_GRADIENT = 256,
VIDEO_EFFECT_FADEFROMBLACK = 512,
- VIDEO_EFFECT_CURTAINOPEN = 1024,
VIDEO_EFFECT_FADETOBLACK = 2048,
- VIDEO_EFFECT_CURTAINCLOSE = 4096,
};
typedef struct {
@@ -84,7 +82,6 @@ M4OSA_ERR M4VSS3GPP_externalVideoEffectFraming( M4OSA_Void *userData, M4VIFI_Ima
M4OSA_ERR M4VSS3GPP_externalVideoEffectFifties( M4OSA_Void *pUserData, M4VIFI_ImagePlane *pPlaneIn, M4VIFI_ImagePlane *pPlaneOut, M4VSS3GPP_ExternalProgress *pProgress, M4OSA_UInt32 uiEffectKind );
unsigned char M4VFL_modifyLumaWithScale(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out, unsigned long lum_factor, void *user_data);
-unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out, M4VFL_CurtainParam *curtain_factor, void *user_data);
M4OSA_ERR M4xVSS_internalConvertRGBtoYUV(M4xVSS_FramingStruct* framingCtx);
M4VIFI_UInt8 M4VIFI_xVSS_RGB565toYUV420(void *pUserData, M4VIFI_ImagePlane *pPlaneIn,
@@ -137,10 +134,6 @@ M4OSA_ERR applyLumaEffect(M4VSS3GPP_VideoEffectType videoEffect,
M4VIFI_ImagePlane *planeIn, M4VIFI_ImagePlane *planeOut,
M4VIFI_UInt8 *buffer1, M4VIFI_UInt8 *buffer2, M4OSA_Int32 lum_factor);
-M4OSA_ERR applyCurtainEffect(M4VSS3GPP_VideoEffectType videoEffect,
- M4VIFI_ImagePlane *planeIn, M4VIFI_ImagePlane *planeOut,
- M4VIFI_UInt8 *buffer1, M4VIFI_UInt8 *buffer2, M4VFL_CurtainParam* curtainParams);
-
M4OSA_ERR applyEffectsAndRenderingMode(vePostProcessParams *params,
M4OSA_UInt32 reportedWidth, M4OSA_UInt32 reportedHeight);
diff --git a/libvideoeditor/vss/common/inc/M4VFL_transition.h b/libvideoeditor/vss/common/inc/M4VFL_transition.h
index b405279..77f76cb 100755
--- a/libvideoeditor/vss/common/inc/M4VFL_transition.h
+++ b/libvideoeditor/vss/common/inc/M4VFL_transition.h
@@ -45,12 +45,6 @@ typedef struct S_M4VFL_modifLumParam
unsigned short copy_chroma;
} M4VFL_ModifLumParam;
-typedef struct S_M4VFL_CurtainParam
-{
- unsigned short nb_black_lines;
- unsigned char top_is_black;
-} M4VFL_CurtainParam;
-
#define M4VIFI_OK 0
#define M4VIFI_ILLEGAL_FRAME_HEIGHT 8
#define M4VIFI_ILLEGAL_FRAME_WIDTH 9
@@ -61,36 +55,6 @@ unsigned char M4VFL_modifyLumaByStep(M4ViComImagePlane *plane_in, M4ViComImagePl
unsigned char M4VFL_modifyLumaWithScale(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
unsigned long lum_factor, void *user_data);
-unsigned char M4VFL_applyClosingCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- unsigned short curtain_factor, void *user_data);
-
-unsigned char M4VFL_applyOpeningCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- unsigned short curtain_factor, void *user_data);
-
-unsigned char M4VFL_applyFallingCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- unsigned short curtain_factor, void *user_data);
-
-
-/**
- ******************************************************************************
- * unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- * M4VFL_CurtainParam *curtain_factor, void *user_data)
- * @brief This function applies a black curtain onto a YUV420 image.
- * @note THis function writes black lines either at the top of the image or at
- * the bottom of the image. The other lines are copied from the source image.
- * First the number of black lines is compted and is rounded to an even integer.
- * @param plane_in: (IN) pointer to the 3 image planes of the source image
- * @param plane_out: (OUT) pointer to the 3 image planes of the destination image
- * @param user_data: (IN) pointer to some user_data
- * @param curtain_factor: (IN) structure with the parameters of the curtain (nb of black lines
- * and if at the top/bottom of the image)
- * @return 0: there is no error
- ******************************************************************************
-*/
-unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- M4VFL_CurtainParam *curtain_factor, void *user_data);
-
-
/**
*************************************************************************************************
* M4OSA_ERR M4VIFI_ImageBlendingonYUV420 (void *pUserData,
diff --git a/libvideoeditor/vss/inc/M4VSS3GPP_API.h b/libvideoeditor/vss/inc/M4VSS3GPP_API.h
index 8865a3c..0356805 100755
--- a/libvideoeditor/vss/inc/M4VSS3GPP_API.h
+++ b/libvideoeditor/vss/inc/M4VSS3GPP_API.h
@@ -94,9 +94,7 @@ typedef enum
{
M4VSS3GPP_kVideoEffectType_None = 0, /**< No video effect */
M4VSS3GPP_kVideoEffectType_FadeFromBlack = 8, /**< Intended for begin effect */
- M4VSS3GPP_kVideoEffectType_CurtainOpening = 9, /**< Intended for begin effect */
M4VSS3GPP_kVideoEffectType_FadeToBlack = 16, /**< Intended for end effect */
- M4VSS3GPP_kVideoEffectType_CurtainClosing = 17, /**< Intended for end effect */
M4VSS3GPP_kVideoEffectType_External = 256 /**< External effect function is used */
/* reserved 256 + n */ /**< External effect number n */
diff --git a/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h b/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h
index b652d44..36e239c 100755
--- a/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h
+++ b/libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h
@@ -258,9 +258,6 @@
* Luminance filter effect error */
#define M4VSS3GPP_ERR_LUMA_FILTER_ERROR M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0104)
/**
- * Curtain filter effect error */
-#define M4VSS3GPP_ERR_CURTAIN_FILTER_ERROR M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0105)
-/**
* Transition filter effect error */
#define M4VSS3GPP_ERR_TRANSITION_FILTER_ERROR M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0106)
/**
diff --git a/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c b/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c
index 19ed65b..f73487f 100755
--- a/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c
+++ b/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c
@@ -1386,7 +1386,6 @@ M4VSS3GPP_intApplyVideoEffect( M4VSS3GPP_InternalEditContext *pC,
M4VSS3GPP_ClipContext *pClip;
M4VSS3GPP_EffectSettings *pFx;
- M4VFL_CurtainParam curtainParams;
M4VSS3GPP_ExternalProgress extProgress;
M4OSA_Double VideoEffectTime;
@@ -1498,34 +1497,6 @@ M4VSS3GPP_intApplyVideoEffect( M4VSS3GPP_InternalEditContext *pC,
}
break;
- case M4VSS3GPP_kVideoEffectType_CurtainOpening:
- /**
- * Compute where we are in the effect (scale is 0->height).
- * It is done with floats because tmp x height can be very large
- (with long clips).*/
- curtainParams.nb_black_lines =
- (M4OSA_UInt16)(( 1.0 - PercentageDone)
- * pPlaneTempIn[0].u_height);
- /**
- * The curtain is hanged on the ceiling */
- curtainParams.top_is_black = 1;
-
- /**
- * Apply the curtain effect */
- err = M4VFL_applyCurtain((M4ViComImagePlane *)pPlaneTempIn,
- (M4ViComImagePlane *)pPlaneTempOut, &curtainParams,
- M4OSA_NULL);
-
- if( M4NO_ERROR != err )
- {
- M4OSA_TRACE1_1(
- "M4VSS3GPP_intApplyVideoEffect: M4VFL_applyCurtain returns error 0x%x,\
- returning M4VSS3GPP_ERR_CURTAIN_FILTER_ERROR",
- err);
- return M4VSS3GPP_ERR_CURTAIN_FILTER_ERROR;
- }
- break;
-
case M4VSS3GPP_kVideoEffectType_FadeToBlack:
/**
* Compute where we are in the effect (scale is 0->1024) */
@@ -1548,32 +1519,6 @@ M4VSS3GPP_intApplyVideoEffect( M4VSS3GPP_InternalEditContext *pC,
}
break;
- case M4VSS3GPP_kVideoEffectType_CurtainClosing:
- /**
- * Compute where we are in the effect (scale is 0->height) */
- curtainParams.nb_black_lines =
- (M4OSA_UInt16)(PercentageDone * pPlaneTempIn[0].u_height);
-
- /**
- * The curtain is hanged on the ceiling */
- curtainParams.top_is_black = 1;
-
- /**
- * Apply the curtain effect */
- err = M4VFL_applyCurtain((M4ViComImagePlane *)pPlaneTempIn,
- (M4ViComImagePlane *)pPlaneTempOut, &curtainParams,
- M4OSA_NULL);
-
- if( M4NO_ERROR != err )
- {
- M4OSA_TRACE1_1(
- "M4VSS3GPP_intApplyVideoEffect: M4VFL_applyCurtain returns error 0x%x,\
- returning M4VSS3GPP_ERR_CURTAIN_FILTER_ERROR",
- err);
- return M4VSS3GPP_ERR_CURTAIN_FILTER_ERROR;
- }
- break;
-
default:
if( pFx->VideoEffectType
>= M4VSS3GPP_kVideoEffectType_External )
diff --git a/libvideoeditor/vss/video_filters/src/M4VFL_transition.c b/libvideoeditor/vss/video_filters/src/M4VFL_transition.c
index eca99bc..6a5e0b6 100755
--- a/libvideoeditor/vss/video_filters/src/M4VFL_transition.c
+++ b/libvideoeditor/vss/video_filters/src/M4VFL_transition.c
@@ -220,308 +220,6 @@ unsigned char M4VFL_modifyLumaWithScale(M4ViComImagePlane *plane_in,
return 0;
}
-
-unsigned char M4VFL_applyClosingCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- unsigned short curtain_factor, void *user_data)
-{
- unsigned char *p_src, *p_srcu, *p_srcv,*p_dest, *p_destu, *p_destv;
- unsigned long u_width, u_widthuv, u_stride_out, u_stride_out_uv,u_stride, u_stride_uv,u_height;
- long j;
- unsigned long nb_black_lines;
-
- u_width = plane_in[0].u_width;
- u_height = plane_in[0].u_height;
- u_stride_out = plane_out[0].u_stride ;
- u_stride_out_uv = plane_out[1].u_stride;
- p_dest = (unsigned char *) &plane_out[0].pac_data[plane_out[0].u_topleft];
- p_destu = (unsigned char *) &plane_out[1].pac_data[plane_out[1].u_topleft];
- p_destv = (unsigned char *) &plane_out[2].pac_data[plane_out[2].u_topleft];
- u_widthuv = u_width >> 1;
-
- /* nb_black_lines is even */
- nb_black_lines = (unsigned long) ((curtain_factor >> 1) << 1);
-
- for (j = (nb_black_lines >> 1); j != 0; j--)
- { /* set black lines */
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- 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;
- }
-
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft +\
- (nb_black_lines * plane_in[0].u_stride)];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft +\
- ((nb_black_lines * plane_in[1].u_stride) >> 1)];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft+\
- ((nb_black_lines * plane_in[2].u_stride) >> 1)];
- u_stride = plane_in[0].u_stride ;
- u_stride_uv = plane_in[1].u_stride;
-
- /* copy other lines from source */
- for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
- {
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
-
- return 0;
-}
-
-
-unsigned char M4VFL_applyOpeningCurtain(M4ViComImagePlane *plane_in,
- M4ViComImagePlane *plane_out,
- unsigned short curtain_factor, void *user_data)
-{
- unsigned char *p_src, *p_srcu, *p_srcv,*p_dest, *p_destu, *p_destv;
- unsigned long u_width, u_widthuv, u_stride_out, u_stride_out_uv,u_stride, u_stride_uv,u_height;
- long j;
- unsigned long nb_black_lines;
-
- u_width = plane_in[0].u_width;
- u_height = plane_in[0].u_height;
- u_stride_out = plane_out[0].u_stride ;
- u_stride_out_uv = plane_out[1].u_stride;
- p_dest = (unsigned char *) &plane_out[0].pac_data[plane_out[0].u_topleft];
- p_destu = (unsigned char *) &plane_out[1].pac_data[plane_out[1].u_topleft];
- p_destv = (unsigned char *) &plane_out[2].pac_data[plane_out[2].u_topleft];
- u_widthuv = u_width >> 1;
-
- /* nb_black_lines is even */
- nb_black_lines = (unsigned long) ((curtain_factor >> 1) << 1);
-
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft +\
- ((u_height - nb_black_lines) * plane_in[0].u_stride)];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft +\
- (((u_height - nb_black_lines) * plane_in[1].u_stride) >> 1)];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft+\
- (((u_height - nb_black_lines) * plane_in[2].u_stride) >> 1)];
- u_stride = plane_in[0].u_stride ;
- u_stride_uv = plane_in[1].u_stride;
-
- for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
- {
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest,0, u_width);
- p_dest += u_stride_out;
- 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;
- }
-
- for (j = (nb_black_lines >> 1); j != 0; j--)
- {
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
-
- return 0;
-}
-
-unsigned char M4VFL_applyFallingCurtain(M4ViComImagePlane *plane_in,
- M4ViComImagePlane *plane_out,
- unsigned short curtain_factor, void *user_data)
-{
- unsigned char *p_src, *p_srcu, *p_srcv,*p_dest, *p_destu, *p_destv;
- unsigned long u_width, u_widthuv, u_stride_out, u_stride_out_uv,u_stride, u_stride_uv,u_height;
- long j;
- unsigned long nb_black_lines;
-
- u_width = plane_in[0].u_width;
- u_height = plane_in[0].u_height;
- u_stride_out = plane_out[0].u_stride ;
- u_stride_out_uv = plane_out[1].u_stride;
- p_dest = (unsigned char *) &plane_out[0].pac_data[plane_out[0].u_topleft];
- p_destu = (unsigned char *) &plane_out[1].pac_data[plane_out[1].u_topleft];
- p_destv = (unsigned char *) &plane_out[2].pac_data[plane_out[2].u_topleft];
- u_widthuv = u_width >> 1;
-
- /* nb_black_lines is even */
- nb_black_lines = (unsigned long) ((curtain_factor >> 1) << 1);
-
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft];
- u_stride = plane_in[0].u_stride ;
- u_stride_uv = plane_in[1].u_stride;
-
- for (j = (nb_black_lines >> 1); j != 0; j--)
- {
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
-
- for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
- {
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- 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;
- }
- return 0;
-}
-
-/**
- ******************************************************************************
- * unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- * M4VFL_CurtainParam *curtain_factor, void *user_data)
- * @brief This function applies a black curtain onto a YUV420 image.
- * @note THis function writes black lines either at the top of the image or at
- * the bottom of the image. The other lines are copied from the source image.
- * First the number of black lines is compted and is rounded to an even integer.
- * @param plane_in: (IN) pointer to the 3 image planes of the source image
- * @param plane_out: (OUT) pointer to the 3 image planes of the destination image
- * @param user_data: (IN) pointer to some user_data
- * @param curtain_factor: (IN) structure with the parameters of the curtain
- * (nb of black lines and if at the top/bottom of the image)
- * @return 0: there is no error
- ******************************************************************************
-*/
-unsigned char M4VFL_applyCurtain(M4ViComImagePlane *plane_in, M4ViComImagePlane *plane_out,
- M4VFL_CurtainParam *curtain_factor, void *user_data)
-{
- unsigned char *p_src, *p_srcu, *p_srcv,*p_dest, *p_destu, *p_destv;
- unsigned long u_width, u_widthuv, u_stride_out, u_stride_out_uv,u_stride, u_stride_uv,u_height;
- long j;
- unsigned long nb_black_lines;
-
- u_width = plane_in[0].u_width;
- u_height = plane_in[0].u_height;
- u_stride_out = plane_out[0].u_stride ;
- u_stride_out_uv = plane_out[1].u_stride;
- p_dest = (unsigned char *) &plane_out[0].pac_data[plane_out[0].u_topleft];
- p_destu = (unsigned char *) &plane_out[1].pac_data[plane_out[1].u_topleft];
- p_destv = (unsigned char *) &plane_out[2].pac_data[plane_out[2].u_topleft];
- u_widthuv = u_width >> 1;
- u_stride = plane_in[0].u_stride ;
- u_stride_uv = plane_in[1].u_stride;
-
- /* nb_black_lines is even */
- nb_black_lines = (unsigned long) ((curtain_factor->nb_black_lines >> 1) << 1);
-
- if (curtain_factor->top_is_black)
- {
- /* black lines first */
- /* compute index of of first source pixels (Y, U and V) to copy after the black lines */
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft +\
- ((nb_black_lines) * plane_in[0].u_stride)];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft +\
- (((nb_black_lines) * plane_in[1].u_stride) >> 1)];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft+\
- (((nb_black_lines) * plane_in[2].u_stride) >> 1)];
-
- /* write black lines */
- for (j = (nb_black_lines >> 1); j != 0; j--)
- {
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- 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;
- }
-
- /* copy from source image */
- for (j = (u_height - nb_black_lines) >> 1; j != 0; j--)
- {
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
- }
- else
- {
- /* black lines at the bottom of the image */
- p_src = (unsigned char *) &plane_in[0].pac_data[plane_in[0].u_topleft];
- p_srcu = (unsigned char *) &plane_in[1].pac_data[plane_in[1].u_topleft];
- p_srcv = (unsigned char *) &plane_in[2].pac_data[plane_in[2].u_topleft];
-
- /* copy from source image image */
- for (j = (nb_black_lines >> 1); j != 0; j--)
- {
- memcpy((void *)p_dest, (void *)p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- memcpy((void *)p_dest,(void *) p_src, u_width);
- p_dest += u_stride_out;
- p_src += u_stride;
- 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;
- p_srcv += u_stride_uv;
- }
-
- /* write black lines*/
- /* 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--)
- {
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- memset((void *)p_dest, 0,u_width);
- p_dest += u_stride_out;
- 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;
- }
- }
-
- return 0;
-}
-
/**
*************************************************************************************************
* M4OSA_ERR M4VIFI_ImageBlendingonYUV420 (void *pUserData,