diff options
author | Danny Fernandes <dannyfernandes@google.com> | 2011-02-16 21:03:28 -0800 |
---|---|---|
committer | Danny Fernandes <dannyfernandes@google.com> | 2011-02-17 12:10:47 -0800 |
commit | ac9dde5945fd00a6fb882bd171ee8a42a091fb86 (patch) | |
tree | 8b5f5da8783185a1093490c2eb14d26d96b94b6e /libvideoeditor/vss | |
parent | 8b95de2c4d57a0a07d7f4c59f2ddd52a140a361e (diff) | |
download | frameworks_av-ac9dde5945fd00a6fb882bd171ee8a42a091fb86.zip frameworks_av-ac9dde5945fd00a6fb882bd171ee8a42a091fb86.tar.gz frameworks_av-ac9dde5945fd00a6fb882bd171ee8a42a091fb86.tar.bz2 |
Fixed issue 3421896 Slide transition causes images to jump in exported movie playback
Change-Id: I78cbe7e3509f65ce651de926267fad4f65c3c263
Diffstat (limited to 'libvideoeditor/vss')
-rwxr-xr-x | libvideoeditor/vss/inc/M4VSS3GPP_InternalTypes.h | 24 | ||||
-rwxr-xr-x | libvideoeditor/vss/src/M4VSS3GPP_Edit.c | 4 | ||||
-rwxr-xr-x | libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c | 15 |
3 files changed, 29 insertions, 14 deletions
diff --git a/libvideoeditor/vss/inc/M4VSS3GPP_InternalTypes.h b/libvideoeditor/vss/inc/M4VSS3GPP_InternalTypes.h index bc29b2a..570b654 100755 --- a/libvideoeditor/vss/inc/M4VSS3GPP_InternalTypes.h +++ b/libvideoeditor/vss/inc/M4VSS3GPP_InternalTypes.h @@ -84,14 +84,21 @@ M4VSS3GPP_EditState; typedef enum { - M4VSS3GPP_kEditVideoState_READ_WRITE = 10, /**< Doing Read/Write operation - (no decoding/encoding) */ - M4VSS3GPP_kEditVideoState_BEGIN_CUT = 11, /**< Decode encode to create an I frame */ - M4VSS3GPP_kEditVideoState_DECODE_ENCODE = 12, /**< Doing Read-Decode/Filter/ - Encode-Write operation */ - M4VSS3GPP_kEditVideoState_TRANSITION = 13, /**< Transition; blending of two videos */ - M4VSS3GPP_kEditVideoState_AFTER_CUT = 14 /**< Special Read/Write mode after a - begin cut (time frozen) */ + /**< Doing Read/Write operation. This operation will have no processing + * on input frames. Only time stamp manipulations in output file. */ + M4VSS3GPP_kEditVideoState_READ_WRITE = 10, + /**< Decode encode to create an I frame. This is done for a single frame + * to create a new reference frame. */ + M4VSS3GPP_kEditVideoState_BEGIN_CUT = 11, + /**< Doing Read->Decode->Filter->Encode->Write operation on the input file + * to create the output file. */ + M4VSS3GPP_kEditVideoState_DECODE_ENCODE = 12, + /**< Applied when Transition is active and blending of two videos is + * required. */ + M4VSS3GPP_kEditVideoState_TRANSITION = 13, + /**< Special Read/Write mode used after BEGIN_CUT state. The frame + * is already coded as I frame in BEGIN_CUT state; so skip it. */ + M4VSS3GPP_kEditVideoState_AFTER_CUT = 14 } M4VSS3GPP_EditVideoState; @@ -611,6 +618,7 @@ typedef struct M4OSA_Bool m_bClipExternalHasStarted; /**< Flag to indicate that an external effect is active */ M4OSA_Int32 iInOutTimeOffset; + M4OSA_Bool bEncodeTillEoF; } M4VSS3GPP_InternalEditContext; diff --git a/libvideoeditor/vss/src/M4VSS3GPP_Edit.c b/libvideoeditor/vss/src/M4VSS3GPP_Edit.c index acdbfdc..8ae0f15 100755 --- a/libvideoeditor/vss/src/M4VSS3GPP_Edit.c +++ b/libvideoeditor/vss/src/M4VSS3GPP_Edit.c @@ -230,6 +230,7 @@ M4OSA_ERR M4VSS3GPP_editInit( M4VSS3GPP_EditContext *pContext, pC->bIsMMS = M4OSA_FALSE; pC->iInOutTimeOffset = 0; + pC->bEncodeTillEoF = M4OSA_FALSE; /** * Return with no error */ @@ -3291,8 +3292,9 @@ static M4OSA_ERR M4VSS3GPP_intSwitchToNextClip( } } } - /* The flag is set to false at the beginning of every clip */ + /* The flags are set to false at the beginning of every clip */ pC->m_bClipExternalHasStarted = M4OSA_FALSE; + pC->bEncodeTillEoF = M4OSA_FALSE; /** * Return with no error */ diff --git a/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c b/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c index 2dfd07b..d15707c 100755 --- a/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c +++ b/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c @@ -729,11 +729,15 @@ static M4OSA_ERR M4VSS3GPP_intCheckVideoMode( to catch all P-frames after the cut) */ else if( M4OSA_TRUE == pC->bClip1AtBeginCut ) { - if( ( M4VSS3GPP_kEditVideoState_BEGIN_CUT == previousVstate) - || (M4VSS3GPP_kEditVideoState_AFTER_CUT == previousVstate) ) + if(pC->pC1->pSettings->ClipProperties.VideoStreamType == M4VIDEOEDITING_kH264) { + pC->Vstate = M4VSS3GPP_kEditVideoState_DECODE_ENCODE; + pC->bEncodeTillEoF = M4OSA_TRUE; + } else if( ( M4VSS3GPP_kEditVideoState_BEGIN_CUT == previousVstate) + || (M4VSS3GPP_kEditVideoState_AFTER_CUT == previousVstate) ) { pC->Vstate = M4VSS3GPP_kEditVideoState_AFTER_CUT; - else + } else { pC->Vstate = M4VSS3GPP_kEditVideoState_BEGIN_CUT; + } } /* Else we are in default copy/paste mode */ else @@ -777,7 +781,8 @@ static M4OSA_ERR M4VSS3GPP_intCheckVideoMode( } } else if(!((pC->m_bClipExternalHasStarted == M4OSA_TRUE) && - (pC->Vstate == M4VSS3GPP_kEditVideoState_DECODE_ENCODE))) + (pC->Vstate == M4VSS3GPP_kEditVideoState_DECODE_ENCODE)) && + pC->bEncodeTillEoF == M4OSA_FALSE) { /** * Test if we go into copy/paste mode or into decode/encode mode @@ -835,7 +840,7 @@ static M4OSA_ERR M4VSS3GPP_intCheckVideoMode( || (M4VSS3GPP_kEditVideoState_TRANSITION == previousVstate)) /**< encode mode */ && (M4VSS3GPP_kEditVideoState_READ_WRITE == pC->Vstate) /**< read mode */ - ) + && (pC->bEncodeTillEoF == M4OSA_FALSE) ) { pC->Vstate = M4VSS3GPP_kEditVideoState_BEGIN_CUT; } |