diff options
author | Chih-Chung Chang <chihchung@google.com> | 2011-06-30 15:13:39 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2011-06-30 16:10:17 +0800 |
commit | 7dbd2c46824000ce473966637c11b8564682cb55 (patch) | |
tree | 8c6624aff2fb9463948f259ad3996330a714f3f6 /libvideoeditor/vss | |
parent | 9969866cfe5b17c6e481b90d81b011a0cece78a0 (diff) | |
download | frameworks_av-7dbd2c46824000ce473966637c11b8564682cb55.zip frameworks_av-7dbd2c46824000ce473966637c11b8564682cb55.tar.gz frameworks_av-7dbd2c46824000ce473966637c11b8564682cb55.tar.bz2 |
Remove curtain effects (they are unused).
Change-Id: I8e1ccad3e9ddf4c272e85e7ca04582b4863c242d
Diffstat (limited to 'libvideoeditor/vss')
-rwxr-xr-x | libvideoeditor/vss/common/inc/M4VFL_transition.h | 36 | ||||
-rwxr-xr-x | libvideoeditor/vss/inc/M4VSS3GPP_API.h | 2 | ||||
-rwxr-xr-x | libvideoeditor/vss/inc/M4VSS3GPP_ErrorCodes.h | 3 | ||||
-rwxr-xr-x | libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c | 55 | ||||
-rwxr-xr-x | libvideoeditor/vss/video_filters/src/M4VFL_transition.c | 302 |
5 files changed, 0 insertions, 398 deletions
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, |