diff options
Diffstat (limited to 'libvideoeditor/vss/common')
4 files changed, 52 insertions, 72 deletions
diff --git a/libvideoeditor/vss/common/inc/M4DECODER_Common.h b/libvideoeditor/vss/common/inc/M4DECODER_Common.h index dd9c0fa..93e3062 100755 --- a/libvideoeditor/vss/common/inc/M4DECODER_Common.h +++ b/libvideoeditor/vss/common/inc/M4DECODER_Common.h @@ -130,21 +130,20 @@ typedef enum M4DECODER_kOptionID_EnableYuvWithEffect = M4OSA_OPTION_ID_CREATE(M4_READ, M4DECODER_COMMON, 0x09), + /** + * Get the supported video decoders and capabilities */ + M4DECODER_kOptionID_VideoDecodersAndCapabilities = + M4OSA_OPTION_ID_CREATE(M4_READ, M4DECODER_COMMON, 0x10), + /* common to MPEG4 decoders */ /** * Get the DecoderConfigInfo */ M4DECODER_MPEG4_kOptionID_DecoderConfigInfo = M4OSA_OPTION_ID_CREATE(M4_READ,\ M4DECODER_MPEG4, 0x01), - /* only for H.264 decoder. */ - /** - Get AVC profile and level. - */ - M4DECODER_kOptionID_AVCProfileAndLevel = M4OSA_OPTION_ID_CREATE(M4_READ, M4DECODER_AVC, 0x01), - /* last decoded cts */ M4DECODER_kOptionID_AVCLastDecodedFrameCTS = M4OSA_OPTION_ID_CREATE(M4_READ, M4DECODER_AVC,\ - 0x02) + 0x01) /* Last decoded cts */ } M4DECODER_OptionID; @@ -223,6 +222,26 @@ typedef enum } M4DECODER_VideoType ; +typedef struct { + M4OSA_UInt32 mProfile; + M4OSA_UInt32 mLevel; +} VideoProfileLevel; + +typedef struct { + VideoProfileLevel *profileLevel; + M4OSA_UInt32 profileNumber; +} VideoComponentCapabilities; + +typedef struct { + M4_StreamType codec; + VideoComponentCapabilities *component; + M4OSA_UInt32 componentNumber; +} VideoDecoder; + +typedef struct { + VideoDecoder *decoder; + M4OSA_UInt32 decoderNumber; +} M4DECODER_VideoDecoders; /** ************************************************************************ * @brief creates an instance of the decoder diff --git a/libvideoeditor/vss/common/inc/M4ENCODER_common.h b/libvideoeditor/vss/common/inc/M4ENCODER_common.h index c94a82e..9064602 100755 --- a/libvideoeditor/vss/common/inc/M4ENCODER_common.h +++ b/libvideoeditor/vss/common/inc/M4ENCODER_common.h @@ -266,7 +266,8 @@ typedef struct M4ENCODER_FrameRate FrameRate; /**< Framerate, see enum */ M4ENCODER_Format Format; /**< Video compression format, H263, MPEG4, MJPEG ... */ - + M4OSA_Int32 videoProfile; /** video profile */ + M4OSA_Int32 videoLevel; /** video level */ } M4ENCODER_Params; /** @@ -292,6 +293,8 @@ typedef struct M4ENCODER_FrameRate FrameRate; /**< Video compression format: H263 or MPEG4 */ M4ENCODER_Format Format; + M4OSA_Int32 videoProfile; /** output video profile */ + M4OSA_Int32 videoLevel; /** output video level */ M4OSA_UInt32 uiHorizontalSearchRange; /**< Set to 0 will use default value (15) */ M4OSA_UInt32 uiVerticalSearchRange; /**< Set to 0 will use default value (15) */ /**< Set to 0 will use default value (0x7FFF i.e. let engine decide when to put an I) */ diff --git a/libvideoeditor/vss/common/inc/M4VD_EXTERNAL_Interface.h b/libvideoeditor/vss/common/inc/M4VD_EXTERNAL_Interface.h index db48207..90bfcb6 100755 --- a/libvideoeditor/vss/common/inc/M4VD_EXTERNAL_Interface.h +++ b/libvideoeditor/vss/common/inc/M4VD_EXTERNAL_Interface.h @@ -29,13 +29,19 @@ extern "C" { (useful for video editing) without having to instanciate a decoder, which can be useful precisely if HW decoders are a possibility. */ -M4OSA_ERR M4DECODER_EXTERNAL_ParseVideoDSI(M4OSA_UInt8* pVol, M4OSA_Int32 aVolSize, - M4DECODER_MPEG4_DecoderConfigInfo* pDci, - M4DECODER_VideoSize* pVideoSize); +M4OSA_ERR M4DECODER_EXTERNAL_ParseVideoDSI( + M4OSA_UInt8* pVol, M4OSA_Int32 aVolSize, + M4DECODER_MPEG4_DecoderConfigInfo* pDci, + M4DECODER_VideoSize* pVideoSize); -M4OSA_ERR M4DECODER_EXTERNAL_ParseAVCDSI(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize, - M4DECODER_AVCProfileLevel *profile); +M4OSA_ERR getAVCProfileAndLevel(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize, + M4OSA_Int32 *pProfile, M4OSA_Int32 *pLevel); +M4OSA_ERR getH263ProfileAndLevel(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize, + M4OSA_Int32 *pProfile, M4OSA_Int32 *pLevel); + +M4OSA_ERR getMPEG4ProfileAndLevel(M4OSA_UInt8 profileAndLevel, + M4OSA_Int32 *pProfile, M4OSA_Int32 *pLevel); #ifdef __cplusplus } diff --git a/libvideoeditor/vss/common/inc/M4_VideoEditingCommon.h b/libvideoeditor/vss/common/inc/M4_VideoEditingCommon.h index a9f6412..5581417 100755 --- a/libvideoeditor/vss/common/inc/M4_VideoEditingCommon.h +++ b/libvideoeditor/vss/common/inc/M4_VideoEditingCommon.h @@ -35,6 +35,8 @@ extern "C" { #define M4VIDEOEDITING_VERSION_MINOR 1 #define M4VIDEOEDITING_VERSION_REVISION 0 +#define M4VIDEOEDITING_VIDEO_UNKNOWN_PROFILE 0x7fffffff +#define M4VIDEOEDITING_VIDEO_UNKNOWN_LEVEL 0x7fffffff /** ****************************************************************************** @@ -71,15 +73,12 @@ typedef enum { */ typedef enum { - M4VIDEOEDITING_kNoneVideo = 0, /**< Video not present */ - M4VIDEOEDITING_kH263 = 1, /**< H263 video */ - M4VIDEOEDITING_kMPEG4 = 2, /**< MPEG-4 video */ - M4VIDEOEDITING_kMPEG4_EMP = 3, /**< MPEG-4 video with support for EMP - (hsr=15, vsr=15, err=0, Iperiod=15, - NO_M4V, NO_AC_PRED) */ - M4VIDEOEDITING_kH264 = 4, /**< H264 video */ - M4VIDEOEDITING_kNullVideo = 254, /**< Do not care video type, use NULL encoder */ - M4VIDEOEDITING_kUnsupportedVideo = 255 /**< Unsupported video stream type */ + M4VIDEOEDITING_kNoneVideo = 0, /**< Video not present */ + M4VIDEOEDITING_kH263 = 1, /**< H263 video */ + M4VIDEOEDITING_kH264 = 2, /**< H264 video */ + M4VIDEOEDITING_kMPEG4 = 3, /**< MPEG-4 video */ + M4VIDEOEDITING_kNullVideo = 254, /**< Do not care video type, use NULL encoder */ + M4VIDEOEDITING_kUnsupportedVideo = 255 /**< Unsupported video stream type */ } M4VIDEOEDITING_VideoFormat; /** @@ -102,51 +101,6 @@ typedef enum { M4VIDEOEDITING_kUnsupportedAudio = 255 /**< Unsupported audio stream type */ } M4VIDEOEDITING_AudioFormat; - -/** - ****************************************************************************** - * enum M4VIDEOEDITING_VideoProfileAndLevel - * @brief This enum defines the video profile and level for MPEG-4 and H263 streams. - ****************************************************************************** -*/ -typedef enum -{ - /* H.263 Profiles and levels */ - M4VIDEOEDITING_kH263_Profile_0_Level_10 = 0, - M4VIDEOEDITING_kH263_Profile_0_Level_20 = 1, - M4VIDEOEDITING_kH263_Profile_0_Level_30 = 2, - M4VIDEOEDITING_kH263_Profile_0_Level_40 = 3, - M4VIDEOEDITING_kH263_Profile_0_Level_45 = 4, - /* MPEG-4 Profiles and levels */ - M4VIDEOEDITING_kMPEG4_SP_Level_0 = 50, - M4VIDEOEDITING_kMPEG4_SP_Level_0b = 51, - M4VIDEOEDITING_kMPEG4_SP_Level_1 = 52, - M4VIDEOEDITING_kMPEG4_SP_Level_2 = 53, - M4VIDEOEDITING_kMPEG4_SP_Level_3 = 54, - M4VIDEOEDITING_kMPEG4_SP_Level_4a = 55, - M4VIDEOEDITING_kMPEG4_SP_Level_5 = 56, - /* AVC Profiles and levels */ - M4VIDEOEDITING_kH264_Profile_0_Level_1 = 150, - M4VIDEOEDITING_kH264_Profile_0_Level_1b = 151, - M4VIDEOEDITING_kH264_Profile_0_Level_1_1 = 152, - M4VIDEOEDITING_kH264_Profile_0_Level_1_2 = 153, - M4VIDEOEDITING_kH264_Profile_0_Level_1_3 = 154, - M4VIDEOEDITING_kH264_Profile_0_Level_2 = 155, - M4VIDEOEDITING_kH264_Profile_0_Level_2_1 = 156, - M4VIDEOEDITING_kH264_Profile_0_Level_2_2 = 157, - M4VIDEOEDITING_kH264_Profile_0_Level_3 = 158, - M4VIDEOEDITING_kH264_Profile_0_Level_3_1 = 159, - M4VIDEOEDITING_kH264_Profile_0_Level_3_2 = 160, - M4VIDEOEDITING_kH264_Profile_0_Level_4 = 161, - M4VIDEOEDITING_kH264_Profile_0_Level_4_1 = 162, - M4VIDEOEDITING_kH264_Profile_0_Level_4_2 = 163, - M4VIDEOEDITING_kH264_Profile_0_Level_5 = 164, - M4VIDEOEDITING_kH264_Profile_0_Level_5_1 = 165, - /* Unsupported profile and level */ - M4VIDEOEDITING_kProfile_and_Level_Out_Of_Range = 255 -} M4VIDEOEDITING_VideoProfileAndLevel; - - /** ****************************************************************************** * enum M4VIDEOEDITING_VideoFrameSize @@ -328,11 +282,9 @@ typedef struct { M4OSA_UInt32 uiVideoTimeScale; /**< Video time scale */ M4OSA_Float fAverageFrameRate; /**< Average frame rate of the video stream */ - M4VIDEOEDITING_VideoProfileAndLevel ProfileAndLevel; /**< Supported MPEG4 and H263 - profiles and levels */ - M4OSA_UInt8 uiH263level; /**< H263 level (from core decoder)*/ - M4OSA_UInt8 uiVideoProfile; /**< H263 or MPEG-4 profile - (from core decoder) */ + M4OSA_Int32 uiVideoLevel; /**< video level*/ + M4OSA_Int32 uiVideoProfile; /**< video profile */ + M4OSA_Bool bMPEG4dataPartition; /**< MPEG-4 uses data partitioning */ M4OSA_Bool bMPEG4rvlc; /**< MPEG-4 uses RVLC tool */ M4OSA_Bool bMPEG4resynchMarker; /**< MPEG-4 stream uses Resynch |