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