1 /*****************************************************************************
2 * fourcc.c: fourcc helpers functions
3 *****************************************************************************
4 * Copyright (C) 2009 Laurent Aimar
7 * Authors: Laurent Aimar <fenrir@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
31 #include <vlc_common.h>
32 #include <vlc_fourcc.h>
40 const char *psz_description;
43 #define NULL4 "\x00\x00\x00\x00"
45 /* XXX You don't want to see the preprocessor generated code ;) */
46 #ifdef WORDS_BIGENDIAN
47 # define FCC2STR(f) { ((f)>>24)&0xff, ((f)>>16)&0xff, ((f)>>8)&0xff, ((f)>>0)&0xff }
49 # define FCC2STR(f) { ((f)>>0)&0xff, ((f)>>8)&0xff, ((f)>>16)&0xff, ((f)>>24)&0xff }
51 /* Begin a new class */
52 #define B(a, c) { .p_class = FCC2STR(a), .p_fourcc = FCC2STR(a), .psz_description = c }
53 /* Create a sub-class entry with description */
54 #define E(b, c) { .p_class = NULL4, .p_fourcc = b, .psz_description = c }
55 /* Create a sub-class entry without description (alias) */
56 #define A(b) E(b, NULL4)
60 static const entry_t p_list_video[] = {
62 B(VLC_CODEC_MPGV, "MPEG-1/2 Video"),
72 E("PIM1", "Pinnacle DC1000 (MPEG-1 Video)"),
74 E("hdv1", "HDV 720p30 (MPEG-2 Video)"),
75 E("hdv2", "Sony HDV 1080i60 (MPEG-2 Video)"),
76 E("hdv3", "FCP HDV 1080i50 (MPEG-2 Video)"),
77 E("hdv4", "HDV 720p24 (MPEG-2 Video)"),
78 E("hdv5", "HDV 720p25 (MPEG-2 Video)"),
79 E("hdv6", "HDV 1080p24 (MPEG-2 Video)"),
80 E("hdv7", "HDV 1080p25 (MPEG-2 Video)"),
81 E("hdv8", "HDV 1080p30 (MPEG-2 Video)"),
82 E("hdv9", "JVC HDV (MPEG-2 Video)"),
84 E("mx5n", "MPEG2 IMX NTSC 525/60 50mb/s (FCP)"),
85 E("mx5p", "MPEG2 IMX PAL 625/60 50mb/s (FCP)"),
86 E("mx4n", "MPEG2 IMX NTSC 525/60 40mb/s (FCP)"),
87 E("mx4p", "MPEG2 IMX PAL 625/50 40mb/s (FCP)"),
88 E("mx3n", "MPEG2 IMX NTSC 525/60 30mb/s (FCP)"),
89 E("mx3p", "MPEG2 IMX NTSC 625/50 30mb/s (FCP)"),
91 E("xdv1", "XDCAM HD"),
92 E("xdv2", "XDCAM HD 1080i60 35mb/s"),
93 E("xdv3", "XDCAM HD 1080i50 35mb/s"),
94 E("xdv4", "XDCAM HD"),
95 E("xdv5", "XDCAM HD"),
96 E("xdv6", "XDCAM HD 1080p24 35mb/s"),
97 E("xdv7", "XDCAM HD 1080p25 35mb/s"),
98 E("xdv8", "XDCAM HD 1080p30 35mb/s"),
99 E("xdv9", "XDCAM HD"),
108 E("xd54", "XDCAM HD422 720p24 CBR"),
109 E("xd55", "XDCAM HD422 720p25 CBR"),
110 E("xd59", "XDCAM HD422 720p60 CBR"),
111 E("xd5a", "XDCAM HD422 720p50 CBR"),
112 E("xd5b", "XDCAM HD422 1080i60 CBR"),
119 E("AVmp", "AVID IMX PAL"),
120 E("MMES", "Matrox MPEG-2"),
121 E("mmes", "Matrox MPEG-2"),
122 E("PIM2", "Pinnacle MPEG-2"),
123 E("LMP2", "Lead MPEG-2"),
125 E("VCR2", "ATI VCR-2"),
127 B(VLC_CODEC_MP4V, "MPEG-4 Video"),
136 A("\x04\x00\x00\x00"),
154 E("xvid", "Xvid MPEG-4 Video"),
155 E("XVID", "Xvid MPEG-4 Video"),
156 E("XviD", "Xvid MPEG-4 Video"),
157 E("XVIX", "Xvid MPEG-4 Video"),
158 E("xvix", "Xvid MPEG-4 Video"),
160 E("DX50", "DivX MPEG-4 Video"),
161 E("dx50", "DivX MPEG-4 Video"),
162 E("BLZ0", "Blizzard MPEG-4 Video"),
163 E("DXGM", "Electronic Arts Game MPEG-4 Video"),
165 E("3IV2", "3ivx MPEG-4 Video"),
166 E("3iv2", "3ivx MPEG-4 Video"),
168 E("UMP4", "UB MPEG-4 Video"),
169 E("SEDG", "Samsung MPEG-4 Video"),
170 E("RMP4", "REALmagic MPEG-4 Video"),
171 E("HDX4", "Jomigo HDX4 (MPEG-4 Video)"),
172 E("hdx4", "Jomigo HDX4 (MPEG-4 Video)"),
173 E("SMP4", "Samsung SMP4 (MPEG-4 Video)"),
174 E("smp4", "Samsung SMP4 (MPEG-4 Video)"),
175 E("fvfw", "FFmpeg MPEG-4"),
176 E("FVFW", "FFmpeg MPEG-4"),
177 E("FFDS", "FFDShow MPEG-4"),
178 E("VIDM", "vidm 4.01 codec"),
179 /* 3ivx delta 3.5 Unsupported
180 * putting it here gives extreme distorted images */
181 //E("3IV1", "3ivx delta 3.5 MPEG-4 Video"),
182 //E("3iv1", "3ivx delta 3.5 MPEG-4 Video"),
185 B(VLC_CODEC_DIV1, "MS MPEG-4 Video v1"),
193 B(VLC_CODEC_DIV2, "MS MPEG-4 Video v2"),
199 /* MSMPEG4 v3 / M$ mpeg4 v3 */
200 B(VLC_CODEC_DIV3, "MS MPEG-4 Video v3"),
214 E("divf", "DivX 4.12"),
215 E("DIVF", "DivX 4.12"),
221 /* AngelPotion stuff */
223 /* 3ivx doctered divx files */
232 B(VLC_CODEC_SVQ1, "SVQ-1 (Sorenson Video v1)"),
238 B(VLC_CODEC_SVQ3, "SVQ-3 (Sorenson Video v3)"),
242 B(VLC_CODEC_H264, "H264 - MPEG-4 AVC (part 10)"),
247 /* avc1: special case h264 */
250 E("VSSH", "Vanguard VSS H264"),
251 E("VSSW", "Vanguard VSS H264"),
252 E("vssh", "Vanguard VSS H264"),
253 E("DAVC", "Dicas MPEGable H.264/MPEG-4 AVC"),
254 E("davc", "Dicas MPEGable H.264/MPEG-4 AVC"),
257 /* H263(+) is also known as Real Video 1.0 */
260 B(VLC_CODEC_H263, "H263"),
268 E("D263", "DEC H263"),
269 E("L263", "LEAD H263"),
270 E("M263", "Microsoft H263"),
271 E("X263", "Xirlink H263"),
273 E("ZyGo", "ITU H263+"),
276 B(VLC_CODEC_H263I, "I263.I"),
281 B(VLC_CODEC_H263P, "ITU H263+"),
282 E("ILVR", "ITU H263+"),
286 E("U263", "UB H263+"),
288 /* Flash (H263) variant */
289 B(VLC_CODEC_FLV1, "Flash Video"),
294 B(VLC_CODEC_H261, "H.261"),
298 B(VLC_CODEC_FLIC, "Flic Video"),
302 B(VLC_CODEC_MJPG, "Motion JPEG Video"),
314 E("AVRn", "Avid Motion JPEG"),
315 E("AVDJ", "Avid Motion JPEG"),
316 E("ADJV", "Avid Motion JPEG"),
317 E("dmb1", "Motion JPEG OpenDML Video"),
318 E("ijpg", "Intergraph JPEG Video"),
319 E("IJPG", "Intergraph JPEG Video"),
320 E("ACDV", "ACD Systems Digital"),
321 E("SLMJ", "SL M-JPEG"),
323 B(VLC_CODEC_MJPGB, "Motion JPEG B Video"),
326 B(VLC_CODEC_LJPG, "Lead Motion JPEG Video"),
329 // ? from avcodec/fourcc.c but makes not sense.
330 //{ VLC_FOURCC( 'L','J','P','G' ), CODEC_ID_MJPEG, VIDEO_ES, "Lead Motion JPEG Video" },
333 B(VLC_CODEC_SP5X, "Sunplus Motion JPEG Video"),
343 B(VLC_CODEC_DV, "DV Video"),
362 E("dvcp", "DV Video PAL"),
363 E("dvp ", "DV Video Pro"),
364 E("dvpp", "DV Video Pro PAL"),
365 E("dv50", "DV Video C Pro 50"),
366 E("dv5p", "DV Video C Pro 50 PAL"),
367 E("dv5n", "DV Video C Pro 50 NTSC"),
368 E("AVdv", "AVID DV"),
369 E("AVd1", "AVID DV"),
370 E("CDVC", "Canopus DV Video"),
371 E("cdvc", "Canopus DV Video"),
372 E("CDVH", "Canopus DV Video"),
373 E("cdvh", "Canopus DV Video"),
374 E("CDV5", "Canopus DV Video"),
376 /* Windows Media Video */
377 B(VLC_CODEC_WMV1, "Windows Media Video 7"),
381 B(VLC_CODEC_WMV2, "Windows Media Video 8"),
385 B(VLC_CODEC_WMV3, "Windows Media Video 9"),
389 /* WMVA is the VC-1 codec before the standardization proces,
390 * it is not bitstream compatible and deprecated */
391 B(VLC_CODEC_WMVA, "Windows Media Video Advanced Profile"),
397 B(VLC_CODEC_VC1, "Windows Media Video VC1"),
403 B(VLC_CODEC_WMVP, "Windows Media Video Presentation"),
407 /* Microsoft Video 1 */
408 B(VLC_CODEC_MSVIDEO1, "Microsoft Video 1"),
417 B(VLC_CODEC_MSRLE, "Microsoft RLE Video"),
420 A("\x01\x00\x00\x00"),
421 A("\x02\x00\x00\x00"),
423 /* Indeo Video Codecs (Quality of this decoder on ppc is not good) */
424 B(VLC_CODEC_INDEO3, "Indeo Video v3"),
431 B(VLC_CODEC_HUFFYUV, "Huff YUV Video"),
434 B(VLC_CODEC_FFVHUFF, "Huff YUV Video"),
437 /* On2 VP3 Video Codecs */
438 B(VLC_CODEC_VP3, "On2's VP3 Video"),
445 /* On2 VP5, VP6 codecs */
446 B(VLC_CODEC_VP5, "On2's VP5 Video"),
450 B(VLC_CODEC_VP6, "On2's VP6.2 Video"),
453 E("VP60", "On2's VP6.0 Video"),
454 E("VP61", "On2's VP6.1 Video"),
456 B(VLC_CODEC_VP6F, "On2's VP6.2 Video (Flash)"),
460 B(VLC_CODEC_VP6A, "On2's VP6 A Video"),
463 B(VLC_CODEC_VP8, "Google/On2's VP8 Video"),
467 /* Xiph.org theora */
468 B(VLC_CODEC_THEORA, "Xiph.org's Theora Video"),
472 /* Xiph.org tarkin */
473 B(VLC_CODEC_TARKIN, "Xiph.org's Tarkin Video"),
476 /* Asus Video (Another thing that doesn't work on PPC) */
477 B(VLC_CODEC_ASV1, "Asus V1 Video"),
479 B(VLC_CODEC_ASV2, "Asus V2 Video"),
482 /* FFMPEG Video 1 (lossless codec) */
483 B(VLC_CODEC_FFV1, "FFMpeg Video 1"),
487 B(VLC_CODEC_VCR1, "ATI VCR1 Video"),
490 /* Cirrus Logic AccuPak */
491 B(VLC_CODEC_CLJR, "Creative Logic AccuPak"),
495 B(VLC_CODEC_RV10, "Real Video 1.0"),
499 B(VLC_CODEC_RV13, "Real Video 1.3"),
503 B(VLC_CODEC_RV20, "Real Video 2.0"),
507 B(VLC_CODEC_RV30, "Real Video 3.0"),
511 B(VLC_CODEC_RV40, "Real Video 4.0"),
516 B(VLC_CODEC_RPZA, "Apple Video"),
522 B(VLC_CODEC_SMC, "Apple graphics"),
525 B(VLC_CODEC_CINEPAK, "Cinepak Video"),
529 /* Screen Capture Video Codecs */
530 B(VLC_CODEC_TSCC, "TechSmith Camtasia Screen Capture"),
534 B(VLC_CODEC_CSCD, "CamStudio Screen Codec"),
538 B(VLC_CODEC_ZMBV, "DosBox Capture Codec"),
541 B(VLC_CODEC_VMNC, "VMware Video"),
543 B(VLC_CODEC_FRAPS, "FRAPS: Realtime Video Capture"),
547 /* Duck TrueMotion */
548 B(VLC_CODEC_TRUEMOTION1, "Duck TrueMotion v1 Video"),
551 B(VLC_CODEC_TRUEMOTION2, "Duck TrueMotion v2.0 Video"),
554 /* FFMPEG's SNOW wavelet codec */
555 B(VLC_CODEC_SNOW, "FFMpeg SNOW wavelet Video"),
559 B(VLC_CODEC_QTRLE, "Apple QuickTime RLE Video"),
562 B(VLC_CODEC_QDRAW, "Apple QuickDraw Video"),
565 B(VLC_CODEC_QPEG, "QPEG Video"),
570 B(VLC_CODEC_ULTI, "IBM Ultimotion Video"),
573 B(VLC_CODEC_VIXL, "Miro/Pinnacle VideoXL Video"),
576 E("PIXL", "Pinnacle VideoXL Video"),
578 B(VLC_CODEC_LOCO, "LOCO Video"),
581 B(VLC_CODEC_WNV1, "Winnov WNV1 Video"),
584 B(VLC_CODEC_AASC, "Autodesc RLE Video"),
587 B(VLC_CODEC_INDEO2, "Indeo Video v2"),
591 /* Flash Screen Video */
592 B(VLC_CODEC_FLASHSV, "Flash Screen Video"),
594 B(VLC_CODEC_KMVC, "Karl Morton's Video Codec (Worms)"),
597 B(VLC_CODEC_NUV, "Nuppel Video"),
601 /* CODEC_ID_SMACKVIDEO */
602 B(VLC_CODEC_SMACKVIDEO, "Smacker Video"),
606 /* Chinese AVS - Untested */
607 B(VLC_CODEC_CAVS, "Chinese AVS"),
612 B(VLC_CODEC_AMV, "AMV"),
615 B(VLC_CODEC_DNXHD, "DNxHD"),
617 B(VLC_CODEC_8BPS, "8BPS"),
619 B(VLC_CODEC_MIMIC, "Mimic"),
622 B(VLC_CODEC_CDG, "CD-G Video"),
625 B(VLC_CODEC_FRWU, "Forward Uncompressed" ),
628 B(VLC_CODEC_INDEO5, "Indeo Video v5"),
634 B(VLC_CODEC_YV12, "Planar 4:2:0 YVU"),
637 B(VLC_CODEC_YV9, "Planar 4:1:0 YVU"),
639 B(VLC_CODEC_I410, "Planar 4:1:0 YUV"),
641 B(VLC_CODEC_I411, "Planar 4:1:1 YUV"),
643 B(VLC_CODEC_I420, "Planar 4:2:0 YUV"),
646 B(VLC_CODEC_I422, "Planar 4:2:2 YUV"),
648 B(VLC_CODEC_I444, "Planar 4:4:0 YUV"),
650 B(VLC_CODEC_I444, "Planar 4:4:4 YUV"),
653 B(VLC_CODEC_J420, "Planar 4:2:0 YUV full scale"),
655 B(VLC_CODEC_J422, "Planar 4:2:2 YUV full scale"),
657 B(VLC_CODEC_J440, "Planar 4:4:0 YUV full scale"),
659 B(VLC_CODEC_J444, "Planar 4:4:4 YUV full scale"),
662 B(VLC_CODEC_YUVP, "Palettized YUV with palette element Y:U:V:A"),
665 B(VLC_CODEC_YUVA, "Planar YUV 4:4:4 Y:U:V:A"),
668 B(VLC_CODEC_RGBP, "Palettized RGB with palette element R:G:B"),
671 B(VLC_CODEC_RGB8, "8 bits RGB"),
673 B(VLC_CODEC_RGB12, "12 bits RGB"),
675 B(VLC_CODEC_RGBA16, "16 bits RGBA"),
677 B(VLC_CODEC_RGB15, "15 bits RGB"),
679 B(VLC_CODEC_RGBT, "16 bits RGBT"),
681 B(VLC_CODEC_RGB16, "16 bits RGB"),
683 B(VLC_CODEC_RGB24, "24 bits RGB"),
685 B(VLC_CODEC_RGB32, "32 bits RGB"),
687 B(VLC_CODEC_RGBA, "32 bits RGBA"),
691 B(VLC_CODEC_GREY, "8 bits greyscale"),
696 B(VLC_CODEC_UYVY, "Packed YUV 4:2:2, U:Y:V:Y"),
707 B(VLC_CODEC_VYUY, "Packed YUV 4:2:2, V:Y:U:Y"),
709 B(VLC_CODEC_YUYV, "Packed YUV 4:2:2, Y:U:Y:V"),
714 B(VLC_CODEC_YVYU, "Packed YUV 4:2:2, Y:V:Y:U"),
717 B(VLC_CODEC_Y211, "Packed YUV 2:1:1, Y:U:Y:V "),
719 B(VLC_CODEC_CYUV, "Creative Packed YUV 4:2:2, U:Y:V:Y, reverted"),
723 B(VLC_CODEC_V210, "10-bit 4:2:2 Component YCbCr"),
726 B(VLC_CODEC_NV12, "Planar Y, Packet UV (420)"),
729 B(VLC_CODEC_I420_9L, "Planar 4:2:0 YUV 9-bit LE"),
731 B(VLC_CODEC_I420_9B, "Planar 4:2:0 YUV 9-bit BE"),
733 B(VLC_CODEC_I422_9L, "Planar 4:2:2 YUV 9-bit LE"),
735 B(VLC_CODEC_I422_9B, "Planar 4:2:2 YUV 9-bit BE"),
737 B(VLC_CODEC_I444_9L, "Planar 4:4:4 YUV 9-bit LE"),
739 B(VLC_CODEC_I444_9B, "Planar 4:4:4 YUV 9-bit BE"),
742 B(VLC_CODEC_I420_10L, "Planar 4:2:0 YUV 10-bit LE"),
744 B(VLC_CODEC_I420_10B, "Planar 4:2:0 YUV 10-bit BE"),
746 B(VLC_CODEC_I422_10L, "Planar 4:2:2 YUV 10-bit LE"),
748 B(VLC_CODEC_I422_10B, "Planar 4:2:2 YUV 10-bit BE"),
750 B(VLC_CODEC_I444_10L, "Planar 4:4:4 YUV 10-bit LE"),
752 B(VLC_CODEC_I444_10B, "Planar 4:4:4 YUV 10-bit BE"),
755 /* Videogames Codecs */
758 B(VLC_CODEC_INTERPLAY, "Interplay MVE Video"),
762 /* Id Quake II CIN */
763 B(VLC_CODEC_IDCIN, "Id Quake II CIN Video"),
766 /* 4X Technologies */
767 B(VLC_CODEC_4XM, "4X Technologies Video"),
772 B(VLC_CODEC_ROQ, "Id RoQ Video"),
775 /* Sony Playstation MDEC */
776 B(VLC_CODEC_MDEC, "PSX MDEC Video"),
780 B(VLC_CODEC_VMDVIDEO, "Sierra VMD Video"),
784 B(VLC_CODEC_DIRAC, "Dirac" ),
788 B(VLC_CODEC_PNG, "PNG Image"),
791 B(VLC_CODEC_PPM, "PPM Image"),
794 B(VLC_CODEC_PGM, "PGM Image"),
797 B(VLC_CODEC_PGMYUV, "PGM YUV Image"),
800 B(VLC_CODEC_PAM, "PAM Image"),
803 B(VLC_CODEC_JPEGLS, "Lossless JPEG"),
806 B(VLC_CODEC_JPEG, "JPEG"),
810 B(VLC_CODEC_BMP, "BMP Image"),
813 B(VLC_CODEC_TIFF, "TIFF Image"),
816 B(VLC_CODEC_GIF, "GIF Image"),
820 B(VLC_CODEC_TARGA, "Truevision Targa Image"),
825 B(VLC_CODEC_SGI, "SGI Image"),
828 B(VLC_CODEC_PNM, "Portable Anymap Image"),
831 B(VLC_CODEC_PCX, "Personal Computer Exchange Image"),
834 B(VLC_CODEC_JPEG2000, "JPEG 2000 Image"),
840 B(VLC_CODEC_LAGARITH, "Lagarith Lossless"),
845 static const entry_t p_list_audio[] = {
847 /* Windows Media Audio 1 */
848 B(VLC_CODEC_WMA1, "Windows Media Audio 1"),
852 /* Windows Media Audio 2 */
853 B(VLC_CODEC_WMA2, "Windows Media Audio 2"),
858 /* Windows Media Audio Professional */
859 B(VLC_CODEC_WMAP, "Windows Media Audio Professional"),
863 /* Windows Media Audio Lossless */
864 B(VLC_CODEC_WMAL, "Windows Media Audio Lossless"),
868 /* Windows Media Audio Speech */
869 B(VLC_CODEC_WMAS, "Windows Media Audio Voice (Speech)"),
874 B(VLC_CODEC_DVAUDIO, "DV Audio"),
881 B(VLC_CODEC_MACE3, "MACE-3 Audio"),
885 B(VLC_CODEC_MACE6, "MACE-6 Audio"),
888 /* MUSEPACK7 Audio */
889 B(VLC_CODEC_MUSEPACK7, "MUSEPACK7 Audio"),
892 /* MUSEPACK8 Audio */
893 B(VLC_CODEC_MUSEPACK8, "MUSEPACK8 Audio"),
898 B(VLC_CODEC_RA_144, "RealAudio 1.0"),
903 B(VLC_CODEC_RA_288, "RealAudio 2.0"),
906 B(VLC_CODEC_SIPR, "RealAudio Sipr"),
909 /* MPEG Audio layer 1/2/3 */
910 B(VLC_CODEC_MPGA, "MPEG Audio layer 1/2/3"),
919 /* A52 Audio (aka AC3) */
920 B(VLC_CODEC_A52, "A52 Audio (aka AC3)"),
926 B(VLC_CODEC_EAC3, "A/52 B Audio (aka E-AC3)"),
930 B(VLC_CODEC_DTS, "DTS Audio"),
937 B(VLC_CODEC_MP4A, "MPEG AAC Audio"),
942 B(VLC_CODEC_ALS, "MPEG-4 Audio Lossless (ALS)"),
945 /* 4X Technologies */
946 B(VLC_CODEC_ADPCM_4XM, "4X Technologies Audio"),
950 B(VLC_CODEC_ADPCM_EA, "EA ADPCM Audio"),
954 B(VLC_CODEC_INTERPLAY_DPCM, "Interplay DPCM Audio"),
958 B(VLC_CODEC_ROQ_DPCM, "Id RoQ DPCM Audio"),
962 B(VLC_CODEC_DSICINAUDIO, "Delphine CIN Audio"),
965 /* Sony Playstation XA ADPCM */
966 B(VLC_CODEC_ADPCM_XA, "PSX XA ADPCM Audio"),
970 B(VLC_CODEC_ADPCM_ADX, "ADX ADPCM Audio"),
974 B(VLC_CODEC_ADPCM_IMA_WS, "Westwood IMA ADPCM audio"),
978 B(VLC_CODEC_ADPCM_MS, "MS ADPCM audio"),
982 B(VLC_CODEC_VMDAUDIO, "Sierra VMD Audio"),
986 B(VLC_CODEC_ADPCM_G726, "G.726 ADPCM Audio"),
990 B(VLC_CODEC_ADPCM_G722, "G.722 ADPCM Audio"),
994 B(VLC_CODEC_ADPCM_SWF, "Flash ADPCM Audio"),
997 B(VLC_CODEC_ADPCM_IMA_WAV, "IMA WAV ADPCM Audio"),
1000 B(VLC_CODEC_ADPCM_IMA_AMV, "IMA AMV ADPCM Audio"),
1004 B(VLC_CODEC_AMR_NB, "AMR narrow band"),
1007 B(VLC_CODEC_AMR_WB, "AMR wide band"),
1011 B(VLC_CODEC_FLAC, "FLAC (Free Lossless Audio Codec)"),
1015 B(VLC_CODEC_ALAC, "Apple Lossless Audio Codec"),
1019 B(VLC_CODEC_QDM2, "QDM2 Audio"),
1023 B(VLC_CODEC_COOK, "Cook Audio"),
1026 /* TTA: The Lossless True Audio */
1027 B(VLC_CODEC_TTA, "The Lossless True Audio"),
1031 B(VLC_CODEC_SHORTEN, "Shorten Lossless Audio"),
1035 B(VLC_CODEC_WAVPACK, "WavPack"),
1039 B(VLC_CODEC_GSM, "GSM Audio"),
1042 B(VLC_CODEC_GSM_MS, "Microsoft GSM Audio"),
1045 B(VLC_CODEC_ATRAC1, "atrac 1"),
1048 B(VLC_CODEC_ATRAC3, "atrac 3"),
1050 A("\x70\x02\x00\x00"),
1052 B(VLC_CODEC_SONIC, "Sonic"),
1055 B(VLC_CODEC_IMC, "IMC" ),
1056 A("\x01\x04\x00\x00"),
1058 B(VLC_CODEC_TRUESPEECH,"TrueSpeech"),
1059 A("\x22\x00\x00\x00"),
1061 B(VLC_CODEC_NELLYMOSER, "NellyMoser ASAO"),
1064 B(VLC_CODEC_APE, "Monkey's Audio"),
1067 B(VLC_CODEC_MLP, "MLP/TrueHD Audio"),
1070 B(VLC_CODEC_TRUEHD, "TrueHD Audio"),
1073 B(VLC_CODEC_QCELP, "QCELP Audio"),
1076 B(VLC_CODEC_SPEEX, "Speex Audio"),
1080 B(VLC_CODEC_VORBIS, "Vorbis Audio"),
1083 B(VLC_CODEC_302M, "302M Audio"),
1086 B(VLC_CODEC_DVD_LPCM, "DVD LPCM Audio"),
1089 B(VLC_CODEC_DVDA_LPCM, "DVD-Audio LPCM Audio"),
1092 B(VLC_CODEC_BD_LPCM, "BD LPCM Audio"),
1095 B(VLC_CODEC_SDDS, "SDDS Audio"),
1099 B(VLC_CODEC_MIDI, "MIDI Audio"),
1103 B(VLC_CODEC_S8, "PCM S8"),
1106 B(VLC_CODEC_U8, "PCM U8"),
1109 B(VLC_CODEC_S16L, "PCM S16 LE"),
1112 B(VLC_CODEC_S16B, "PCM S16 BE"),
1115 B(VLC_CODEC_U16L, "PCM U16 LE"),
1118 B(VLC_CODEC_U16B, "PCM U16 BE"),
1121 B(VLC_CODEC_S20B, "PCM S20 BE"),
1123 B(VLC_CODEC_S24L, "PCM S24 LE"),
1125 A("42ni"), /* Quicktime */
1127 B(VLC_CODEC_S24B, "PCM S24 BE"),
1129 A("in24"), /* Quicktime */
1131 B(VLC_CODEC_U24L, "PCM U24 LE"),
1134 B(VLC_CODEC_U24B, "PCM U24 BE"),
1137 B(VLC_CODEC_S32L, "PCM S32 LE"),
1139 A("23ni"), /* Quicktime */
1141 B(VLC_CODEC_S32B, "PCM S32 BE"),
1143 A("in32"), /* Quicktime */
1145 B(VLC_CODEC_U32L, "PCM U32 LE"),
1148 B(VLC_CODEC_U32B, "PCM U32 BE"),
1151 B(VLC_CODEC_ALAW, "PCM ALAW"),
1154 B(VLC_CODEC_MULAW, "PCM MU-LAW"),
1158 B(VLC_CODEC_DAT12, "12 bits DAT audio"),
1160 B(VLC_CODEC_S24DAUD, "PCM DAUD"),
1163 B(VLC_CODEC_FI32, "32 bits fixed float"),
1166 B(VLC_CODEC_F32L, "32 bits float LE"),
1170 B(VLC_CODEC_F32B, "32 bits float BE"),
1173 B(VLC_CODEC_F64L, "64 bits float LE"),
1176 B(VLC_CODEC_F64L, "64 bits float BE"),
1179 B(VLC_CODEC_TWINVQ, "TwinVQ"),
1184 static const entry_t p_list_spu[] = {
1186 B(VLC_CODEC_SPU, "DVD Subtitles"),
1190 B(VLC_CODEC_DVBS, "DVB Subtitles"),
1193 B(VLC_CODEC_SUBT, "Text subtitles with various tags"),
1196 B(VLC_CODEC_XSUB, "DivX XSUB subtitles"),
1201 B(VLC_CODEC_SSA, "SubStation Alpha subtitles"),
1204 B(VLC_CODEC_TEXT, "Plain text subtitles"),
1207 B(VLC_CODEC_TELETEXT, "Teletext"),
1210 B(VLC_CODEC_KATE, "Kate subtitles"),
1213 B(VLC_CODEC_CMML, "CMML annotations/metadata"),
1216 B(VLC_CODEC_ITU_T140, "ITU T.140 subtitles"),
1219 B(VLC_CODEC_USF, "USF subtitles"),
1222 B(VLC_CODEC_OGT, "OGT subtitles"),
1225 B(VLC_CODEC_CVD, "CVD subtitles"),
1228 B(VLC_CODEC_BD_PG, "BD subtitles"),
1231 B(VLC_CODEC_EBU_STL, "EBU STL subtitles"),
1237 /* Create a fourcc from a string.
1238 * XXX it assumes that the string is at least four bytes */
1239 static inline vlc_fourcc_t CreateFourcc( const char *psz_fourcc )
1241 return VLC_FOURCC( psz_fourcc[0], psz_fourcc[1],
1242 psz_fourcc[2], psz_fourcc[3] );
1246 static entry_t Lookup( const entry_t p_list[], vlc_fourcc_t i_fourcc )
1248 const char *p_class = NULL;
1249 const char *psz_description = NULL;
1251 entry_t e = B(0, "");
1253 for( int i = 0; ; i++ )
1255 const entry_t *p = &p_list[i];
1256 const vlc_fourcc_t i_entry_fourcc = CreateFourcc( p->p_fourcc );
1257 const vlc_fourcc_t i_entry_class = CreateFourcc( p->p_class );
1259 if( i_entry_fourcc == 0 )
1262 if( i_entry_class != 0 )
1264 p_class = p->p_class;
1265 psz_description = p->psz_description;
1268 if( i_entry_fourcc == i_fourcc )
1270 assert( p_class != NULL );
1272 memcpy( e.p_class, p_class, 4 );
1273 memcpy( e.p_fourcc, p->p_fourcc, 4 );
1274 e.psz_description = p->psz_description ?
1275 p->psz_description : psz_description;
1283 static entry_t Find( int i_cat, vlc_fourcc_t i_fourcc )
1290 return Lookup( p_list_video, i_fourcc );
1292 return Lookup( p_list_audio, i_fourcc );
1294 return Lookup( p_list_spu, i_fourcc );
1297 e = Find( VIDEO_ES, i_fourcc );
1298 if( CreateFourcc( e.p_class ) == 0 )
1299 e = Find( AUDIO_ES, i_fourcc );
1300 if( CreateFourcc( e.p_class ) == 0 )
1301 e = Find( SPU_ES, i_fourcc );
1307 vlc_fourcc_t vlc_fourcc_GetCodec( int i_cat, vlc_fourcc_t i_fourcc )
1309 entry_t e = Find( i_cat, i_fourcc );
1311 if( CreateFourcc( e.p_class ) == 0 )
1313 return CreateFourcc( e.p_class );
1316 vlc_fourcc_t vlc_fourcc_GetCodecFromString( int i_cat, const char *psz_fourcc )
1318 if( !psz_fourcc || strlen(psz_fourcc) != 4 )
1320 return vlc_fourcc_GetCodec( i_cat,
1321 VLC_FOURCC( psz_fourcc[0], psz_fourcc[1],
1322 psz_fourcc[2], psz_fourcc[3] ) );
1325 vlc_fourcc_t vlc_fourcc_GetCodecAudio( vlc_fourcc_t i_fourcc, int i_bits )
1327 const int i_bytes = ( i_bits + 7 ) / 8;
1329 if( i_fourcc == VLC_FOURCC( 'a', 'f', 'l', 't' ) )
1334 return VLC_CODEC_FL32;
1336 return VLC_CODEC_FL64;
1341 else if( i_fourcc == VLC_FOURCC( 'a', 'r', 'a', 'w' ) ||
1342 i_fourcc == VLC_FOURCC( 'p', 'c', 'm', ' ' ) )
1347 return VLC_CODEC_U8;
1349 return VLC_CODEC_S16L;
1351 return VLC_CODEC_S24L;
1354 return VLC_CODEC_S32L;
1359 else if( i_fourcc == VLC_FOURCC( 't', 'w', 'o', 's' ) )
1364 return VLC_CODEC_S8;
1366 return VLC_CODEC_S16B;
1368 return VLC_CODEC_S24B;
1370 return VLC_CODEC_S32B;
1375 else if( i_fourcc == VLC_FOURCC( 's', 'o', 'w', 't' ) )
1380 return VLC_CODEC_S8;
1382 return VLC_CODEC_S16L;
1384 return VLC_CODEC_S24L;
1386 return VLC_CODEC_S32L;
1393 return vlc_fourcc_GetCodec( AUDIO_ES, i_fourcc );
1398 const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
1400 entry_t e = Find( i_cat, i_fourcc );
1402 return e.psz_description;
1407 #define VLC_CODEC_YUV_PLANAR_410 \
1408 VLC_CODEC_I410, VLC_CODEC_YV9
1410 #define VLC_CODEC_YUV_PLANAR_420 \
1411 VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420
1413 #define VLC_CODEC_YUV_PLANAR_420_16 \
1414 VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_I420_9L, VLC_CODEC_I420_9B
1416 #define VLC_CODEC_YUV_PLANAR_422 \
1417 VLC_CODEC_I422, VLC_CODEC_J422
1419 #define VLC_CODEC_YUV_PLANAR_422_16 \
1420 VLC_CODEC_I422_10L, VLC_CODEC_I422_10B, VLC_CODEC_I422_9L, VLC_CODEC_I422_9B
1422 #define VLC_CODEC_YUV_PLANAR_440 \
1423 VLC_CODEC_I440, VLC_CODEC_J440
1425 #define VLC_CODEC_YUV_PLANAR_444 \
1426 VLC_CODEC_I444, VLC_CODEC_J444
1428 #define VLC_CODEC_YUV_PLANAR_444_16 \
1429 VLC_CODEC_I444_10L, VLC_CODEC_I444_10B, VLC_CODEC_I444_9L, VLC_CODEC_I444_9B
1431 #define VLC_CODEC_YUV_PACKED \
1432 VLC_CODEC_YUYV, VLC_CODEC_YVYU, \
1433 VLC_CODEC_UYVY, VLC_CODEC_VYUY
1435 #define VLC_CODEC_FALLBACK_420 \
1436 VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PACKED, \
1437 VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
1438 VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
1440 static const vlc_fourcc_t p_I420_fallback[] = {
1441 VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420, 0
1443 static const vlc_fourcc_t p_J420_fallback[] = {
1444 VLC_CODEC_J420, VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_FALLBACK_420, 0
1446 static const vlc_fourcc_t p_YV12_fallback[] = {
1447 VLC_CODEC_YV12, VLC_CODEC_I420, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420, 0
1450 #define VLC_CODEC_FALLBACK_420_16 \
1451 VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420
1453 static const vlc_fourcc_t p_I420_9L_fallback[] = {
1454 VLC_CODEC_I420_9L, VLC_CODEC_I420_9B, VLC_CODEC_FALLBACK_420_16, 0
1456 static const vlc_fourcc_t p_I420_9B_fallback[] = {
1457 VLC_CODEC_I420_9B, VLC_CODEC_I420_9L, VLC_CODEC_FALLBACK_420_16, 0
1459 static const vlc_fourcc_t p_I420_10L_fallback[] = {
1460 VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_FALLBACK_420_16, 0
1462 static const vlc_fourcc_t p_I420_10B_fallback[] = {
1463 VLC_CODEC_I420_10B, VLC_CODEC_I420_10L, VLC_CODEC_FALLBACK_420_16, 0
1466 #define VLC_CODEC_FALLBACK_422 \
1467 VLC_CODEC_YUV_PACKED, VLC_CODEC_YUV_PLANAR_420, \
1468 VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
1469 VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
1471 static const vlc_fourcc_t p_I422_fallback[] = {
1472 VLC_CODEC_I422, VLC_CODEC_J422, VLC_CODEC_FALLBACK_422, 0
1474 static const vlc_fourcc_t p_J422_fallback[] = {
1475 VLC_CODEC_J422, VLC_CODEC_I422, VLC_CODEC_FALLBACK_422, 0
1478 #define VLC_CODEC_FALLBACK_422_16 \
1479 VLC_CODEC_I422, VLC_CODEC_J422, VLC_CODEC_FALLBACK_422
1481 static const vlc_fourcc_t p_I422_9L_fallback[] = {
1482 VLC_CODEC_I422_9L, VLC_CODEC_I422_9B, VLC_CODEC_FALLBACK_422_16, 0
1484 static const vlc_fourcc_t p_I422_9B_fallback[] = {
1485 VLC_CODEC_I422_9B, VLC_CODEC_I422_9L, VLC_CODEC_FALLBACK_422_16, 0
1487 static const vlc_fourcc_t p_I422_10L_fallback[] = {
1488 VLC_CODEC_I422_10L, VLC_CODEC_I422_10B, VLC_CODEC_FALLBACK_422_16, 0
1490 static const vlc_fourcc_t p_I422_10B_fallback[] = {
1491 VLC_CODEC_I422_10B, VLC_CODEC_I422_10L, VLC_CODEC_FALLBACK_422_16, 0
1494 #define VLC_CODEC_FALLBACK_444 \
1495 VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PACKED, \
1496 VLC_CODEC_YUV_PLANAR_420, VLC_CODEC_YUV_PLANAR_440, \
1497 VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
1499 static const vlc_fourcc_t p_I444_fallback[] = {
1500 VLC_CODEC_I444, VLC_CODEC_J444, VLC_CODEC_FALLBACK_444, 0
1502 static const vlc_fourcc_t p_J444_fallback[] = {
1503 VLC_CODEC_J444, VLC_CODEC_I444, VLC_CODEC_FALLBACK_444, 0
1506 #define VLC_CODEC_FALLBACK_444_16 \
1507 VLC_CODEC_I444, VLC_CODEC_J444, VLC_CODEC_FALLBACK_444
1509 static const vlc_fourcc_t p_I444_9L_fallback[] = {
1510 VLC_CODEC_I444_9L, VLC_CODEC_I444_9B, VLC_CODEC_FALLBACK_444_16, 0
1512 static const vlc_fourcc_t p_I444_9B_fallback[] = {
1513 VLC_CODEC_I444_9B, VLC_CODEC_I444_9L, VLC_CODEC_FALLBACK_444_16, 0
1515 static const vlc_fourcc_t p_I444_10L_fallback[] = {
1516 VLC_CODEC_I444_10L, VLC_CODEC_I444_10B, VLC_CODEC_FALLBACK_444_16, 0
1518 static const vlc_fourcc_t p_I444_10B_fallback[] = {
1519 VLC_CODEC_I444_10B, VLC_CODEC_I444_10L, VLC_CODEC_FALLBACK_444_16, 0
1522 static const vlc_fourcc_t p_I440_fallback[] = {
1524 VLC_CODEC_YUV_PLANAR_420,
1525 VLC_CODEC_YUV_PLANAR_422,
1526 VLC_CODEC_YUV_PLANAR_444,
1527 VLC_CODEC_YUV_PACKED,
1528 VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211, 0
1531 #define VLC_CODEC_FALLBACK_PACKED \
1532 VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PLANAR_420, \
1533 VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
1534 VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
1536 static const vlc_fourcc_t p_YUYV_fallback[] = {
1541 VLC_CODEC_FALLBACK_PACKED, 0
1543 static const vlc_fourcc_t p_YVYU_fallback[] = {
1548 VLC_CODEC_FALLBACK_PACKED, 0
1550 static const vlc_fourcc_t p_UYVY_fallback[] = {
1555 VLC_CODEC_FALLBACK_PACKED, 0
1557 static const vlc_fourcc_t p_VYUY_fallback[] = {
1562 VLC_CODEC_FALLBACK_PACKED, 0
1565 static const vlc_fourcc_t *pp_YUV_fallback[] = {
1570 p_I420_10L_fallback,
1571 p_I420_10B_fallback,
1576 p_I422_10L_fallback,
1577 p_I422_10B_fallback,
1583 p_I444_10L_fallback,
1584 p_I444_10B_fallback,
1595 static const vlc_fourcc_t p_list_YUV[] = {
1596 VLC_CODEC_YUV_PLANAR_420,
1597 VLC_CODEC_YUV_PLANAR_422,
1598 VLC_CODEC_YUV_PLANAR_440,
1599 VLC_CODEC_YUV_PLANAR_444,
1600 VLC_CODEC_YUV_PACKED,
1601 VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211,
1602 VLC_CODEC_YUV_PLANAR_420_16,
1603 VLC_CODEC_YUV_PLANAR_422_16,
1604 VLC_CODEC_YUV_PLANAR_444_16,
1609 static const vlc_fourcc_t p_RGB32_fallback[] = {
1617 static const vlc_fourcc_t p_RGB24_fallback[] = {
1625 static const vlc_fourcc_t p_RGB16_fallback[] = {
1633 static const vlc_fourcc_t p_RGB15_fallback[] = {
1641 static const vlc_fourcc_t p_RGB8_fallback[] = {
1649 static const vlc_fourcc_t *pp_RGB_fallback[] = {
1660 static const vlc_fourcc_t *GetFallback( vlc_fourcc_t i_fourcc,
1661 const vlc_fourcc_t *pp_fallback[],
1662 const vlc_fourcc_t p_list[] )
1664 for( unsigned i = 0; pp_fallback[i]; i++ )
1666 if( pp_fallback[i][0] == i_fourcc )
1667 return pp_fallback[i];
1672 const vlc_fourcc_t *vlc_fourcc_GetYUVFallback( vlc_fourcc_t i_fourcc )
1674 return GetFallback( i_fourcc, pp_YUV_fallback, p_list_YUV );
1676 const vlc_fourcc_t *vlc_fourcc_GetRGBFallback( vlc_fourcc_t i_fourcc )
1678 return GetFallback( i_fourcc, pp_RGB_fallback, p_RGB32_fallback );
1681 bool vlc_fourcc_AreUVPlanesSwapped( vlc_fourcc_t a, vlc_fourcc_t b )
1683 static const vlc_fourcc_t pp_swapped[][4] = {
1684 { VLC_CODEC_YV12, VLC_CODEC_I420, VLC_CODEC_J420, 0 },
1685 { VLC_CODEC_YV9, VLC_CODEC_I410, 0 },
1689 for( int i = 0; pp_swapped[i][0]; i++ )
1691 if( pp_swapped[i][0] == b )
1697 if( pp_swapped[i][0] != a )
1699 for( int j = 1; pp_swapped[i][j]; j++ )
1701 if( pp_swapped[i][j] == b )
1708 bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
1710 for( unsigned i = 0; p_list_YUV[i]; i++ )
1712 if( p_list_YUV[i] == fcc )
1718 #define PLANAR(n, w_den, h_den, size, bits) \
1719 { .plane_count = n, \
1720 .p = { {.w = {1, 1}, .h = {1, 1}}, \
1721 {.w = {1,w_den}, .h = {1,h_den}}, \
1722 {.w = {1,w_den}, .h = {1,h_den}}, \
1723 {.w = {1, 1}, .h = {1, 1}} }, \
1724 .pixel_size = size, \
1725 .pixel_bits = bits }
1727 #define PLANAR_8(n, w_den, h_den) PLANAR(n, w_den, h_den, 1, 8)
1728 #define PLANAR_16(n, w_den, h_den, bits) PLANAR(n, w_den, h_den, 2, bits)
1730 #define PACKED_FMT(size, bits) \
1731 { .plane_count = 1, \
1732 .p = { {.w = {1,1}, .h = {1,1}} }, \
1733 .pixel_size = size, \
1734 .pixel_bits = bits }
1738 vlc_fourcc_t p_fourcc[6];
1739 vlc_chroma_description_t description;
1740 } p_list_chroma_description[] = {
1741 { { VLC_CODEC_I411, 0 }, PLANAR_8(3, 4, 1) },
1742 { { VLC_CODEC_YUV_PLANAR_410, 0 }, PLANAR_8(3, 4, 4) },
1743 { { VLC_CODEC_YUV_PLANAR_420, 0 }, PLANAR_8(3, 2, 2) },
1744 { { VLC_CODEC_YUV_PLANAR_422, 0 }, PLANAR_8(3, 2, 1) },
1745 { { VLC_CODEC_YUV_PLANAR_440, 0 }, PLANAR_8(3, 1, 2) },
1746 { { VLC_CODEC_YUV_PLANAR_444, 0 }, PLANAR_8(3, 1, 1) },
1747 { { VLC_CODEC_YUVA, 0 }, PLANAR_8(4, 1, 1) },
1749 { { VLC_CODEC_I420_10L,
1750 VLC_CODEC_I420_10B, 0 }, PLANAR_16(3, 2, 2, 10) },
1751 { { VLC_CODEC_I420_9L,
1752 VLC_CODEC_I420_9B, 0 }, PLANAR_16(3, 2, 2, 9) },
1753 { { VLC_CODEC_I422_10L,
1754 VLC_CODEC_I422_10B, 0 }, PLANAR_16(3, 2, 1, 10) },
1755 { { VLC_CODEC_I422_9L,
1756 VLC_CODEC_I422_9B, 0 }, PLANAR_16(3, 2, 1, 9) },
1757 { { VLC_CODEC_I444_10L,
1758 VLC_CODEC_I444_10B, 0 }, PLANAR_16(3, 1, 1, 10) },
1759 { { VLC_CODEC_I444_9L,
1760 VLC_CODEC_I444_9B, 0 }, PLANAR_16(3, 1, 1, 9) },
1762 { { VLC_CODEC_YUV_PACKED, 0 }, PACKED_FMT(2, 16) },
1763 { { VLC_CODEC_RGB8, VLC_CODEC_GREY,
1764 VLC_CODEC_YUVP, VLC_CODEC_RGBP, 0 }, PACKED_FMT(1, 8) },
1766 { { VLC_CODEC_RGB15, 0 }, PACKED_FMT(2, 15) },
1767 { { VLC_CODEC_RGB12, 0 }, PACKED_FMT(2, 12) },
1768 { { VLC_CODEC_RGB16, VLC_CODEC_RGBT,
1769 VLC_CODEC_RGBA16, 0 }, PACKED_FMT(2, 16) },
1770 { { VLC_CODEC_RGB24, 0 }, PACKED_FMT(3, 24) },
1771 { { VLC_CODEC_RGB32, 0 }, PACKED_FMT(4, 24) },
1772 { { VLC_CODEC_RGBA, 0 }, PACKED_FMT(4, 32) },
1774 { { VLC_CODEC_Y211, 0 }, { 1, { {{1,4}, {1,1}} }, 4, 32 } },
1776 { {0}, { 0, {}, 0, 0 } }
1784 const vlc_chroma_description_t *vlc_fourcc_GetChromaDescription( vlc_fourcc_t i_fourcc )
1786 for( unsigned i = 0; p_list_chroma_description[i].p_fourcc[0]; i++ )
1788 const vlc_fourcc_t *p_fourcc = p_list_chroma_description[i].p_fourcc;
1789 for( unsigned j = 0; p_fourcc[j]; j++ )
1791 if( p_fourcc[j] == i_fourcc )
1792 return &p_list_chroma_description[i].description;