Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 382f6a66 authored by Santosh Madhava's avatar Santosh Madhava Committed by Android Git Automerger
Browse files

am ec6d65f6: Fix for issue 3404624 - The overlay in exported video is blurry

* commit 'ec6d65f6c23188ee0b3187a4ba664c51987816dd':
  Fix for issue 3404624 - The overlay in exported video is blurry
parents 64dc9b1d bb337b47
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -608,6 +608,8 @@ typedef struct
    M4OSA_Bool               bIssecondClip;
    M4OSA_UInt8              *pActiveEffectsList1;  /**< List of the active effects settings. Array of nbEffects RC */
    M4OSA_UInt8              nbActiveEffects1;  /**< Numbers of active effects RC */
    M4OSA_Bool               m_bClipExternalHasStarted;  /**< Flag to indicate that an
                                                              external effect is active */
} M4VSS3GPP_InternalEditContext;


+4 −0
Original line number Diff line number Diff line
@@ -224,6 +224,8 @@ M4OSA_ERR M4VSS3GPP_editInit( M4VSS3GPP_EditContext *pContext,
    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;

@@ -3287,6 +3289,8 @@ static M4OSA_ERR M4VSS3GPP_intSwitchToNextClip(
            }
        }
    }
    /* The flag is set to false at the beginning of every clip */
    pC->m_bClipExternalHasStarted = M4OSA_FALSE;

    /**
    * Return with no error */
+37 −19
Original line number Diff line number Diff line
@@ -770,8 +770,15 @@ static M4OSA_ERR M4VSS3GPP_intCheckVideoMode(
                    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;
            }
        }
@@ -1978,6 +1985,13 @@ M4VSS3GPP_intCheckVideoEffects( M4VSS3GPP_InternalEditContext *pC,
                     * Update counter of active effects */
                    i++;

                    /**
                     * 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 */
@@ -1998,14 +2012,18 @@ M4VSS3GPP_intCheckVideoEffects( M4VSS3GPP_InternalEditContext *pC,
                     * Update counter of active effects */
                    i++;

                    /**
                     * 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 */
                }


            }

        }
    }

+4 −4
Original line number Diff line number Diff line
@@ -2248,8 +2248,8 @@ replaceJPG_3GP:
                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 */
@@ -3892,9 +3892,9 @@ replace3GP_3GP:
                        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 )