FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
const char * s
Definition: avisynth_c.h:768
int nmixoutchs[4]
Speaker layout mask for mixer output channels.
Definition: dca_exss.h:85
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
int exss_size
Number of bytes of extension substream.
Definition: dca_exss.h:77
GetBitContext gb
Definition: dca_exss.h:73
int asset_index
Audio asset identifier.
Definition: dca_exss.h:32
uint8_t
int nmixoutconfigs
Number of mixing configurations.
Definition: dca_exss.h:84
int exss_index
Extension substream index.
Definition: dca_exss.h:75
int extension_mask
Coding components used in asset.
Definition: dca_exss.h:45
bitstream reader API header.
ptrdiff_t size
Definition: opengl_enc.c:101
int hd_stream_id
DTS-HD stream ID.
Definition: dca_exss.h:68
int xxch_offset
Offset to XXCH extension from start of substream.
Definition: dca_exss.h:53
int representation_type
Representation type.
Definition: dca_exss.h:42
int exss_size_nbits
Number of bits for extension substream size.
Definition: dca_exss.h:76
int embedded_6ch
Embedded 6 channels flag.
Definition: dca_exss.h:39
int nassets
Number of audio assets in extension substream.
Definition: dca_exss.h:81
int lbr_offset
Offset to LBR component from start of substream.
Definition: dca_exss.h:59
int xbr_offset
Offset to XBR extension from start of substream.
Definition: dca_exss.h:50
int mix_metadata_enabled
Mixing metadata enable flag.
Definition: dca_exss.h:83
int xll_offset
Offset to XLL data from start of substream.
Definition: dca_exss.h:62
int coding_mode
Coding mode for the asset.
Definition: dca_exss.h:44
int xll_delay_nframes
Initial XLL decoding delay in frames.
Definition: dca_exss.h:65
int static_fields_present
Per stream static fields presence flag.
Definition: dca_exss.h:79
DCAExssAsset assets[1]
Audio asset descriptors.
Definition: dca_exss.h:87
int xll_size
Size of XLL data in extension substream.
Definition: dca_exss.h:63
int one_to_one_map_ch_to_spkr
One to one channel to speaker mapping flag.
Definition: dca_exss.h:37
int max_sample_rate
Maximum sample rate.
Definition: dca_exss.h:35
int ff_dca_exss_parse(DCAExssParser *s, const uint8_t *data, int size)
Definition: dca_exss.c:378
Libavcodec external API header.
int core_size
Size of core component in extension substream.
Definition: dca_exss.h:48
int pcm_bit_res
PCM bit resolution.
Definition: dca_exss.h:34
int asset_size
Size of encoded asset data.
Definition: dca_exss.h:31
main external API structure.
Definition: avcodec.h:1502
int lbr_size
Size of LBR component in extension substream.
Definition: dca_exss.h:60
int x96_size
Size of X96 extension in extension substream.
Definition: dca_exss.h:57
int embedded_stereo
Embedded stereo flag.
Definition: dca_exss.h:38
int spkr_mask_enabled
Speaker mask enabled flag.
Definition: dca_exss.h:40
int nchannels_total
Total number of channels.
Definition: dca_exss.h:36
int xbr_size
Size of XBR extension in extension substream.
Definition: dca_exss.h:51
common internal and external API header
int asset_offset
Offset to asset data from start of substream.
Definition: dca_exss.h:30
int xll_sync_present
XLL sync word present flag.
Definition: dca_exss.h:64
AVCodecContext * avctx
Definition: dca_exss.h:72
int xxch_size
Size of XXCH extension in extension substream.
Definition: dca_exss.h:54
int x96_offset
Offset to X96 extension from start of substream.
Definition: dca_exss.h:56
int spkr_mask
Loudspeaker activity mask.
Definition: dca_exss.h:41
int npresents
Number of defined audio presentations.
Definition: dca_exss.h:80
int core_offset
Offset to core component from start of substream.
Definition: dca_exss.h:47
int xll_sync_offset
Number of bytes offset to XLL sync.
Definition: dca_exss.h:66