X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Ffourcc.c;h=80b8db3db62433c66587f2c59455a6bae6458e04;hb=faca3e7c1b56dcb2e26ee82d55ea55f4ee2316d3;hp=95e3bc0e0b5e0c04fc81e5c5479f0dbb25fde2f9;hpb=376853e5d685a9dde50acbdc2524fa5d890aed83;p=vlc diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c index 95e3bc0e0b..80b8db3db6 100644 --- a/src/misc/fourcc.c +++ b/src/misc/fourcc.c @@ -443,10 +443,15 @@ static const entry_t p_list_video[] = { B(VLC_CODEC_VP6F, "On2's VP6.2 Video (Flash)"), A("VP6F"), + A("FLV4"), B(VLC_CODEC_VP6A, "On2's VP6 A Video"), A("VP6A"), + B(VLC_CODEC_VP8, "Google/On2's VP8 Video"), + A("VP80"), + + /* Xiph.org theora */ B(VLC_CODEC_THEORA, "Xiph.org's Theora Video"), A("theo"), @@ -699,6 +704,9 @@ static const entry_t p_list_video[] = { B(VLC_CODEC_V210, "10-bit 4:2:2 Component YCbCr"), A("v210"), + B(VLC_CODEC_NV12, "Planar Y, Packet UV (420)"), + A("NV12"), + /* Videogames Codecs */ /* Interplay MVE */ @@ -875,6 +883,10 @@ static const entry_t p_list_audio[] = { A("mp4a"), A("aac "), + /* ALS audio */ + B(VLC_CODEC_ALS, "MPEG-4 Audio Lossless (ALS)"), + A("als "), + /* 4X Technologies */ B(VLC_CODEC_ADPCM_4XM, "4X Technologies Audio"), A("4xma"), @@ -1193,7 +1205,8 @@ static entry_t Lookup( const entry_t p_list[], vlc_fourcc_t i_fourcc ) memcpy( e.p_class, p_class, 4 ); memcpy( e.p_fourcc, p->p_fourcc, 4 ); - e.psz_description = p->psz_description ?: psz_description; + e.psz_description = p->psz_description ? + p->psz_description : psz_description; break; } } @@ -1562,3 +1575,58 @@ bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc) return false; } +#define PLANAR(n, w_den, h_den) \ + { .plane_count = n, \ + .p = { {.w = {1, 1}, .h = {1, 1}}, \ + {.w = {1,w_den}, .h = {1,h_den}}, \ + {.w = {1,w_den}, .h = {1,h_den}}, \ + {.w = {1, 1}, .h = {1, 1}} }, \ + .pixel_size = 1 } + +#define PACKED(size) \ + { .plane_count = 1, \ + .p = { {.w = {1,1}, .h = {1,1}} }, \ + .pixel_size = size } + +static const struct +{ + vlc_fourcc_t p_fourcc[5]; + vlc_chroma_description_t description; +} p_list_chroma_description[] = { + { { VLC_CODEC_I411, 0 }, PLANAR(3, 4, 1) }, + { { VLC_CODEC_YUV_PLANAR_410, 0 }, PLANAR(3, 4, 4) }, + { { VLC_CODEC_YUV_PLANAR_420, 0 }, PLANAR(3, 2, 2) }, + { { VLC_CODEC_YUV_PLANAR_422, 0 }, PLANAR(3, 2, 1) }, + { { VLC_CODEC_YUV_PLANAR_440, 0 }, PLANAR(3, 1, 2) }, + { { VLC_CODEC_YUV_PLANAR_444, 0 }, PLANAR(3, 1, 1) }, + { { VLC_CODEC_YUVA, 0 }, PLANAR(4, 1, 1) }, + + { { VLC_CODEC_YUV_PACKED, 0 }, PACKED(2) }, + { { VLC_CODEC_RGB8, VLC_CODEC_GREY, + VLC_CODEC_YUVP, VLC_CODEC_RGBP, 0 }, PACKED(1) }, + { { VLC_CODEC_RGB16, VLC_CODEC_RGB15, 0 }, PACKED(2) }, + { { VLC_CODEC_RGB24, 0 }, PACKED(3) }, + { { VLC_CODEC_RGB32, VLC_CODEC_RGBA, 0 }, PACKED(4) }, + + { { VLC_CODEC_Y211, 0 }, { 1, { {{1,4}, {1,1}} }, 4 } }, + + { {0}, { 0, {}, 0 } } +}; + +#undef PACKED +#undef PLANAR + +const vlc_chroma_description_t *vlc_fourcc_GetChromaDescription( vlc_fourcc_t i_fourcc ) +{ + for( unsigned i = 0; p_list_chroma_description[i].p_fourcc[0]; i++ ) + { + const vlc_fourcc_t *p_fourcc = p_list_chroma_description[i].p_fourcc; + for( unsigned j = 0; p_fourcc[j]; j++ ) + { + if( p_fourcc[j] == i_fourcc ) + return &p_list_chroma_description[i].description; + } + } + return NULL; +} +