pC->State = M4VSS3GPP_kEditState_CREATED;
pC->Vstate = M4VSS3GPP_kEditVideoState_READ_WRITE;
pC->Astate = M4VSS3GPP_kEditAudioState_READ_WRITE;
+ /* The flag is set to false at the beginning of every clip */
+ pC->m_bClipExternalHasStarted = M4OSA_FALSE;
pC->bIsMMS = M4OSA_FALSE;
}
}
}
+ /* The flag is set to false at the beginning of every clip */
+ pC->m_bClipExternalHasStarted = M4OSA_FALSE;
/**
* Return with no error */
pC->Vstate = M4VSS3GPP_kEditVideoState_READ_WRITE;
}
}
- else
+ else if(!((pC->m_bClipExternalHasStarted == M4OSA_TRUE) &&
+ (pC->Vstate == M4VSS3GPP_kEditVideoState_DECODE_ENCODE)))
{
+ /**
+ * Test if we go into copy/paste mode or into decode/encode mode
+ * If an external effect has been applied on the current clip
+ * then continue to be in decode/encode mode till end of
+ * clip to avoid H.264 distortion.
+ */
pC->Vstate = M4VSS3GPP_kEditVideoState_READ_WRITE;
}
}
{
if ((t >= (M4OSA_Int32)(pFx->uiStartTime)) && /**< Are we after the start time of the effect? */
(t < (M4OSA_Int32)(pFx->uiStartTime + pFx->uiDuration)) ) /**< Are we into the effect duration? */
- {
- /**
- * Set the active effect(s) */
+ {
+ /**
+ * Set the active effect(s) */
pC->pActiveEffectsList[i] = pC->nbEffects-1-uiFxIndex;
- /**
- * Update counter of active effects */
+ /**
+ * Update counter of active effects */
i++;
- /**
- * The third effect has the highest priority, then the second one, then the first one.
- * Hence, as soon as we found an active effect, we can get out of this loop */
+ /**
+ * For all external effects set this flag to true. */
+ if(pFx->VideoEffectType > M4VSS3GPP_kVideoEffectType_External)
+ {
+ pC->m_bClipExternalHasStarted = M4OSA_TRUE;
+ }
+
+ /**
+ * The third effect has the highest priority, then the second one, then the first one.
+ * Hence, as soon as we found an active effect, we can get out of this loop */
}
}
(M4OSA_Int32)(pFx->uiStartTime)) && (t + pC->pTransitionList[uiClipIndex].uiTransitionDuration
< (M4OSA_Int32)(pFx->uiStartTime + pFx->uiDuration)) ) /**< Are we into the effect duration? */
{
- /**
- * Set the active effect(s) */
+ /**
+ * Set the active effect(s) */
pC->pActiveEffectsList1[i] = pC->nbEffects-1-uiFxIndex;
- /**
- * Update counter of active effects */
+ /**
+ * Update counter of active effects */
i++;
- /**
- * The third effect has the highest priority, then the second one, then the first one.
- * Hence, as soon as we found an active effect, we can get out of this loop */
- }
-
+ /**
+ * For all external effects set this flag to true. */
+ if(pFx->VideoEffectType > M4VSS3GPP_kVideoEffectType_External)
+ {
+ pC->m_bClipExternalHasStarted = M4OSA_TRUE;
+ }
+ /**
+ * The third effect has the highest priority, then the second one, then the first one.
+ * Hence, as soon as we found an active effect, we can get out of this loop */
+ }
}
-
}
}
i]->ClipProperties.uiStillPicHeight; //ARGB_Height;
pParams->width = pSettings->pClipList[
i]->ClipProperties.uiStillPicWidth; //ARGB_Width;
- M4OSA_TRACE1_1("CLIP M4xVSS_SendCommand is %d", pParams->height);
- M4OSA_TRACE1_1("CLIP M4xVSS_SendCommand is %d", pParams->height);
+ M4OSA_TRACE3_1("CLIP M4xVSS_SendCommand ARGB8888 H = %d", pParams->height);
+ M4OSA_TRACE3_1("CLIP M4xVSS_SendCommand ARGB8888 W = %d", pParams->width);
if( xVSS_context->pPTo3GPPparamsList
== M4OSA_NULL ) /* Means it is the first element of the list */
xVSS_context,
&(xVSS_context->pSettings->Effects[j]),
framingCtx->aFramingCtx,xVSS_context->pSettings->xVSS.outputVideoSize);
- M4OSA_TRACE1_1("FRAMMING AFTER M4xVSS_SendCommand %d",
+ M4OSA_TRACE3_1("FRAMING WIDTH BEFORE M4xVSS_SendCommand %d",
framingCtx->aFramingCtx->width);
- M4OSA_TRACE1_1("FRAMMING AFTER M4xVSS_SendCommand %d",
+ M4OSA_TRACE3_1("FRAMING HEIGHT BEFORE M4xVSS_SendCommand %d",
framingCtx->aFramingCtx->height);
if( err != M4NO_ERROR )