X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_fourcc.h;h=f36651f99e486ecb1c7494852632a3465a33d00f;hb=c60652e38ac6afd74bd8225e9dae5406f13aaa4f;hp=6951228ed85202a6804d508b497eb8a09c4b9355;hpb=e6d6cbdfdf092ce84d6210d3b27b5994af5e2212;p=vlc diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h index 6951228ed8..f36651f99e 100644 --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h @@ -29,8 +29,6 @@ /* Video codec */ #define VLC_CODEC_MPGV VLC_FOURCC('m','p','g','v') -#define VLC_CODEC_MP1V VLC_FOURCC('m','p','1','v') -#define VLC_CODEC_MP2V VLC_FOURCC('m','p','2','v') #define VLC_CODEC_MP4V VLC_FOURCC('m','p','4','v') #define VLC_CODEC_DIV1 VLC_FOURCC('D','I','V','1') #define VLC_CODEC_DIV2 VLC_FOURCC('D','I','V','2') @@ -112,7 +110,15 @@ #define VLC_CODEC_MDEC VLC_FOURCC('M','D','E','C') #define VLC_CODEC_VMDVIDEO VLC_FOURCC('V','M','D','V') #define VLC_CODEC_CDG VLC_FOURCC('C','D','G',' ') +#define VLC_CODEC_FRWU VLC_FOURCC('F','R','W','U') +#define VLC_CODEC_AMV VLC_FOURCC('A','M','V',' ') +#define VLC_CODEC_INDEO5 VLC_FOURCC('I','V','5','0') +#define VLC_CODEC_VP8 VLC_FOURCC('V','P','8','0') +#define VLC_CODEC_JPEG2000 VLC_FOURCC('J','P','2','K') + +/* Planar YUV 4:1:0 Y:V:U */ +#define VLC_CODEC_YV9 VLC_FOURCC('Y','V','U','9') /* Planar YUV 4:2:0 Y:V:U */ #define VLC_CODEC_YV12 VLC_FOURCC('Y','V','1','2') /* Planar YUV 4:1:0 Y:U:V */ @@ -142,7 +148,7 @@ /* Palettized RGB with palette element R:G:B */ #define VLC_CODEC_RGBP VLC_FOURCC('R','G','B','P') /* 8 bits RGB */ -#define VLC_CODEC_RGB8 VLC_FOURCC('R','G','B','2') +#define VLC_CODEC_RGB8 VLC_FOURCC('R','G','B','8') /* 15 bits RGB stored on 16 bits */ #define VLC_CODEC_RGB15 VLC_FOURCC('R','V','1','5') /* 16 bits RGB store on a 16 bits */ @@ -157,16 +163,20 @@ #define VLC_CODEC_GREY VLC_FOURCC('G','R','E','Y') /* Packed YUV 4:2:2, U:Y:V:Y */ #define VLC_CODEC_UYVY VLC_FOURCC('U','Y','V','Y') +/* Packed YUV 4:2:2, V:Y:U:Y */ +#define VLC_CODEC_VYUY VLC_FOURCC('V','Y','U','Y') /* Packed YUV 4:2:2, Y:U:Y:V */ #define VLC_CODEC_YUYV VLC_FOURCC('Y','U','Y','2') /* Packed YUV 4:2:2, Y:V:Y:U */ #define VLC_CODEC_YVYU VLC_FOURCC('Y','V','Y','U') /* Packed YUV 2:1:1, Y:U:Y:V */ #define VLC_CODEC_Y211 VLC_FOURCC('Y','2','1','1') -/* Planar Y, packed UV, from Matrox */ -#define VLC_CODEC_YMGA VLC_FOURCC('Y','M','G','A') /* Packed YUV 4:2:2, U:Y:V:Y, reverted */ #define VLC_CODEC_CYUV VLC_FOURCC('c','y','u','v') +/* 10-bit 4:2:2 Component YCbCr */ +#define VLC_CODEC_V210 VLC_FOURCC('v','2','1','0') +/* Planar Y Packet UV (420) */ +#define VLC_CODEC_NV12 VLC_FOURCC('N','V','1','2') /* Image codec (video) */ #define VLC_CODEC_PNG VLC_FOURCC('p','n','g',' ') @@ -188,6 +198,7 @@ /* Audio codec */ #define VLC_CODEC_MPGA VLC_FOURCC('m','p','g','a') #define VLC_CODEC_MP4A VLC_FOURCC('m','p','4','a') +#define VLC_CODEC_ALS VLC_FOURCC('a','l','s',' ') #define VLC_CODEC_A52 VLC_FOURCC('a','5','2',' ') #define VLC_CODEC_EAC3 VLC_FOURCC('e','a','c','3') #define VLC_CODEC_DTS VLC_FOURCC('d','t','s',' ') @@ -216,18 +227,23 @@ #define VLC_CODEC_ADPCM_XA VLC_FOURCC('x','a',' ',' ') #define VLC_CODEC_ADPCM_ADX VLC_FOURCC('a','d','x',' ') #define VLC_CODEC_ADPCM_IMA_WS VLC_FOURCC('A','I','W','S') -#define VLC_CODEC_VMDAUDIO VLC_FOURCC('v','m','d','a') #define VLC_CODEC_ADPCM_G726 VLC_FOURCC('g','7','2','6') +#define VLC_CODEC_ADPCM_SWF VLC_FOURCC('S','W','F','a') +#define VLC_CODEC_ADPCM_MS VLC_FOURCC('m','s',0x00,0x02) +#define VLC_CODEC_ADPCM_IMA_WAV VLC_FOURCC('m','s',0x00,0x11) +#define VLC_CODEC_VMDAUDIO VLC_FOURCC('v','m','d','a') #define VLC_CODEC_AMR_NB VLC_FOURCC('s','a','m','r') #define VLC_CODEC_AMR_WB VLC_FOURCC('s','a','w','b') #define VLC_CODEC_ALAC VLC_FOURCC('a','l','a','c') #define VLC_CODEC_QDM2 VLC_FOURCC('Q','D','M','2') #define VLC_CODEC_COOK VLC_FOURCC('c','o','o','k') +#define VLC_CODEC_SIPR VLC_FOURCC('s','i','p','r') #define VLC_CODEC_TTA VLC_FOURCC('T','T','A','1') #define VLC_CODEC_SHORTEN VLC_FOURCC('s','h','n',' ') #define VLC_CODEC_WAVPACK VLC_FOURCC('W','V','P','K') #define VLC_CODEC_GSM VLC_FOURCC('g','s','m',' ') #define VLC_CODEC_GSM_MS VLC_FOURCC('a','g','s','m') +#define VLC_CODEC_ATRAC1 VLC_FOURCC('a','t','r','1') #define VLC_CODEC_ATRAC3 VLC_FOURCC('a','t','r','c') #define VLC_CODEC_SONIC VLC_FOURCC('S','O','N','C') #define VLC_CODEC_IMC VLC_FOURCC(0x1,0x4,0x0,0x0) @@ -237,6 +253,7 @@ #define VLC_CODEC_QCELP VLC_FOURCC('Q','c','l','p') #define VLC_CODEC_302M VLC_FOURCC('3','0','2','m') #define VLC_CODEC_DVD_LPCM VLC_FOURCC('l','p','c','m') +#define VLC_CODEC_DVDA_LPCM VLC_FOURCC('a','p','c','m') #define VLC_CODEC_BD_LPCM VLC_FOURCC('b','p','c','m') #define VLC_CODEC_SDDS VLC_FOURCC('s','d','d','s') #define VLC_CODEC_MIDI VLC_FOURCC('M','I','D','I') @@ -254,12 +271,17 @@ #define VLC_CODEC_S32B VLC_FOURCC('s','3','2','b') #define VLC_CODEC_U32L VLC_FOURCC('u','3','2','l') #define VLC_CODEC_U32B VLC_FOURCC('u','3','2','b') +#define VLC_CODEC_F32L VLC_FOURCC('f','3','2','l') +#define VLC_CODEC_F32B VLC_FOURCC('f','3','2','b') +#define VLC_CODEC_F64L VLC_FOURCC('f','6','4','l') +#define VLC_CODEC_F64B VLC_FOURCC('f','6','4','b') + #define VLC_CODEC_ALAW VLC_FOURCC('a','l','a','w') #define VLC_CODEC_MULAW VLC_FOURCC('m','l','a','w') #define VLC_CODEC_S24DAUD VLC_FOURCC('d','a','u','d') #define VLC_CODEC_FI32 VLC_FOURCC('f','i','3','2') -#define VLC_CODEC_FL32 VLC_FOURCC('f','l','3','2') -#define VLC_CODEC_FL64 VLC_FOURCC('f','l','6','4') +#define VLC_CODEC_TWINVQ VLC_FOURCC('T','W','I','N') +#define VLC_CODEC_ADPCM_IMA_AMV VLC_FOURCC('i','m','a','v') /* Subtitle */ #define VLC_CODEC_SPU VLC_FOURCC('s','p','u',' ') @@ -275,23 +297,49 @@ #define VLC_CODEC_USF VLC_FOURCC('u','s','f',' ') #define VLC_CODEC_OGT VLC_FOURCC('o','g','t',' ') #define VLC_CODEC_CVD VLC_FOURCC('c','v','d',' ') +/* Blu-ray Presentation Graphics */ +#define VLC_CODEC_BD_PG VLC_FOURCC('b','d','p','g') -/* Special endian dependant values */ +/* Special endian dependant values + * The suffic N means Native + * The suffix I means Inverted (ie non native) */ #ifdef WORDS_BIGENDIAN # define VLC_CODEC_S16N VLC_CODEC_S16B # define VLC_CODEC_U16N VLC_CODEC_U16B # define VLC_CODEC_S24N VLC_CODEC_S24B # define VLC_CODEC_S32N VLC_CODEC_S32B +# define VLC_CODEC_FL32 VLC_CODEC_F32B +# define VLC_CODEC_FL64 VLC_CODEC_F64B + +# define VLC_CODEC_S16I VLC_CODEC_S16L +# define VLC_CODEC_U16I VLC_CODEC_U16L +# define VLC_CODEC_S24I VLC_CODEC_S24L +# define VLC_CODEC_S32I VLC_CODEC_S32L #else # define VLC_CODEC_S16N VLC_CODEC_S16L # define VLC_CODEC_U16N VLC_CODEC_U16L # define VLC_CODEC_S24N VLC_CODEC_S24L # define VLC_CODEC_S32N VLC_CODEC_S32L +# define VLC_CODEC_FL32 VLC_CODEC_F32L +# define VLC_CODEC_FL64 VLC_CODEC_F64L + +# define VLC_CODEC_S16I VLC_CODEC_S16B +# define VLC_CODEC_U16I VLC_CODEC_U16B +# define VLC_CODEC_S24I VLC_CODEC_S24B +# define VLC_CODEC_S32I VLC_CODEC_S32B #endif +/* Non official codecs, used to force a profile in an encoder */ +/* MPEG-1 video */ +#define VLC_CODEC_MP1V VLC_FOURCC('m','p','1','v') +/* MPEG-2 video */ +#define VLC_CODEC_MP2V VLC_FOURCC('m','p','2','v') +/* MPEG-I/II layer 3 audio */ +#define VLC_CODEC_MP3 VLC_FOURCC('m','p','3',' ') + /** - * It returns the codec associatedto a fourcc within a ES category. + * It returns the codec associated to a fourcc within a ES category. * * If not found, it will return the given fourcc. * If found, it will allways be one of the VLC_CODEC_ defined above. @@ -300,6 +348,26 @@ */ VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodec, ( int i_cat, vlc_fourcc_t i_fourcc ) ); +/** + * It returns the codec associated to a fourcc store in a zero terminated + * string. + * + * If the string is NULL or does not have exactly 4 charateres, it will + * return 0, otherwise it behaves like vlc_fourcc_GetCodec. + * + * Provided for convenience. + */ +VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodecFromString, ( int i_cat, const char * ) ); + +/** + * It convert the gives fourcc to an audio codec when possible. + * + * The fourcc converted are aflt, araw/pcm , twos, sowt. When an incompatible i_bits + * is detected, 0 is returned. + * The other fourcc goes through vlc_fourcc_GetCodec and i_bits is not checked. + */ +VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodecAudio, ( vlc_fourcc_t i_fourcc, int i_bits ) ); + /** * It returns the description of the given fourcc or NULL if not found. * @@ -307,5 +375,56 @@ VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodec, ( int i_cat, vlc_fourcc_t i_fourc */ VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i_fourcc ) ); +/** + * It returns a list (terminated with the value 0) of YUV fourccs in + * decreasing priority order for the given chroma. + * + * It will always return a non NULL pointer that must not be freed. + */ +VLC_EXPORT( const vlc_fourcc_t *, vlc_fourcc_GetYUVFallback, ( vlc_fourcc_t ) ); + +/** + * It returns a list (terminated with the value 0) of RGB fourccs in + * decreasing priority order for the given chroma. + * + * It will always return a non NULL pointer that must not be freed. + */ +VLC_EXPORT( const vlc_fourcc_t *, vlc_fourcc_GetRGBFallback, ( vlc_fourcc_t ) ); + +/** + * It returns true if the given fourcc is YUV and false otherwise. + */ +VLC_EXPORT( bool, vlc_fourcc_IsYUV, ( vlc_fourcc_t ) ); + +/** + * It returns true if the two fourccs are equivalent if their U&V planes are + * swapped. + */ +VLC_EXPORT( bool, vlc_fourcc_AreUVPlanesSwapped, (vlc_fourcc_t , vlc_fourcc_t ) ); + +/** + * Chroma related information. + */ +typedef struct { + unsigned plane_count; + struct { + struct { + unsigned num; + unsigned den; + } w; + struct { + unsigned num; + unsigned den; + } h; + } p[4]; + unsigned pixel_size; +} vlc_chroma_description_t; + +/** + * It returns a vlc_chroma_description_t describing the request fourcc or NULL + * if not found. + */ +VLC_EXPORT( const vlc_chroma_description_t *, vlc_fourcc_GetChromaDescription, ( vlc_fourcc_t fourcc ) ); + #endif /* _VLC_FOURCC_H */