• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __M4XVSS_INTERNAL_H__
18 #define __M4XVSS_INTERNAL_H__
19 
20 /**
21  ******************************************************************************
22  * @file    M4xVSS_Internal.h
23  * @brief    Internal of Video Authoring.
24  * @note
25  ******************************************************************************
26 */
27 
28 #include "NXPSW_CompilerSwitches.h"
29 
30 #include "M4MCS_API.h"
31 #include "M4MCS_ErrorCodes.h"
32 
33 #include "M4PTO3GPP_API.h"
34 #include "M4PTO3GPP_ErrorCodes.h"
35 
36 #include "M4AIR_API.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #define M4_xVSS_MAJOR        1
43 #define M4_xVSS_MINOR        5
44 #define M4_xVSS_REVISION    5
45 
46 /* The following defines describe the max dimensions of an input JPG */
47 #define M4XVSS_MX_JPG_NB_OF_PIXELS    3926016
48 
49 /*Size of the UTF temporary conversion buffer keep in the VA internal context and
50 allocate at the initialization*/
51 #define UTF_CONVERSION_BUFFER_SIZE            2048
52 
53 /* Max path length size */
54 #define  M4XVSS_MAX_PATH_LEN 256
55 
56 /** Determine absolute value of a. */
57 #define M4xVSS_ABS(a)               ( ( (a) < (0) ) ? (-(a)) : (a) )
58 
59 /** Y,U,V values in case of black borders rendering */
60 #define Y_PLANE_BORDER_VALUE    0x00
61 #define U_PLANE_BORDER_VALUE    0x80
62 #define V_PLANE_BORDER_VALUE    0x80
63 
64 /**
65  ******************************************************************************
66  * struct    M4xVSS_EffectsAlphaBlending
67  * @brief    Internal effects alpha blending parameters
68  * @note    This structure contains all internal informations to create an alpha
69  *            blending for the effects text and framing
70  ******************************************************************************
71 */
72 typedef struct
73 {
74     M4OSA_UInt8                    m_fadeInTime;        /*Start percentage of Alpha blending*/
75     M4OSA_UInt8                    m_fadeOutTime;        /*Middle percentage of Alpha blending*/
76     M4OSA_UInt8                    m_end;            /*End percentage of Alpha blending*/
77     M4OSA_UInt8                    m_middle;    /*Duration, in percentage of effect duration,
78                                                  of the FadeIn phase*/
79     M4OSA_UInt8                    m_start;    /*Duration, in percentage of effect duration,
80                                                 of the FadeOut phase*/
81 
82 } M4xVSS_internalEffectsAlphaBlending;
83 
84 /**
85  ******************************************************************************
86  * THIS STRUCTURE MUST NOT BE MODIFIED
87  * struct    M4xVSS_FramingStruct
88  * @brief    It is used internally by xVSS for framing effect, and by VPS for previewing
89  ******************************************************************************
90 */
91 typedef struct
92 {
93     M4VIFI_ImagePlane *FramingRgb;                /**< decoded BGR565 plane */
94     M4VIFI_ImagePlane *FramingYuv;                /**< converted YUV420 planar plane */
95     M4OSA_Int32 duration;                        /**< Duration of the frame */
96     M4OSA_Int32 previousClipTime;                /**< Previous clip time, used by framing
97                                                      filter for SAVING */
98     M4OSA_Int32 previewOffsetClipTime;            /**< Previous clip time, used by framing
99                                                      filter for PREVIEW */
100     M4OSA_Int32 previewClipTime;                /**< Current clip time, used by framing
101                                                      filter for PREVIEW */
102     M4OSA_Void* pCurrent;                        /**< Current M4xVSS_FramingStruct used by
103                                                          framing filter */
104     M4OSA_Void* pNext;                            /**< Next M4xVSS_FramingStruct, if no more,
105                                                          point on current M4xVSS_FramingStruct */
106     M4OSA_UInt32 topleft_x;                        /**< The top-left X coordinate in the output
107                                                          picture of the first decoded pixel */
108     M4OSA_UInt32 topleft_y;                        /**< The top-left Y coordinate in the output
109                                                          picture of the first decoded pixel */
110     M4xVSS_internalEffectsAlphaBlending* alphaBlendingStruct; /* Alpha blending Struct */
111 /*To support ARGB8888 : get the width and height in case of file ARGB888 used in framing
112  as video effect */
113     M4OSA_UInt32                width;   /*width of the ARGB8888 clip
114                                         .Used only if video effect is framming */
115     M4OSA_UInt32                height; /*height of the ARGB8888 clip .
116                                         Used only if video effect is framming */
117 
118 } M4xVSS_FramingStruct;
119 
120 #ifdef DECODE_GIF_ON_SAVING
121 /**
122  ******************************************************************************
123  * THIS STRUCTURE MUST NOT BE MODIFIED
124  * struct    M4xVSS_FramingContext
125  * @brief    It is used internally by xVSS for framing effect, when the flag
126                 DECODE_GIF_ON_SAVING is activated
127  ******************************************************************************
128 */
129 typedef struct
130 {
131     M4xVSS_FramingStruct*            aFramingCtx;        /**<Framing struct for the decoding
132                                                             of the current frame of the gif*/
133     M4xVSS_FramingStruct*            aFramingCtx_last;    /**<Framing struct for the decoding of
134                                                              the previous frame of the gif*/
135     M4OSA_FileReadPointer*            pFileReadPtr;    /**< Pointer on OSAL file read functions */
136     M4OSA_FileWriterPointer*        pFileWritePtr;     /**< Pointer on OSAL file write functions */
137     M4OSA_Void*                        pSPSContext;        /**<SPS context for the GIF decoding*/
138     //M4SPS_Stream                    inputStream;        /**<GIF input stream buffer pointer*/
139     M4OSA_Void*                        pEffectFilePath;    /**<file path of the gif*/
140     M4VIDEOEDITING_VideoFrameSize    outputVideoSize;    /**< Output video size RC */
141     //M4SPS_DisposalMode                disposal;            /**<previous frame GIF disposal*/
142     M4OSA_UInt16                    b_animated;            /**<Is the GIF animated?*/
143     M4OSA_Bool                        bEffectResize;        /**<Is the gif resize*/
144     M4OSA_UInt32                    topleft_x;            /**< The top-left X coordinate in the
145                                                                  output picture of the first
146                                                                  decoded pixel */
147     M4OSA_UInt32                    topleft_y;            /**< The top-left Y coordinate in the
148                                                                  output picture of the first
149                                                                  decoded pixel */
150     M4OSA_UInt32                    width;                /**<GIF width, fill during the
151                                                                 initialization with the SPS*/
152     M4OSA_UInt32                    height;                /**<GIF height, fill during the
153                                                                  initialization with the SPS*/
154     M4OSA_UInt32                    effectDuration;        /**<Effect duration*/
155     M4OSA_Int32                        effectStartTime;    /**<Effect start time*/
156     M4OSA_UInt32                    clipTime;            /**<current output clip time for the
157                                                                 current frame*/
158     M4OSA_UInt32                    last_clipTime;        /**<previous output clip time for the
159                                                                 previous frame*/
160     M4OSA_UInt32                    lastStepDuration;    /**<Time interval between the previous
161                                                              frame and the current frame*/
162     M4OSA_Bool                        b_IsFileGif;        /**<Is the framing using a gif file*/
163     M4OSA_UInt32                    last_width;            /**<Last frame width*/
164     M4OSA_UInt32                    last_height;        /**<Last frame height*/
165     M4OSA_UInt32                    last_topleft_x;        /**<Last frame x topleft*/
166     M4OSA_UInt32                    last_topleft_y;        /**<Last frame y topleft*/
167     M4OSA_UInt32                    current_gif_time;    /**< Current time os the GIF in output
168                                                               file time */
169     M4OSA_Float                        frameDurationRatio;    /**< Frame duration ratio */
170     M4xVSS_internalEffectsAlphaBlending*    alphaBlendingStruct;/*Alpha blending structure*/
171 #ifdef DEBUG_GIF
172     M4OSA_UInt8                        uiDebug_fileCounter;/**<for debug purpose,
173                                                                  count the frame of the gif*/
174 #endif /*DEBUG_GIF*/
175 }M4xVSS_FramingContext;
176 #endif /*DECODE_GIF_ON_SAVING*/
177 
178 /**
179  ******************************************************************************
180  * struct    M4xVSS_Pto3GPP_params
181  * @brief    Internal xVSS parameter for Pto3GPP module
182  * @note    This structure is filled by M4xVSS_sendCommand function,
183  * @note    and is used during M4xVSS_Step function to initialize Pto3GPP module
184  * @note    All the JPG files to transform to 3GP are chained
185  ******************************************************************************
186 */
187 typedef struct {
188     M4OSA_Char*                        pFileIn;
189     M4OSA_Char*                        pFileOut;
190     M4OSA_Char*                        pFileTemp;            /**< temporary file used for
191                                                                  metadata writing, NULL is cstmem
192                                                                  writer not used */
193     M4OSA_UInt32                    duration;
194     M4VIDEOEDITING_FileType            InputFileType;
195     M4OSA_Bool                        isCreated;            /**< This boolean is used to know if
196                                                                     the output file is already
197                                                                     created or not */
198     M4OSA_Bool                        isPanZoom;            /**< RC: Boolean used to know if the
199                                                                 pan and zoom mode is enabled */
200     M4OSA_UInt16                    PanZoomXa;            /**< RC */
201     M4OSA_UInt16                    PanZoomTopleftXa;    /**< RC */
202     M4OSA_UInt16                    PanZoomTopleftYa;    /**< RC */
203     M4OSA_UInt16                    PanZoomXb;            /**< RC */
204     M4OSA_UInt16                    PanZoomTopleftXb;    /**< RC */
205     M4OSA_UInt16                    PanZoomTopleftYb;    /**< RC */
206     M4xVSS_MediaRendering            MediaRendering;        /**< FB: to render or not picture
207                                                                 aspect ratio */
208     M4VIDEOEDITING_VideoFramerate    framerate;            /**< RC */
209     M4OSA_Void*                pNext;                /**< Address of next M4xVSS_Pto3GPP_params*
210                                                              element */
211     /*To support ARGB8888:width and height */
212     M4OSA_UInt32            width;
213     M4OSA_UInt32             height;
214 
215 } M4xVSS_Pto3GPP_params;
216 
217 /**
218  ******************************************************************************
219  * struct    M4xVSS_fiftiesStruct
220  * @brief    It is used internally by xVSS for fifties effect
221  ******************************************************************************
222 */
223 typedef struct
224 {
225     M4OSA_UInt32 fiftiesEffectDuration;    /**< Duration of the same effect in a video */
226     M4OSA_Int32 previousClipTime;          /**< Previous clip time, used by framing filter
227                                                 for SAVING */
228     M4OSA_UInt32 shiftRandomValue;                /**< Vertical shift of the image */
229       M4OSA_UInt32 stripeRandomValue;                /**< Horizontal position of the stripe */
230 
231 } M4xVSS_FiftiesStruct;
232 
233 /**
234  ******************************************************************************
235  * struct    M4xVSS_ColorRGB16
236  * @brief    It is used internally by xVSS for RGB16 color effect
237  ******************************************************************************
238 */
239 typedef struct
240 {
241     M4xVSS_VideoEffectType colorEffectType;    /*Color type of effect*/
242     M4OSA_UInt16    rgb16ColorData;            /*RGB16 color only for the RGB16 color effect*/
243 } M4xVSS_ColorStruct;
244 
245 
246 /**
247  ******************************************************************************
248  * struct    M4xVSS_PictureCallbackCtxt
249  * @brief    The Callback Context parameters for Pto3GPP
250  ******************************************************************************
251 */
252 typedef struct
253 {
254     M4OSA_Char*                m_FileIn;
255     M4OSA_UInt32            m_NbImage;
256     M4OSA_UInt32            m_ImageCounter;
257     M4OSA_Double            m_timeDuration;
258     M4OSA_FileReadPointer*  m_pFileReadPtr;
259     M4VIFI_ImagePlane*        m_pDecodedPlane; /* Used for Pan and Zoom only */
260     M4xVSS_Pto3GPP_params*    m_pPto3GPPparams;
261     M4OSA_Context            m_air_context;
262     M4xVSS_MediaRendering    m_mediaRendering;
263 
264 } M4xVSS_PictureCallbackCtxt;
265 
266 /**
267  ******************************************************************************
268  * enum        M4xVSS_State
269  * @brief    Internal State of the xVSS
270  ******************************************************************************
271 */
272 typedef enum
273 {
274     M4xVSS_kStateInitialized = 0,
275     M4xVSS_kStateAnalyzing,
276     M4xVSS_kStateOpened,
277     //M4xVSS_kStateGeneratingPreview,
278     //M4xVSS_kStatePreview,
279     M4xVSS_kStateSaving,
280     M4xVSS_kStateSaved
281 
282 } M4xVSS_State;
283 
284 /**
285  ******************************************************************************
286  * enum        M4xVSS_editMicroState
287  * @brief    Internal Micro state of the xVSS for previewing/saving states
288  ******************************************************************************
289 */
290 typedef enum
291 {
292     M4xVSS_kMicroStateEditing = 0,
293     M4xVSS_kMicroStateAudioMixing
294 
295 } M4xVSS_editMicroState;
296 
297 /**
298  ******************************************************************************
299  * enum        M4xVSS_editMicroState
300  * @brief    Internal Micro state of the xVSS for analyzing states
301  ******************************************************************************
302 */
303 typedef enum
304 {
305     M4xVSS_kMicroStateAnalysePto3GPP = 0,
306     M4xVSS_kMicroStateConvertPto3GPP,
307     M4xVSS_kMicroStateAnalyzeMCS,
308     M4xVSS_kMicroStateTranscodeMCS
309 
310 } M4xVSS_analyseMicroState;
311 
312 
313 /**
314  ******************************************************************************
315  * struct    M4xVSS_MCS_params
316  * @brief    Internal xVSS parameter for MCS module
317  * @note    This structure is filled by M4xVSS_sendCommand function,
318  * @note    and is used during M4xVSS_Step function to initialize MCS module
319  * @note    All the input files to transcode are chained
320  ******************************************************************************
321 */
322 typedef struct {
323     M4OSA_Void*                                pFileIn;
324     M4OSA_Void*                                pFileOut;
325     /**< temporary file used for metadata writing, NULL is cstmem writer not used */
326     M4OSA_Void*                             pFileTemp;
327     M4VIDEOEDITING_FileType                    InputFileType;
328     M4VIDEOEDITING_FileType                    OutputFileType;
329     M4VIDEOEDITING_VideoFormat                OutputVideoFormat;
330     M4VIDEOEDITING_VideoFrameSize            OutputVideoFrameSize;
331     M4VIDEOEDITING_VideoFramerate            OutputVideoFrameRate;
332     M4VIDEOEDITING_AudioFormat                OutputAudioFormat;
333     M4VIDEOEDITING_AudioSamplingFrequency    OutputAudioSamplingFrequency;
334     M4OSA_Bool                                bAudioMono;
335     M4VIDEOEDITING_Bitrate                    OutputVideoBitrate;
336     M4VIDEOEDITING_Bitrate                    OutputAudioBitrate;
337     M4OSA_Bool                                isBGM;
338     /**< This boolean is used to know if the output file is already created or not */
339     M4OSA_Bool                                isCreated;
340     /**< Address of next M4xVSS_MCS_params* element */
341     M4OSA_Void*                                pNext;
342 
343     /*FB: transcoding per parts*/
344     M4OSA_UInt32                         BeginCutTime;    /**< Beginning cut time in input file */
345     M4OSA_UInt32                         EndCutTime;      /**< End cut time in input file */
346     M4OSA_UInt32                         OutputVideoTimescale;    /*Output timescale*/
347 
348     M4MCS_MediaRendering                 MediaRendering;   /**< FB: to crop, resize, or render
349                                                                 black borders*/
350     M4OSA_UInt32                         videoclipnumber;
351     M4OSA_UInt32  outputVideoProfile;
352     M4OSA_UInt32  outputVideoLevel;
353 } M4xVSS_MCS_params;
354 
355 /**
356  ******************************************************************************
357  * struct    M4xVSS_internal_AlphaMagicSettings
358  * @brief    This structure defines the alpha magic transition settings
359  ******************************************************************************
360 */
361 typedef struct {
362     M4VIFI_ImagePlane    *pPlane;
363     M4OSA_Int32         blendingthreshold;    /**< Blending Range */
364     M4OSA_Bool            isreverse;            /**< direct effect or reverse */
365 
366 } M4xVSS_internal_AlphaMagicSettings;
367 
368 
369 /**
370  ******************************************************************************
371  * struct    M4xVSS_internal_SlideTransitionSettings
372  * @brief    This structure defines the internal slide transition settings
373  * @note    This type happens to match the external transition settings
374  *            structure (i.e. the one which is given by the application), but are
375  *            conceptually different types, so that if (or rather when) some day
376  *            translation needs to occur when loading the settings from the app,
377  *            this separate type will already be ready.
378  ******************************************************************************
379 */
380 
381 typedef M4xVSS_SlideTransitionSettings    M4xVSS_internal_SlideTransitionSettings;
382 
383 /**
384  ******************************************************************************
385  * struct    M4xVSS_internalJpegChunkMode
386  * @brief    This structure defines the parameters of the chunk callback to decode
387  *            a JPEG by chunk mode.
388  ******************************************************************************
389 */
390 
391 /**
392  ******************************************************************************
393  * struct    M4xVSS_UTFConversionContext
394  * @brief    Internal UTF conversion context
395  * @note    This structure contains the UTF conversion informations
396  *            needed by the xVSS to manage the different formats (UTF8/16/ASCII)
397  ******************************************************************************
398 */
399 typedef struct
400 {
401     /*Function pointer on an external text conversion function */
402     M4xVSS_toUTF8Fct                pConvToUTF8Fct;
403     /*Function pointer on an external text conversion function */
404     M4xVSS_fromUTF8Fct                pConvFromUTF8Fct;
405     /*Temporary buffer that contains the result of each conversion*/
406     M4OSA_Void*                        pTempOutConversionBuffer;
407     /*Size of the previous buffer, the size is prederminated*/
408     M4OSA_UInt32                    m_TempOutConversionSize;
409 } M4xVSS_UTFConversionContext;
410 
411 
412 
413 /**
414  ******************************************************************************
415  * struct    M4xVSS_Context
416  * @brief    Internal context of the xVSS
417  * @note    This structure contains all internal informations needed by the xVSS
418  ******************************************************************************
419 */
420 typedef struct {
421     /**< Pointer on OSAL file read functions */
422     M4OSA_FileReadPointer*            pFileReadPtr;
423     /**< Pointer on OSAL file write functions */
424     M4OSA_FileWriterPointer*        pFileWritePtr;
425     /**< Local copy of video editor settings */
426     M4VSS3GPP_EditSettings*            pSettings;
427     /**< Current Settings of video editor to use in step functions for preview/save */
428     M4VSS3GPP_EditSettings*            pCurrentEditSettings;
429     /**< Current context of video editor to use in step functions for preview/save */
430     M4VSS3GPP_EditContext            pCurrentEditContext;
431     /**< This is to know if a previous M4xVSS_sendCommand has already been called */
432     M4OSA_UInt8                        previousClipNumber;
433     /**< Audio mixing settings, needed to free it in M4xVSS_internalCloseAudioMixedFile function*/
434     M4VSS3GPP_AudioMixingSettings*    pAudioMixSettings;
435     /**< Audio mixing context */
436     M4VSS3GPP_AudioMixingContext    pAudioMixContext;
437     /**< File path for PCM output file: used for preview, given to user */
438     M4OSA_Char*                        pcmPreviewFile;
439     /**< Duplication of output file pointer, to be able to use audio mixing */
440     M4OSA_Char*                        pOutputFile;
441     /**< Duplication of temporary file pointer, to be able to use audio mixing */
442     M4OSA_Char*                        pTemporaryFile;
443     /**< Micro state for Saving/Previewing state */
444     M4xVSS_editMicroState            editingStep;
445     /**< Micro state for Analyzing state */
446     M4xVSS_analyseMicroState        analyseStep;
447     /**< Nb of step for analysis or save/preview. Used to compute progression
448          of analysis or save/preview */
449     M4OSA_UInt8                        nbStepTotal;
450     /**< Current step number for analysis or save/preview */
451     M4OSA_UInt8                        currentStep;
452     /**< To be able to free pEffects during preview close */
453     M4xVSS_PreviewSettings*            pPreviewSettings;
454     /**< Temporary file path: all temporary files are created here */
455     M4OSA_Char*                        pTempPath;
456     /**< Current state of xVSS */
457     M4xVSS_State                    m_state;
458     /**< List of still pictures input to convert to 3GP with parameters */
459     M4xVSS_Pto3GPP_params*            pPTo3GPPparamsList;
460     /**< Current element of the above chained list beeing processd by the Pto3GPP */
461     M4xVSS_Pto3GPP_params*            pPTo3GPPcurrentParams;
462     /**< Current Pto3GPP context, needed to call Pto3GPP_step function in M4xVSS_step function */
463     M4PTO3GPP_Context                pM4PTO3GPP_Ctxt;
464     /**< Pointer on the callback function of the Pto3GPP module */
465     M4xVSS_PictureCallbackCtxt*        pCallBackCtxt;
466     /**< List of files to transcode with parameters */
467     M4xVSS_MCS_params*                pMCSparamsList;
468     /**< Current element of the above chained list beeing processd by the MCS */
469     M4xVSS_MCS_params*                pMCScurrentParams;
470     /**< Current MCS context, needed to call MCS_step function in M4xVSS_step function*/
471     M4MCS_Context                    pMCS_Ctxt;
472     /**< Index to have unique temporary filename */
473     M4OSA_UInt32                    tempFileIndex;
474     /**< In case of MMS use case, targeted bitrate to reach output file size */
475     M4OSA_UInt32                    targetedBitrate;
476     /**< If the sendCommand fct is called twice or more, the first computed timescale
477         recorded here must be reused */
478     M4OSA_UInt32                    targetedTimescale;
479 
480     /*UTF Conversion support*/
481     M4xVSS_UTFConversionContext    UTFConversionContext;    /*UTF conversion context structure*/
482 
483 } M4xVSS_Context;
484 
485 /**
486  * Internal function prototypes */
487 
488 M4OSA_ERR M4xVSS_internalStartTranscoding(M4OSA_Context pContext,
489                                           M4OSA_UInt32 *rotationDegree);
490 
491 M4OSA_ERR M4xVSS_internalStopTranscoding(M4OSA_Context pContext);
492 
493 M4OSA_ERR M4xVSS_internalDecodeJPG(M4OSA_Void* pFileIn, M4OSA_FileReadPointer* pFileReadPtr,
494                                    M4VIFI_ImagePlane** pImagePlanes);
495 
496 M4OSA_ERR M4xVSS_internalConvertARGB8888toYUV420(M4OSA_Void* pFileIn,
497                                                  M4OSA_FileReadPointer* pFileReadPtr,
498                                                  M4VIFI_ImagePlane** pImagePlanes,
499                                                  M4OSA_UInt32 width,M4OSA_UInt32 height);
500 M4OSA_ERR M4xVSS_internalDecodeAndResizeJPG(M4OSA_Void* pFileIn,
501                                             M4OSA_FileReadPointer* pFileReadPtr,
502                                             M4VIFI_ImagePlane* pImagePlanes);
503 M4OSA_ERR M4xVSS_internalConvertAndResizeARGB8888toYUV420(M4OSA_Void* pFileIn,
504                                                           M4OSA_FileReadPointer* pFileReadPtr,
505                                                           M4VIFI_ImagePlane* pImagePlanes,
506                                                           M4OSA_UInt32 width,M4OSA_UInt32 height);
507 
508 M4OSA_ERR M4xVSS_internalStartConvertPictureTo3gp(M4OSA_Context pContext);
509 
510 M4OSA_ERR M4xVSS_internalStopConvertPictureTo3gp(M4OSA_Context pContext);
511 
512 M4OSA_ERR M4xVSS_internalConvertRGBtoYUV(M4xVSS_FramingStruct* framingCtx);
513 
514 #ifdef DECODE_GIF_ON_SAVING
515 M4OSA_ERR M4xVSS_internalDecodeGIF(M4OSA_Context pContext);
516 
517 M4OSA_ERR M4xVSS_internalDecodeGIF_Initialization(M4OSA_Context pContext);
518 
519 M4OSA_ERR M4xVSS_internalDecodeGIF_Cleaning(M4OSA_Context pContext);
520 
521 #else
522 M4OSA_ERR M4xVSS_internalDecodeGIF(M4OSA_Context pContext, M4VSS3GPP_EffectSettings* pEffect,
523                                    M4xVSS_FramingStruct* framingCtx);
524 #endif /*DECODE_GIF_ON_SAVING*/
525 
526 M4OSA_ERR M4xVSS_internalConvertARGB888toYUV420_FrammingEffect(M4OSA_Context pContext,
527                                                                M4VSS3GPP_EffectSettings* pEffect,
528                                                                M4xVSS_FramingStruct* framingCtx,
529                                                                M4VIDEOEDITING_VideoFrameSize \
530                                                                     OutputVideoResolution);
531 
532 M4OSA_ERR M4xVSS_internalGenerateEditedFile(M4OSA_Context pContext);
533 
534 M4OSA_ERR M4xVSS_internalCloseEditedFile(M4OSA_Context pContext);
535 
536 M4OSA_ERR M4xVSS_internalGenerateAudioMixFile(M4OSA_Context pContext);
537 
538 M4OSA_ERR M4xVSS_internalCloseAudioMixedFile(M4OSA_Context pContext);
539 
540 M4OSA_ERR M4xVSS_internalFreePreview(M4OSA_Context pContext);
541 
542 M4OSA_ERR M4xVSS_internalFreeSaving(M4OSA_Context pContext);
543 
544 M4OSA_ERR M4xVSS_freeSettings(M4VSS3GPP_EditSettings* pSettings);
545 
546 M4OSA_ERR M4xVSS_freeCommand(M4OSA_Context pContext);
547 
548 M4OSA_ERR M4xVSS_internalGetProperties(M4OSA_Context pContext, M4OSA_Char* pFile,
549                                          M4VIDEOEDITING_ClipProperties *pFileProperties);
550 
551 M4OSA_ERR M4xVSS_AlphaMagic( M4OSA_Void *userData, M4VIFI_ImagePlane PlaneIn1[3],
552                              M4VIFI_ImagePlane PlaneIn2[3], M4VIFI_ImagePlane *PlaneOut,
553                              M4VSS3GPP_ExternalProgress *pProgress,
554                              M4OSA_UInt32 uiTransitionKind);
555 
556 M4OSA_ERR M4xVSS_AlphaMagicBlending( M4OSA_Void *userData, M4VIFI_ImagePlane PlaneIn1[3],
557                                      M4VIFI_ImagePlane PlaneIn2[3], M4VIFI_ImagePlane *PlaneOut,
558                                      M4VSS3GPP_ExternalProgress *pProgress,
559                                      M4OSA_UInt32 uiTransitionKind);
560 
561 M4OSA_ERR M4xVSS_SlideTransition( M4OSA_Void *userData, M4VIFI_ImagePlane PlaneIn1[3],
562                                   M4VIFI_ImagePlane PlaneIn2[3], M4VIFI_ImagePlane *PlaneOut,
563                                   M4VSS3GPP_ExternalProgress *pProgress,
564                                   M4OSA_UInt32 uiTransitionKind);
565 
566 M4OSA_ERR M4xVSS_FadeBlackTransition(M4OSA_Void *userData, M4VIFI_ImagePlane PlaneIn1[3],
567                                      M4VIFI_ImagePlane PlaneIn2[3],M4VIFI_ImagePlane *PlaneOut,
568                                      M4VSS3GPP_ExternalProgress *pProgress,
569                                      M4OSA_UInt32 uiTransitionKind);
570 
571 M4OSA_ERR M4xVSS_internalGetTargetedTimeScale(M4OSA_Context pContext,
572                                               M4VSS3GPP_EditSettings* pSettings,
573                                               M4OSA_UInt32* pTargetedTimeScale);
574 
575 M4OSA_ERR M4xVSS_internalConvertToUTF8(M4OSA_Context pContext, M4OSA_Void* pBufferIn,
576                                        M4OSA_Void* pBufferOut, M4OSA_UInt32* convertedSize);
577 
578 
579 M4OSA_ERR M4xVSS_internalConvertFromUTF8(M4OSA_Context pContext, M4OSA_Void* pBufferIn,
580                                          M4OSA_Void* pBufferOut, M4OSA_UInt32* convertedSize);
581 #ifdef __cplusplus
582 }
583 #endif /* __cplusplus */
584 
585 
586 #endif /* __M4XVSS_INTERNAL_H__ */
587 
588