hash stringlengths 32 32 | doc_id stringlengths 7 13 | section stringlengths 3 121 | content stringlengths 0 2.2M |
|---|---|---|---|
e16d334f11519b9671e26952047d356b | 103 491 | 8.2 Fundamental Bitstream Operations for ACE | |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.1 Align | Aligns the read pointer to a n-byte boundary. Table 8-1: Align Syntax // Read count: 0 ... 8*n-1 bits void align(uint n); void align() { align(1); } Parameters β’ n - Byte boundary to align to. |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.2 Skip | Advances the read pointer by n bytes. Byte alignment is implied. Table 8-2: Skip Syntax // Read count: n bytes void skip(uint n); ETSI ETSI TS 103 491 V1.2.1 (2019-05) 125 Parameters β’ n - Number of bytes to skip. |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.3 BitsUsed | BitsUsed(void) reports the position of the bitstream read pointer with respect to the origin (start point) of the bitstream. BitsUsed(uint n) set the current position of the bitstream read pointer to the value n. A typical use is the call BitsUsed(0), sets the current position of the bitstream pointer as the origin of ... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.4 BitsLeft | Bitsleft(void) reports the number of bits left in the bitstream, that is, the number of bits that can be read before exceeding bitstream capacity. Table 8-4: BitsLeft Syntax // Report the number of bits left in the bitstream. int BitsLeft(); |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.5 BitsTotal | BitsTotal(void) reports the capacity of the bitstream. BitsTotal(uint n) sets the capacity of the bitstream to the value n. Table 8-5: BitsTotal Syntax // Report the capacity of the bitstream int BitsUsed(); // Set the capacity of the bitstream int BitsTotal(int n) Parameters β’ n - The new value of the bitstream capaci... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.6 ReadBit | Readbit(void) extracts a single bit from the bitstream and returns a value 0 or 1. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 126 Table 8-6: ReadBit Syntax // Read count: 1 bit uint ReadBit() { return (uint)ExtractBit(1); } |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.7 ReadBool | ReadBool(void) extracts a single bit from a bitstream and returns a value of either FALSE or TRUE. Table 8-7: ReadBool Syntax Reference // Read count: 1 bit bool ReadBool() { return (bool)ReadBit(); } 8.2.3 |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.8 ReadUint | ReadUint (uint num_bits) extracts num_bits from a bitstream to form an unsigned integer. Table 8-8: ReadUint Syntax Reference // Read count: num_bits bits uint ReadUint(uint num_bits) { uint result = 0; for (int i=0;i<num_bits;i++) { result = (result << 1) | ReadBit(); } return result; } 8.2.3 |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.9 ReadInt | ReadInt (uint num_bits) extracts a 2's complement integer from a bitstream. Table 8-9: ReadInt Syntax Reference // Read count: num_bits bits int ReadInt(uint num_bits) { if (num_bits == 0) { return 0; } int result = (int) ReadUint(num_bits); if (result >= ((1<<num_bits)>>1) { return (result - (1<<num_bits)); } return r... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.10 ReadUnary | ReadUnary(alpha) extracts an unsigned integer n from the bitstream, with 0 <= < ./β. The value < ./β β1 is encoded as a sequence of n zeros, terminated by the symbol 1. The value ./β β1 is encoded by a sequence of ./β β1 zeros. ReadUnary(alpha) returns the value 0 for ./β = 0,1. Table 8-10: ReadUnary Synt... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.11 ReadUniform | ReadUniform(alpha) extracts an unsigned integer n from the bitstream, where 0 β€ < ./β. The value n is encoded as an m-bit or (m-1)-bit integer, where 2( ) < ./β β€2. When alpha is a power of two, ReadUniform(alpha) is equivalent to ReadUint(m). Table 8-11: ReadUniform Syntax Reference // Read count: NumBits(alp... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.12 ReadGolomb | ReadGolomb(uint alpha, uint kparam) extracts an unsigned integer from the bitstream with the kparam least significant bits uniformly encoded, and the remaining most significant bits unary encoded. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 128 Table 8-12: ReadGolomb Syntax Reference // Read count: variable uint ReadGolomb(u... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.13 ReadGolombLimited | ReadGolombLimited(uint alpha, uint kparam, uint limit) extracts an unsigned integer from the bitstream. Values smaller than limit are Golomb-encoded with binary resolution kparam. Values larger than or equal to limit are encoded by first Golomb-encoding limit and then encoding the difference between the value and limit... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.14 ReadGolombWithParams | ReadGolombWithParams(GolombParams gparams) extracts an unsigned integer from the bitstream using ReadGolombLimited, with its parameters aggregated in a GolombParams datatype. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 129 Table 8-14: ReadGolombWithParams Syntax Reference // Aggregate for Golomb parameters typedef struct { u... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.15 ReadVLC | ReadVLC(primary_table, escape_table) extracts an unsigned integer from the bitstream using ReadUint(), with the resolution of the ReadUint call read from the bitstream using ReadUnary. The value returned is recursively incremented by the alphabet size of previous unused resolutions. The parameter list of ReadVLC allows... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.16 ReadLimitsVLC | ReadLimitsVLC(res_table) extracts an unsigned integer from the bitstream using a sequence of resolutions given by res_table. The sequence stops when the partial value read from the bitstream is smaller than the maximum value for the current resolution. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 130 Table 8-16: ReadLimitsVLC... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.2.17 ReadNonUniformFiveTen | ReadNonUniformFiveTen() extracts an unsigned integer from the bitstream. Values smaller than 24 are represented by 5 bits. Values larger than 23 and smaller than 280 are represented by 10 bits. Values larger than 279 and smaller than 280 + (1 << 22) are represented by 32 bits. Table 8-17: ReadNonUniformFiveTen Syntax R... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3 Auxiliary Functions | |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3.1 NumBits | NumBits(value) returns the number of minimal number bits required to represent value. Table 8-18: NumBits Syntax uint NumBits(uint value) { uint result = 0; while (value != 0) { value >>= 1; result++; } return result; } ETSI ETSI TS 103 491 V1.2.1 (2019-05) 131 Parameter β’ value - The value for which the number of bits... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3.2 Modular | Modular(value,low,high) computes value (mod alpha) represented between low (inclusive) and high (inclusive), where ./β = ββ β . 1 + 1. Table 8-19: Modular Syntax int Modular (int value, int low, int high) { ASSERT( low <= high); uint alpha = high - low + 1; int result = value; while (result > high) { result -= alph... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3.3 NegativeRiceMap | NegativeRiceMapDecode(value) decodes a signed from an unsigned integer representation. It differs from PositiveRiceMapDecode(value) by a sign change. Table 8-20: NegativeRiceMapDecode Syntax int NegativeRiceMapDecode(uint value) { if ( value & 1 ) { return -(int)(value+1)/2; else { return (int)value/2; } } Parameter β’ ... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3.4 PositiveRiceMap | PositiveRiceMapDecode(value) decodes a signed from an unsigned integer representation. It differs from NegativeRiceMapDecode(value) by a sign change. Table 8-21: PositiveRiceMapDecode Syntax int PositiveRiceMapDecode(uint value) { return -NegativeRiceMapDecode(value); } ETSI ETSI TS 103 491 V1.2.1 (2019-05) 132 Paramet... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3.5 CenterMap | CenterMap is an efficient method to encode a non-negative integer concentrated around a center value c, by ordering unsigned integers in a finite alphabet in increasing order of distance to c. Given an alphabet size alpha and a center c in the range 0 < < ./β and assuming β€ 2(./β β1)/2)3 the map EncodeCenterMap is ... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.3.6 Rand | The function Rand(float lb, float ub) draws with uniform probability a floating point value in the interval defined by its lower bound (inclusive) and its upperbound (exclusive). ETSI ETSI TS 103 491 V1.2.1 (2019-05) 133 Table 8-23: Rand Syntax // Pseudo-random number generator // // parameter[in] lb: lowerbound of int... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.4 ACE Data Types | |
e16d334f11519b9671e26952047d356b | 103 491 | 8.4.1 FixedPoint | An instance of class FixedPoint represents the number _data / (1 << PRECISION), where _data is the internal data carrier, and PRECISION is the fixed point precision parameter. Table 8-24: FixedPoint Syntax // FixedPoint Class (datatype) template<int PRECISION> class FixedPoint { // Initialization from integer and fract... |
e16d334f11519b9671e26952047d356b | 103 491 | 8.4.2 Fixed Point Instances | Table 8-25 defines some fixed point types used in the ACE decoder sample code. Table 8-25: Fixed Point Instances Syntax typedef FixedPoint<10> LNFP; // lognorm typedef FixedPoint<10> BAFP; // bit allocation typedef FixedPoint<4> LBFP; // band size typedef FixedPoint<5> RBFP; // running balance typedef FixedPoint<11> BQ... |
e16d334f11519b9671e26952047d356b | 103 491 | 9 ACE Decoder | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.1 Overview | An ACE elementary bitstream consists of a sequence of frames, where each frame encodes one or more waveforms for a given specified window in time. In general, ACE frames have temporal dependencies and can only be successfully decoded when a previous frame has been successfully decoded. An elementary bitstream may be pa... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.2 Bitstream | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.2.1 Bitstream Data and Method | An ACE bitstream consists of one or more Frames that are read out sequentially, as shown in Table 9-1. Table 9-1: BitStream Data and Methods Syntax Reference // A bitstream consists of one or more Frames that are read out sequentially. struct BitStream { Frame frame[]; void read_bitstream(); } 9.2.2 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.2.2 read_bitstream | read_bitstream() fetches and process the ACE audio frames in presentation order, as shown in Table 9-2. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 139 Table 9-2: read_bitstream Syntax Reference read_bitstream() { Frame* previous = NULL; for (int i=0;;i++) { frame[i].read_frame(previous); previous = &(frame[i]); } } 9.3.2 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.3 ACE Frames | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.3.1 Frame Data and Methods | A Frame, shown in Table 9-3, encapsulates one or more compressed waveforms, logically grouped in StreamSets; each StreamSet logically groups a number of audible elements (Streams) that are intended to be played out together. Table 9-3: Frame Syntax Reference struct Frame { Frame *_previous; uint _padding; FrameHeader _... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.3.2 read_decode_frame | The function read_decode_frame, shown in Table 9-4, reads and decodes a single frame from a bitstream. This function takes a pointer to the previous Frame as input parameter. Table 9-4: read_decode_frame Syntax Reference // Read a single Frame from the bitstream // // parameter[in] frame: pointer to the previous frame.... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.3.3 Function Supporting read_decode_frame | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.3.3.1 read_padding | The function read_padding, shown in Table 9-5, reads the number of bytes to be skipped (_padding) after completion all of the streamsets in a Frame. Table 9-5: read_padding Syntax Reference // read number of padding bytes from a bitstream void read_padding() { _padding = 0; Table PRIMARY_TABLE = {7,31}; Table ESCAPE_TA... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4 ACE Frame Header | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.1 Frame Header Data and Methods | The structure of a Frame Header is shown in Table 9-6. A FrameHeader records Frame properties that are persistent for every StreamSet and every Stream contained within a Frame. A Frame is encoded as a byte-aligned data packet that may contain zero or more padding bytes. Any decoder conforming to the present document sh... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.2 read_frame_header | The function read_frame_header, shown in, reads basic information, shared across all streamsets, from a bitstream. Table 9-7: read_frame_header Syntax Reference // read the FrameHeader from a bitstream // // parameter[in] frame: pointer to the frameheader in the previous frame void read_frame_header(Frame* containing_f... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3 Functions used by read_frame_header | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3.1 read_is_sync | The function read_is_sync, shown in Table 9-8, reads the sync flag from the bitstream. A Frame with the is_sync flag set to true is referred to as a sync-Frame, and indicates the start of a GoF. In a sync-Frame, bitstream metadata are not predicted or derived from metadata in a previous Frame. The sync flag, when true,... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3.2 read_enable_deemphasis | The function read_enable_deemphasis(), shown in Table 9-9, reads the enable_deemphasis Boolean flag, which enables (enable_deemphasis = true) or disables de-emphasis processing in the decoder. Table 9-9: read_enable_deemphasis Syntax Reference // Read the enable_deemphasis flag void read_enable_deemphasis() { coded_val... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3.3 read_frame_duration | The function read_frame_duration(), shown in Table 9-10, reads the duration of the encoded measured in number of samples. For this version of the decoder the only allowed value is 1 024. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 143 Table 9-10: read_frame_duration Syntax Reference // Read frame_duration from bitstream void... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3.4 read_sampling_rate | The function read_sampling_rate(), shown in Table 9-11, reads the sampling rate of the waveforms encoded in a Frame, with allowed values of 44 100 Hz and 48 000 Hz. The sampling_rate value is copied from the previous frame in a non-sync frame. The sampling rate is constant for the duration of an ACE bitstream. Table 9-... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3.5 read_num_stream_sets | The function read_num_stream_sets, shown in Table 9-12, reads the number of streamsets within a Frame. This value is dynamic and may change from frame to frame. Table 9-12: read_num_stream_sets Syntax Reference // Read num_stream_sets from bitstream read_num_stream_sets () { num_stream_sets = ReadLimitsVLC() + 1; } 8.2... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.4.3.6 read_has_padding | The function read_has_padding, shown in Table 9-13, reads the has_padding flag from the bitstream. If this flag is set, the number of padding bytes will be read from the bitstream before frame parsing continues. Table 9-13: read_has_padding Syntax Reference // Read padding flag read_has_padding () { has_padding = ReadB... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5 ACE StreamSetHeader | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.1 StreamSetHeader Data and Methods | A StreamSetHeader, shown in Table 9-14, carries the metadata that are common for all streams included in a StreamSet. Table 9-14: StreamSetHeader Syntax struct StreamSetHeader { Frame* frame; // pointer to containing frame FrameHeader* frame_header; // pointer to containing frame header StreamSetHeader *previous; // po... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.2 read_streamset_header | The function read_streamset_header, shown in Table 9-15, reads streamset header data from a bitstream. Table 9-15: read_streamset_header Syntax Reference // read a streamset header from a bitstream // // parameter[in] frame: pointer to containing frame // parameter[in] header: pointer to containing frame header // para... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3 Functions called from read_streamset_header | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3.1 read_streamset_id | The function read_streamset_id, shown in Table 9-16 reads the streamset_id from the bitstream. The streamset_id binds streamsets across time. Table 9-16: read_streamset_id Syntax Reference // read streamset_id void read_streamset_id() { streamset_id = ReadLimitsVLC(); } 8.2.16 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3.2 read_stream_information | The function read_stream_information, shown in Table 9-17, reads the composition of a streamset as a set of LFEStreams, MonoStreams, and StereoStreams from the bitstream. Table 9-17: read_stream_information Syntax Reference // Read stream information from the bitstream // // 1. The first 10 composition code values indi... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3.3 read_lfe_stream_payload_size | The function read_lfe_payload_size, shown in Table 9-18, reads an LFE payload size from the bitstream. Table 9-18: read_lfe_stream_payload_size Syntax Reference // read an LFE payload size from a bitstream void read_lfe_stream_payload_size(uint stream_idx) { lfe_stream_payload_size[stream_idx] = ReadNonUniformFiveTen()... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3.4 read_mono_stream_payload_size | The function read_mono_stream_payload_size, shown in Table 9-19, reads a MonoStream payload size from the bitstream. Table 9-19: read_mono_stream_payload_size Syntax Reference // read a MonoStream payload size from a bitstream void read_mono_stream_payload_size(uint stream_idx) { Table PRIMARY_TABLE[] = {2,7,9,13}; Tab... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3.5 read_stereo_stream_payload_size | The function read_stereo_stream_payload_size, shown in Table 9-20, reads a StereoStream payload size from the bitstream. Table 9-20: read_stereo_stream_payload_size Syntax Reference // read an StereoStream payload size from a bitstream void read_stereo_stream_payload_size(uint stream_idx) { Table PRIMARY_TABLE[] = {2,7... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.5.3.6 read_stream_bandwidth_mode | The function read_stream_bandwidth_mode, shown in Table 9-21, reads bandwidth mode information from a bitstream. The bandwidth mode and determines the number of bands that are coded (num_effective_bands). bandwidth_mode does not apply to LFE streams. Table 9-21: read_stream_bandwidth_mode Syntax Reference // read bandw... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.6 ACE Stream Set | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.6.1 Stream Set Data and Methods | A StreamSet, shown in Table 9-22, aggregates one or more waveforms that are intended to be played back together. The composition of a StreamSet is recorded in its associated header. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 149 Table 9-22: AceStreamSet Syntax struct AceStreamSet { Frame* _frame; StreamSetHeader* _header; S... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.6.2 read_decode_streamset | The function read_decode streamset, shown in Table 9-23, reads and decodes a StreamSet from a bitstream by reading and decoding all of its included streams (LFE, mono, stereo). Table 9-23: read_decode_streamset Syntax Reference // reading a streamset from a bitstream void read_decode_streamset(Frame* frame, StreamSetHe... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7 ACE LFEStreams | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.1 LFE Stream Data and Methods | An LFEStream holds one or more LFEChannels. Parsing an LFEStream amounts to parsing and decoding its included LFEChannels. An LFEStream contains the data listed in Table 9-24. Table 9-24: LFEStream Syntax struct LFEStream { Frame* _frame; StreamSet* _streamset; LFEStream *_previous; uint _stream_index; LFEChannel _lfe_... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.2 read_decode_lfe_stream | The function read_lfe_decode_stream, shown in Table 9-25, parses and decodes an LFE stream by parsing and decoding its included LFE channels. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 151 Table 9-25: read_decode_lfe_stream Syntax Reference // Parse an LFE stream from the bitstream // // parameter[in] frame: pointer to the ... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3 LFEChannel | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.1 LFEChannel Data and Methods | An LFEChannel contains the data listed in Table 9-26. Table 9-26: LFEChannel Syntax struct LFEChannel { // Reference pointers Frame* _frame; // pointer to current frame LFEStream* _stream; // pointer to stream LFEChannel* _previous; // pointer to LFEChannel in previous frame uint _channel_index; // index in the LFEChan... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.2 read_decode_lfe_channel | The function read_decode_lfe_channel, Table 9-27, reads metadata for a single LFE channel. This function ends with decode_lfe_channel reconstructing PCM values from the data that has been read from the bitstream. Table 9-27: read_decode_lfe_channel Syntax Reference read_lfe_channel(Frame* frame, LFEStream* stream, uint... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.3 Functions Called by read_lfe_channel | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.3.1 read_resolution | The function read_resolution reads the quantization resolution from the bitstream. Table 9-28: read_resolution Syntax Reference // Read quantization resolution from the bitstream read_resolution() { const uint RESOLUTION_TABLE[] = {8,10,12}; _resolution = RESOLUTION_TABLE[ReadUniform(3)]; } 8.2.11 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.3.2 read_savings | The function read_savings reads the adjustment to resolution value for predictive decoding from the bitstream. Table 9-29: read_savings Syntax Reference // Read adjustment to quantization resolution from the bitstream. read_savings() { LFE_SAVINGS_BITS = 2; _savings = ReadUint(LFE_SAVINGS_BITS); 8.2.8 ETSI ETSI TS 103 ... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.3.3 read_dbnorm | The function dbnorm reads the lognorm of the decimated LFE channel from the bitstream. Table 9-30: read_dbnorm Syntax Reference // Read the lognorm of the decimated LFE channel from the bitstream. read_dbnorm() { uint LFE_NORM_BITS = 6; _dbnorm = ReadUint(LFE_NORM_BITS); } 8.2.8 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.3.4 read_predictor | The function read_predictor() reads the prediction coefficient for predictive decoding from the bitstream. Table 9-31: read_predictor Syntax Reference // Read the prediction coefficients from the bitstream read_predictor() { const uint LFE_PREDICTION_ORDER = 2; const uint LFE_LAR_INDEX_ALPHABET_SIZE = 255; for (int i=0... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.7.3.3.5 read_lfe_decimated_buffer | The function read_lfe_decimated_buffer() reads sample values (in non-predictive mode) or residual values (in predictive mode) from the bitstream. Table 9-32: read_lfe_decimated_buffer Syntax Reference // Read samples or residuals from the bitstream read_lfe_decimated_buffer() { // Read Golomb k-parameter uint kparam; u... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.8 ACE Streams | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.8.1 Stream Data and Methods | A Stream contains the data listed in Table 9-33. Table 9-33: Stream Syntax Reference struct Stream { Frame* _frame; StreamSet* _streamset; Stream* _previous; uint stream_index; float _stream_buffer[][]; uint _total_bits; BandsConfig* _config; uint _frame_duration; bool enable_deemphasis; uint _num_stream_channels; uint... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.8.2 read_decode_mono_stream | A MonoStream is specific instance of general Stream, with _is_stereo set to false, encoding a single waveform, as shown in Table 9-34. Table 9-34: MonoStream Syntax struct MonoStream : Stream { _is_stereo = false; } The call to read_ stream() is shown in Table 9-35. Table 9-35: read_decode_mono_stream Syntax Reference ... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.8.3 read_decode_stereo_stream | A StereoStream is specific instance of general Stream, with _is_stereo set to true, encoding exactly two waveforms, as shown in Table 9-36. Table 9-36: StereoStream Syntax struct StereoStream : Stream { _is_stereo = true; } The call to read_decode_stream() is shown in Table 9-37. Table 9-37: read_decode_stereo_stream S... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.8.4 read_decode_stream | The function read_decode_stream(), in Table 9-38, reads and decodes a single stream from a bitstream. Table 9-38: read_decode_stream Syntax Reference // Parse a stream from the bitstream // // parameter[in] frame: pointer to current frame // parameter[in] stream_set: pointer to containing stream_set // parameter[in] st... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9 Stream Preparation | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.1 read_coding_mode | The function read_coding_mode(), shown in Table 9-39, reads the coding mode from the bitstream. When _coding_mode is equal to kCodingOff no spectral coefficients are encoded in the bitstream. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 161 Table 9-39: read_coding_mode Syntax Reference // read coding mode uint read_coding_mod... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.2 compute_effective_channels | The function compute_effective_channels(), shown in Table 9-40, determines the channels that are effectively encoded in the bitstream. Table 9-40: compute_effective_channels Syntax // Determine the first and last channel that are effectively coded in the bit stream, // depending on the coding mode and the overall numbe... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.3 read_long_term_synthesis | The function read_long_term_sysnthesis(), shown in Table 9-41, reads the long term synthesis parameters from the bitstream. If long term synthesis is disabled, the _lts_lag value and the three _lts_coefficients are all set to zero. Table 9-41: read_long_term_synthesis Syntax Reference void read_long_term_synthesis() { ... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.4 read_vq_resolution_mode | The function read_vq_resolution_mode(), shown in Table 9-42, sets the _is_highres flag. If the flag is true, the vector quantizer used to quantize and encode the bands' spectral shapes operates in a higher resolution mode (up to 4 levels of recursive subdivision, pyramid vectors L1 norm maxK = 256). If the flag is fals... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.5 read_mdct_mode | The function read_mdct_mode(), shown in Table 9-43, sets the _is_short flag as well as the number of MDCT blocks _num_mdct_block for the stream. This number is 1 when _is_short equals false, and 8 when _is_short equals true. Table 9-43: read_mdct_mode Syntax // read mdct_mode uint read_mdct_mode() { uint NUM_MDCT_BLOCK... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.6 read_shf_enabled | The function read_shf_enabled() in Table 9-44 reads the _shf_enabled flag from the bit_stream. Table 9-44: read_shf_enabled Syntax Reference // read shf enabled flag void read_shf_enabled() { _shf_enabled = ReadBool(); } 8.2.7 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.7 read_thf_enabled | The function read_thf_enabled(), in Table 9-45, reads the _thf_enabled flag from the bit_stream. This function is only called when _is_short equals true. Table 9-45: read_thf_enabled Syntax Reference // read thf enabled flag void read_thf_enabled() { _thf_enabled = ReadBool(); } 8.2.7 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.8 read_lognorm_primary | The function read_lognorm_primary(), in Table 9-46, reads a first approximation of the band lognorm values from the bitstream. Table 9-46: read_lognorm_primary Syntax Reference // read first approximation to lognorm valuesvoid read_lognorm_primary() { const uint MAX_K_BOOST = 6; uint transform_index = _is_short ? 1 : 0... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.9 read_num_band_blocks | The function read_num_band_blocks(), in Table 9-47, retrieves the number of blocks _num_band_blocks for each of the spectral bands as encoded in the bitstream. Table 9-47: read_num_band_blocks Syntax Reference // read number of blocks per band void read_num_band_blocks () { const uint index_to_dk_pair[4] = { 2, 3, 0, 1... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.10 Functions Supporting read_num_band_blocks | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.10.1 map_tf_change | Auxiliary function map_tf_change() maps a decoded unsigned symbol to a signed change value. Table 9-48: map_tf_change Syntax Reference // map_tf_change int map_tf_change(uint msymb, uint alpha_base, bool is_narrow, uint diff) { const int map_short_narrow[] = { 0, -1, -2, -3 }; const int map_short_wide[] = { 0, 1, -1, -... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.10.2 undo_differential | The function undo_differential() reverses differentiation in a differentially encoded vector of integers. Table 9-49: undo_differential Syntax Reference // undo differentiation undo_differential(int &vec[], uint alpha_base) { uint num_narrow_bands = _config -> num_narrow_bands; enforce_range(vec[0], alpha_base, num_nar... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.10.3 enforce_range | (vec[band], alpha_base, band < num_narrow_bands); } } 9.9.10.3 ETSI ETSI TS 103 491 V1.2.1 (2019-05) 166 Table 9-50: enforce_range Syntax Reference // enforce range void enforce_range(int &val, uint alpha_base, bool is_narrow) { const int LONGBLOCK_MIN = 0; const int SHORTBLOCK_MIN = -3; uint alpha = is_narrow ? (alpha... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.11 read_conditioning_level | The function read_reconditioning_level() retrieves the reconditioning level from the bitstream. Table 9-51: read_reconditioning_level Syntax Reference // read reconditioning level read_reconditioning_level() { reconditioning_level = ReadUint(2); } 8.2.8 |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.12 read_allocation | The function read_allocation() assigns to each band a bit budget, determining the quality of reconstruction for each band. The parameter _num_coded_bands indicates the region of bands that have spectral components encoded in the bitstream. Bands that have no encoded spectral components are reconstructed based on lognor... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.13.13 read_alloc_diff_steps | (n_bands_ref, alloc_ref, ref_guaranteed_alloc, _num_coded_bands, _alloc); break; } // Differentially code allocation bits-per-band with respect // to a Foundation Curve case: kSignedDiffFromFoundation: { const uint cost_estimate[2] = { 60, 72 }; int zeros[NUM_ACE_BANDS]; int foundation[NUM_ACE_BANDS]; // get a rough es... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.13 Functions use by read_allocation | |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.13.1 read_num_coded_bands | The function read_num_coded_bands() reads the number of coded bands. If no bands are coded, the function read_allocation returns immediately. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 169 Table 9-53: read_num_coded_bands Syntax Reference // read the number of coded bands (>= 0, <= _num_effective_bands) void read_num_coded_... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.13.2 read_num_bands | The function read_num_bands() reads the cardinality of a sequence of bands. Table 9-54: read_num_bands Syntax Reference // read a cardinality of sequence of bands uint read_num_bands(GolombParams gparams, uint prev_num_bands) { if (!_is_predictive) { num_bands = ReadUniform(gparams.alpha); } else { 8.2.11 int mapped_re... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.13.3 read_allocation_model | The function read_allocation_model() reads the allocation model from the bitstream. Table 9-55: read_alloc_mode Syntax Reference // Read the allocation model from the bitstream void read_alloc_mode() { const uint BIT_ALLOCATION_SIGNALLING_MODE_ALPHA = 6; _alloc_model = ReadUniform(BIT_ALLOCATION_SIGNALLING_MODE_ALPHA);... |
e16d334f11519b9671e26952047d356b | 103 491 | 9.9.13.4 read_alloc_model_parameter | The function read_alloc_model_parameter() reads the allocation model parameter from the bitstream. ETSI ETSI TS 103 491 V1.2.1 (2019-05) 170 Table 9-56: read_alloc_model_parameter Syntax Reference void read_alloc_model_parameter() { const uint ALLOC_MODEL_PARAM_ALPHA = 11; if (!_is_predictive) { _alloc_model_parameter ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.