FFmpeg
dca_exss.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 foo86
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_DCA_EXSS_H
22 #define AVCODEC_DCA_EXSS_H
23 
24 #include "libavutil/common.h"
25 
26 #include "avcodec.h"
27 #include "get_bits.h"
28 
29 typedef struct DCAExssAsset {
30  int asset_offset; ///< Offset to asset data from start of substream
31  int asset_size; ///< Size of encoded asset data
32  int asset_index; ///< Audio asset identifier
33 
34  int pcm_bit_res; ///< PCM bit resolution
35  int max_sample_rate; ///< Maximum sample rate
36  int nchannels_total; ///< Total number of channels
37  int one_to_one_map_ch_to_spkr; ///< One to one channel to speaker mapping flag
38  int embedded_stereo; ///< Embedded stereo flag
39  int embedded_6ch; ///< Embedded 6 channels flag
40  int spkr_mask_enabled; ///< Speaker mask enabled flag
41  int spkr_mask; ///< Loudspeaker activity mask
42  int representation_type; ///< Representation type
43 
44  int coding_mode; ///< Coding mode for the asset
45  int extension_mask; ///< Coding components used in asset
46 
47  int core_offset; ///< Offset to core component from start of substream
48  int core_size; ///< Size of core component in extension substream
49 
50  int xbr_offset; ///< Offset to XBR extension from start of substream
51  int xbr_size; ///< Size of XBR extension in extension substream
52 
53  int xxch_offset; ///< Offset to XXCH extension from start of substream
54  int xxch_size; ///< Size of XXCH extension in extension substream
55 
56  int x96_offset; ///< Offset to X96 extension from start of substream
57  int x96_size; ///< Size of X96 extension in extension substream
58 
59  int lbr_offset; ///< Offset to LBR component from start of substream
60  int lbr_size; ///< Size of LBR component in extension substream
61 
62  int xll_offset; ///< Offset to XLL data from start of substream
63  int xll_size; ///< Size of XLL data in extension substream
64  int xll_sync_present; ///< XLL sync word present flag
65  int xll_delay_nframes; ///< Initial XLL decoding delay in frames
66  int xll_sync_offset; ///< Number of bytes offset to XLL sync
67 
68  int hd_stream_id; ///< DTS-HD stream ID
69 } DCAExssAsset;
70 
71 typedef struct DCAExssParser {
74 
75  int exss_index; ///< Extension substream index
76  int exss_size_nbits; ///< Number of bits for extension substream size
77  int exss_size; ///< Number of bytes of extension substream
78 
79  int static_fields_present; ///< Per stream static fields presence flag
80  int npresents; ///< Number of defined audio presentations
81  int nassets; ///< Number of audio assets in extension substream
82 
83  int mix_metadata_enabled; ///< Mixing metadata enable flag
84  int nmixoutconfigs; ///< Number of mixing configurations
85  int nmixoutchs[4]; ///< Speaker layout mask for mixer output channels
86 
87  DCAExssAsset assets[1]; ///< Audio asset descriptors
89 
91 
92 #endif
DCAExssParser::avctx
AVCodecContext * avctx
Definition: dca_exss.h:72
DCAExssAsset::embedded_6ch
int embedded_6ch
Embedded 6 channels flag.
Definition: dca_exss.h:39
DCAExssAsset::asset_size
int asset_size
Size of encoded asset data.
Definition: dca_exss.h:31
DCAExssAsset::spkr_mask_enabled
int spkr_mask_enabled
Speaker mask enabled flag.
Definition: dca_exss.h:40
DCAExssAsset::x96_size
int x96_size
Size of X96 extension in extension substream.
Definition: dca_exss.h:57
data
const char data[16]
Definition: mxf.c:142
DCAExssParser
Definition: dca_exss.h:71
DCAExssAsset::xll_size
int xll_size
Size of XLL data in extension substream.
Definition: dca_exss.h:63
DCAExssAsset::one_to_one_map_ch_to_spkr
int one_to_one_map_ch_to_spkr
One to one channel to speaker mapping flag.
Definition: dca_exss.h:37
DCAExssAsset
Definition: dca_exss.h:29
DCAExssAsset::xbr_size
int xbr_size
Size of XBR extension in extension substream.
Definition: dca_exss.h:51
DCAExssAsset::lbr_offset
int lbr_offset
Offset to LBR component from start of substream.
Definition: dca_exss.h:59
GetBitContext
Definition: get_bits.h:61
ff_dca_exss_parse
int ff_dca_exss_parse(DCAExssParser *s, const uint8_t *data, int size)
Definition: dca_exss.c:378
DCAExssAsset::embedded_stereo
int embedded_stereo
Embedded stereo flag.
Definition: dca_exss.h:38
DCAExssParser::nassets
int nassets
Number of audio assets in extension substream.
Definition: dca_exss.h:81
DCAExssParser::npresents
int npresents
Number of defined audio presentations.
Definition: dca_exss.h:80
s
#define s(width, name)
Definition: cbs_vp9.c:257
DCAExssAsset::spkr_mask
int spkr_mask
Loudspeaker activity mask.
Definition: dca_exss.h:41
get_bits.h
DCAExssParser::mix_metadata_enabled
int mix_metadata_enabled
Mixing metadata enable flag.
Definition: dca_exss.h:83
DCAExssAsset::lbr_size
int lbr_size
Size of LBR component in extension substream.
Definition: dca_exss.h:60
DCAExssAsset::core_offset
int core_offset
Offset to core component from start of substream.
Definition: dca_exss.h:47
DCAExssAsset::xll_offset
int xll_offset
Offset to XLL data from start of substream.
Definition: dca_exss.h:62
size
int size
Definition: twinvq_data.h:10344
DCAExssAsset::xll_delay_nframes
int xll_delay_nframes
Initial XLL decoding delay in frames.
Definition: dca_exss.h:65
DCAExssAsset::asset_index
int asset_index
Audio asset identifier.
Definition: dca_exss.h:32
DCAExssAsset::max_sample_rate
int max_sample_rate
Maximum sample rate.
Definition: dca_exss.h:35
DCAExssParser::nmixoutchs
int nmixoutchs[4]
Speaker layout mask for mixer output channels.
Definition: dca_exss.h:85
DCAExssParser::exss_index
int exss_index
Extension substream index.
Definition: dca_exss.h:75
DCAExssAsset::core_size
int core_size
Size of core component in extension substream.
Definition: dca_exss.h:48
DCAExssParser::exss_size
int exss_size
Number of bytes of extension substream.
Definition: dca_exss.h:77
common.h
uint8_t
uint8_t
Definition: audio_convert.c:194
DCAExssAsset::xll_sync_offset
int xll_sync_offset
Number of bytes offset to XLL sync.
Definition: dca_exss.h:66
DCAExssParser::assets
DCAExssAsset assets[1]
Audio asset descriptors.
Definition: dca_exss.h:87
DCAExssParser::exss_size_nbits
int exss_size_nbits
Number of bits for extension substream size.
Definition: dca_exss.h:76
avcodec.h
DCAExssAsset::nchannels_total
int nchannels_total
Total number of channels.
Definition: dca_exss.h:36
DCAExssParser::static_fields_present
int static_fields_present
Per stream static fields presence flag.
Definition: dca_exss.h:79
DCAExssAsset::asset_offset
int asset_offset
Offset to asset data from start of substream.
Definition: dca_exss.h:30
AVCodecContext
main external API structure.
Definition: avcodec.h:536
DCAExssAsset::pcm_bit_res
int pcm_bit_res
PCM bit resolution.
Definition: dca_exss.h:34
DCAExssAsset::xll_sync_present
int xll_sync_present
XLL sync word present flag.
Definition: dca_exss.h:64
DCAExssParser::nmixoutconfigs
int nmixoutconfigs
Number of mixing configurations.
Definition: dca_exss.h:84
DCAExssAsset::x96_offset
int x96_offset
Offset to X96 extension from start of substream.
Definition: dca_exss.h:56
DCAExssAsset::xbr_offset
int xbr_offset
Offset to XBR extension from start of substream.
Definition: dca_exss.h:50
DCAExssAsset::extension_mask
int extension_mask
Coding components used in asset.
Definition: dca_exss.h:45
DCAExssAsset::xxch_size
int xxch_size
Size of XXCH extension in extension substream.
Definition: dca_exss.h:54
DCAExssAsset::xxch_offset
int xxch_offset
Offset to XXCH extension from start of substream.
Definition: dca_exss.h:53
DCAExssAsset::coding_mode
int coding_mode
Coding mode for the asset.
Definition: dca_exss.h:44
DCAExssAsset::representation_type
int representation_type
Representation type.
Definition: dca_exss.h:42
DCAExssAsset::hd_stream_id
int hd_stream_id
DTS-HD stream ID.
Definition: dca_exss.h:68
DCAExssParser::gb
GetBitContext gb
Definition: dca_exss.h:73