/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __M4XVSS_INTERNAL_H__ #define __M4XVSS_INTERNAL_H__ /** ****************************************************************************** * @file M4xVSS_Internal.h * @brief Internal of Video Authoring. * @note ****************************************************************************** */ #include "NXPSW_CompilerSwitches.h" #include "M4MCS_API.h" #include "M4MCS_ErrorCodes.h" #include "M4PTO3GPP_API.h" #include "M4PTO3GPP_ErrorCodes.h" #include "M4AIR_API.h" #ifdef __cplusplus extern "C" { #endif #define M4_xVSS_MAJOR 1 #define M4_xVSS_MINOR 5 #define M4_xVSS_REVISION 5 /* The following defines describe the max dimensions of an input JPG */ #define M4XVSS_MX_JPG_NB_OF_PIXELS 3926016 /*Size of the UTF temporary conversion buffer keep in the VA internal context and allocate at the initialization*/ #define UTF_CONVERSION_BUFFER_SIZE 2048 /* Max path length size */ #define M4XVSS_MAX_PATH_LEN 256 /** Determine absolute value of a. */ #define M4xVSS_ABS(a) ( ( (a) < (0) ) ? (-(a)) : (a) ) /** Y,U,V values in case of black borders rendering */ #define Y_PLANE_BORDER_VALUE 0x00 #define U_PLANE_BORDER_VALUE 0x80 #define V_PLANE_BORDER_VALUE 0x80 /** ****************************************************************************** * struct M4xVSS_EffectsAlphaBlending * @brief Internal effects alpha blending parameters * @note This structure contains all internal informations to create an alpha * blending for the effects text and framing ****************************************************************************** */ typedef struct { M4OSA_UInt8 m_fadeInTime; /*Start percentage of Alpha blending*/ M4OSA_UInt8 m_fadeOutTime; /*Middle percentage of Alpha blending*/ M4OSA_UInt8 m_end; /*End percentage of Alpha blending*/ M4OSA_UInt8 m_middle; /*Duration, in percentage of effect duration, of the FadeIn phase*/ M4OSA_UInt8 m_start; /*Duration, in percentage of effect duration, of the FadeOut phase*/ } M4xVSS_internalEffectsAlphaBlending; /** ****************************************************************************** * THIS STRUCTURE MUST NOT BE MODIFIED * struct M4xVSS_FramingStruct * @brief It is used internally by xVSS for framing effect, and by VPS for previewing ****************************************************************************** */ typedef struct { M4VIFI_ImagePlane *FramingRgb; /**< decoded BGR565 plane */ M4VIFI_ImagePlane *FramingYuv; /**< converted YUV420 planar plane */ M4OSA_Int32 duration; /**< Duration of the frame */ M4OSA_Int32 previousClipTime; /**< Previous clip time, used by framing filter for SAVING */ M4OSA_Int32 previewOffsetClipTime; /**< Previous clip time, used by framing filter for PREVIEW */ M4OSA_Int32 previewClipTime; /**< Current clip time, used by framing filter for PREVIEW */ M4OSA_Void* pCurrent; /**< Current M4xVSS_FramingStruct used by framing filter */ M4OSA_Void* pNext; /**< Next M4xVSS_FramingStruct, if no more, point on current M4xVSS_FramingStruct */ M4OSA_UInt32 topleft_x; /**< The top-left X coordinate in the output picture of the first decoded pixel */ M4OSA_UInt32 topleft_y; /**< The top-left Y coordinate in the output picture of the first decoded pixel */ M4xVSS_internalEffectsAlphaBlending* alphaBlendingStruct; /* Alpha blending Struct */ /*To support ARGB8888 : get the width and height in case of file ARGB888 used in framing as video effect */ M4OSA_UInt32 width; /*width of the ARGB8888 clip .Used only if video effect is framming */ M4OSA_UInt32 height; /*height of the ARGB8888 clip . Used only if video effect is framming */ } M4xVSS_FramingStruct; #ifdef DECODE_GIF_ON_SAVING /** ****************************************************************************** * THIS STRUCTURE MUST NOT BE MODIFIED * struct M4xVSS_FramingContext * @brief It is used internally by xVSS for framing effect, when the flag DECODE_GIF_ON_SAVING is activated ****************************************************************************** */ typedef struct { M4xVSS_FramingStruct* aFramingCtx; /**