From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 5/7] avformat/mov_chan: move the definition of MovChannelLayoutTag to the header Date: Mon, 28 Mar 2022 20:24:51 -0300 Message-ID: <20220328232453.54773-5-jamrial@gmail.com> (raw) In-Reply-To: <20220328232453.54773-1-jamrial@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/mov_chan.c | 104 ----------------------------------------- libavformat/mov_chan.h | 104 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index 4cb373d1b9..5b757c6a8a 100644 --- a/libavformat/mov_chan.c +++ b/libavformat/mov_chan.c @@ -29,110 +29,6 @@ #include "libavcodec/codec_id.h" #include "mov_chan.h" -/** - * Channel Layout Tag - * This tells which channels are present in the audio stream and the order in - * which they appear. - * - * @note We're using the channel layout tag to indicate channel order - * when the value is greater than 0x10000. The Apple documentation has - * some contradictions as to how this is actually supposed to be handled. - * - * Core Audio File Format Spec: - * "The high 16 bits indicates a specific ordering of the channels." - * Core Audio Data Types Reference: - * "These identifiers specify the channels included in a layout but - * do not specify a particular ordering of those channels." - */ -enum MovChannelLayoutTag { -#define MOV_CH_LAYOUT_UNKNOWN 0xFFFF0000 - MOV_CH_LAYOUT_USE_DESCRIPTIONS = ( 0 << 16) | 0, - MOV_CH_LAYOUT_USE_BITMAP = ( 1 << 16) | 0, - MOV_CH_LAYOUT_DISCRETEINORDER = (147 << 16) | 0, - MOV_CH_LAYOUT_MONO = (100 << 16) | 1, - MOV_CH_LAYOUT_STEREO = (101 << 16) | 2, - MOV_CH_LAYOUT_STEREOHEADPHONES = (102 << 16) | 2, - MOV_CH_LAYOUT_MATRIXSTEREO = (103 << 16) | 2, - MOV_CH_LAYOUT_MIDSIDE = (104 << 16) | 2, - MOV_CH_LAYOUT_XY = (105 << 16) | 2, - MOV_CH_LAYOUT_BINAURAL = (106 << 16) | 2, - MOV_CH_LAYOUT_AMBISONIC_B_FORMAT = (107 << 16) | 4, - MOV_CH_LAYOUT_QUADRAPHONIC = (108 << 16) | 4, - MOV_CH_LAYOUT_PENTAGONAL = (109 << 16) | 5, - MOV_CH_LAYOUT_HEXAGONAL = (110 << 16) | 6, - MOV_CH_LAYOUT_OCTAGONAL = (111 << 16) | 8, - MOV_CH_LAYOUT_CUBE = (112 << 16) | 8, - MOV_CH_LAYOUT_MPEG_3_0_A = (113 << 16) | 3, - MOV_CH_LAYOUT_MPEG_3_0_B = (114 << 16) | 3, - MOV_CH_LAYOUT_MPEG_4_0_A = (115 << 16) | 4, - MOV_CH_LAYOUT_MPEG_4_0_B = (116 << 16) | 4, - MOV_CH_LAYOUT_MPEG_5_0_A = (117 << 16) | 5, - MOV_CH_LAYOUT_MPEG_5_0_B = (118 << 16) | 5, - MOV_CH_LAYOUT_MPEG_5_0_C = (119 << 16) | 5, - MOV_CH_LAYOUT_MPEG_5_0_D = (120 << 16) | 5, - MOV_CH_LAYOUT_MPEG_5_1_A = (121 << 16) | 6, - MOV_CH_LAYOUT_MPEG_5_1_B = (122 << 16) | 6, - MOV_CH_LAYOUT_MPEG_5_1_C = (123 << 16) | 6, - MOV_CH_LAYOUT_MPEG_5_1_D = (124 << 16) | 6, - MOV_CH_LAYOUT_MPEG_6_1_A = (125 << 16) | 7, - MOV_CH_LAYOUT_MPEG_7_1_A = (126 << 16) | 8, - MOV_CH_LAYOUT_MPEG_7_1_B = (127 << 16) | 8, - MOV_CH_LAYOUT_MPEG_7_1_C = (128 << 16) | 8, - MOV_CH_LAYOUT_EMAGIC_DEFAULT_7_1 = (129 << 16) | 8, - MOV_CH_LAYOUT_SMPTE_DTV = (130 << 16) | 8, - MOV_CH_LAYOUT_ITU_2_1 = (131 << 16) | 3, - MOV_CH_LAYOUT_ITU_2_2 = (132 << 16) | 4, - MOV_CH_LAYOUT_DVD_4 = (133 << 16) | 3, - MOV_CH_LAYOUT_DVD_5 = (134 << 16) | 4, - MOV_CH_LAYOUT_DVD_6 = (135 << 16) | 5, - MOV_CH_LAYOUT_DVD_10 = (136 << 16) | 4, - MOV_CH_LAYOUT_DVD_11 = (137 << 16) | 5, - MOV_CH_LAYOUT_DVD_18 = (138 << 16) | 5, - MOV_CH_LAYOUT_AUDIOUNIT_6_0 = (139 << 16) | 6, - MOV_CH_LAYOUT_AUDIOUNIT_7_0 = (140 << 16) | 7, - MOV_CH_LAYOUT_AUDIOUNIT_7_0_FRONT = (148 << 16) | 7, - MOV_CH_LAYOUT_AAC_6_0 = (141 << 16) | 6, - MOV_CH_LAYOUT_AAC_6_1 = (142 << 16) | 7, - MOV_CH_LAYOUT_AAC_7_0 = (143 << 16) | 7, - MOV_CH_LAYOUT_AAC_OCTAGONAL = (144 << 16) | 8, - MOV_CH_LAYOUT_TMH_10_2_STD = (145 << 16) | 16, - MOV_CH_LAYOUT_TMH_10_2_FULL = (146 << 16) | 21, - MOV_CH_LAYOUT_AC3_1_0_1 = (149 << 16) | 2, - MOV_CH_LAYOUT_AC3_3_0 = (150 << 16) | 3, - MOV_CH_LAYOUT_AC3_3_1 = (151 << 16) | 4, - MOV_CH_LAYOUT_AC3_3_0_1 = (152 << 16) | 4, - MOV_CH_LAYOUT_AC3_2_1_1 = (153 << 16) | 4, - MOV_CH_LAYOUT_AC3_3_1_1 = (154 << 16) | 5, - MOV_CH_LAYOUT_EAC3_6_0_A = (155 << 16) | 6, - MOV_CH_LAYOUT_EAC3_7_0_A = (156 << 16) | 7, - MOV_CH_LAYOUT_EAC3_6_1_A = (157 << 16) | 7, - MOV_CH_LAYOUT_EAC3_6_1_B = (158 << 16) | 7, - MOV_CH_LAYOUT_EAC3_6_1_C = (159 << 16) | 7, - MOV_CH_LAYOUT_EAC3_7_1_A = (160 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_B = (161 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_C = (162 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_D = (163 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_E = (164 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_F = (165 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_G = (166 << 16) | 8, - MOV_CH_LAYOUT_EAC3_7_1_H = (167 << 16) | 8, - MOV_CH_LAYOUT_DTS_3_1 = (168 << 16) | 4, - MOV_CH_LAYOUT_DTS_4_1 = (169 << 16) | 5, - MOV_CH_LAYOUT_DTS_6_0_A = (170 << 16) | 6, - MOV_CH_LAYOUT_DTS_6_0_B = (171 << 16) | 6, - MOV_CH_LAYOUT_DTS_6_0_C = (172 << 16) | 6, - MOV_CH_LAYOUT_DTS_6_1_A = (173 << 16) | 7, - MOV_CH_LAYOUT_DTS_6_1_B = (174 << 16) | 7, - MOV_CH_LAYOUT_DTS_6_1_C = (175 << 16) | 7, - MOV_CH_LAYOUT_DTS_6_1_D = (182 << 16) | 7, - MOV_CH_LAYOUT_DTS_7_0 = (176 << 16) | 7, - MOV_CH_LAYOUT_DTS_7_1 = (177 << 16) | 8, - MOV_CH_LAYOUT_DTS_8_0_A = (178 << 16) | 8, - MOV_CH_LAYOUT_DTS_8_0_B = (179 << 16) | 8, - MOV_CH_LAYOUT_DTS_8_1_A = (180 << 16) | 9, - MOV_CH_LAYOUT_DTS_8_1_B = (181 << 16) | 9, -}; - struct MovChannelLayoutMap { uint32_t tag; uint64_t layout; diff --git a/libavformat/mov_chan.h b/libavformat/mov_chan.h index 2815f15f07..93d9878798 100644 --- a/libavformat/mov_chan.h +++ b/libavformat/mov_chan.h @@ -33,6 +33,110 @@ #include "libavcodec/codec_par.h" #include "avformat.h" +/** + * Channel Layout Tag + * This tells which channels are present in the audio stream and the order in + * which they appear. + * + * @note We're using the channel layout tag to indicate channel order + * when the value is greater than 0x10000. The Apple documentation has + * some contradictions as to how this is actually supposed to be handled. + * + * Core Audio File Format Spec: + * "The high 16 bits indicates a specific ordering of the channels." + * Core Audio Data Types Reference: + * "These identifiers specify the channels included in a layout but + * do not specify a particular ordering of those channels." + */ +enum MovChannelLayoutTag { +#define MOV_CH_LAYOUT_UNKNOWN 0xFFFF0000 + MOV_CH_LAYOUT_USE_DESCRIPTIONS = ( 0 << 16) | 0, + MOV_CH_LAYOUT_USE_BITMAP = ( 1 << 16) | 0, + MOV_CH_LAYOUT_DISCRETEINORDER = (147 << 16) | 0, + MOV_CH_LAYOUT_MONO = (100 << 16) | 1, + MOV_CH_LAYOUT_STEREO = (101 << 16) | 2, + MOV_CH_LAYOUT_STEREOHEADPHONES = (102 << 16) | 2, + MOV_CH_LAYOUT_MATRIXSTEREO = (103 << 16) | 2, + MOV_CH_LAYOUT_MIDSIDE = (104 << 16) | 2, + MOV_CH_LAYOUT_XY = (105 << 16) | 2, + MOV_CH_LAYOUT_BINAURAL = (106 << 16) | 2, + MOV_CH_LAYOUT_AMBISONIC_B_FORMAT = (107 << 16) | 4, + MOV_CH_LAYOUT_QUADRAPHONIC = (108 << 16) | 4, + MOV_CH_LAYOUT_PENTAGONAL = (109 << 16) | 5, + MOV_CH_LAYOUT_HEXAGONAL = (110 << 16) | 6, + MOV_CH_LAYOUT_OCTAGONAL = (111 << 16) | 8, + MOV_CH_LAYOUT_CUBE = (112 << 16) | 8, + MOV_CH_LAYOUT_MPEG_3_0_A = (113 << 16) | 3, + MOV_CH_LAYOUT_MPEG_3_0_B = (114 << 16) | 3, + MOV_CH_LAYOUT_MPEG_4_0_A = (115 << 16) | 4, + MOV_CH_LAYOUT_MPEG_4_0_B = (116 << 16) | 4, + MOV_CH_LAYOUT_MPEG_5_0_A = (117 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_0_B = (118 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_0_C = (119 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_0_D = (120 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_1_A = (121 << 16) | 6, + MOV_CH_LAYOUT_MPEG_5_1_B = (122 << 16) | 6, + MOV_CH_LAYOUT_MPEG_5_1_C = (123 << 16) | 6, + MOV_CH_LAYOUT_MPEG_5_1_D = (124 << 16) | 6, + MOV_CH_LAYOUT_MPEG_6_1_A = (125 << 16) | 7, + MOV_CH_LAYOUT_MPEG_7_1_A = (126 << 16) | 8, + MOV_CH_LAYOUT_MPEG_7_1_B = (127 << 16) | 8, + MOV_CH_LAYOUT_MPEG_7_1_C = (128 << 16) | 8, + MOV_CH_LAYOUT_EMAGIC_DEFAULT_7_1 = (129 << 16) | 8, + MOV_CH_LAYOUT_SMPTE_DTV = (130 << 16) | 8, + MOV_CH_LAYOUT_ITU_2_1 = (131 << 16) | 3, + MOV_CH_LAYOUT_ITU_2_2 = (132 << 16) | 4, + MOV_CH_LAYOUT_DVD_4 = (133 << 16) | 3, + MOV_CH_LAYOUT_DVD_5 = (134 << 16) | 4, + MOV_CH_LAYOUT_DVD_6 = (135 << 16) | 5, + MOV_CH_LAYOUT_DVD_10 = (136 << 16) | 4, + MOV_CH_LAYOUT_DVD_11 = (137 << 16) | 5, + MOV_CH_LAYOUT_DVD_18 = (138 << 16) | 5, + MOV_CH_LAYOUT_AUDIOUNIT_6_0 = (139 << 16) | 6, + MOV_CH_LAYOUT_AUDIOUNIT_7_0 = (140 << 16) | 7, + MOV_CH_LAYOUT_AUDIOUNIT_7_0_FRONT = (148 << 16) | 7, + MOV_CH_LAYOUT_AAC_6_0 = (141 << 16) | 6, + MOV_CH_LAYOUT_AAC_6_1 = (142 << 16) | 7, + MOV_CH_LAYOUT_AAC_7_0 = (143 << 16) | 7, + MOV_CH_LAYOUT_AAC_OCTAGONAL = (144 << 16) | 8, + MOV_CH_LAYOUT_TMH_10_2_STD = (145 << 16) | 16, + MOV_CH_LAYOUT_TMH_10_2_FULL = (146 << 16) | 21, + MOV_CH_LAYOUT_AC3_1_0_1 = (149 << 16) | 2, + MOV_CH_LAYOUT_AC3_3_0 = (150 << 16) | 3, + MOV_CH_LAYOUT_AC3_3_1 = (151 << 16) | 4, + MOV_CH_LAYOUT_AC3_3_0_1 = (152 << 16) | 4, + MOV_CH_LAYOUT_AC3_2_1_1 = (153 << 16) | 4, + MOV_CH_LAYOUT_AC3_3_1_1 = (154 << 16) | 5, + MOV_CH_LAYOUT_EAC3_6_0_A = (155 << 16) | 6, + MOV_CH_LAYOUT_EAC3_7_0_A = (156 << 16) | 7, + MOV_CH_LAYOUT_EAC3_6_1_A = (157 << 16) | 7, + MOV_CH_LAYOUT_EAC3_6_1_B = (158 << 16) | 7, + MOV_CH_LAYOUT_EAC3_6_1_C = (159 << 16) | 7, + MOV_CH_LAYOUT_EAC3_7_1_A = (160 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_B = (161 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_C = (162 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_D = (163 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_E = (164 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_F = (165 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_G = (166 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_H = (167 << 16) | 8, + MOV_CH_LAYOUT_DTS_3_1 = (168 << 16) | 4, + MOV_CH_LAYOUT_DTS_4_1 = (169 << 16) | 5, + MOV_CH_LAYOUT_DTS_6_0_A = (170 << 16) | 6, + MOV_CH_LAYOUT_DTS_6_0_B = (171 << 16) | 6, + MOV_CH_LAYOUT_DTS_6_0_C = (172 << 16) | 6, + MOV_CH_LAYOUT_DTS_6_1_A = (173 << 16) | 7, + MOV_CH_LAYOUT_DTS_6_1_B = (174 << 16) | 7, + MOV_CH_LAYOUT_DTS_6_1_C = (175 << 16) | 7, + MOV_CH_LAYOUT_DTS_6_1_D = (182 << 16) | 7, + MOV_CH_LAYOUT_DTS_7_0 = (176 << 16) | 7, + MOV_CH_LAYOUT_DTS_7_1 = (177 << 16) | 8, + MOV_CH_LAYOUT_DTS_8_0_A = (178 << 16) | 8, + MOV_CH_LAYOUT_DTS_8_0_B = (179 << 16) | 8, + MOV_CH_LAYOUT_DTS_8_1_A = (180 << 16) | 9, + MOV_CH_LAYOUT_DTS_8_1_B = (181 << 16) | 9, +}; + /** * Get the channel layout tag for the specified codec id and channel layout. * If the layout tag was not found, use a channel bitmap if possible. -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-03-28 23:26 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-28 23:24 [FFmpeg-devel] [PATCH 1/7] avformat/mov_chan: rename mov_get_channel_label() to better reflect its purpose James Almer 2022-03-28 23:24 ` [FFmpeg-devel] [PATCH 2/7] avformat/mov_chan: add a few missing channel label mappings James Almer 2022-03-28 23:24 ` [FFmpeg-devel] [PATCH 3/7] avformat/mov_chan: use a higher log level for a debug message James Almer 2022-03-28 23:24 ` [FFmpeg-devel] [PATCH 4/7] avformat/movenc: write channel descriptions when a known layout or a bitmap can't be used James Almer 2022-03-28 23:24 ` James Almer [this message] 2022-03-28 23:24 ` [FFmpeg-devel] [PATCH 6/7] avformat/movenc: don't use mono layout when a front center label is expected James Almer 2022-03-28 23:24 ` [FFmpeg-devel] [PATCH 7/7] fate: add a test for writing channel descriptions in mov James Almer 2022-04-05 12:20 ` [FFmpeg-devel] [PATCH 1/7] avformat/mov_chan: rename mov_get_channel_label() to better reflect its purpose James Almer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220328232453.54773-5-jamrial@gmail.com \ --to=jamrial@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git