diff --git a/marked/Rel-11/26_series/26073/raw.md b/marked/Rel-11/26_series/26073/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..6aad2abf3951760911be710bea7887bda17597ee --- /dev/null +++ b/marked/Rel-11/26_series/26073/raw.md @@ -0,0 +1,1120 @@ + + + + + + +# --- Contents + +| | | +|--------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and abbreviations ..... | 5 | +| 3.1 Definitions..... | 5 | +| 3.2 Abbreviations ..... | 5 | +| 4 C code structure ..... | 6 | +| 4.1 Contents of the C source code..... | 6 | +| 4.2 Program execution..... | 6 | +| 4.3 Coding style..... | 7 | +| 4.4 Code hierarchy ..... | 7 | +| 4.5 Variables, constants and tables..... | 11 | +| 4.5.1 Description of constants used in the C-code ..... | 11 | +| 4.5.2 Description of fixed tables used in the C-code..... | 11 | +| 4.5.3 Static variables used in the C-code..... | 13 | +| 5 Homing procedure..... | 17 | +| 6 File formats ..... | 23 | +| 6.1 Speech file (encoder input / decoder output) ..... | 23 | +| 6.2 Mode control file (encoder input) ..... | 23 | +| 6.3 Parameter bitstream file (encoder output / decoder input)..... | 23 | +| Annex A (informative): Change History..... | 25 | + +# --- Foreword + +This Technical Specification (TS) has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document contains an electronic copy of the ANSI-C code for the Adaptive Multi-Rate codec. The ANSI-C code is necessary for a bit exact implementation of the Adaptive Multi Rate speech transcoder (TS 26.090 [2]), Voice Activity Detection (TS 26.094 [6]), comfort noise (TS 26.092 [4]), source controlled rate operation (TS 26.093 [5]) and example solutions for substituting and muting of lost frames (TS 26.091 [3]). + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. + +- [1] 3GPP TS 26.074: "AMR Speech Codec; Test sequences". +- [2] 3GPP TS 26.090: "AMR Speech Codec; Speech transcoding". +- [3] 3GPP TS 26.091: "AMR Speech Codec; Substitution and muting of lost frames". +- [4] 3GPP TS 26.092: "AMR Speech Codec; Comfort noise aspects". +- [5] 3GPP TS 26.093: "AMR Speech Codec; Source controlled rate operation". +- [6] 3GPP TS 26.094: "AMR Speech Codec; Voice Activity Detection". +- [7] RFC 3267: "A Real-Time Transport Protocol (RTP) Payload Format and File Storage Format for Adaptive Multi-Rate (AMR) and Adaptive Multi-Rate Wideband (AMR-WB) Audio Codecs", June 2002. + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +Definition of terms used in the present document, can be found in TS 06.090 [2], TS 06.091 [3], TS 06.092 [4], TS 06.093 [5] and TS 06.094 [6]. + +## 3.2 Abbreviations + +For the purpose of the present document, the following abbreviations apply: + +| | | +|------|-----------------------------------------| +| ANSI | American National Standards Institute | +| ETS | European Telecommunication Standard | +| GSM | Global System for Mobile communications | +| I/O | Input/Output | +| RAM | Random Access Memory | +| ROM | Read Only Memory | + +# --- 4 C code structure + +This clause gives an overview of the structure of the bit-exact C code and provides an overview of the contents and organization of the C code attached to this document. + +The C code has been verified on the following systems: + +- Sun Microsystems workstations and GNU gcc compiler; +- DEC Alpha workstations and GNU gcc compiler; +- IBM PC/AT compatible computers with Linux operating system and GNU gcc compiler. + +ANSI-C 9899 was selected as the programming language because portability was desirable. + +## 4.1 Contents of the C source code + +The C code distribution has all files in the root level. + +The distributed files with suffix "c" contain the source code and the files with suffix "h" are the header files. The ROM data is contained mostly in files with suffix "tab". + +The C code distribution also contains one speech coder installation verification data file, "spch\_dos.inp". The reference encoder output file is named "spch\_dos.cod", the reference decoder input file is named "spch\_dos.dec" and the reference decoder output file is named "spch\_dos.out". These four files are formatted such that they are correct for an IBM PC/AT compatible computer. The same files with reversed byte order of the 16 bit words are named "spch\_unx.inp", "spch\_unx.cod", "spch\_unx.dec" and "spch\_unx.out", respectively. + +Final verification is to be performed using the GSM Adaptive Multi-Rate test sequences described in GSM 06.74 [2]. + +Makefiles are provided for the platforms in which the C code has been verified (listed above). Once the software is installed, this directory will have a compiled version of *encoder* and *decoder* (the bit-exact C executables of the speech codec) and all the object files. + +## 4.2 Program execution + +The GSM Adaptive Multi-Rate codec is implemented in two programs: + +- (*encoder*) speech encoder; +- (*decoder*) speech decoder. + +The programs should be called like: + +- encoder [encoder options] ; +- decoder [decoder options] . + +The speech files contain 16-bit linear encoded PCM speech samples and the parameter files contain encoded speech data and some additional flags. + +The encoder and decoder options will be explained by running the applications with option `-h`. See the file `readme.txt` for more information on how to run the *encoder* and *decoder* programs. + +## 4.3 Coding style + +The C code is written according to the following structuring conventions. Each function `func()` that needs static variables is considered a module. A module consists of: + +- a 'state structure' (`struct`) combining the static variables of the module; +- three auxiliary functions `func_init()`, `func_reset()`, and `func_exit()`; +- the processing function `func()` itself. + +The initialization function `func_init()` allocates (from the heap) a new state structure, calls the `func_reset()` function, stores the pointer to the newly allocated structure in its first function parameter, and returns with a value of 0 if completed successful or a value of 1 otherwise. + +The reset function `func_reset()` takes a pointer to the state structure and resets all members of the structure to a predefined value ('homing'). + +The exit function `func_exit()` performs any necessary cleanup and frees the state structure memory. + +The processing function `func()` also takes a pointer to the state structure as well as all other necessary parameters and performs its task using (and possibly modifying) the values in the state structure. + +If a module calls other modules, the higher level state structure contains a pointer to the lower level state structures, and the `init`, `reset`, and `exit` functions recursively call the corresponding lower level functions. + +By this convention, the code becomes "instantiable" (more than one copy of a module can be used in the same program) and the static data hierarchy is clearly visible in the code. + +## 4.4 Code hierarchy + +Figures 1 to 4 are call graphs that show the functions used in the speech codec, including the functions of VAD, DTX, and comfort noise generation. + +Each column represents a call level and each cell a function. The functions contain calls to the functions in rightwards neighbouring cells. The time order in the call graphs is from the top downwards as the processing of a frame advances. All standard C functions: `printf()`, `fwrite()`, etc. have been omitted. Also, no basic operations (`add()`, `L_add()`, `mac()`, etc.) or double precision extended operations (e.g. `L_Extract()`) appear in the graphs. The initialization of the static RAM (i.e. calling the `_init` functions) is also omitted. + +The basic operations are not counted as extending the depth, therefore the deepest level in this software is level 7. + +The encoder call graph is broken down into three separate call graphs, Table 1 to 3. + +**Table 1: Speech encoder call structure** + +| Speech_Encode_Frame | Pre_Process | | | | | +|---------------------|-------------|---------------------|------------------------------|-------------------------------------------|----------------------------------------| +| | cod_amr | Copy | | | | +| | | Vad 1 | filter_bank | first_filter_stage | | +| | | | | filter5 | | +| | | | | filter3 | | +| | | | | level_calculation | | +| | | | vad_decision | complex estimate adapt | | +| | | | | complex vad | | +| | | | | noise estimate update | update cntrl | +| | | | | hangover addition | | +| | | Vad2 1 | block_norm | | | +| | | | r_fft | c_fft | | +| | | | fn10Log10 | Log2 | Log2_norm | +| | | | Pow2 | | | +| | | tx_dtx_handler | | | | +| | | lpc | Autocorr | | | +| | | | Lag_window | | | +| | | | Levinson | | | +| | | lsp | Az_lsp | Chebpps | | +| | | | Q_plsf_5 | Lsp_lsf | | +| | | | | Lsf_wt | | +| | | | | Vq_subvec | | +| | | | | Vq_subvec_s | | +| | | | | Reorder_lsf | | +| | | | | Lsf_lsp | | +| | | | Int_lpc_1and3_2 | Lsp_az | Get_lsp_pol | +| | | | Int_lpc_1and3 | Lsp_az | Get_lsp_pol | +| | | | Q_plsf_3 | Lsp_lsf | | +| | | | | Lsf_wt | | +| | | | | Copy | | +| | | | | Vq_subvec3 | | +| | | | | Vq_subvec4 | | +| | | | | Reorder_lsf | | +| | | | | Lsf_lsp | | +| | | | Int_lpc_1to3_2 | Lsp_az | Get_lsp_pol | +| | | | Int_lpc_1to3 | Lsp_az | Get_lsp_pol | +| | | | Copy | | | +| | | dtx_buffer | Copy | | | +| | | | Log2 | Log2_norm | | +| | | dtx_enc | Lsp_lsf | | | +| | | | Reorder_lsf | | | +| | | | Lsf_lsp | | | +| | | Set_zero | | | | +| | | lsp_reset | Copy | | | +| | | | Q_plsf_reset | | | +| | | cl_ltp_reset | Pitch_fr_reset | | | +| | | check_lsp | | | | +| | | pre_big | Weight_Ai | | | +| | | | Residu | | | +| | | | Syn_filt | | | +| | | ol_ltp | Pitch_ol | vad_tone_detection_update 2 | | +| | | | | Lag_max | vad_tone_detection 2 | +| | | | | comp_corr 2 | Inv_sqrt | +| | | | | hp_max 2 | | +| | | | | vad_complex_detection_update 2 | | +| | | | Pitch_ol_wgh | comp_corr 2 | | +| | | | | Lag_max 2 | vad_tone_detection_update 2 | +| | | | | gmed_n | vad_tone_detection 2 | +| | | | | hp_max 2 | | +| | | | | vad_complex_detection_update 2 | | +| | | vad_pitch_detection | LTP_flag_update 3 | | | +| | | subframePreProc | Weight_Ai | | | +| | | | Syn_filt | | | +| | | | Residu | | | +| | | | Copy | | | +| | | cl_ltp | Pitch_fr | getRange | | +| | | | | Norm_Corr | Convolve | +| | | | | | Inv_sqrt | +| | | | | searchFrac | Interpol_3or6 | +| | | | | Enc_lag3 | | +| | | | | Enc_lag6 | | + +(continued) + +1 Option to call one or the other VAD option2 Specific to VAD option 13 Specific to VAD option 2 + +**Table 1 (concluded): Speech encoder call structure** + +| | | | | +|--|----------|--------------------|-------------| +| | | Pred_lt_3or6 | | +| | | Convolve | | +| | | G_pitch | | +| | | check_gp_clipping | | +| | | q_gain_pitch | | +| | | cbsearch | see Table 2 | +| | | gainQuant | see Table 3 | +| | | update_gp_clipping | Copy | +| | | subframePostProc | Syn_filt | +| | | Pred_lt_3or6 | | +| | | Convolve | | +| | Prm2bits | Int2bin | | + +**Table 2: cbsearch call structure** + +| | | | | +|----------|-------------------|------------------|------------| +| cbsearch | code_2i40_9bits | cor h x | | +| | | set_sign | | +| | | cor h | Inv_sqrt | +| | | search_2i40 | | +| | | build_code | | +| | | | | +| | code_2i40_11bits | cor h x | | +| | | set_sign | | +| | | cor h | Inv_sqrt | +| | | search_2i40 | | +| | | build_code | | +| | | | | +| | code_3i40_14bits | cor h x | | +| | | set_sign | | +| | | cor h | Inv_sqrt | +| | | search_3i40 | | +| | | build_code | | +| | | | | +| | code_4i40_17bits | cor h x | | +| | | set_sign | | +| | | cor h | Inv_sqrt | +| | | search_4i40 | | +| | | build_code | | +| | | | | +| | code_8i40_31bits | cor h x | | +| | | set_sign12k2 | Inv_sqrt | +| | | cor h | Inv_sqrt | +| | | search_10and8i40 | | +| | | build_code | | +| | | compress_code | compress10 | +| | | | | +| | code_10i40_35bits | cor h x | | +| | | set_sign12k2 | Inv_sqrt | +| | | cor h | Inv_sqrt | +| | | search_10and8i40 | | +| | | build_code | | +| | | q_p | | + +**Table 3: gainQuant call structure** + +| | | | | +|-----------|-----------------------|---------------------------|----------------| +| gainQuant | gc_pred_copy | Copy | | +| | gc_pred | Log2 | Log2_norm | +| | | Log2_norm | | +| | calc_filt_energies | | | +| | calc_target_energy | | | +| | MR475_update_unq_pred | gc_pred_update | | +| | MR475_gain_quant | MR475_quant_store_results | Log2 Log2_norm | +| | | gc_pred_update | | +| | | gc_pred | Log2 Log2_norm | +| | | Log2_norm | | +| | G_code | | | +| | q_gain_code | Pow2 | | +| | MR795_gain_quant | q_gain_pitch | | +| | | MR795_gain_code_quant3 | | +| | | calc_unfilt_energies | Log2 Log2_norm | +| | | gain_adapt | gmed_n | +| | | MR795_gain_code_quant_mod | sqrt_l_exp | +| | Qua_gain | Pow2 | | +| | gc_pred_update | | | + +Table 4: Speech decoder call structure + +| | | | | | +|---------------------|--------------|-------------------------|-------------------------|--------------| +| Speech_Decode_Frame | Bits2prm | Bin2int | | | +| | Decoder_amr | rx_dtx_handler | | | +| | | Decoder_amr_reset | lsp_avg_reset | | +| | | | D_plsf_reset | | +| | | | ec_gain_pitch_reset | | +| | | | ec_gain_code_reset | | +| | | | gc_pred_reset | | +| | | | Bgn_scd_reset | Set_zero | +| | | | ph_disp_reset | | +| | | | dtx_dec_reset | Copy | +| | | | | Set_zero | +| | | dtx_dec | Copy | | +| | | | Lsf_lsp | | +| | | | Init_D_plsf_3 | Copy | +| | | | D_plsf_3 | Reorder_lsf | +| | | | | Copy | +| | | | | Lsf_lsp | +| | | | pseudonoise | | +| | | | Lsp_lsf | | +| | | | Reorder_lsf | | +| | | | Lsp_Az | Get_lsp_pol | +| | | | A_Refl | | +| | | | Log2 | Log2_norm | +| | | | Build_CN_code | pseudonoise | +| | | | Syn_filt | | +| | | Lsf_lsp | | | +| | | Lsp_avg | | | +| | | Copy | | | +| | | D_plsf_3 | Reorder_lsf | | +| | | | Copy | | +| | | | Lsf_lsp | | +| | | Int_lpc_1to3 | Lsp_Az | Get_lsp_pol | +| | | D_plsf_5 | Reorder_lsf | | +| | | | Copy | | +| | | | Lsf_lsp | | +| | | Int_lpc_1and3 | Lsp_Az | Get_lsp_pol | +| | | Dec_lag3 | | | +| | | Pred_lt_3or6 | | | +| | | Dec_lag6 | | | +| | | decode 2i40 9bits | | | +| | | decode 2i40 11bits | | | +| | | decode 3i40 14bits | | | +| | | decode 4i40 17bits | | | +| | | decode 8i40 31bits | decompress_code | decompress10 | +| | | ec_gain_pitch | gmed_n | | +| | | d_gain_pitch | | | +| | | ec_gain_pitch_update | | | +| | | decode 10i40 35bits | | | +| | | Dec_gain | Log2 | Log2_norm | +| | | | gc_pred | Log2 | +| | | | | Log2_norm | +| | | | Log2_norm | | +| | | | Pow2 | | +| | | | gc_pred_update | | +| | | ec_gain_code | gmed_n | | +| | | | gc_pred_average_limeted | | +| | | | gc_pred_update | | +| | | ec_gain_code_update | | | +| | | d_gain_code | gc_pred | Log2 | +| | | | | Log2_norm | +| | | | Log2_norm | | +| | | | Pow2 | | +| | | | gc_pred_update | | +| | | Int_lsf | | | +| | | Cb_gain_average | | | +| | | ph_disp_release | | | +| | | ph_disp_lock | | | +| | | ph_disp | | | +| | | sqrt_l_exp | | | +| | | Ex_ctrl | gmed_n | | +| | | agc2 | Inv_sqrt | | +| | | Syn_filt | | | +| | | Bgn_scd | gmed_n | | +| | | dtx_dec_activity_update | Copy | | +| | | | Log2 | Log2_norm | +| | | Lsp_avg | | | +| | Post_Filter | Copy | | | +| | | Weight_Ai | | | +| | | Residu | | | +| | | Set_zero | | | +| | | Syn_filt | | | +| | | Preemphasis | | | +| | | agc | energy_old | | +| | | | energy_new | energy_old | +| | | | Inv_sqrt | | +| | Post_Process | | | | + +## 4.5 Variables, constants and tables + +The data types of variables and tables used in the fixed point implementation are signed integers in 2's complement representation, defined by: + +- **Word16** 16 bit variable; +- **Word32** 32 bit variable. + +Furthermore some **enum** types are used, all possible to represent with one byte, and a Boolean **Flag**. + +### 4.5.1 Description of constants used in the C-code + +This subclause contains a listing of all global constants defined in cnst.h. + +**Table 5: Global constants** + +| Constant | Value | Description | +|--------------------|--------|---------------------------------------------------------------------------------------| +| L_TOTAL | 320 | total size of speech buffer. | +| L_WINDOW | 240 | window size in LP analysis | +| L_FRAME | 160 | frame size | +| L_FRAME_BY2 | 80 | frame size divided by 2 | +| L_SUBFR | 40 | subframe size | +| L_CODE | 40 | codevector length | +| NB_TRACK | 5 | number of tracks | +| STEP | 5 | codebook step size | +| NB_TRACK_MR102 | 4 | number of tracks mode mr102 | +| STEP_MR102 | 4 | codebook step size mode mr102 | +| M | 10 | order of LP filter | +| MP1 | (M+1) | order of LP filter + 1 | +| LSF_GAP | 205 | minimum distance between LSF after quantization; 50 Hz = 205 | +| LSP_PRED_FAC_MR122 | 21299 | MR122 LSP prediction factor (0.65 Q15) | +| AZ_SIZE | 44 | size of array of LP filters in 4 subframes (4*M+4) | +| PIT_MIN_MR122 | 18 | minimum pitch lag (MR122 mode) | +| PIT_MIN | 20 | minimum pitch lag (all other modes) | +| PIT_MAX | 143 | maximum pitch lag | +| L_INTERPOL | (10+1) | length of filter for interpolation | +| L_INTER_SRCH | 4 | length of filter for CL LTP search interpolation | +| MU | 26214 | factor for tilt compensation filter 0,8 | +| AGC_FAC | 29491 | factor for automatic gain control 0,9 | +| L_NEXT | 40 | overhead in LP analysis | +| SHARPMAX | 13017 | maximum value of pitch sharpening | +| SHARPMIN | 0 | minimum value of pitch sharpening | +| MAX_PRM_SIZE | 57 | max. num. of params | +| MAX_SERIAL_SIZE | 244 | max. num. of serial bits | +| GP_CLIP | 15565 | pitch gain clipping = 0.95 | +| N_FRAME | 7 | old pitch gains in average calculation | +| EHF_MASK | 8 | 16 bit representation of all samples in the encoder homing frame (left justification) | + +### 4.5.2 Description of fixed tables used in the C-code + +This section contains a listing of all fixed tables sorted by source file name and table name. All table data is declared as **Word16**. + +**Table 6: Fixed tables** + +| File | Table name | Length | Description | +|--------------|---------------------|--------|---------------------------------------------------------------------------------------------------| +| c2_9pf.c | trackTable | 4*5 | track table for algebraic code book search (MR475, MR515) | +| cod_amr.c | gamma1 | 10 | spectral expansion factors | +| cod_amr.c | gamma1_12k2 | 10 | spectral expansion factors | +| cod_amr.c | gamma2 | 10 | spectral expansion factors | +| dtx_dec.c | lsf_hist_mean_scale | 10 | initialization values for DTX lsf parameters | +| dtx_dec.c | dtx_log_en_adjust | 9 | level adjustments for each mode | +| ec_gains.c | cdown | 7 | attenuation factors for codebook gain | +| ec_gains.c | pdown | 7 | attenuation factors for adaptive codebook gain | +| gc_pred.c | pred | 4 | algebraic code book gain MA predictor coefficients | +| gc_pred.c | pred_MR122 | 4 | algebraic code book gain MA predictor coefficients (MR122) | +| pitch_fr.c | mode_dep_parm | 72 | parameters defining the adaptive codebook search per mode | +| post_pro.c | a | 3 | HP filter coefficients (denominator) in Post_Process | +| post_pro.c | b | 3 | HP filter coefficients (numerator) in Post_Process | +| pre_proc.c | a | 3 | HP filter coefficients (denominator) in Pre_Process | +| pre_proc.c | b | 3 | HP filter coefficients (numerator) in Pre_Process | +| pred_lt.c | inter_6 | 61 | interpolation filter coefficients | +| pstfilt.c | gamma3_MR122 | 10 | spectral expansion factors | +| pstfilt.c | gamma3 | 10 | spectral expansion factors | +| pstfilt.c | gamma4_MR122 | 10 | spectral expansion factors | +| pstfilt.c | gamma4 | 10 | spectral expansion factors | +| bitno.tab | prmno | 9 | number of bits for each mode | +| bitno.tab | prmnofs | 8 | number of parameters for LPC and first subframe for each mode (used for decoder homing procedure) | +| bitno.tab | bitno | 9 | pointers to the bitno_MR... tables | +| bitno.tab | bitno_MR475 | 17 | number of bits per parameter to transmit (MR475) | +| bitno.tab | bitno_MR515 | 19 | number of bits per parameter to transmit (MR515) | +| bitno.tab | bitno_MR59 | 19 | number of bits per parameter to transmit (MR59) | +| bitno.tab | bitno_MR67 | 19 | number of bits per parameter to transmit (MR67) | +| bitno.tab | bitno_MR74 | 19 | number of bits per parameter to transmit (MR74) | +| bitno.tab | bitno_MR795 | 23 | number of bits per parameter to transmit (MR795) | +| bitno.tab | bitno_MR102 | 39 | number of bits per parameter to transmit (MR102) | +| bitno.tab | bitno_MR122 | 57 | number of bits per parameter to transmit (MR122) | +| bitno.tab | bitno_MRDTX | 5 | number of bits per parameter to transmit (MRDTX) | +| c2_11pf.tab | startPos1 | 2 | track start search position for first pulse | +| c2_11pf.tab | startPos2 | 4 | track start search position for second pulse | +| c2_9pf.tab | startPos | 16 | track start search position | +| corrwght.tab | corrweight | 251 | weighting of the correlation function in open loop LTP search (MR102) | +| d_homing.tab | dhf | 8 | pointers to the dhf_MR... tables | +| d_homing.tab | dhf_MR475 | 17 | parameter values for the decoder homing frame (MR475) | +| d_homing.tab | dhf_MR515 | 19 | parameter values for the decoder homing frame (MR515) | +| d_homing.tab | dhf_MR59 | 19 | parameter values for the decoder homing frame (MR59) | +| d_homing.tab | dhf_MR67 | 19 | parameter values for the decoder homing frame (MR67) | +| d_homing.tab | dhf_MR74 | 19 | parameter values for the decoder homing frame (MR74) | +| d_homing.tab | dhf_MR795 | 23 | parameter values for the decoder homing frame (MR795) | +| d_homing.tab | dhf_MR102 | 39 | parameter values for the decoder homing frame (MR102) | +| d_homing.tab | dhf_MR122 | 57 | parameter values for the decoder homing frame (MR122) | +| gains.tab | qua_gain_pitch | 16 | adaptive codebook gain quantization table (MR122, MR795) | +| gains.tab | qua_gain_code | 96 | fixed codebook gain quantization table (MR122, MR795) | +| gray.tab | gray | 8 | gray coding table | +| gray.tab | dgray | 8 | gray decoding table | +| grid.tab | grid | 61 | grid points at which Chebyshev polynomials are evaluated | +| inter_36.tab | inter_6 | 25 | interpolation filter coefficients | +| inv_sqr1.tab | table | 49 | table used in inverse square root computation | +| lag_wind.tab | lag_h | 10 | high part of the lag window table | +| lag_wind.tab | lag_l | 10 | low part of the lag window table | + +(continued) + +**Table 6 (concluded): Fixed tables** + +| File | Table name | Length | Description | +|--------------|----------------------|--------|-------------------------------------------------------------------| +| log2.tab | table | 33 | table used in base 2 logarithm computation | +| lsp.tab | lsp_init_data | 10 | initialization table for lsp history in DTX | +| lsp_lsf.tab | table | 65 | table to compute cos(x) in Lsf_lsp() | +| lsp_lsf.tab | slope | 64 | table to compute acos(x) in Lsp_lsf() | +| ph_disp.tab | ph_imp_low_MR795 | 40 | phase dispersion impulse response (MR795) | +| ph_disp.tab | ph_imp_mid_MR795 | 40 | phase dispersion impulse response (MR795) | +| ph_disp.tab | ph_imp_low | 40 | phase dispersion impulse response (MR475 - MR67) | +| ph_disp.tab | ph_imp_mid | 40 | phase dispersion impulse response (MR475 - MR67) | +| pow2.tab | table | 33 | table used in 2 to the power computation | +| q_plsf_3.tab | past_rq_init | 80 | initialization table for the MA predictor in DTX | +| q_plsf_3.tab | mean_lsf | 10 | LSF means (not in MR122) | +| q_plsf_3.tab | pred_fac | 10 | LSF prediction factors (not in MR122) | +| q_plsf_3.tab | dico1_lsf | 3*256 | 1 st LSF quantizer (not in MR122 and MR795) | +| q_plsf_3.tab | dico2_lsf | 3*512 | 2 nd LSF quantizer (not in MR122) | +| q_plsf_3.tab | dico3_lsf | 4*512 | 3 rd LSF quantizer (not in MR122, MR515 and MR475) | +| q_plsf_3.tab | mr515_3_lsf | 4*128 | 3 rd LSF quantizer (MR515 and MR475) | +| q_plsf_3.tab | mr795_1_lsf | 3*512 | 1 st LSF quantizer (MR795) | +| q_plsf_5.tab | mean_lsf | 10 | LSF means (MR122) | +| q_plsf_5.tab | dico1_lsf | 4*128 | 1 st LSF quantizer (MR122) | +| q_plsf_5.tab | dico2_lsf | 4*256 | 2 nd LSF quantizer (MR122) | +| q_plsf_5.tab | dico3_lsf | 4*256 | 3 rd LSF quantizer (MR122) | +| q_plsf_5.tab | dico4_lsf | 4*256 | 4 th LSF quantizer (MR122) | +| q_plsf_5.tab | dico5_lsf | 4*64 | 5 th LSF quantizer (MR122) | +| qgain475.tab | table_gain_MR475 | 4*256 | gain quantization table (MR475) | +| qua_gain.tab | table_gain_highrates | 128*4 | gain quantization table (MR67, MR74 and MR102) | +| qua_gain.tab | table_gain_lowrates | 64*4 | gain quantization table (MR515 and MR59) | +| R_fft.c | phs_tbl | 128 | sine/cosine phase table | +| R_fft.c | ii_table | 8 | indexing table | +| sqrt_l | table | 49 | table to compute sqrt(x) | +| Vad1.c | ch_tbl | 2*16 | channel energy combination table | +| Vad1.c | ch_tbl_sh | 16 | channel energy scaling table | +| Vad1.c | vm_tbl | 90 | voice metric table | +| Vad1.c | hangover_table | 20 | used to determine hangover as a function of SNR | +| Vad1.c | burstcount_table | 20 | used to determine burst count threshold as a function of SNR | +| Vad1.c | vm_thresh_table | 20 | used to determine the voice metric threshold as a function of SNR | +| Vad1.c | energy_state_tables | 2*6 | constants as a function of scaling state | +| window.tab | window_200_40 | 240 | LP analysis window (not in MR122) | +| window.tab | window_160_80 | 240 | 1 st LP analysis window (MR122) | +| window.tab | window_232_8 | 240 | 2 nd LP analysis window (MR122) | + +### 4.5.3 Static variables used in the C-code + +In this section two tables that specify the static variables for the speech encoder and decoder respectively are shown. All static variables are declared within a C **struct**. + +**Table 7: Speech encoder static variables** + +| Struct name | Variable | Type[Length] | Description | +|------------------------------|--------------------|------------------|------------------------------------------------------------------------| +| Speech_Encode_
FrameState | cod_amr_state | cod_amrState | see below in this table | +| | pre_state | Pre_ProcessState | see below in this table | +| | dtx | Flag | Is set if DTX functionality is used | +| | complexityCounter | int | Used for wMOPS counting | +| Pre_ProcessState | y2_hi | Word16 | filter state, upper word | +| | y2_lo | Word16 | filter state, lower word | +| | y1_hi | Word16 | filter state, upper word | +| | y1_lo | Word16 | filter state, lower word | +| | x0 | Word16 | filter state | +| | x1 | Word16 | filter state | +| cod_amrState | old_speech | Word16[320] | speech buffer | +| | speech | Word16* | pointer to current frame in old_speech | +| | p_window | Word16* | pointer to LPC analysis window in old_speech | +| | p_window_12k2 | Word16* | pointer to LPC analysis window with no lookahead in old_speech (MR122) | +| | new_speech | Word16* | pointer to the last 160 speech samples in old_speech | +| | old_wsp | Word16[303] | buffer holding spectral weighted speech | +| | wsp | Word16* | pointer to the current frame in old_wsp | +| | old_lags | Word16[5] | open loop LTP states | +| | ol_gain_flg | Word16[2] | enables open loop pitch lag weighting (MR102) | +| | old_exc | Word16[314] | excitation vector | +| | exc | Word16* | current excitation | +| | ai_zero | Word16[51] | history of weighted synth. filter followed by zero vector | +| | zero | Word16* | zero vector | +| | h1 | Word16* | impulse response of weighted synthesis filter | +| | hvec | Word16[80] | zero vector followed by impulse response | +| | lpcSt | lpcState | see below in this table | +| | lspSt | lspState | see below in this table | +| | clLtpSt | clLtpState | see below in this table | +| | gainQuantSt | gainQuantState | see below in this table | +| | pitchOLWghtSt | pitchOLWghtState | see below in this table | +| | tonStabSt | tonStabState | see below in this table | +| | vadSt | vadState1 | see below in this table | +| | vadSt | vadState2 | see below in this table | +| | dtx | Flag | is set if DTX functionality is used | +| | dtx_encSt | dtx_encState | see below in this table | +| | mem_syn | Word16[10] | synthesis filter memory | +| | mem_w0 | Word16[10] | weighting filter memory (applied to error signal) | +| | mem_w | Word16[10] | weighting filter memory (applied to input signal) | +| | mem_err | Word16[50] | filter memory for production of error vector | +| | error | Word16* | error signal (input minus synthesized speech) | +| | sharp | Word16 | pitch sharpening gain | +| vadState1 | bckr_est | Word16[9] | background noise estimate | +| | ave_level | Word16[9] | averaged input components for stationary estimation | +| | old_level | Word16[9] | input levels of the previous frame | +| | sub_level | Word16[9] | input levels calculated at the end of a frame (lookahead) | +| | a_data5 | Word16[6] | memory for the filter bank | +| | a_data3 | Word16[5] | memory for the filter bank | +| | burst_count | Word16 | counts length of a speech burst | +| | hang_count | Word16 | hangover counter | +| | stat_count | Word16 | stationary counter | +| | vadreg | Word16 | 15 flags for intermediate VAD decisions | +| | pitch | Word16 | 15 flags for pitch detection | +| | tone | Word16 | 15 flags for tone detection | +| | complex_high | Word16 | flags for complex detection | +| | complex_low | Word16 | flags for complex detection | +| | oldlag_count | Word16 | variables for pitch detection | +| | oldlag | Word16 | variables for pitch detection | +| | complex_hang_count | Word16 | complex hangover counter, used by VAD | +| | complex_hang_timer | Word16 | hangover initiator, used by CAD | + +| Struct name | Variable | Type[Length] | Description | +|------------------|---------------------|----------------|------------------------------------------------------------| +| vadState2 | best_corr_hp | Word16 | filtered value | +| | speech_vad_decision | Word16 | final decision | +| | complex_warning | Word16 | complex background warning | +| | sp_burst_count | Word16 | counts length of a speech burst incl HO addition | +| | corr_hp_fast | Word16 | filtered value | +| | pre_emp_mem | Word16 | input pre-emphasis memory | +| | update_cnt | Word16 | noise update counter | +| | hyster_cnt | Word16 | hysteresis counter | +| | last_update_cnt | Word16 | noise update counter value for last frame | +| | ch_enrg_long_db | Word16[16] | long term channel energy in dB | +| | Lframe_cnt | Word32 | 10 ms frame counter | +| | Lch_enrg | Word32[16] | channel energy estimate | +| | Lch_noise | Word32[16] | channel noise estimate | +| | last_normb_shift | Word16 | block shift factor for last frame, used for
pre_emp_mem | +| | tsnr | Word16 | total estimated peak SNR in dB | +| | hangover | Word16 | VAD hangover | +| | burstcount | Word16 | number of consecutive voice active frames | +| | fupdate_flag | Word16 | A flag to control a forced update of the noise
estimate | +| | negSNRvar | Word16 | SNR variability | +| | negSNRbias | Word16 | sensitivity bias | +| | shift_state | Word16 | indicates scaling state of channel energy estimate | +| | L_R0 | Word32 | LTP energy | +| | L_Rmax | Word32 | LTP max correlation | +| | LTP_flag | Flag | set when open loop pitch prediction gain >
threshold | +| dtx_encState | lsp_hist | Word16[80] | LSP history (8 frames) | +| | log_en_hist | Word16[8] | logarithmic frame energy history (8 frames) | +| | hist_ptr | Word16 | pointer to the cyclic history vectors | +| | log_en_index | Word16 | Index for logarithmic energy | +| | init_lsf_vq_index | Word16 | initial index for lsf predictor | +| | lsp_index | Word16[3] | lsp indecies to the three code books | +| | dtxHangoverCount | Word16 | is decreased in DTX hangover period | +| | decAnaElapsedCount | Word16 | counter for elapsed speech frames in DTX | +| lpcState | LevinsonSt | LevinsonState | see below | +| LevinsonState | old_A | Word16[11] | last frames direct form coefficients | +| lspState | lsp_old | Word16[10] | old LSP vector | +| | lsp_old_q | Word16[10] | old quantized LSP vector | +| | qSt | Q_plsfState | see below in this table | +| Q_plsfState | past_rq | Word16[10] | past quantized LSF prediction error | +| clLtpState | pitchSt | Pitch_frState | see below in this table | +| tonStabState | count | Word16 | count consecutive (potential) resonance frames | +| | gp | Word16[7] | pitch gain history | +| Pitch_frState | T0_prev_subframe | Word16 | integer. pitch lag of previous subframe | +| gainQuantState | sf0_exp_gcode0 | Word16 | subframe 0/2 codebook gain exponent | +| | sf0_frac_gcode0 | Word16 | subframe 0/2 codebook gain fraction | +| | sf0_exp_target_en | Word16 | subframe 0/2 target energy exponent | +| | sf0_frac_target_en | Word16 | subframe 0/2 target energy fraction | +| | sf0_exp_coeff | Word16[5] | subframe 0/2 energy coefficient exponents | +| | sf0_frac_coeff | Word16[5] | subframe 0/2 energy coefficient fractions | +| | gain_idx_ptr | Word16* | pointer to gain index value in parameter frame | +| | gc_predSt | gc_predState | see below in this table | +| | gc_predUncSt | gc_predState | see below in this table | +| | adaptSt | GainAdaptState | see below in this table | +| gc_predState | past_qua_en | Word16[4] | MA predictor memory (20*log10(pred. error)) | +| | past_qua_en_MR122 | Word16[4] | MA predictor memory, 12.2 style (log2(pred.
error)) | +| GainAdaptState | onset | Word16 | onset counter | +| | prev_alpha | Word16 | previous adaptor output | +| | prev_gc | Word16 | previous codebook gain | +| | ltpg_mem | Word16[5] | pitch gain history | +| pitchOLWghtState | old_T0_med | Word16 | weighted open loop pitch lag | +| | ada_w | Word16 | weigthing level depeding on open loop pitch gain | +| | wght_flg | Word16 | switches lag weighting on and off | + +**Table 8: Speech decoder static variables** + +| Struct name | Variable | Type[Length] | Description | +|--------------------------|---------------------|----------------------|---------------------------------------------------------| +| Speech_Decode_FrameState | decoder_amrState | Decoder_amrState | see below in this table | +| | post_state | Post_FilterState | see below in this table | +| | postHP_state | Post_ProcessState | see below in this table | +| | ComplexityCounter | int | Used for wMOPS counting | +| Decoder_amrState | old_exc | Word16[194] | excitation vector | +| | exc | Word16* | current excitation | +| | lsp_old | Word16[10] | LSP vector of previous frame | +| | mem_syn | Word16[10] | synthesis filter memory | +| | sharp | Word16 | pitch sharpening gain | +| | old_T0 | Word16 | pitch sharpening lag | +| | prev_bf | Word16 | previous value of "bad frame" flag | +| | prev_pdf | Word16 | previous value of "pot. dangerous frame" flag | +| | state | Word16 | ECU state (0..6) | +| | excEnergyHist | Word16[9] | excitation energy history | +| | T0_lagBuff | Word16 | received pitch lag for ECU | +| | inBackgroundNoise | Word16 | background noise flag | +| | voicedHangover | Word16 | hangover flag | +| | ltpGainHistory | Word16[9] | pitch gain history | +| | background_state | Bgn_scdState | see below in this table | +| | Cb_gain_averState | Cb_gain_averageState | see below in this table | +| | lsp_avg_st | lsp_avgState | see below in this table | +| | lsfState | D_plsfState | see below in this table | +| | ec_gain_p_st | ec_gain_pitchState | see below in this table | +| | ec_gain_c_st | ec_gain_codeState | see below in this table | +| | pred_state | gc_predState | see table 7 | +| | nodataSeed | Word16 | seed for CN generator | +| | ph_disp_st | ph_dispState | see below in this table | +| | dtxDecoderState | dtx_decState | see below in this table | +| dtx_decState | since_last_sid | Word16 | number of frames since last SID frame | +| | true_sid_period_inv | Word16 | inverse of true SID update rate | +| | log_en | Word16 | logarithmic frame energy | +| | old_log_en | Word16 | previous value of log_en | +| | L_pn_seed_rx | Word32 | random number generator seed | +| | lsp | Word16[10] | LSP vector | +| | lsp_old | Word16[10] | previous LSP vector | +| | lsf_hist | Word16[80] | LSF vector history (8 frames) | +| | lsf_hist_ptr | Word16 | index to beginning of LSF history | +| | lsf_hist_mean | Word16[80] | mean-removed LSF history (8 frames) | +| | log_pg_mean | Word16 | mean-removed logarithmic prediction gain | +| | log_en_hist | Word16[8] | logarithmic frame energy history | +| | log_en_hist_ptr | Word16 | index to beginning of log, frame energy history | +| | log_en_adjust | Word16 | mode-dependent frame energy adjustment | +| | dtxHangoverCount | Word16 | counts down in hangover period | +| | decAnaElapsedCount | Word16 | counts elapsed speech frames after DTX flags SID frames | +| | sid_frame | Word16 | flags SID frames | +| | valid_data | Word16 | flags SID frames containing valid data | +| | dtxHangoverAdded | Word16 | flags hangover period at end of speech | +| | dtxGlobalState | enum DTXStateType | DTX state flags | +| | data_updated | Word16 | flags CNI updates | +| Bgn_scdState | frameEnergyHist | Word16[60] | history of synthesis frame energy | +| | bgHangover | Word16 | number of frames since last speech frame | +| Cb_gain_averageState | cbGainHistory | Word16[7] | codebook gain history | +| | hangVar | Word16 | counts length of talkspurt in subframes | +| | hangCount | Word16 | number of subframes since last talkspurt | +| lsp_avgState | lsp_meanSave | Word16[10] | averaged LSP vector | +| D_plsfState | past_r_q | Word16[10] | past quantized LSF prediction vector | +| | past_lsf_q | Word16[10] | past dequantized LSF vector | + +| Struct name | Variable | Type[Length] | Description | +|--------------------|----------------------------------------------------------------|-------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| ec_gain_pitchState | pbuf
past_gain_pit
prev_gp | Word16[5]
Word16
Word16 | pitch gain history
previous pitch gain (limited to 1.0)
previous good pitch gain | +| ec_gain_codeState | gbuf
past_gain_code
prev_gc | Word16[5]
Word16
Word16 | codebook gain history
previous codebook gain
previous good codebook gain | +| ph_dispState | gainMem
prevState
prevCbGain
lockFull
onset | Word16[5]
Word16
Word16
Word16
Word16 | pitch gain history
previously used impulse response
previous codebook gain
force maximum phase dispersion
onset counter | +| Post_FilterState | res2
mem_syn_pst
synth_buf
agc_state
preemph_state | Word16[40]
Word16[10]
Word16[170]
agcState
preemphasisState | LP residual
synthesis filter memory
synthesis filter work area
see below in this table
see below in this table | +| agcState | past_gain | Word16 | past agc gain | +| preemphasisState | mem_pre | Word16 | filter state | +| Post_ProcessState | y2_hi
y2_lo
y1_hi
y1_lo
x0
x1 | Word16
Word16
Word16
Word16
Word16
Word16 | filter state, upper word
filter state, lower word
filter state, upper word
filter state, lower word
filter state
filter state | + +# 5 Homing procedure + +The principles of the homing procedures are described in [2]. This specification only includes a detailed description of the 8 decoder homing frames. For each AMR codec mode, the corresponding decoder homing frame has a fixed set of speech parameters shown in table 9a-9h. The bit allocation within these parameters is identical to the corresponding bit allocation of the source encoder output parameters given in [2]. + +In the following tables, the following naming convention is used for the individual parameters. Letters in *italics* indicate numbers. + +| | | +|----------------------------------|------------------------------------------------------------------------------------------------------------------------| +| LPC n | index of n th LSF submatrix. | +| LTP-LAG m | adaptive codebook index for subframe m . | +| LTP-GAIN m | adaptive codebook gain index in subframe m . | +| FCB-GAIN m | fixed codebook gain index in subframe m . | +| GAIN_VQ m | codebook gain VQ index in subframe m (subframe m and m+1 for MR475). | +| POS m_n | position index of n th pulse in subframe m . | +| POS m_n_k | position index of n th and k th pulse in subframe m . | +| POS m_n_k_l_j | position index of n th, k th, l th, and j th pulse in subframe m . | +| SIGN m_n_k | sign information for n th and k th pulse in subframe m . | +| SIGN m_n_k_l_j | sign information for n th, k th, l th, and j th pulse in subframe m . | +| SIGN m_n_k POS m_n | sign information for n th and k th pulse and position index for n th pulse in subframe m . | + +**Table 9a: Parameter values for the decoder homing frame (MR475)** + +| Parameter | Value (LSB=b0) | +|------------------|-----------------------| +| LPC 1 | 0x00F8 | +| LPC 2 | 0x009D | +| LPC 3 | 0x001C | +| LTP-LAG 1 | 0x0066 | +| POS 1_1_2 | 0x0000 | +| SIGN_1_1_2 | 0x0003 | +| GAIN-VQ 1 | 0x0028 | +| LTP-LAG 2 | 0x000F | +| POS 2_1_2 | 0x0038 | +| SIGN_2_1_2 | 0x0001 | +| LTP-LAG 3 | 0x000F | +| POS 3_1_2 | 0x0031 | +| SIGN_3_1_2 | 0x0002 | +| GAIN-VQ 3 | 0x0008 | +| LTP-LAG 4 | 0x000F | +| POS 4_1_2 | 0x0026 | +| SIGN_4_1_2 | 0x0003 | + +**Table 9b: Parameter values for the decoder homing frame (MR515)** + +| Parameter | Value (LSB=b0) | +|------------------|-----------------------| +| LPC 1 | 0x00F8 | +| LPC 2 | 0x009D | +| LPC 3 | 0x001C | +| LTP-LAG 1 | 0x0066 | +| POS 1_1_2 | 0x0000 | +| SIGN_1_1_2 | 0x0003 | +| GAIN-VQ 1 | 0x0037 | +| LTP-LAG 2 | 0x000F | +| POS 2_1_2 | 0x0000 | +| SIGN_2_1_2 | 0x0003 | +| GAIN-VQ 2 | 0x0005 | +| LTP-LAG 3 | 0x000F | +| POS 3_1_2 | 0x0037 | +| SIGN_3_1_2 | 0x0003 | +| GAIN-VQ 3 | 0x0037 | +| LTP-LAG 4 | 0x000F | +| POS 4_1_2 | 0x0023 | +| SIGN_4_1_2 | 0x0003 | +| GAIN-VQ 4 | 0x001F | + +**Table 9c: Parameter values for the decoder homing frame (MR59)** + +| Parameter | Value (LSB=b0) | +|------------------|-----------------------| +| LPC 1 | 0x00F8 | +| LPC 2 | 0x00E3 | +| LPC 3 | 0x002F | +| LTP-LAG 1 | 0x00BD | +| POS 1_1_2 | 0x0000 | +| SIGN_1_1_2 | 0x0003 | +| GAIN-VQ 1 | 0x0037 | +| LTP-LAG 2 | 0x000F | +| POS 2_1_2 | 0x0001 | +| SIGN_2_1_2 | 0x0003 | +| GAIN-VQ 2 | 0x000F | +| LTP-LAG 3 | 0x0060 | +| POS 3_1_2 | 0x00F9 | +| SIGN_3_1_2 | 0x0003 | +| GAIN-VQ 3 | 0x0037 | +| LTP-LAG 4 | 0x000F | +| POS 4_1_2 | 0x0000 | +| SIGN_4_1_2 | 0x0003 | +| GAIN-VQ 4 | 0x0037 | + +**Table 9d: Parameter values for the decoder homing frame (MR67)** + +| Parameter | Value (LSB=b0) | +|------------------|-----------------------| +| LPC 1 | 0x00F8 | +| LPC 2 | 0x00E3 | +| LPC 3 | 0x002F | +| LTP-LAG 1 | 0x00BD | +| POS 1_1_2_3 | 0x0002 | +| SIGN_1_1_2_3 | 0x0007 | +| GAIN-VQ 1 | 0x0000 | +| LTP-LAG 2 | 0x000F | +| POS 2_1_2_3 | 0x0098 | +| SIGN_2_1_2_3 | 0x0007 | +| GAIN-VQ 2 | 0x0061 | +| LTP-LAG 3 | 0x0060 | +| POS 3_1_2_3 | 0x05C5 | +| SIGN_3_1_2_3 | 0x0007 | +| GAIN-VQ 3 | 0x0000 | +| LTP-LAG 4 | 0x000F | +| POS 4_1_2_3 | 0x0318 | +| SIGN_4_1_2_3 | 0x0007 | +| GAIN-VQ 4 | 0x0000 | + +**Table 9e: Parameter values for the decoder homing frame (MR74)** + +| Parameter | Value (LSB=b0) | +|----------------|----------------| +| LPC 1 | 0x00F8 | +| LPC 2 | 0x00E3 | +| LPC 3 | 0x002F | +| LTP-LAG 1 | 0x00BD | +| POS 1_1_2_3_4 | 0x0006 | +| SIGN_1_1_2_3_4 | 0x000F | +| GAIN-VQ 1 | 0x0000 | +| LTP-LAG 2 | 0x001B | +| POS 2_1_2_3_4 | 0x0208 | +| SIGN_2_1_2_3_4 | 0x000F | +| GAIN-VQ 2 | 0x0062 | +| LTP-LAG 3 | 0x0060 | +| POS 3_1_2_3_4 | 0x1BA6 | +| SIGN_3_1_2_3_4 | 0x000F | +| GAIN-VQ 3 | 0x0000 | +| LTP-LAG 4 | 0x001B | +| POS 4_1_2_3_4 | 0x0006 | +| SIGN_4_1_2_3_4 | 0x000F | +| GAIN-VQ 4 | 0x0000 | + +**Table 9f: Parameter values for the decoder homing frame (MR795)** + +| Parameter | Value (LSB=b0) | +|----------------|----------------| +| LPC 1 | 0x00C2 | +| LPC 2 | 0x00E3 | +| LPC 3 | 0x002F | +| LTP-LAG 1 | 0x00BD | +| POS 1_1_2_3_4 | 0x0006 | +| SIGN_1_1_2_3_4 | 0x000F | +| LTP-GAIN 1 | 0x000A | +| FCB-GAIN 1 | 0x0000 | +| LTP-LAG 2 | 0x0039 | +| POS 2_1_2_3_4 | 0x1C08 | +| SIGN_2_1_2_3_4 | 0x0007 | +| LTP-GAIN 2 | 0x000A | +| FCB-GAIN 2 | 0x000B | +| LTP-LAG 3 | 0x0063 | +| POS 3_1_2_3_4 | 0x11A6 | +| SIGN_3_1_2_3_4 | 0x000F | +| LTP-GAIN 3 | 0x0001 | +| FCB-GAIN 3 | 0x0000 | +| LTP-LAG 4 | 0x0039 | +| POS 4_1_2_3_4 | 0x09A0 | +| SIGN_4_1_2_3_4 | 0x000F | +| LTP-GAIN 4 | 0x0002 | +| FCB-GAIN 4 | 0x0001 | + +**Table 9g: Parameter values for the decoder homing frame (MR102)** + +| Parameter | Value (LSB=b0) | +|------------------|-----------------------| +| LPC 1 | 0x00F8 | +| LPC 2 | 0x00E3 | +| LPC 3 | 0x002F | +| LTP-LAG 1 | 0x0045 | +| SIGN_1_1_5 | 0x0000 | +| SIGN_1_2_6 | 0x0000 | +| SIGN_1_3_7 | 0x0000 | +| SIGN_1_4_8 | 0x0000 | +| POS_1_1_2_5 | 0x0000 | +| POS_1_3_6_7 | 0x0000 | +| POS_1_4_8 | 0x0000 | +| GAIN-VQ_1 | 0x0000 | +| LTP-LAG 2 | 0x001B | +| SIGN_2_1_5 | 0x0000 | +| SIGN_2_2_6 | 0x0001 | +| SIGN_2_3_7 | 0x0000 | +| SIGN_2_4_8 | 0x0001 | +| POS_2_1_2_5 | 0x0326 | +| POS_2_3_6_7 | 0x00CE | +| POS_2_4_8 | 0x007E | +| GAIN-VQ_2 | 0x0051 | +| LTP-LAG 3 | 0x0062 | +| SIGN_3_1_5 | 0x0000 | +| SIGN_3_2_6 | 0x0000 | +| SIGN_3_3_7 | 0x0000 | +| SIGN_3_4_8 | 0x0000 | +| POS_3_1_2_5 | 0x015A | +| POS_3_3_6_7 | 0x0359 | +| POS_3_4_8 | 0x0076 | +| GAIN-VQ_3 | 0x0000 | +| LTP-LAG 4 | 0x001B | +| SIGN_4_1_5 | 0x0000 | +| SIGN_4_2_6 | 0x0000 | +| SIGN_4_3_7 | 0x0000 | +| SIGN_4_4_8 | 0x0000 | +| POS_4_1_2_5 | 0x017C | +| POS_4_3_6_7 | 0x0215 | +| POS_4_4_8 | 0x0038 | +| GAIN-VQ_4 | 0x0030 | + +**Table 9h: Parameter values for the decoder homing frame (MR122)** + +| Parameter | Value (LSB=b0) | +|---------------------|-----------------------| +| LPC1 | 0x0004 | +| LPC2 | 0x002A | +| LPC3 | 0x00DB | +| LPC4 | 0x0096 | +| LPC5 | 0x002A | +| LTP-LAG 1 | 0x0156 | +| LTP-GAIN 1 | 0x000B | +| SIGN_1_1_6_POS_1_1 | 0x0000 | +| SIGN_1_2_7_POS_1_2 | 0x0000 | +| SIGN_1_3_8_POS_1_3 | 0x0000 | +| SIGN_1_4_9_POS_1_4 | 0x0000 | +| SIGN_1_5_10_POS_1_5 | 0x0000 | +| POS 1_6 | 0x0000 | +| POS 1_7 | 0x0000 | +| POS 1_8 | 0x0000 | +| POS 1_9 | 0x0000 | +| POS 1_10 | 0x0000 | +| FCB-GAIN 1 | 0x0000 | +| LTP-LAG 2 | 0x0036 | +| LTP-GAIN 2 | 0x000B | +| SIGN_2_1_6_POS_2_1 | 0x0000 | +| SIGN_2_2_7_POS_2_2 | 0x000F | +| SIGN_2_3_8_POS_2_3 | 0x000E | +| SIGN_2_4_9_POS_2_4 | 0x000C | +| SIGN_2_5_10_POS_2_5 | 0x000D | +| POS 2_6 | 0x0000 | +| POS 2_7 | 0x0001 | +| POS 2_8 | 0x0005 | +| POS 2_9 | 0x0007 | +| POS 2_10 | 0x0001 | +| FCB-GAIN 2 | 0x0008 | +| LTP-LAG 3 | 0x0024 | +| LTP-GAIN 3 | 0x0000 | +| SIGN_3_1_6_POS_3_1 | 0x0001 | +| SIGN_3_2_7_POS_3_2 | 0x0000 | +| SIGN_3_3_8_POS_3_3 | 0x0005 | +| SIGN_3_4_9_POS_3_4 | 0x0006 | +| SIGN_3_5_10_POS_3_5 | 0x0001 | +| POS 3_6 | 0x0002 | +| POS 3_7 | 0x0004 | +| POS 3_8 | 0x0007 | +| POS 3_9 | 0x0004 | +| POS 3_10 | 0x0002 | +| FCB-GAIN 3 | 0x0003 | +| LTP-LAG 4 | 0x0036 | +| LTP-GAIN 4 | 0x000B | +| SIGN_4_1_6_POS_4_1 | 0x0000 | +| SIGN_4_2_7_POS_4_2 | 0x0002 | +| SIGN_4_3_8_POS_4_3 | 0x0004 | +| SIGN_4_4_9_POS_4_4 | 0x0000 | +| SIGN_4_5_10_POS_4_5 | 0x0003 | +| POS 4_6 | 0x0006 | +| POS 4_7 | 0x0001 | +| POS 4_8 | 0x0007 | +| POS 4_9 | 0x0006 | +| POS 4_10 | 0x0005 | +| FCB-GAIN 4 | 0x0000 | + +# 6 File formats + +This section describes the file formats used by the encoder and decoder programs. The test sequences defined in [1] also use the file formats described here. + +## 6.1 Speech file (encoder input / decoder output) + +Speech files read by the encoder and written by the decoder consist of 16-bit words where each word contains a 13-bit, left aligned speech sample. The byte order depends on the host architecture (e.g. MSByte first on SUN workstations, LSByte first on PCs etc.). Both the encoder and the decoder program process complete frames (of 160 samples) only. + +This means that the encoder will only process $n$ frames if the length of the input file is $n \cdot 160 + k$ words, while the files produced by the decoder will always have a length of $n \cdot 160$ words. + +## 6.2 Mode control file (encoder input) + +The encoder program can optionally read in a mode control file which specifies the encoding mode for each frame of speech processed. The file is a text file containing one line per speech frame. Each line contains one of the mode names from the list {MR475, MR515, MR59, MR67, MR74, MR795, MR102, MR122}. + +## 6.3 Parameter bitstream file (encoder output / decoder input) + +The files produced by the speech encoder/expected by the speech decoder contain an arbitrary number of frames in the following format. + +| | | | | | | | | | +|-------------------------|-----------------|-----------------|-----|-------------------|------------------------|----------------|-----|----------------| +| FRAME_TYPE | B1 | B2 | ... | B244 | MODE_INFO | unused1 | ... | unused4 | +|-------------------------|-----------------|-----------------|-----|-------------------|------------------------|----------------|-----|----------------| + +Each box corresponds to one `Word16` value in the bitstream file, for a total of 250 words or 500 bytes per frame. The fields have the following meaning: + +| | | | | | | | | +|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|--|--|--|--|--| +| FRAME_TYPE | transmit frame type, which is one of | | | | | | | +| | TX_SPEECH | (0x0000) | | | | | | +| | TX_SID_FIRST | (0x0001) | | | | | | +| | TX_SID_UPDATE | (0x0002) | | | | | | +| | TX_NO_DATA | (0x0003) | | | | | | +| B0..B244 | speech encoder parameter bits (i.e. the bitstream itself). Each Bx either has the value 0x0000 or 0x0001. Only mode MR122 really uses all 244 bits; for the other modes, only the first $n$ bits are used ( $35 \leq n \leq 204$ ). The remaining bits are unused (written as 0x0000) | | | | | | | +| MODE_INFO | encoding mode information, which is one of | | | | | | | +| | MR475 | (0x0000) | | | | | | +| | MR515 | (0x0001) | | | | | | +| | MR59 | (0x0002) | | | | | | +| | MR67 | (0x0003) | | | | | | +| | MR74 | (0x0004) | | | | | | +| | MR795 | (0x0005) | | | | | | +| | MR102 | (0x0006) | | | | | | +| | MR122 | (0x0007) | | | | | | +| unused1...4 | unused, written as 0x0000 | | | | | | | + +As indicated in section 6.1 above, the byte order depends on the host architecture. + +By using a preprocessor definition the encoder output and decoder input can optionally use format described in [7], sections 5.1 and 5.3. + +# Annex A (informative): Change History + +| SMG # | Tdoc SMG | Spec | CR | Cat | PH | Vers | New Version | Subject | +|-------|-----------|--------|------|-----|--------|--------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| SA6 | SP-99560 | 26.073 | | | | | 3.0.0 | Approved at TSG-SA#6 | +| SA7 | SP-000025 | 26.073 | 001 | A | R99 | 3.0.0 | 3.1.0 | Avoidance of pulse cancellation in FCB excitation | +| SA11 | SP-010100 | 26.073 | 003 | A | R99 | 3.1.0 | 3.2.0 | Correction of potential bug in AMR decoder due to usage of standard C abs() function | +| SA11 | SP-010100 | 26.073 | 005 | A | R99 | 3.1.0 | 3.2.0 | Correction of comfort noise parameter interpolation bug of AMR decoder | +| SA11 | SP-010100 | 26.073 | 007 | A | R99 | 3.1.0 | 3.2.0 | Correction of mode state bug in AMR decoder | +| SA11 | SP-010100 | 26.073 | 009 | A | R99 | 3.1.0 | 3.2.0 | Correction of TX_TYPE and RX_TYPE identifiers | +| SA11 | SP-010100 | 26.073 | 011 | A | R99 | 3.1.0 | 3.2.0 | Correction of potential bug in AMR decoder due to the usage of standard C abs() function (VAD option_2) | +| SA11 | SP-010100 | 26.073 | 004 | A | Rel-4 | 3.1.0 | 4.0.0 | Correction of potential bug in AMR decoder due to usage of standard C abs() function | +| SA11 | SP-010100 | 26.073 | 006 | A | Rel-4 | 3.1.0 | 4.0.0 | Correction of comfort noise parameter interpolation bug of AMR decoder | +| SA11 | SP-010100 | 26.073 | 008 | A | Rel-4 | 3.1.0 | 4.0.0 | Correction of mode state bug in AMR decoder | +| SA11 | SP-010100 | 26.073 | 010 | A | Rel-4 | 3.1.0 | 4.0.0 | Correction of TX_TYPE and RX_TYPE identifiers | +| SA11 | SP-010100 | 26.073 | 012 | A | Rel-4 | 3.1.0 | 4.0.0 | Correction of potential bug in AMR decoder due to the usage of standard C abs() function (VAD option_2) | +| SA14 | SP-010696 | 26.073 | 014 | A | Rel-4 | 4.0.0 | 4.1.0 | Correction of RX-DTX handling of NO_DATA frames in AMR decoder | +| SA14 | SP-010697 | 26.073 | 016 | A | Rel-4 | 4.0.0 | 4.1.0 | Correction in AMR decoder to avoid division by zero in RX-DTX Handling | +| SA16 | | | | | Rel-5 | 4.1.0 | 5.0.0 | Version for Release 5 | +| SA19 | SP-030085 | 26.073 | 017 | | Rel-5 | 5.0.0 | 5.1.0 | MMS compatible input/output option | +| SA21 | SP-030444 | 26.073 | 018 | | Rel-5 | 5.1.0 | 5.2.0 | Correction of the MMS_IO flag
Note. The following line (missing in the approved CR) was added for the ANSI-C code to compile correctly:
+const char sp_enc_id[] = "@(#)\$ld \$" sp_enc_h; | +| SA23 | SP-040197 | 26.073 | 019 | | Rel-5 | 5.2.0 | 5.3.0 | Correction of AMR DTX functionality | +| SA26 | | | | | Rel-6 | 5.3.0 | 6.0.0 | Version for Release 6 | +| SA36 | SP-070321 | 26.073 | 0020 | 1 | Rel-7 | 6.0.0 | 7.0.0 | Bit order of Mode Indication in AMR comfort noise frames | +| SA42 | | | | | Rel-8 | 7.0.0 | 8.0.0 | Version for Release 8 | +| SA46 | | | | | Rel-9 | 8.0.0 | 9.0.0 | Version for Release 9 | +| SA51 | | | | | Rel-10 | 9.0.0 | 10.0.0 | Version for Release 10 | +| SA57 | | | | | Rel-11 | 10.0.0 | 11.0.0 | Version for Release 11 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26074/raw.md b/marked/Rel-11/26_series/26074/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..90916a4ff7872298c35658ff7fdfbec1956c4713 --- /dev/null +++ b/marked/Rel-11/26_series/26074/raw.md @@ -0,0 +1,367 @@ + + + + + + +# --- Contents + +| | | +|-------------------------------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and abbreviations ..... | 5 | +| 3.1 Definitions..... | 5 | +| 3.2 Abbreviations ..... | 5 | +| 4 General..... | 6 | +| 5 Test sequence format ..... | 6 | +| 5.1 File format..... | 6 | +| 5.2 Codec homing ..... | 6 | +| 6 Speech codec test sequences..... | 7 | +| 6.1 Codec configuration..... | 7 | +| 6.2 Speech codec test sequences ..... | 7 | +| 6.2.1 Speech encoder test sequences ..... | 7 | +| 6.2.2 Speech decoder test sequences ..... | 8 | +| 6.2.3 Codec homing sequence..... | 8 | +| 7 Test sequences for source controlled rate operation ..... | 9 | +| 7.1 Codec configuration..... | 9 | +| 7.2 Test Sequences..... | 9 | +| 7.2.1 Test sequences for background noise estimation ..... | 9 | +| 7.2.2 Test sequences for pitch, tone and complex signal detection..... | 10 | +| 7.2.3 Real speech and tones..... | 10 | +| 7.2.4 Test sequence for signal-to-noise ratio estimation ..... | 10 | +| 8 Sequences for finding the 20 ms framing of the adaptive multi-rate speech encoder ..... | 10 | +| 8.1 Bit synchronisation..... | 10 | +| 8.2 Frame synchronisation ..... | 11 | +| 8.3 Formats and sizes of the synchronisation sequences ..... | 11 | +| 9 Trau Testing with 8 Bit A- and $\mu$ -law PCM Test Sequences ..... | 12 | +| Annex A (informative): Change history ..... | 13 | + +# --- Foreword + +This Technical Specification (TS) has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document specifies the digital test sequences for the adaptive multi-rate (AMR) speech codec. These sequences test for a bit exact implementation of the adaptive multi-rate speech transcoder (TS 26.090 [2]), voice activity detection (TS 26.094 [5]), comfort noise (TS 26.092 [3]), and source controlled rate operation (TS 26.093 [4]). + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TS 26.071: "AMR Speech Codec; General Description". +- [2] 3GPP TS 26.090: "AMR Speech Codec; Speech Transcoding Functions". +- [3] 3GPP TS 26.092: "AMR Speech Codec; Comfort Noise Aspects". +- [4] 3GPP TS 26.093: "AMR Speech Codec; Source Controlled Rate Operation". +- [5] 3GPP TS 26.094: "AMR Speech Codec; Voice Activity Detector". +- [6] 3GPP TS 26.091: "AMR Speech Codec; Error Concealment of Lost Frames". +- [7] 3GPP TS 26.073: "AMR Speech Codec; ANSI C-code". +- [8] 3GPP TS 46.054: "Test sequences for the GSM Enhanced Full Rate (EFR) speech codec". + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the terms and definitions given in TS 26.090 [2], TS 26.091 [6], TS 26.092 [3], TS 26.093 [4] and TS 26.094 [5] apply. + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +[T.B.A] + +# --- 4 General + +Digital test sequences are necessary to test for a bit exact implementation of the adaptive multi-rate speech transcoder (TS 26.090 [2]), voice activity detection (TS 26.094 [5]), comfort noise generation (TS 26.092 [3]), and source controlled rate operation (TS 26.093 [4]). + +The test sequences may also be used to verify installations of the ANSI C code in TS 26.073 [7]. + +Clause 5 describes the format of the files which contain the digital test sequences. Clause 6 describes the test sequences for the speech transcoder. Clause 7 describes the test sequences for the VAD, comfort noise and source controlled rate operation. + +Clause 8 describes the method by which synchronisation is obtained between the test sequences and the speech codec under test. + +*[Clause 9 describes the alternative acceptance testing of the speech encoder and decoder in the TRAU by means of 8 bit A- or $\mu$ -law compressed test sequences on the A-Interface.]* + +# --- 5 Test sequence format + +This clause provides information on the format of the digital test sequences for the GSM adaptive multi-rate speech transcoder (TS 26.090 [2]), voice activity detection (TS 26.094 [5]), comfort noise generation (TS 26.092 [3]), and source controlled rate operation (TS 26.093 [4]). + +## 5.1 File format + +The test sequence files in PC (little-endian) byte order are provided in archive files (ZIP format) which accompany the present document. + +Following decompression, three types of file are provided: + +- | | | +|-------------------------------------------------------------------------------------|---------| +| - Files for input to the speech encoder: | *.INP | +| - Files for comparison with the encoder output and for input to the speech decoder: | *.COD | +| - Files for comparison with the decoder output: | *.OUT | +| - One mode control file for the mode switching test | T21.MOD | + +All file formats are described in TS 26.073 [7]. + +## 5.2 Codec homing + +Each \*.INP file includes two homing frames (see TS 26.073 [7]) at the start of the test sequence. The function of these frames is to reset the speech encoder state variables to their initial value. In the case of a correct installation of the ANSI-C simulation (TS 26.073 [7]), all speech encoder output frames shall be identical to the corresponding frame in the \*.COD file. In the case of a correct hardware implementation undergoing testing, the first speech encoder output frame is undefined and need not be identical to the first frame in the \*.COD file, but all remaining speech encoder output frames shall be identical to the corresponding frames in the \*.COD file. + +The function of the two homing frames in the \*.COD files is to reset the speech decoder state variables to their initial value. In the case of a correct installation of the ANSI-C simulation (TS 26.073 [7]), all speech decoder output frames shall be identical to the corresponding frame in the \*.OUT file. In the case of a correct hardware implementation undergoing testing, the first speech decoder output frame is undefined and need not be identical to first frame in the \*.OUT file, but all remaining speech decoder output frames shall be identical to the corresponding frames in the \*.OUT file. + +# --- 6 Speech codec test sequences + +This clause describes the test sequences designed to exercise the adaptive multi-rate speech transcoder (TS 26.090 [2]). + +## 6.1 Codec configuration + +The speech encoder shall be configured not to operate in the source controlled rate mode. + +## 6.2 Speech codec test sequences + +### 6.2.1 Speech encoder test sequences + +Twenty-two encoder input sequences are provided. Note that for the input sequences T00.INP to T03.INP, the amplitude figures are given in 13-bit precision. The active speech levels are given in dBov. + +- T00.INP - Synthetic harmonic signal. The pitch delay varies slowly from 18 to 143.5 samples. The minimum and maximum amplitudes are -997 and +971. +- T01.INP - Synthetic harmonic signal. The pitch delay varies slowly from 144 down to 18.5 samples. Amplitudes at saturation point -4096 and +4095. +- T02.INP - Sinusoidal sweep varying from 150 Hz to 3400 Hz. Amplitudes $\pm$ 1250. +- T03.INP - Sinusoidal sweep varying from 150 Hz to 3400 Hz. Amplitudes $\pm$ 4000. +- T04.INP - Female speech, active speech level: -19.4 dBov, flat frequency response. +- T05.INP - Male speech, active speech level: -18.7 dBov, flat frequency response. +- T06.INP - Female speech, ambient noise, active speech level: -35.0 dBov, flat frequency response. +- T07.INP - Female speech, ambient noise, active speech level: -25.0 dBov, flat frequency response. +- T08.INP - Female speech, ambient noise, active speech level: -15.6 dBov, flat frequency response. +- T09.INP - Female speech, car noise, active speech level: -35.5 dBov, flat frequency response. +- T10.INP - Female speech, car noise, active speech level: -26.1 dBov, flat frequency response. +- T11.INP - Female speech, car noise, active speech level: -15.8 dBov, flat frequency response. +- T12.INP - Male speech, ambient noise, active speech level: -34.9 dBov, flat frequency response. +- T13.INP - Male speech, ambient noise, active speech level: -24.8 dBov, flat frequency response. +- T14.INP - Male speech, ambient noise, active speech level: -15.0 dBov, flat frequency response. +- T15.INP - Male speech, babble noise, active speech level: -34.1 dBov, flat frequency response. +- T16.INP - Male speech, babble noise, active speech level: -24.3 dBov, flat frequency response. +- T17.INP - Male speech, babble noise, active speech level: -14.4 dBov, flat frequency response. +- T18.INP - Female speech, ambient noise, active speech level: -26.0 dBov, modified IRS frequency response, with many zero frames. +- T19.INP - Male speech, ambient noise, active speech level: -36.0 dBov, modified IRS frequency response, with many zero frames. +- T20.INP - Sequence for exercising the LPC vector quantisation codebooks and ROM tables of the codec. +- T21.INP - Speech sequence for mode switching test. + +The output using these input sequences will be different depending on the tested adaptive multi-rate mode. In the notation used below should be changed to the number of the tested mode, i.e. one of 122, 102, 795, 74, 67, 59, 515, or 475. + +The T00.INP and T01.INP sequences were designed to test the pitch lag of the GSM adaptive multi-rate speech encoder. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the T00\_.COD and T01\_.COD sequences, respectively. + +The T02.INP and T03.INP sequences are particularly suited for testing the LPC analysis, as well as for finding saturation problems. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the T02\_.COD and T03\_.COD sequences, respectively. + +The T04.INP and T05.INP sequences contain a lot of low-frequency components. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the T04\_.COD and T05\_.COD sequences, respectively. + +The T18.INP and T19.INP sequences contain some "all zeros" frames (silence) in between segments of speech. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the T18\_.COD and T19\_.COD sequences, respectively. + +The T20.INP sequence was designed to exercise the LPC code indices and the ROM table indices of the codec. + +The sequences T06.INP to T17.INP were selected on the basis of bringing various input characteristics (background noise) and levels to the test sequence set. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the T06\_.COD to T17\_.COD sequences, respectively. + +The T21.INP sequence was designed to test mode switching in the encoder. For testing mode switching this sequence is used together with the mode control file T21.MOD. See TS 26.073 [7] for the format of the mode control file. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the sequence T21.COD. Note that T21.COD contains parameter frames in different codec modes. + +### 6.2.2 Speech decoder test sequences + +Twenty-one times eight speech decoder input sequences TXX\_.COD (XX = 00..20, = {122, 102, 795, 74, 67, 59, 515, or 475}) are provided for the static mode tests. These are the output of the corresponding TXX.INP sequences, one set per mode. In a correct implementation, the resulting speech decoder output shall be identical to the corresponding TXX\_.OUT sequences. + +The switching test decoder input T21.COD shall result in decoder output identical to the T21.OUT sequence. For the decoder switching test no special mode control file is needed since the mode information is included in the .COD file according to the file format (see TS 26.073 [7]). + +### 6.2.3 Codec homing sequence + +In addition to the test sequences described above, the homing sequences are provided to assist in codec testing. T22.INP contains one encoder-homing-frame. The sequences T22\_.COD ( = {122, 102, 795, 74, 67, 59, 515, or 475}) contain one decoder-homing-frame each for the corresponding mode. The use of these sequences is described in TS 26.071 [1]. + +All files are contained in the archive T.TGZ which accompanies the present document. + +# --- 7 Test sequences for source controlled rate operation + +This clause describes the test sequences designed to exercise the VAD algorithm options 1 and 2 (TS 26.094 [5]), comfort noise (TS 26.092 [3]), and source controlled rate operation (TS 26.093 [4]). + +Test sequences DTX\*.\* are to be used with VAD option 1. DTX1.\* , DTX2.\* , and DTX4.\* shall be run only with speech codec mode MR122. Test sequence DTX3.\* shall be run for all the speech codec modes (MR122, MR102, MR795, MR67, MR59, MR515 and MR475). + +Test sequences DT2.\* are to be used with VAD option 2. DT21.\* , DT23.\* , and DT24.\* shall be run only with speech codec mode MR122. Test sequence DT22.\* shall be run for all the speech codec modes (MR122, MR102, MR795, MR67, MR59, MR515 and MR475). + +## 7.1 Codec configuration + +The VAD, comfort noise and source controlled rate operation shall be tested in conjunction with the speech coder (TS 26.090 [2]). The speech encoder shall be configured to operate in the source controlled rate mode, with either VAD option 1 or VAD option 2. + +## 7.2 Test Sequences + +Each DTX test sequence consists of three files: + +- Files for input to the speech encoder: \*.INP +- Files for comparison with the encoder output and input to the speech decoder: \*.COD +- Files for comparison with the decoder output: \*.OUT + +The \*.COD and \*.OUT file names has the format DTxA\_.\*, where "x" is the VAD option ( X for option 1 and 2 for option 2), "A" is the test case number (1, 2, 3 or 4) and is the speech codec mode. + +In a correct implementation, the speech encoder parameters generated by the \*.INP file shall be identical to those specified in the \*.COD file; and the speech decoder output generated by the \*.COD file shall be identical to that specified in the \*.OUT file. + +| Sequence name | No. of frames | Size (bytes) | | | +|---------------|---------------|--------------|---------|---------| +| | | *.INP | *.COD | *.OUT | +| DTX1 | 710 | 227 200 | 355 000 | 227 200 | +| DTX2 | 898 | 287 360 | 449 000 | 287 360 | +| DTX3 | 1620 | 518 400 | 810 000 | 518 400 | +| DTX4 | 1188 | 380 160 | 594 000 | 380 160 | +| DT21 | 938 | 300 160 | 469 000 | 300 160 | +| DT22 | 616 | 197 280 | 308 000 | 197 120 | +| DT23 | 938 | 300 320 | 469 000 | 300 160 | +| DT24 | 1188 | 380 160 | 594 000 | 380 160 | + +### 7.2.1 Test sequences for background noise estimation + +Background noise estimation algorithm is tested by the following test sequences: + +DTX1.\* + +DTX2.\* + +DT21.\* + +DT22.\* + +(The sequence DTX1.INP in the same as in [8] 3GPP TS 46.054 sequence DTX01.INP) + +### 7.2.2 Test sequences for pitch, tone and complex signal detection + +Pitch, tone and complex signal detection algorithms are tested by the following test sequence: + +DTX3.\* + +### 7.2.3 Real speech and tones + +This test sequence consists of very clean speech, barely detectable speech and a swept frequency tone (The sequences DTX4.INP and DT24.INP are the same as in [8] 3GPP TS 46.054 sequence DTX07.INP): + +DTX4.\* + +DT24.\* + +### 7.2.4 Test sequence for signal-to-noise ratio estimation + +The full range of SNR estimates are tested by the following test sequence: + +DT23.\* + +# 8 Sequences for finding the 20 ms framing of the adaptive multi-rate speech encoder + +*[This clause needs further adaptation of the text and terminology from GSM to 3G context.]* + +When testing the decoder, alignment of the test sequences used to the decoder framing is achieved by the air interface (testing of MS) or can be reached easily on the Abis-interface (testing on network side). + +When testing the encoder, usually there is no information available about where the encoder starts its 20 ms segments of speech input to the encoder. + +In the following, a procedure is described to find the 20 ms framing of the encoder using special synchronisation sequences. This procedure can be used for MS as well as for network side. + +Synchronisation can be achieved in two steps. First, bit synchronisation has to be found. In a second step, frame synchronisation can be determined. This procedure takes advantage of the codec homing feature of the adaptive multi-rate codec, which puts the codec in a defined home state after the reception of the first homing frame. On the reception of further homing frames, the output of the codec is predefined and can be triggered to. + +## 8.1 Bit synchronisation + +The input to the speech encoder is a series of 13 bit long words (104 kbits/s, 13 bit linear PCM). When starting to test the speech encoder, no knowledge is available on bit synchronisation, i.e., where the encoder expects its least significant bits, and where it expects the most significant bits. + +The encoder homing frame consists of 160 samples, all set to zero with the exception of the least significant bit, which is set to one (0 0000 0000 0001 binary, or 0x0008 hex if written into 16 bit words left justified). If two such encoder homing frames are input to the encoder consecutively, the corresponding decoder homing frame of the used codec mode is expected at the output as a reaction of the second encoder homing frame. + +Since there are only 13 possibilities for bit synchronisation, after a maximum of 13 trials bit synchronisation can be reached for each codec mode. In each trial three consecutive encoder homing frames are input to the encoder. If the corresponding decoder homing frame is not detected at the output, the relative bit position of the three input frames is shifted by one and another trial is performed. As soon as the decoder homing frame of the used codec mode is detected at the output, bit synchronisation is found, and the first step can be terminated. + +The reason why three consecutive encoder homing frames are needed is that frame synchronisation is not known at this stage. To be sure that the encoder reads two complete homing frames, three frames have to be input. Wherever the encoder has its 20 ms segmentation, it will always read at least two complete encoder homing frames. + +An example of the 13 different frame triplets is given in sequence BITSYNC.INP. + +## 8.2 Frame synchronisation + +Once bit synchronisation is found, frame synchronisation can be found by inputting two identical frames consecutively to the encoder. There exist 160 different output sequences depending on the 160 different positions that the beginning of this sequence of frames can possibly have with respect to the encoder framing. + +Before inputting this special synchronisation sequence to the encoder, again the encoder has to be reset by one encoder homing frame. A second encoder homing frame is needed to provoke a decoder homing frame at the output that can be triggered to. And since the framing of the encoder is not known at that stage, three encoder homing frames have to precede the special synchronisation sequence to ensure that the encoder reads at least two homing frames, and at least one decoder homing frame is produced at the output, serving as a trigger for recording. + +After the last decoder homing frame of the used codec mode it is required to detect two consecutive output frames that are different from the preceding decoder homing frame. To achieve this in the 12.2 kbit/s mode (no lookahead in the linear prediction analysis [4]), the last 40 samples of the third encoder homing frame shall be different from 0x0008 hex. Only the first 120 samples of this frame were set to 0x0008 hex in this mode. + +The special synchronisation sequence preceded by three encoder homing frames are given in SEQSYNC.INP. For the 12.2 kbit/s mode this sequence is different in the third frame and is given in SEQSYNC\_122.INP. + +Generally, the output sequences will be different depending on the tested adaptive multi-rate mode. In the notation below should be changed to the number of the tested mode, i.e. one of 122, 102, 795, 74, 67, 59, 515 or 475. + +In all 160 output sequences only the second frame after the last decoder homing frame is given in SYNC000\_.COD through SYNC159\_.COD. These output frames were calculated by shifting the sequence SEQSYNC.INP respectively SEQSYNC\_122.INP through the positions 0 to 159, where the samples at the beginning were set to zero. For each codec mode it was finally verified that the last frame in each of the 160 output sequences is different to all other last frames. + +The three digit number in the filenames above indicates the number of samples by which the input was retarded with respect to the encoder framing. By a corresponding shift in the opposite direction, alignment with the encoder framing for the used codec mode can be reached. + +## 8.3 Formats and sizes of the synchronisation sequences + +### BITSYNC.INP: + +This sequence consists of 13 frame triplets. It has the format of the speech encoder input test sequences (13 bit left justified with the three least significant bits set to zero). + +The size of it is therefore: + +$$\text{SIZE (BITSYNC.INP)} = 13 * 3 * 160 * 2 \text{ bytes} = 12480 \text{ bytes}$$ + +### SEQSYNC.INP/SEQSYNC\_122.INP: + +This sequence consists of a 3 frame header (see clause 8.2 for details) and the special synchronisation sequence, consisting of two identical frames. It has the format of the speech encoder input test sequences (13 bit left justified with the three least significant bits set to zero). + +The size of it is therefore: + +$$\text{SIZE (SEQSYNC.INP/SEQSYNC_122.INP)} = 5 * 160 * 2 \text{ bytes} = 1600 \text{ bytes}$$ + +### SYNCXXX\_.COD: + +These sequences consist of 1 encoder output frame each. They have the format of the speech encoder output test sequences (16 bit words right justified). In these frames the values of the FRAME\_TYPE and MODE\_INFO fields are set to the transmit frame type and to the corresponding encoding mode information [3]. + +The size of them is therefore: + +$$\text{SIZE (SYNCXXX_.COD)} = (244 + 6) * 2 \text{ bytes} = 500 \text{ bytes}$$ + +All files are contained in the archive S.TGZ which accompanies the present document. + +# 9 Trau Testing with 8 Bit A- and $\mu$ -law PCM Test Sequences + +*[This clause needs further adaptation of the text and terminology from GSM to 3G context.]* + +In the previous clauses, tests for the transcoder in the TRAU are described, using 13 bit linear test sequences. However, these 13 bit test sequences require a special interface in the TRAU and do not allow testing in the field. In most cases the TRAU has to be set in special mode before testing. + +The 'Y' in the file names below stands for A (A-law) and U ( $\mu$ -law), respectively. + +As an alternative, the speech codec tests in the TRAU can be performed using A- or $\mu$ -law compressed 8 bit PCM test sequences on the A interface. For this purpose modified input test sequences (TXX\_ Y.INP) are generated from the original sequences (see clause 6) by A or $\mu$ law compression. As an input to the encoder they result in modified encoder output sequences (TXX.COD). These modified (TXX.COD) sequences are used as decoder input sequences. The decoder will then produce the output sequences TXX\_ Y.OUT, which are A- or $\mu$ compressed. + +The A- and $\mu$ -law compression and decompression does not change the homing frames at the encoder input. The format of all A- and $\mu$ -law PCM files TXX\_Y.INP and TXX\_Y.OUT is one sample (8 bit) written into 16 bit words. The format of the modified TXX.COD files is as described in clause 5. + +All files are contained in the archives T\_A.TGZ (for the A-law sequences) and T\_U.TGZ (for the $\mu$ -law sequences) which accompany the present document. + +In addition to the test sequences above, special input (SEQSYNC\_Y.INP/SEQSYNC\_122\_Y.INP) and output (SEQSYNC000\_.COD through SEQSYNC159\_.COD) sequences for frame synchronisation are provided. The Y again stands for A and $\mu$ law compressed PCM and is described in clause 6. + +All files are contained in the archives S\_A.TGZ (for the A-law sequences) and S\_U.TGZ (for the $\mu$ -law sequences) which accompany the present document. The synchronization procedure is described in clause 8. + +# Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|-----------------------------------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 12-1999 | 6 | | | | V.3.0.0 Approved | | 3.0.0 | +| 02-2000 | | | | | Inclusion of test sequences | 3.0.0 | 3.0.1 | +| 09-2000 | | | | | Inclusion of corrected VAD2 test sequences | 3.0.1 | 3.0.2 | +| 02-2001 | 11 | SP-010101 | 001 | | Update of AMR codec test sequences after CRs to TS 26.073 | 3.0.2 | 3.1.0 | +| 03-2001 | 11 | SP-010101 | 002 | | Update of AMR codec test sequences after CRs to TS 26.073 | 3.0.2 | 4.0.0 | +| 06-2001 | | | | | Update of AMR codec test sequences (including also the synchronisation sequences) | 4.0.0 | 4.0.1 | +| 06-2002 | 16 | | | | Version for Release 5 | 4.0.1 | 5.0.0 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.0.0 | 6.0.0 | +| 06-2007 | 36 | | | | Version for Release 7 | 6.0.0 | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 11-2011 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | +| 12-2013 | 62 | SP-130568 | 0005 | | Correction to references | 11.0.0 | 11.1.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26092/raw.md b/marked/Rel-11/26_series/26092/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..f113f95518cdfd5db5c40df4dd1f094f1fcc0ca5 --- /dev/null +++ b/marked/Rel-11/26_series/26092/raw.md @@ -0,0 +1,313 @@ + + + + + + +# --- Contents + +| | | +|------------------------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions, symbols and abbreviations ..... | 6 | +| 3.1 Definitions..... | 6 | +| 3.2 Symbols..... | 6 | +| 3.3 Abbreviations ..... | 6 | +| 4 General..... | 7 | +| 5 Functions on the transmit (TX) side ..... | 7 | +| 5.1 LSF evaluation ..... | 7 | +| 5.2 Frame energy calculation ..... | 8 | +| 5.3 Modification of the speech encoding algorithm during SID frame generation..... | 8 | +| 5.4 SID-frame encoding ..... | 9 | +| 6 Functions on the receive (RX) side..... | 9 | +| 6.1 Averaging and decoding of the LP and energy parameters ..... | 9 | +| 6.2 Comfort noise generation and updating ..... | 10 | +| 7 Computational details and bit allocation..... | 11 | +| Annex A (informative): Change history..... | 12 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document gives the detailed requirements for the correct operation of the background acoustic noise evaluation, noise parameter encoding/decoding and comfort noise generation for the AMR speech codec during Source Controlled Rate (SCR) operation. + +The requirements described in the present document are mandatory for implementation in all UEs capable of supporting the AMR speech codec. + +The receiver requirements are mandatory for implementation in all networks capable of supporting the AMR speech codec, the transmitter requirements only for those where downlink SCR will be used. + +In case of discrepancy between the requirements described in the present document and the fixed point computational description of these requirements contained in [1], the description in [1] will prevail. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TS 26.073: "Adaptive Multi-Rate (AMR); ANSI C source code". +- [2] 3GPP TS 26.090 : "Transcoding functions". +- [3] 3GPP TS 26.091: "Mandatory Speech Codec speech processing functions; AMR Speech Codec; Error concealment of lost frames". +- [4] 3GPP TS 26.093: "Source Controlled Rate operation ". +- [5] 3GPP TS 26.101: "Frame Structure". + +# 3 Definitions, symbols and abbreviations + +## 3.1 Definitions + +For the purpose of the present document, the following terms and definitions apply. + +**Frame:** time interval of 20 ms corresponding to the time segmentation of the adaptive multi-rate speech transcoder, also used as a short term for traffic frame. + +**SID frames:** special Comfort Noise frames. It may convey information on the acoustic background noise or inform the decoder that it should start generating background noise. + +**Speech frame:** traffic frame that cannot be classified as a SID frame. + +**VAD flag:** voice Activity Detection flag. + +**TX\_TYPE:** one of SPEECH, SID\_FIRST, SID\_UPD, NO\_DATA (defined in TS 26.093 [4]). + +**RX\_TYPE:** classification of the received traffic frame (defined in TS 26.093 [4]). + +Other definitions of terms used in the present document can be found in TS 26.090 [2] and TS 26.093 [4]. The overall operation of SCR is described in TS 26.093 [4]. + +## 3.2 Symbols + +For the purpose of the present document , the following symbols apply. Boldface symbols are used for vector variables. + +$$\sum_{n=a}^b x(n) = x(a) + x(a+1) + \dots + x(b-1) + x(b)$$ + +$en_{\log}^{mean}$ Averaged logarithmic frame energy + +$\mathbf{f}^{mean}$ Averaged LSF parameter vector + +$\mathbf{e}$ Computed LSF parameter prediction residual + +$en_{\log}$ Logarithmic frame energy + +$\hat{\mathbf{e}}$ Quantized LSF parameter prediction residual + +$\hat{\mathbf{f}}^T = [\hat{f}_1 \hat{f}_2 \dots \hat{f}_{10}]$ Quantized LSF vector + +$\hat{\mathbf{f}}^{(m)}$ Quantized LSF vector of frame $m$ + +$\hat{\mathbf{f}}^{ref}$ Reference vector for LSF quantization + +$\mathbf{f}^T = [f_1 f_2 \dots f_{10}]$ Unquantized LSF vector + +$\mathbf{f}^{(m)}$ Unquantized LSF vector of frame $m$ + +## 3.3 Abbreviations + +For the purpose of the present document , the following abbreviations apply. + +| | | +|-----|----------------------------------------------------------------------------| +| AMR | Adaptive Multi-Rate | +| SCR | Source Controlled Rate operation ( aka source discontinuous transmission ) | +| UE | User Equipment | +| SID | SIlence Descriptor | +| LP | Linear Prediction | +| LSP | Line Spectral Pair | +| LSF | Line Spectral Frequency | +| RX | Receive | +| TX | Transmit | + +# --- 4 General + +A basic problem when using SCR is that the background acoustic noise, which is transmitted together with the speech, would disappear when the transmission is cut, resulting in discontinuities of the background noise. Since the SCR switching can take place rapidly, it has been found that this effect can be very annoying for the listener - especially in a car environment with high background noise levels. In bad cases, the speech may be hardly intelligible. + +This document specifies the way to overcome this problem by generating on the receive (RX) side synthetic noise similar to the transmit (TX) side background noise. The comfort noise parameters are estimated on the TX side and transmitted to the RX side at a regular rate when speech is not present. This allows the comfort noise to adapt to the changes of the noise on the TX side. + +# --- 5 Functions on the transmit (TX) side + +The comfort noise evaluation algorithm uses the following parameters of the AMR speech encoder, defined in [2]: + +- the unquantized Linear Prediction (LP) parameters, using the Line Spectral Pair (LSP) representation, where the unquantized Line Spectral Frequency (LSF) vector is given by $\mathbf{f}^T = [f_1 \ f_2 \ \dots \ f_{10}]$ ; +- the unquantized LSF vector for the 12.2 kbit/s mode is given by the second set of LSF parameters in the frame. + +The algorithm computes the following parameters to assist in comfort noise generation: + +- the averaged LSF parameter vector $\mathbf{f}^{mean}$ (average of the LSF parameters of the eight most recent frames); +- the averaged logarithmic frame energy $en_{log}^{mean}$ (average of the logarithmic energy of the eight most recent frames). + +These parameters give information on the level ( $en_{log}^{mean}$ ) and the spectrum ( $\mathbf{f}^{mean}$ ) of the background noise. + +The evaluated comfort noise parameters ( $\mathbf{f}^{mean}$ and $en_{log}^{mean}$ ) are encoded into a special frame, called a Silence Descriptor (SID) frame for transmission to the RX side. + +A hangover logic is used to enhance the quality of the silence descriptor frames. A hangover of seven frames is added to the VAD flag so that the coder waits with the switch from active to inactive mode for a period of seven frames, during that time the decoder can compute a silence descriptor frame from the quantized LSFs and the logarithmic frame energy of the decoded speech signal. Therefore, no comfort noise description is transmitted in the first SID frame after active speech. If the background noise contains transients which will cause the coder to switch to active mode and then back to inactive mode in a very short time period, no hangover is used. Instead the previously used comfort noise frames are used for comfort noise generation. + +The first SID frame also serves to initiate the comfort noise generation on the receive side, as a first SID frame is always sent at the end of a speech burst, i.e., before the transmission is terminated. + +The scheduling of SID or speech frames on the network path is described in [4]. + +## 5.1 LSF evaluation + +The comfort noise parameters to be encoded into a SID frame are calculated over $N = 8$ consecutive frames marked with VAD=0, as follows: + +The averaged LSF parameter vector $\mathbf{f}^{mean}(i)$ of the frame $i$ shall be computed according to the equation: + +$$\mathbf{f}^{mean}(i) = \frac{1}{8} \sum_{n=0}^7 \mathbf{f}(i-n) \quad (1)$$ + +where $\mathbf{f}(i-n)$ is the (unquantized) LSF parameter vector of the current frame $i$ ( $n=0$ ) and past frames ( $n=1, \dots, 7$ ). + +The averaged LSF parameter vector $\mathbf{f}^{mean}(i)$ of the frame $i$ is encoded using the same encoding tables that are also used by the 7.4 kbit/s mode for the encoding of the non-averaged LSF parameter vectors in ordinary speech encoding mode, but the quantization algorithm is modified in order to support the quantization of comfort noise. + +The LSF parameter prediction residual to be quantized for frame $i$ is obtained according to the following equation: + +$$\mathbf{e}(i) = \mathbf{f}^{mean}(i) - \hat{\mathbf{f}}^{ref} \quad (2)$$ + +where $\hat{\mathbf{f}}^{ref}$ is a reference vector picked from a codebook. + +The vector $\hat{\mathbf{f}}^{ref}$ used in eq (2) is encoded for each SID frame. A lookup table containing 8 vectors typical for background noise are searched. The vector which yields the lowest prediction residual energy is selected. After the above step the LSF parameter encoding procedure is performed. The 3-bit index for the reference vector and the 26 bits for LSF parameter are transmitted in the SID frame (see bit allocation in table 1). + +## 5.2 Frame energy calculation + +The frame energy is computed for each frame marked with VAD=0 according to the equation : + +$$en_{\log}(i) = \frac{1}{2} \log_2 \left( \frac{1}{N} \sum_{n=0}^{N-1} s^2(n) \right) \quad (3)$$ + +where $s(n)$ is the HP-filtered input speech signal of the current frame $i$ . + +The averaged logarithmic energy is computed by: + +$$en_{\log}^{mean}(i) = \frac{1}{8} \sum_{n=0}^7 en_{\log}(i-n) \quad (4)$$ + +The averaged logarithmic energy is quantized means of a 6 bit algorithmic quantizer. The 6 bits for the energy index are transmitted in the SID frame (see bit allocation in table 1). + +## 5.3 Modification of the speech encoding algorithm during SID frame generation + +When the TX\_TYPE is not equal to SPEECH the speech encoding algorithm is modified in the following way: + +- The non-averaged LP parameters which are used to derive the filter coefficients of the filters $H(z)$ and $W(z)$ of the speech encoder are not quantized; +- The open loop pitch lag search is performed, but the closed loop pitch lag search is inactivated. The adaptive codebook gain and memory is set to zero. +- No fixed codebook search is made. +- The memory of weighting filter $W(z)$ is set to zero, i.e., the memory of $W(z)$ is not updated. + +- The ordinary LP parameter quantization algorithm is inactive. The averaged LSF parameter vector $\mathbf{f}^{mean}$ is calculated each time a new SID frame is to be sent to the AN. This parameter vector is encoded into the SID frame as defined in subclause 5.1. +- The ordinary gain quantization algorithm is inactive. +- The predictor memories of the ordinary LP parameter quantization and fixed codebook gain quantization algorithms are initialized when TX\_TYPE is not SPEECH, so that the quantizers start from known initial states when the speech activity begins again. + +## 5.4 SID-frame encoding + +The encoding of the comfort noise bits in a SID frame is described in [5] where the indication of the first SID frame is also described. The bit allocation and sequence of the bits from comfort noise encoding is shown in Table 1. + +# 6 Functions on the receive (RX) side + +The situations in which comfort noise shall be generated on the receive side are defined in [4]. In general, the comfort noise generation is started or updated whenever a valid SID frame is received. + +## 6.1 Averaging and decoding of the LP and energy parameters + +When speech frames are received by the decoder the LP and the energy parameters of the last seven speech frames shall be kept in memory. The decoder counts the number of frames elapsed since the last SID frame was updated and passed to the RSS by the encoder. Based on this count, the decoder determines whether or not there is a hangover period at the end of the speech burst (defined in [4]). The interpolation factor is also adapted to the SID update rate. + +As soon as a SID frame is received comfort noise is generated at the decoder end. The first SID frame parameters are not received but computed from the parameters stored during the hangover period. If no hangover period is detected, the parameters from the previous SID update are used. + +The averaging procedure for obtaining the comfort noise parameters for the first SID frame is as follows: + +- when a speech frame is received, the LSF vector is decoded and stored in memory, moreover the logarithmic frame energy of the decoded signal is also stored in memory. +- the averaged values of the quantized LSF vectors and the averaged logarithmic frame energy of the decoded frames are computed and used for comfort noise generation. + +The averaged value of the LSF vector for the first SID frame is given by: + +$$\hat{\mathbf{f}}^{mean}(i) = \frac{1}{8} \sum_{n=0}^7 \hat{\mathbf{f}}(i-n) \quad (5)$$ + +where $\hat{\mathbf{f}}(i-n)$ , $n > 0$ is the quantized LSF vector of one of the frames of the hangover period and where $\hat{\mathbf{f}}(i-0) = \hat{\mathbf{f}}(i-1)$ . The averaged logarithmic frame energy for the first SID frame is given by: + +$$\hat{en}_{log}^{mean}(i) = \frac{1}{8} \sum_{n=0}^7 \hat{en}_{log}(i-n) \quad (6)$$ + +where $\hat{en}_{log}(i-n)$ , $n > 0$ is the logarithmic vector of one of the frames of the hangover period computed for the decoded frames and where $\hat{en}_{log}(i-0) = \hat{en}_{log}(i-1)$ . + +For ordinary SID frames, the LSF vector and logarithmic frame energy are computed by table lookup. The energy is also adjusted according to the signalled speech modes capabilities, as to provide high quality transitions from Comfort Noise to Speech. The LSF vector is given by the sum of the decoded reference vector and the decoded LSF prediction residual. + +During comfort noise generation the spectrum and energy of the comfort noise is determined by interpolation between old and new SID frames. + +In order to achieve a comfort noise that is less static in appearance the LSF vector is slightly perturbed for each frame by adding a small component based on parameters variations computed in the hangover period. The computation of the perturbation is made by computing the mean LSF vector from the matrix $\hat{\mathbf{f}}$ , this mean vector is then subtracted from each of the elements of $\hat{\mathbf{f}}$ forming a new matrix $\tilde{\mathbf{f}}$ . For every frame a mean removed LSF vector is randomly chosen from $\tilde{\mathbf{f}}$ and added to the interpolated LSF vector. + +## 6.2 Comfort noise generation and updating + +The comfort noise generation procedure uses the adaptive multi-rate speech decoder algorithm defined in [2]. + +When comfort noise is to be generated, the various encoded parameters are set as follows: + +In each subframe, the pulse positions and signs of the fixed codebook excitation are locally generated using uniformly distributed pseudo random numbers. The excitation pulses take values of +1 and -1 when comfort noise is generated. The fixed codebook comfort noise excitation generation algorithm works as follows: + +``` +for (i = 0; i < 40; i++) code[i] = 0; +for (i = 0; i < 10; i++) { + j = random(4); + idx = j * 10 + i; + if (random(2) == 1) code[idx] = 1; + else code[idx] = -1; +} +``` + +where: + +**code[0..39]** fixed codebook excitation buffer; +**random(4)** generates a random integer value, uniformly distributed between 0 and 3; +**random(2)** generates a random integer value, uniformly distributed between 0 and 1. + +The fixed codebook gain is computed from the logarithmic frame energy parameter by converting it to the linear domain and normalizing with the gain of LP synthesis filter. + +The adaptive codebook gain values in each subframe are set to 0, also the memory of the adaptive codebook is set to zero. + +The pitch delay values in each subframe are set to 40. + +The LP filter parameters used are those received in the SID frame. + +The predictor memories of the ordinary LP parameter and fixed codebook gain quantization algorithms are initialized when RX\_TYPE is not SPEECH, so that the quantizers start from given initial states when the speech activity begins again. With these parameters, the speech decoder now performs the standard operations described in [2] and synthesizes comfort noise. + +Updating of the comfort noise parameters (energy and LP filter parameters) occurs each time a valid SID frame is received, as described in [4]. + +When updating the comfort noise, the parameters above should be interpolated over the SID update period to obtain smooth transitions. + +# --- 7 Computational details and bit allocation + +A bit exact computational description of comfort noise encoding and generation in form of an ANSI-C source code is found in [1]. + +The detailed bit allocation and the sequence of bits in the comfort noise encoding is shown in Table 1. + +**Table 1: Source encoder output parameters in order of occurrence and bit allocation for comfort noise encoding.** + +| Bits (MSB-LSB) | Description | +|----------------|-----------------------------------| +| s1 – s3 | index of reference vector | +| s4 - s11 | index of 1st LSF subvector | +| s12 – s20 | index of 2nd LSF subvector | +| s21 – s29 | index of 3rd LSF subvector | +| s30 – s35 | index of logarithmic frame energy | + +# Annex A (informative): Change history + +| Document history | | | | | | | | | +|-------------------------|-----------------|---------------------------------------|-----------|------------|------------------------|--|------------|------------| +| V. 2.0.0 | June 21, 1999 | Presented at S#4 Plenary for approval | | | | | | | +| V. 3.0.0 | June 22, 1999 | Approved at S#4 Plenary | | | | | | | +| V. 3.0.1 | August 22, 1999 | Reformatted in 3GPP style | | | | | | | +| Change history | | | | | | | | | +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | | Old | New | +| 03-2001 | 11 | | | | Version for Release 4 | | | 4.0.0 | +| 06-2002 | 16 | | | | Version for Release 5 | | 4.0.0 | 5.0.0 | +| 12-2004 | 26 | | | | Version for Release 6 | | 5.0.0 | 6.0.0 | +| 06-2007 | 36 | | | | Version for Release 7 | | 6.0.0 | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | | 7.0.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26093/1a827b10290f33d4fec04d0e8ef7a897_img.jpg b/marked/Rel-11/26_series/26093/1a827b10290f33d4fec04d0e8ef7a897_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0ff99504a004f443106eb3ce5b2a63b9ec79cb7f --- /dev/null +++ b/marked/Rel-11/26_series/26093/1a827b10290f33d4fec04d0e8ef7a897_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23dae8718a8cc12e4c510a7e84f464b772e825f0149ecbf0623be8096517b5c0 +size 42279 diff --git a/marked/Rel-11/26_series/26093/1c94fd3cebf58af136144f14160d128e_img.jpg b/marked/Rel-11/26_series/26093/1c94fd3cebf58af136144f14160d128e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..84a9fa510c9c1e9a343569594d1a5167516a8d55 --- /dev/null +++ b/marked/Rel-11/26_series/26093/1c94fd3cebf58af136144f14160d128e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:163456252c87c99f6a58182d15e478453f1558a28724e0615788ea36df8b470b +size 49378 diff --git a/marked/Rel-11/26_series/26093/36117e9cb27c58484cd8d3e5f9dc7ac3_img.jpg b/marked/Rel-11/26_series/26093/36117e9cb27c58484cd8d3e5f9dc7ac3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b6b60c0be975913d3e43fd6863dd399d6149a850 --- /dev/null +++ b/marked/Rel-11/26_series/26093/36117e9cb27c58484cd8d3e5f9dc7ac3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db7e9f7a27ab929176356bd987e588bbf8c43e8ea0ddf64f3398107dacf38646 +size 51114 diff --git a/marked/Rel-11/26_series/26093/3da1a07cb87051bf616c9876db958cf0_img.jpg b/marked/Rel-11/26_series/26093/3da1a07cb87051bf616c9876db958cf0_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4349fc6397fc7be202f8f6df59ba5d56798af94f --- /dev/null +++ b/marked/Rel-11/26_series/26093/3da1a07cb87051bf616c9876db958cf0_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:766c1abf26324934be01cb915506d3f57997414b5ffc0d4c843d7486961a2f61 +size 44107 diff --git a/marked/Rel-11/26_series/26093/5860ad6bd2a2dd8d1ab12864b8f90f37_img.jpg b/marked/Rel-11/26_series/26093/5860ad6bd2a2dd8d1ab12864b8f90f37_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d7eb76708a85663a9849eedf22c59fa8eae5707f --- /dev/null +++ b/marked/Rel-11/26_series/26093/5860ad6bd2a2dd8d1ab12864b8f90f37_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6967f280e893311c7138d7a09efca27fce698e635e499a2d80b0c44fc9b4a5de +size 67667 diff --git a/marked/Rel-11/26_series/26093/7e670a2b556b53ea9002dfff3a420e08_img.jpg b/marked/Rel-11/26_series/26093/7e670a2b556b53ea9002dfff3a420e08_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ddc8381ac2ba120df6b9ffcd225f415ff1839725 --- /dev/null +++ b/marked/Rel-11/26_series/26093/7e670a2b556b53ea9002dfff3a420e08_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9330f31f0823e9a1314bb6bf567ee764ec2271b4b2883493ea122563b9943fa2 +size 55447 diff --git a/marked/Rel-11/26_series/26093/b8661c6c54f72ecc7ff6cb05e47b2891_img.jpg b/marked/Rel-11/26_series/26093/b8661c6c54f72ecc7ff6cb05e47b2891_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..96f9f9ee1e1b44ee5b659aaa6f693c532ce2bdd2 --- /dev/null +++ b/marked/Rel-11/26_series/26093/b8661c6c54f72ecc7ff6cb05e47b2891_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa91686c40de3a43183311d807c58293f3126124381e7441fee123cb3a802a65 +size 49441 diff --git a/marked/Rel-11/26_series/26093/raw.md b/marked/Rel-11/26_series/26093/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..0872b40e26472cde9fb384d48502c72414553934 --- /dev/null +++ b/marked/Rel-11/26_series/26093/raw.md @@ -0,0 +1,967 @@ + + + + + + +# Contents + +| | | +|--------------------------------------------------------------------------------------------------|-----------| +| Foreword ..... | 5 | +| 1 Scope..... | 6 | +| 2 References..... | 6 | +| 3 Definitions, symbols and abbreviations..... | 6 | +| 3.1 Definitions..... | 6 | +| 3.2 Symbols..... | 7 | +| 3.3 Abbreviations ..... | 7 | +| 4 General..... | 7 | +| 4.1 General organisation ..... | 7 | +| 5 AMR SCR operation..... | 8 | +| 5.1 Transmit (TX) side..... | 8 | +| 5.1.1 General operation ..... | 8 | +| 5.1.2 Functions of the TX SCR handler ..... | 9 | +| 5.1.2.1 AMR SCR Timing procedures..... | 9 | +| 5.1.3 The TX part of the AN ..... | 10 | +| 5.2 Receive (RX) side ..... | 11 | +| 5.2.1 General operation ..... | 11 | +| 5.2.3 Demands on the RX SCR handler ..... | 11 | +| 5.3 AMR SID Information format..... | 12 | +| Annex A (normative): AMR DTX handler for the GSM system (corresponding to GSM 06.93)..... | 13 | +| A.1 Scope..... | 13 | +| A.2 References..... | 13 | +| A.3 Definitions, symbols and abbreviations..... | 14 | +| A.3.1 Definitions..... | 14 | +| A.3.2 Symbols..... | 14 | +| A.3.3 Abbreviations ..... | 15 | +| A.4 General..... | 15 | +| A.4.1 General organisation ..... | 15 | +| A.5 Transmit (TX) side..... | 16 | +| A.5.1 General operation ..... | 16 | +| A.5.1.1 Functions of the TX DTX handler..... | 17 | +| A.5.1.2 Functions of the TX Radio Subsystem..... | 18 | +| A.5.1.2.1 Functions of the TX Radio Subsystem for TCH/AFS ..... | 18 | +| A.5.1.2.2 Functions of the TX Radio Subsystem for TCH/AHS ..... | 18 | +| A.5.1.2.3 Functions of the Downlink TX Radio Subsystem for TFO ..... | 19 | +| A.5.1.2.4 Functions of the TX Radio Subsystem for RATSCCH ..... | 20 | +| A.6 Receive (RX) side ..... | 20 | +| A.6.1 General operation ..... | 20 | +| A.6.1.1 Functions of the RX radio subsystem..... | 21 | +| A.6.1.2 Functions of the RX DTX handler ..... | 21 | +| Annex B (normative): ETSI GSM-EFR SCR handler ..... | 22 | +| Transmit (TX) side..... | 22 | +| General operation ..... | 22 | +| Functions of the TX SCR handler..... | 22 | +| GSM-EFR SCR Timing procedures..... | 22 | +| The TX part of the AN ..... | 22 | +| Demands on the TX part of the Access Network..... | 22 | + +Receive (RX) side .....23 + +SID Information format.....23 + +**Annex C (normative): TIA IS-641 SCR Handler .....24** + +TX-side.....24 + +RX-side.....24 + +SID Information format.....24 + +**Annex D (normative): TIA TDMA-US1 SCR Handler .....25** + +TX-side.....25 + +RX-side.....25 + +SID Information format.....25 + +**Annex E (normative): ARIB PDC-EFR SCR Handler .....26** + +Transmit (TX) side .....26 + +General operation .....26 + +Functions of the TX SCR handler.....26 + +PDC\_EFR SCR Timing procedures.....26 + +The TX part of the AN .....27 + +Demands on the TX part of the Access Network.....27 + +Receive (RX) side .....27 + +SID information format.....27 + +Annex F (informative): Change history.....28 + +# --- Foreword + +This Technical Specification has been produced by the 3GPP. + +The present document describes the operation of the Adaptive Multi Rate speech codec during Source Controlled Rate (SCR) operation within the 3GPP system. + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of this TS, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +# --- 1 Scope + +This document describes the Source Controlled Rate (SCR) operation of the Adaptive Multi-Rate speech Codec in Codec Types UMTS\_AMR and UMTS\_AMR2 for the UMTS system. The implementation of this SCR operation is mandatory in all UMTS equipment. + +The description is structured according to the block diagram in figure 1. This structure of distributing the various functions between system entities is not mandatory for implementation, as long as the operation on the speech decoder output remains the same. + +Annex A describes the Discontinuous Transmission (DTX) operation of the Adaptive Multi-Rate speech Codec in Codec Types FR\_AMR, HR\_AMR and OHR\_AMR for GERAN. This annex is the former GSM 06.93 (Release 98). + +Annexes B to E describe the SCR operation of the Adaptive Multi-Rate speech Codec in Codec Types GSM\_EFR, TDMA\_EFR, TDMA\_US1 and PDC\_EFR for the UMTS system. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. + - For a specific reference, subsequent revisions do not apply. + - For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. +- [1] 3GPP TS 26.071 : "AMR Speech Codec; General description". +- [2] 3GPP TS 26.073 : "AMR Speech Codec; ANSI-C code". +- [3] 3GPP TS 26.074 : "AMR Speech Codec; Test sequences". +- [4] 3GPP TS 26.090 : "AMR Speech Codec; Transcoding functions". +- [5] 3GPP TS 26.091 : "AMR Speech Codec; Error concealment of lost frames". +- [6] 3GPP TS 26.092 : "AMR Speech Codec; Comfort noise aspects". +- [7] 3GPP TS 26.094 : "AMR Speech Codec; Voice Activity Detector (VAD)". +- [8] 3GPP TS 26.101 : "AMR Speech Codec; Frame structure". + +# --- 3 Definitions, symbols and abbreviations + +## 3.1 Definitions + +For the purpose of this document, the following definitions apply. + +**frame:** Time interval of 20 ms, corresponding to the time segmentation of the Adaptive Multi Rate speech Codec, also used as a short term for a traffic frame. + +**traffic frame:** Block of 95..244 information bits transmitted on the speech traffic channels. + +**SID frame:** Frame that conveys information about the acoustic background noise. + +**speech frame:** Traffic frame that has been classified as SPEECH\_GOOD or SPEECH\_BAD frame. + +**VAD flag:** Boolean flag, generated by the VAD algorithm indicating the presence ("1") or the absence ("0") of a speech frame. + +**RX\_TYPE:** classifies the received frame. + +**TX\_TYPE:** classifies the frame to be transmitted. + +**hangover period:** A period of frames added at the end of a speech burst in which VAD flag ="0" and TX\_TYPE is ="SPEECH\_GOOD", this period provides the encoder with an extra window to derive the Comfort Noise parameters . + +## 3.2 Symbols + +For the purpose of this document, the following symbols apply. + +| | | +|----------------------|------------------------------------------------------------| +| $N_{\text{elapsed}}$ | Number of elapsed frames since the last updated SID frame. | +|----------------------|------------------------------------------------------------| + +## 3.3 Abbreviations + +For the purpose of this document , the following abbreviations apply. + +| | | +|----------|------------------------------------------------------| +| AN | Access Network | +| SCR | Source Controlled Rate operation | +| TS | Telecommunication Standard, Technical Specification | +| GSM | Global System for Mobile Telecommunication | +| GSM-EFR | GSM Enhanced Full Rate speech Codec | +| UE | User Equipment | +| PDC-EFR | ARIB PDC-EFR 6.7 kBit/s speech Codec | +| RAN | Radio Access Network | +| RX | Receive | +| SID | Silence Descriptor | +| TDMA-EFR | TIA IS-641 Enhanced speech Codec | +| TDMA-US1 | TIA TDMA-US1 (12.2 kBit/s Codec, similar to GSM-EFR) | +| TX | Transmit | +| VAD | Voice Activity Detector | + +# --- 4 General + +Source Controlled Rate operation (SCR) is a mechanism for the AMR Speech Codec, which allows to encode the input signal at a lower average rate by taking speech inactivity into account. The SCR scheme may be used for the following purposes: + +- to save power in the User Equipment; +- to reduce the overall interference and load in the networks. + +SCR in the transmitting path (uplink) shall be in operation in UEs, if commanded so by the network. Note that for UMTS AMR and UMTS AMR2 codec types, the uplink SCR operation shall always be activated. The UE shall handle SCR in the receiving path (downlink) at any time, regardless, whether SCR in the transmitting path is enabled or not. + +## 4.1 General organisation + +The default SCR mechanism described in this document requires the following functions: + +- a Voice Activity Detector (VAD) on the transmit (TX) side; +- evaluation of the background acoustic noise on the transmit (TX) side, in order to transmit characteristic parameters to the receive (RX) side; +- generation on the receive (RX) side of a similar noise, called comfort noise, during periods where the transmission is switched off. + +The Voice Activity Detector (VAD) is defined in [7] and the AMR-mode comfort noise functions in [6]. Both are based partly on the speech Codec and its internal variables, defined in [4]. + +In addition to these functions, if the parameters arriving at the RX side are detected to be seriously corrupted by errors, the speech or comfort noise must be generated from substituted data in order to avoid seriously annoying effects for the listener. These functions are defined in [5]. + +An overall description of the speech processing parts can be found in [1]. An overview of one link SCR operation is shown in Figure 1. + +![Figure 1: Block diagram of one link SCR operation. The diagram shows three main components: TX SCR handler, 'Network', and RX SCR handler. The TX SCR handler contains Speech Encoder, Voice Activity Detector, and Comfort Noise Parameter Computation. The 'Network' contains Information packeting, transport and classification. The RX SCR handler contains Speech Decoder, Error Concealment, and Comfort Noise Generation. Arrows show the flow of Information bits, Mode Indication, TX_TYPE, and RX_TYPE between these components.](5860ad6bd2a2dd8d1ab12864b8f90f37_img.jpg) + +``` + +graph LR + subgraph TX_SCR_handler [TX SCR handler] + SE[Speech Encoder] + VAD[Voice Activity Detector] + CNPC[Comfort Noise Parameter Computation] + end + subgraph Network ["Network"] + IPC[Information packeting, transport and classification] + end + subgraph RX_SCR_handler [RX SCR handler] + SD[Speech Decoder] + EC[Error Concealment] + CN[Comfort Noise Generation] + end + SE -- "Information bits" --> IPC + VAD -- "Mode Indication" --> IPC + CNPC -- "TX_TYPE" --> IPC + IPC -- "Information bits" --> SD + IPC -- "Mode Indication" --> EC + IPC -- "RX_TYPE" --> CN + +``` + +Figure 1: Block diagram of one link SCR operation. The diagram shows three main components: TX SCR handler, 'Network', and RX SCR handler. The TX SCR handler contains Speech Encoder, Voice Activity Detector, and Comfort Noise Parameter Computation. The 'Network' contains Information packeting, transport and classification. The RX SCR handler contains Speech Decoder, Error Concealment, and Comfort Noise Generation. Arrows show the flow of Information bits, Mode Indication, TX\_TYPE, and RX\_TYPE between these components. + +Figure 1: Block diagram of one link SCR operation + +# 5 AMR SCR operation + +## 5.1 Transmit (TX) side + +A block diagram of the transmit side SCR functions is shown in Figure 2. + +![Figure 2: Block diagram of SCR functions at the TX side. The diagram shows three main components: TX SCR handler, Framing, and TX Access Network. The TX SCR handler contains Speech Encoder, Voice Activity Detector, and Comfort Noise Parameter Computation. The Framing unit contains bit fields T, S, 2, 6, ., 1, 0, 1. The TX Access Network contains TX of information. Arrows show the flow of Information bits, Mode Indication, TX_TYPE, and the resulting frame fields (Information bits, Frame Type, FQI) between these components.](1c94fd3cebf58af136144f14160d128e_img.jpg) + +``` + +graph LR + subgraph TX_SCR_handler [TX SCR handler] + SE[Speech Encoder] + VAD[Voice Activity Detector] + CNPC[Comfort Noise Parameter Computation] + end + subgraph Framing + T[T] + S[S] + 2[2] + 6[6] + dot[.] + 1[1] + 0[0] + 1[1] + end + subgraph TX_Access_Network [TX Access Network] + TXI[TX of information] + end + SE -- "Information bits" --> Framing + VAD -- "Mode Indication" --> Framing + CNPC -- "TX_TYPE" --> Framing + Framing -- "Information bits" --> TXI + Framing -- "Frame Type" --> TXI + Framing -- "FQI" --> TXI + +``` + +Figure 2: Block diagram of SCR functions at the TX side. The diagram shows three main components: TX SCR handler, Framing, and TX Access Network. The TX SCR handler contains Speech Encoder, Voice Activity Detector, and Comfort Noise Parameter Computation. The Framing unit contains bit fields T, S, 2, 6, ., 1, 0, 1. The TX Access Network contains TX of information. Arrows show the flow of Information bits, Mode Indication, TX\_TYPE, and the resulting frame fields (Information bits, Frame Type, FQI) between these components. + +Figure 2: Block diagram of SCR functions at the TX side + +### 5.1.1 General operation + +The TX SCR handler passes traffic frames, individually marked by TX\_TYPE, to the Framing unit. Each frame consists of bit fields containing the information bits, the codec mode indication, and the TX\_TYPE. TX\_TYPE shall be used to specify the contents of the frame. The table below provides an overview of the different TX\_TYPES used and explains the required contents in the information bit and the mode indication bit fields. + +**Table 1: SCR TX\_TYPE identifiers for UMTS\_AMR and UMTS\_AMR2** + +| TX_TYPE | Information Bits | Mode Indication | +|----------------|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------| +| SPEECH_GOOD | Speech frame, size 95..244 bits, depending on codec mode | Current codec mode | +| SPEECH_BAD | Corrupt speech frame (bad CRC), size 95..244 bits, depending on codec mode | Current codec mode | +| SID_FIRST | Marker for the end of talkspurt, no further information, all 35 comfort noise bits set to "0" | The codec mode that would have been used if TX_TYPE had been "SPEECH_GOOD" | +| SID_UPDATE | 35 comfort noise bits | The codec mode that would have been used if TX_TYPE had been "SPEECH_GOOD" | +| SID_BAD | Corrupt SID update frame (bad CRC) | The codec mode that would have been used if TX_TYPE had been "SPEECH_GOOD" | +| NO_DATA | No useful information, nothing to be transmitted | No useful information | + +TX\_TYPE = "NO\_DATA" indicates that the Information Bit and Codec Mode fields do not contain any useful data (and should not be transmitted over AN). The purpose of this TX\_TYPE is to provide the option to save network transmission between the transcoder and AN. Note, the TX\_TYPEs "SPEECH\_BAD" and "SID\_BAD" may occur in TFO and TrFO situations. + +The scheduling of the frames for transmission on the Access Network is controlled by the TX SCR handler by the use of the TX\_TYPE field. + +### 5.1.2 Functions of the TX SCR handler + +If TX SCR operation is disabled, the TX SCR handler continuously generates speech frames, i.e. frames marked with TX\_TYPE="SPEECH\_GOOD". + +If the TX SCR operation is enabled, the VAD flag controls the TX SCR handler operation as described in the following paragraphs. + +Note that the TX SCR operation is always enabled on the UE side for UMTS AMR and UMTS AMR2 codec types. + +#### 5.1.2.1 AMR SCR Timing procedures + +To allow an exact verification of the TX SCR handler functions, all frames before the reset of the system are treated as if there were speech frames of an infinitely long time. Therefore, and in order to ensure the correct estimation of comfort noise parameters at RX SCR side, the first 7 frames after the reset or after enabling the SCR operation shall always be marked with TX\_TYPE= "SPEECH\_GOOD", even if VAD flag ="0" (hangover period, see figure 3). + +The Voice Activity Detector (VAD) shall operate all the time in order to assess whether the input signal contains speech or not. The output is a binary flag (VAD flag ="1" or VAD flag ="0", respectively) on a frame by frame basis (see [7]). + +The VAD flag controls indirectly, via the TX SCR handler operations described below, the overall SCR operation on the transmit side. + +Whenever VAD flag ="1", the speech encoder output frame along with mode information shall be passed directly to the AN, marked with TX\_TYPE = " SPEECH\_GOOD " + +At the end of a speech burst (transition VAD flag ="1" to VAD flag ="0"), it takes eight consecutive frames to make a new updated SID analysis available (see [6]). Normally, the first seven speech encoder output frames after the end of + +the speech burst shall therefore be passed directly to the AN, marked with TX\_TYPE = " SPEECH\_GOOD " ("hangover period"). + +The end of the speech is then indicated by passing frame eight after the end of the speech burst to the AN, marked with TX\_TYPE = "SID\_FIRST" (see figure 3). SID\_FIRST frames do not contain data. + +![Figure 3: Normal hangover procedure for AMR (N_elapsed > 23). The diagram shows a timeline of frames with VAD flags and TX types. A 'Hangover' period is indicated by a dotted line starting from the 'end of speech burst' (frame 42) and ending at the 'first pause frame' (frame 43). The 'last speech frame' is frame 42. The 'end of speech burst' is frame 42. The 'first pause frame' is frame 43. The 'Hangover' period is from frame 42 to frame 43. The 'Frame (20 ms)' is indicated by a double-headed arrow between frames 43 and 44. The 'N_elapsed' row shows values: e.g., 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 0, 1. The 'TX Type' row shows: S, S, S, S, S, S, S, S, S, F, N, N, U, N. The 'Frames to AN' row shows: S, S, S, S, S, S, S, S, S, F, N, N, U, N. An arrow points from the 'TX Type' label to the 'S' in frame 35.](b8661c6c54f72ecc7ff6cb05e47b2891_img.jpg) + +| | | | | | | | | | | | | | | +|---------------------------|----|----|----|----|----|----|----|----|----|----|----|---|---| +| N elapsed e.g. | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 0 | 1 | +| TX Type | S | S | S | S | S | S | S | S | F | N | N | U | N | +| Frames to AN | S | S | S | S | S | S | S | S | F | N | N | U | N | + +Figure 3: Normal hangover procedure for AMR (N\_elapsed > 23). The diagram shows a timeline of frames with VAD flags and TX types. A 'Hangover' period is indicated by a dotted line starting from the 'end of speech burst' (frame 42) and ending at the 'first pause frame' (frame 43). The 'last speech frame' is frame 42. The 'end of speech burst' is frame 42. The 'first pause frame' is frame 43. The 'Hangover' period is from frame 42 to frame 43. The 'Frame (20 ms)' is indicated by a double-headed arrow between frames 43 and 44. The 'N\_elapsed' row shows values: e.g., 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 0, 1. The 'TX Type' row shows: S, S, S, S, S, S, S, S, S, F, N, N, U, N. The 'Frames to AN' row shows: S, S, S, S, S, S, S, S, S, F, N, N, U, N. An arrow points from the 'TX Type' label to the 'S' in frame 35. + +TX Types: "S" = SPEECH; "F" = SID\_FIRST; "U" = "SID\_UPDATE; "N" = NO DATA +Nelapsed: No. of elapsed frames since last SID\_UPDATE + +**Figure 3: Normal hangover procedure for AMR (Nelapsed > 23)** + +If, however, at the end of the speech burst, less than 24 frames have elapsed since the last SID\_UPDATE frame was computed, then this last analysed SID\_UPDATE frame should be passed to the AN whenever a SID\_UPDATE frame is to be produced, until a new updated SID analysis is available (8 consecutive frames marked with VAD flag = "0"). This reduces the load on the network in cases where short background noise spikes are taken for speech, by avoiding the "hangover" waiting for the SID frame computation. + +Once the SID\_FIRST frame has been passed to the AN, the TX SCR handler shall at regular intervals compute and pass updated SID\_UPDATE (Comfort Noise) frames to the AN as long as VAD flag = "0". SID\_UPDATE frames shall be generated every 8th frame. The first SID\_UPDATE shall be sent as the third frame after the SID\_FIRST frame. + +The speech encoder is operated in full speech modality if TX\_TYPE = " SPEECH\_GOOD " and otherwise in a simplified mode, because not all encoder functions are required for the evaluation of comfort noise parameters and because comfort noise parameters are only to be generated at certain times. + +### 5.1.3 The TX part of the AN + +The TX part of the AN has the following overall functionality. The transmission is cut after the transmission of a SID\_FIRST frame when the speaker stops talking. During speech pauses the transmission is resumed at regular intervals for transmission of one SID\_UPDATE frame, in order to update the generated comfort noise on the RX side. The operation of + +the TX part of the AN is controlled by the TX SCR handler via the TX\_TYPE. + +All frames, marked with SPEECH\_GOOD, SID\_FIRST or SID\_UPDATE shall be transmitted by the TX part of the AN. + +## 5.2 Receive (RX) side + +A block diagram of the receive side SCR functions is shown in Figure 4 below. + +![Block diagram of the receive side SCR functions. The diagram shows three main components: RX SCR handler, De-framing, and RX Access Network. The RX Access Network contains 'AMR Frame Type Detection' and 'Error Correction & Detection'. It sends 'Information bits', 'Frame Type', and 'FQI' to the 'De-framing' block. The 'De-framing' block contains a vertical list of bits: T, S, 2, 6, ., 1, 0, 1. It sends 'Information bits', 'Mode Indication', and 'RX_TYPE' to the 'RX SCR handler'. The 'RX SCR handler' contains 'Speech Decoder', 'Error Concealment', and 'Comfort Noise Generation'.](7e670a2b556b53ea9002dfff3a420e08_img.jpg) + +Block diagram of the receive side SCR functions. The diagram shows three main components: RX SCR handler, De-framing, and RX Access Network. The RX Access Network contains 'AMR Frame Type Detection' and 'Error Correction & Detection'. It sends 'Information bits', 'Frame Type', and 'FQI' to the 'De-framing' block. The 'De-framing' block contains a vertical list of bits: T, S, 2, 6, ., 1, 0, 1. It sends 'Information bits', 'Mode Indication', and 'RX\_TYPE' to the 'RX SCR handler'. The 'RX SCR handler' contains 'Speech Decoder', 'Error Concealment', and 'Comfort Noise Generation'. + +Figure 4: Block diagram of the receive side SCR functions + +### 5.2.1 General operation + +The AN passes all the received traffic frames to the RX SCR handler, classified with RX\_TYPE, as described in Table 2 (see TS 26.102). The RX SCR handles the frame accordingly. + +Table 2: RX\_TYPE identifiers for UMTS\_AMR and UMTS\_AMR2 + +| RX_TYPE | Information Bits | +|--------------------|--------------------------------------------------------------------------------------------| +| SPEECH_GOOD | Speech frame without detected errors. | +| SPEECH_BAD | (likely) speech frame with bad CRC (or estimated to be very bad by the RX part of the AN ) | +| SID_FIRST | This SID-frame marks the beginning of a comfort noise period. | +| SID_UPDATE | Correct SID update frame | +| SID_BAD | Corrupt SID update frame (bad CRC; applicable only for SID_UPDATE frames) | +| NO_DATA | Nothing useable was received. The synthesis mode of the previous frame type is used. | + +### 5.2.3 Demands on the RX SCR handler + +The RX SCR handler is responsible for the overall SCR operation on the RX side. It consists of two main modes: SPEECH and COMFORT\_NOISE. The initial mode shall be SPEECH. + +The SCR operation on the RX side shall be as follows: + +- The RX SCR handler shall enter mode SPEECH, when a frame classified as SPEECH\_GOOD is received. + +whenever a frame classified as SPEECH\_GOOD is received the RX SCR handler shall pass it directly on to the speech decoder; + +- if the RX SCR handler is in mode SPEECH, then frames classified as SPEECH\_BAD or NO\_DATA shall be substituted and muted as defined in [5]. Frames classified as NO\_DATA shall be handled like SPEECH\_BAD frames without valid speech information; + +- frames classified as SID\_FIRST, SID\_UPDATE or SID\_BAD shall bring the RX SCR handler into mode COMFORT\_NOISE and shall result in comfort noise generation, as defined in [6]. SID\_BAD frames shall be substituted and muted as defined in [5];; +- in mode COMFORT\_NOISE the RX SCR handler shall ignore all unusable frames (NO\_DATA, SPEECH\_BAD); comfort noise generation shall continue, until timeout may apply ([5]). + +## 5.3 AMR SID Information format + +The SID\_UPDATE frame format is according to [5]. This is the default and only mandatory operating mode of the SCR handler. + +# --- Annex A (normative): AMR DTX handler for the GSM system (corresponding to GSM 06.93) + +## A.1 Scope + +The present document gives a description of the general baseband operation of Adaptive Multi-Rate speech traffic channels in the transmitter and in the receiver of GSM Mobile Stations (MS)s and Base Station Systems (BSS)s during Discontinuous Transmission (DTX). + +For clarity, the description is structured according to the block diagrams in figures 1 and 3. Except in the case described next, this structure of distributing the various functions between system entities is not mandatory for implementation, as long as the operation on the air interface and on the speech decoder output remains the same. + +In the case of BSSs where the speech transcoder is located remote from the Base Transceiver Station (BTS), the implementation of the interfaces between the DTX handlers and the Radio Sub System (RSS) as described in the present document together with all their flags is mandatory, being part of the A-bis interface as described in GSM 08.60 and GSM 08.61. + +The DTX functions described in this technical specification are mandatory for implementation in the GSM MSs. The receiver requirements are mandatory for implementation in all GSM BSSs, the transmitter requirements only for those where downlink DTX or Tandem Free Operation will be used. + +## --- A.2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TR 21.905:"Vocabulary for 3GPP Specifications". +- [2] 3GPP TS 24.008: "Digital cellular telecommunication system (Phase 2+); Mobile radio interface layer 3 specification". +- [3] 3GPP TS 45.003: "Digital cellular telecommunication system (Phase 2+); Channel coding". +- [4] 3GPP TS 45.005: "Digital cellular telecommunication system (Phase 2+); Radio transmission and reception". +- [5] 3GPP TS 45.008: "Digital cellular telecommunication system (Phase 2+); Radio subsystem link control". +- [6] 3GPP TS 45.009: "Digital cellular telecommunication system (Phase 2+); Link adaptation". +- [7] 3GPP TS 26.071: "Digital cellular telecommunications system (Phase 2+); Adaptive Multi-Rate (AMR) speech processing functions; General description". +- [8] 3GPP TS 26.073: "Digital cellular telecommunications system (Phase 2+); ANSI-C code for the GSM Adaptive Multi-Rate speech codec". +- [9] 3GPP TS 26.074: "Digital cellular telecommunications system (Phase 2); Test vectors for the GSM Adaptive Multi-Rate speech codec". + +- [10] 3GPP TS 26.090: "Digital cellular telecommunications system (Phase 2+); Adaptive Multi-Rate speech transcoding". +- [11] 3GPP TS 26.091: "Digital cellular telecommunications system (Phase 2+); Substitution and muting of lost frame for Adaptive Multi-Rate speech traffic channels". +- [12] 3GPP TS 26.092: "Digital cellular telecommunications system (Phase 2+); Comfort noise aspects for Adaptive Multi-Rate speech traffic channels". +- [13] 3GPP TS 26.094: "Digital cellular telecommunications system (Phase 2+); Voice Activity Detector (VAD) for Adaptive Multi-Rate speech traffic channels". +- [14] 3GPP TS 28.060: "Digital cellular telecommunication system (Phase 2+); Inband control of remote transcoders and rate adaptors for Full Rate traffic channels". +- [15] 3GPP TS 28.061: "Digital cellular telecommunication system (Phase 2+); Inband Control of Remote Transcoders and Rate Adaptors for Half Rate traffic channels". +- [16] 3GPP TS 28.062: " Digital cellular telecommunications system; Inband Tandem Free Operation (TFO) of Speech Codecs". + +## --- A.3 Definitions, symbols and abbreviations + +### A.3.1 Definitions + +For the purpose of the present document, the following definitions apply. + +**frame:** Time interval of 20 ms, corresponding to the time segmentation of the Adaptive Multi Rate speech transcoder (3GPP TS 26.090 [9]), also used as a short term for a traffic frame. + +**traffic frame:** Block of 95..244 information bits transmitted on the TCH/AFS or TCH/AHS speech traffic channels. + +**SID frame:** Frame characterised by the SID (Silence Descriptor) gross bit patterns. It may convey information on the acoustic background noise. + +**speech frame:** Traffic frame that has been classified as a SPEECH frame. + +**VAD flag:** Boolean flag, generated by the VAD algorithm defined in 3GPP TS 26.094 indicating the presence ("1") or the absence ("0") of a speech frame. + +**RX\_TYPE:** flag with eight values, generated by the RX radio subsystem, indicating to the RX DTX handler the type of data in the current frame. Refer to Table 2. + +**TX\_TYPE:** flag with eight values, generated by the TX DTX handler, indicating to the TX radio subsystem the type of data in the current frame. Refer to Table 1. + +**hangover period:** A period of 7 frames added at the end of a speech burst in which VAD flag ="0" and TX\_TYPE is "SPEECH". + +### A.3.2 Symbols + +For the purpose of the present document, the following symbols apply. + +| | | +|----------------------|------------------------------------------------------------| +| $N_{\text{elapsed}}$ | Number of elapsed frames since the last updated SID frame. | +|----------------------|------------------------------------------------------------| + +### A.3.3 Abbreviations + +For the purpose of the present document, the following abbreviations apply. + +| | | +|-----|--------------------------| +| BSC | Base Station Controller | +| BSS | Base Station System | +| BTS | Base Transceiver Station | +| CHD | Channel Decoder | + +| | | +|---------|-------------------------------------------------| +| CHE | Channel Encoder | +| DTX | Discontinuous Transmission | +| ETS | European Telecommunication Standard | +| FACCH | Fast Associated Control CHannel | +| GSM | Global System for Mobile Telecommunications | +| MS | Mobile Station | +| RATSCCH | Robust Amr Traffic Synchronised Control CHannel | +| RSS | Radio Sub System | +| RX | Receive | +| SACCH | Slow Associated Control CHannel | +| SID | SIlence Descriptor | +| TX | Transmit | +| VAD | Voice Activity Detector | + +For abbreviations not given in this subclause, see 3GPP TS 21.004. + +## --- A.4 General + +Discontinuous Transmission (DTX) is a mechanism, which allows the radio transmitter to be switched off most of the time during speech pauses for the following two purposes: + +to save power in the Mobile Station (MS); + +to reduce the overall interference level over the air interface. + +DTX in uplink shall be in operation within the GSM MS, if commanded so by the network, see 3GPP TS 204.08. The MS shall handle DTX in downlink at any time, regardless, whether DTX in uplink is commanded or not. + +### A.4.1 General organisation + +The overall DTX mechanism described in the present document requires the following functions: + +a Voice Activity Detector (VAD) on the transmit (TX) side; + +evaluation of the background acoustic noise on the transmit (TX) side, in order to transmit characteristic parameters to the receive (RX) side; + +generation on the receive (RX) side of a similar noise, called comfort noise, during periods where the radio transmission is switched off. + +The Voice Activity Detector (VAD) is defined in 3GPP TS 26.094 and the comfort noise functions in 3GPP TS 26.092. Both are based partly on the speech transcoder and its internal variables, defined in 3GPP TS 26.090. + +In addition to these functions, if the parameters arriving at the RX side are detected to be seriously corrupted by errors, the speech or comfort noise must be generated from substituted data in order to avoid seriously annoying effects for the listener. This function is defined in 3GPP TS 26.091. + +An overall description of the speech processing parts can be found in 3GPP TS 26.071. + +The description for Tandem Free Operation is given in 3GPP TS 28.062. + +## --- A.5 Transmit (TX) side + +A block diagram of the transmit side DTX functions is shown in figure 5. + +![Figure 5: Block diagram of the transmit side DTX functions. The diagram shows two main components: TX DTX handler and TX Radio subsystem. The TX DTX handler contains three sub-blocks: Speech encoder, Voice Activity Detector, and Comfort Noise Computation. The TX Radio subsystem contains two sub-blocks: Channel Encoder and TX_TYPE Monitoring. Arrows indicate the flow of data: Information bits from Speech encoder to Channel Encoder; Mode Indication from Voice Activity Detector to Channel Encoder; TX_TYPE from Comfort Noise Computation to TX_TYPE Monitoring; and NSYNC from TX_TYPE Monitoring back to Comfort Noise Computation.](1a827b10290f33d4fec04d0e8ef7a897_img.jpg) + +``` + +graph LR + subgraph TX_DTX_handler [TX DTX handler] + SE[Speech encoder] + VAD[Voice Activity Detector] + CNC[Comfort Noise Computation] + end + subgraph TX_Radio_subsystem [TX Radio subsystem] + CE[Channel Encoder] + TM[TX_TYPE Monitoring] + end + SE -- "Information bits" --> CE + VAD -- "Mode Indication" --> CE + CNC -- "TX_TYPE" --> TM + TM -- "NSYNC" --> CNC + +``` + +Figure 5: Block diagram of the transmit side DTX functions. The diagram shows two main components: TX DTX handler and TX Radio subsystem. The TX DTX handler contains three sub-blocks: Speech encoder, Voice Activity Detector, and Comfort Noise Computation. The TX Radio subsystem contains two sub-blocks: Channel Encoder and TX\_TYPE Monitoring. Arrows indicate the flow of data: Information bits from Speech encoder to Channel Encoder; Mode Indication from Voice Activity Detector to Channel Encoder; TX\_TYPE from Comfort Noise Computation to TX\_TYPE Monitoring; and NSYNC from TX\_TYPE Monitoring back to Comfort Noise Computation. + +Figure 5: Block diagram of the transmit side DTX functions + +### A.5.1 General operation + +The TX DTX handler passes traffic frames, individually marked by TX\_TYPE, to the Radio Subsystem (RSS). Each frame passed to the RSS consists of bit fields containing the information bits, the codec mode indication, and the TX\_TYPE. TX\_TYPE is used to specify the contents of the frame. The table below provides an overview of the different TX\_TYPEs used and explains the required contents in the information bit and the mode indication bit fields. In case of ongoing Tandem Free Operation (see 3GPP TS 28.062) frames with errors may arrive in downlink in the BTS. + +Table 3: TX TYPE identifiers + +| TX_TYPE Legend | Information Bits | Mode Indication | +|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------| +| SPEECH_GOOD | speech frame, size 95..244 bits depending on codec mode; no errors known. | current code mode | +| SPEECH_DEGRADED
(only in downlink in TFO) | Speech frame, size 95..244 bits, depending on codec mode; there might be errors in class 2 bits. | current codec mode | +| SPEECH_BAD
(only in downlink in TFO) | Speech frame, size 95..244 bits, depending on codec mode; there are errors in class 1 bits. | current codec mode | +| SID_FIRST | marks the end of a talkspurt, respectively the beginning of a speech pause; does not contain information bits. | the codec mode that would have been used if TX_TYPE had been SPEECH | +| SID_UPDATE | comfort noise, 35 bits; no errors known | the codec mode that would have been used if TX_TYPE had been SPEECH | +| SID_BAD
(only in downlink in TFO) | comfort noise, 35 bits; errors detected, parameters unusable | the codec mode that would have been used if TX_TYPE had been SPEECH | +| ONSET
(only in downlink in TFO) | announces the beginning of a speech burst; does not contain information bits | the codec mode of the following speech frame | +| NO_DATA | no useful information | no useful information | + +TX\_TYPE = “NO\_DATA” indicates that the Information Bit and Codec Mode fields do not contain any useful data (and shall not be transmitted over the air interface). The purpose of this TX\_TYPE is to provide the option to save transmission between the transcoder and the radio base station if a packet oriented transmission is used. + +The scheduling of the frames for transmission on the air interface is controlled by the TX DTX handler by the use of the TX\_TYPE field. + +#### A.5.1.1 Functions of the TX DTX handler + +To allow an exact verification of the TX DTX handler functions, all frames before the reset of the system are treated as if there were speech frames of an infinitely long time. Therefore, and in order to ensure the correct estimation of comfort noise parameters at RX DTX side, the first 7 frames after the reset or after enabling the DTX operation shall always be marked with TX\_TYPE= " SPEECH\_GOOD ", even if VAD flag ="0" (hangover period, see figure 2). + +The Voice Activity Detector (VAD) shall operate all the time in order to assess whether the input signal contains speech or not. The output is a binary flag (VAD flag = "1" or VAD flag = "0", respectively) on a frame by frame basis (see 3GPP TS 26.094). + +The VAD flag controls indirectly, via the TX DTX handler operations described below, the overall DTX operation on the transmit side. + +Whenever VAD flag = "1", the speech encoder output frame along with mode information shall be passed directly to the radio subsystem (RSS), marked with TX\_TYPE = " SPEECH\_GOOD " + +At the end of a speech burst (transition VAD flag = "1" to VAD flag = "0"), it takes 8 consecutive frames to make a new updated SID analysis available at receiver side (see 3GPP TS 26.092). Normally, the first 7 speech encoder output frames after the end of the speech burst shall therefore be passed directly to the RSS, marked with TX\_TYPE = " SPEECH\_GOOD " ("hangover period"). The end of the speech is then indicated by passing frame 8 after the end of the speech burst to the RSS, marked with TX\_TYPE = "SID\_FIRST" (see figure 2). + +![Figure 6: Normal hangover procedure (N_elapsed > 23). The diagram shows a timeline of VAD flag states and a corresponding table of transmitted frames. The VAD flag is high (speech) until the 'last speech frame', then drops to low (pause) at the 'end of speech burst'. A 'Hangover' period of 8 frames follows, starting with the 'first pause frame'. The 'end of speech burst' occurs at the start of the 8th frame of the hangover. Below the timeline, a table shows frames 35 to 45, 0, and 1. Frames 35-42 are 'S' (Speech), frame 43 is 'F' (SID_FIRST), frames 44-45 are 'N' (No Data), frame 0 is 'U' (SID_UPDATE), and frame 1 is 'N' (No Data). An arrow points from the 'last speech frame' label to the start of the hangover period. Another arrow points from the 'end of speech burst' label to the start of frame 43. A third arrow points from the 'first pause frame' label to the start of frame 36. A fourth arrow points from the 'Hangover' label to the period from frame 36 to 42. A fifth arrow points from the 'Frame (20 ms)' label to a single frame interval. A sixth arrow points from the 'TX Type' label to the 'S' in frame 35.](36117e9cb27c58484cd8d3e5f9dc7ac3_img.jpg) + +| | | | | | | | | | | | | | | +|---------------------------|---------|----|----|----|----|----|----|----|----|----|----|---|---| +| N elapsed e.g. | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 0 | 1 | +| | S | S | S | S | S | S | S | S | F | N | N | U | N | +| Frames to RSS | TX Type | | | | | | | | | | | | | + +Figure 6: Normal hangover procedure (N\_elapsed > 23). The diagram shows a timeline of VAD flag states and a corresponding table of transmitted frames. The VAD flag is high (speech) until the 'last speech frame', then drops to low (pause) at the 'end of speech burst'. A 'Hangover' period of 8 frames follows, starting with the 'first pause frame'. The 'end of speech burst' occurs at the start of the 8th frame of the hangover. Below the timeline, a table shows frames 35 to 45, 0, and 1. Frames 35-42 are 'S' (Speech), frame 43 is 'F' (SID\_FIRST), frames 44-45 are 'N' (No Data), frame 0 is 'U' (SID\_UPDATE), and frame 1 is 'N' (No Data). An arrow points from the 'last speech frame' label to the start of the hangover period. Another arrow points from the 'end of speech burst' label to the start of frame 43. A third arrow points from the 'first pause frame' label to the start of frame 36. A fourth arrow points from the 'Hangover' label to the period from frame 36 to 42. A fifth arrow points from the 'Frame (20 ms)' label to a single frame interval. A sixth arrow points from the 'TX Type' label to the 'S' in frame 35. + +TX Types: "S" = SPEECH; "F" = SID\_FIRST; "U" = "SID\_UPDATE"; "N" = NO DATA +Nelapsed: No. of elapsed frames since last SID\_UPDATE + +**Figure 6: Normal hangover procedure (Nelapsed > 23)** + +If, however, at the end of the speech burst, less than 24 frames have elapsed since the last SID\_UPDATE frame was computed and passed to the RSS, then this last analysed SID\_UPDATE frame shall repeatedly be passed to the RSS whenever a SID\_UPDATE frame is to be produced, until a new updated SID analysis is available (8 consecutive frames marked with VAD flag = "0"). This reduces the activity on the air in cases where short background noise spikes are taken for speech, by avoiding the "hangover" waiting for the SID frame computation. + +Once the first SID analysis after the end of a speech burst has been computed and the SID\_FIRST frame has been passed to the Radio Subsystem, the TX DTX handler shall at regular intervals compute and pass updated SID\_UPDATE (Comfort Noise) frames to the Radio Subsystem (RSS) as long as VAD flag = "0". SID\_UPDATE frames shall be generated every 8th frame. The first SID\_UPDATE shall be sent as the third frame after the SID\_FIRST frame. + +The speech encoder is operated in full speech modality if TX\_TYPE = " SPEECH\_GOOD " and otherwise in a simplified mode, because not all encoder functions are required for the evaluation of comfort noise parameters and because comfort noise parameters are only to be generated at certain times. + +In order to ensure TX/RX DTX handler synchronisation at handover, the uplink TX DTX handler in the MS shall accept messages from TX RSS with control parameter NSYNC, resulting in the following operation during a period of the next NSYNC frames: + +- The TX DTX handler shall send SID\_UPDATE instead of NO\_DATA frames to the TX RSS. +- If, however, during this period of NSYNC frames, VAD flag is equal to 1 at least for one speech frame, TX DTX handler shall send SPEECH frames for the rest of the period of the NSYNC frames. Note the TX DTX handler shall send SPEECH frames at least for the duration of the hangover period. + +#### A.5.1.2 Functions of the TX Radio Subsystem + +The TX Radio Subsystem has the following overall functionality. The radio transmission is cut after the transmission of a SID\_FIRST frame when the speaker stops talking. During speech pauses the transmission is resumed at regular intervals for transmission of one SID\_UPDATE frame, in order to update the generated comfort noise on the RX side (and to improve the measurement of the link quality by the RSS). Note that the transcoder knows what frames to send. In the case when nothing is to be transmitted it outputs frames marked with TX\_TYPE = "NO\_DATA". + +Within the TX Radio Subsystem the TX\_TYPE Monitoring unit controls the operation of the Channel Encoder (as specified in 3GPP TS 25.003) and the Transmission of the frame. Control input to the TX\_TYPE Monitoring unit is the TX\_TYPE. Control output and input to the Channel Encoder are indicators specifying the frame format. These frame format indicators are defined in 3GPP TS 25.003, they are different for TCH/AFS and TCH/AHS. + +##### A.5.1.2.1 Functions of the TX Radio Subsystem for TCH/AFS + +The TX Radio Subsystem operates in the following way regarding DTX (without TFO): + +- all frames marked with TX\_TYPE = " SPEECH\_GOOD " are scheduled for normal channel coding and transmission. The frame format for CHE operation shall be SPEECH. If, however, the previous frame was not of TX\_TYPE = "SPEECH\_GOOD", an ONSET frame format followed by SPEECH\_GOOD shall be signalled to the CHE; +- for frames marked with TX\_TYPE = "SID\_FIRST" a SID\_FIRST frame format is signalled to the CHE; +- frames marked with TX\_TYPE = "SID\_UPDATE" are scheduled for SID\_UPDATE frame channel coding and transmission. The frame format signalled to CHE is SID\_UPDATE; +- for frames marked with TX\_TYPE = "NO\_DATA" no processing or transmission is carried out. + +If a FACCH needs to be sent during a speech pause, and: + +- if the frame preceding the FACCH is not of TX\_TYPE="SPEECH\_GOOD", then an ONSET frame shall be signalled to the CHE, followed by the FACCH frame(s); +- if the frame following the FACCH frame is not of TX\_TYPE="SPEECH\_GOOD", then a SID\_FIRST shall be signalled to the CHE. + +A stolen SID\_UPDATE should be rescheduled on the frame subsequent to the SID\_FIRST marker that follows the FACCH frame(s) (when that marker exists), unless that rescheduling would steal a frame of TX\_TYPE="SPEECH\_GOOD", or if a frame of TX\_TYPE="SID\_UPDATE" has been received before the rescheduling could take place. This rescheduling shall not affect the timing of subsequent SID\_UPDATE frames. + +Note: a SID\_UPDATE frame is considered as stolen when this frame must be replaced by a FACCH frame. + +At handover, TX/RX DTX handler synchronisation shall be initiated. At the time instant before the MS starts sending to the new base station, a message shall be sent to the uplink TX DTX handler with the parameter NSYNC = 12. + +##### A.5.1.2.2 Functions of the TX Radio Subsystem for TCH/AHS + +The TX Radio Subsystem operates in the following way regarding DTX: + +all frames marked with TX\_TYPE = " SPEECH\_GOOD " are scheduled for normal channel coding and transmission. The frame format for CHE operation shall be SPEECH. However, if the previous frame was of TX\_TYPE = "SID\_FIRST", a SID\_FIRST\_INH frame format followed by SPEECH\_GOOD shall be signalled to the CHE. If the previous frame was of TX\_TYPE = "SID\_UPDATE", a SID\_UPDATE\_INH frame format followed by SPEECH\_GOOD shall be signalled to the CHE. If the previous frame was of TX\_TYPE = "NO\_DATA", an ONSET frame format followed by SPEECH\_GOOD shall be signalled to the CHE; + +for frames marked with TX\_TYPE = "SID\_FIRST" a SID\_FIRST\_P1 frame format is signalled to the CHE. Note: All 4 TDMA frames carrying the bits of this frame shall be transmitted. The Mode Indication received with the frame is stored for potential use in the next frame; + +for frames marked with TX\_TYPE = "SID\_UPDATE" a SID\_UPDATE frame format is signalled to the CHE. All 4 TDMA frames carrying the bits of this frame shall be transmitted; + +for frames marked with TX\_TYPE = "NO\_DATA", no processing or transmission is carried out. However, if the preceding frame was marked with TX\_TYPE = "SID\_FIRST", a SID\_FIRST\_P2 frame format is signalled to CHE. Note: The 2 TDMA frames carrying bits of this frame shall be transmitted. If, depending on the current frame number, the Mode Indication is to be transmitted with these TDMA frames, the Mode Indication shall be used that was stored during the processing of the preceding SID\_FIRST frame. + +If a FACCH needs to be sent during a speech pause, and: + +if the frame preceding the FACCH is of TX\_TYPE="SID\_FIRST", then a SID\_FIRST\_INH frame format followed by the FACCH shall be signalled to the CHE; + +if the frame preceding the FACCH is of TX\_TYPE="SID\_UPDATE", then a SID\_UPDATE\_INH frame format followed by the FACCH shall be signalled to the CHE; + +if the frame preceding the FACCH is of TX\_TYPE="NO\_DATA", then an ONSET frame format followed by the FACCH shall be signalled to the CHE; + +if the frame following the FACCH is not of TX\_TYPE="SPEECH\_GOOD", then a SID\_FIRST shall be signalled to the CHE. Both SID\_FIRST\_P1 and SID\_FIRST\_P2 frame formats shall be consecutively signalled to CHE. + +A stolen SID\_UPDATE should be rescheduled on the frame subsequent to the SID\_FIRST\_P1 and SID\_FIRST\_P2 markers that follow the FACCH frame(s) (when these markers exist), unless that rescheduling would steal a frame of TX\_TYPE="SPEECH\_GOOD", or if a frame of TX\_TYPE="SID\_UPDATE" has been received before the rescheduling could take place. This rescheduling shall not affect the timing of subsequent SID\_UPDATE frames. + +Note: a SID\_UPDATE frame is considered as stolen when this frame must be replaced by a FACCH frame. + +At handover, TX/RX DTX handler synchronisation shall be initiated. At the time instant before the MS starts sending to the new base station, a message shall be sent to the uplink TX DTX handler with the parameter NSYNC = 12. + +##### A.5.1.2.3 Functions of the Downlink TX Radio Subsystem for TFO + +The TX Radio Subsystem in the BTS shall in addition operate in the following way regarding DTX, if TFO is ongoing (see 3GPP TS 28.062): + +- Frames with TX\_TYPE = SPEECH\_GOOD, SID\_FIRST and SID\_UPDATE shall be handled as usual in DTX, regardless whether DTX in downlink is requested or not. Also NO\_DATA shall be handled as usual, if DTX is requested. +- Frames with TX\_TYPE = NO\_DATA shall be replaced by SID\_FILLER frames, if DTX in downlink is not requested. By this the radio transmission continues in downlink, although no parameters are transmitted in speech pauses on the Abis interface. The MS generates Comfort Noise in these speech pauses. +- Frames with TX\_TYPE = SPEECH\_DEGRADED shall be handled exactly like SPEECH\_GOOD frames. +- For frame with TX\_TYPE = SPEECH\_BAD and SID\_BAD the CHE shall perform its regular processing, but then shall invert the six, respectively 14 CRC bits before convolutional encoding and transmitting the frames on the air interface. By this the error concealment mechanism in the MS is triggered to handle these corrupted frames. +- ONSET frames may be ignored by the TX Radio Subsystem and need not to be processed. + +**Definition:** SID\_FILLER frames are like SID\_BAD frames, but with all information bits set to "1". The 14 CRC bits shall artificially be inverted by the CHE before convolutional encoding and transmission. + +##### A.5.1.2.4 Functions of the TX Radio Subsystem for RATSCCH + +During regular speech transmission (in the middle of a speech burst) RATSCCH replaces (steals) one (TCH/AFS) respectively two (TCH/AHS) speech frames (see 3GPP TS 25.009). Also in all non speech cases the RATSCCH shall be handled like speech. The respective RATSCCH frame formats (RATSCCH in case of TCH/AFS, respectively RATSCCH\_MARKER and RATSCCH\_DATA in case of TCH/AHS) shall be signalled to the CHE. + +RATSCCH should be handled in the same way as a FACCH. + +## A.6 Receive (RX) side + +A block diagram of the receive side DTX functions is shown in figure 7. + +![Block diagram of the receive side DTX functions. The diagram shows two main components: RX DTX handler and RX Radio subsystem. The RX DTX handler contains three sub-blocks: Speech Decoder, Comfort Noise Generation, and Error Concealment. The RX Radio subsystem contains three sub-blocks: Error Correction & Detection, SID frame Detection, and Mode Detection. Arrows indicate data flow: Information bits from Error Correction & Detection to Speech Decoder; Mode Indication from SID frame Detection to Comfort Noise Generation; and RX_TYPE from Mode Detection to Error Concealment.](3da1a07cb87051bf616c9876db958cf0_img.jpg) + +``` + +graph LR + subgraph RX_DTX_handler [RX DTX handler] + SD[Speech Decoder] + CNG[Comfort Noise Generation] + EC[Error Concealment] + end + subgraph RX_Radio_subsystem [RX Radio subsystem] + ECD[Error Correction & Detection] + SFD[SID frame Detection] + MD[Mode Detection] + end + ECD -- "Information bits" --> SD + SFD -- "Mode Indication" --> CNG + MD -- "RX_TYPE" --> EC + +``` + +Block diagram of the receive side DTX functions. The diagram shows two main components: RX DTX handler and RX Radio subsystem. The RX DTX handler contains three sub-blocks: Speech Decoder, Comfort Noise Generation, and Error Concealment. The RX Radio subsystem contains three sub-blocks: Error Correction & Detection, SID frame Detection, and Mode Detection. Arrows indicate data flow: Information bits from Error Correction & Detection to Speech Decoder; Mode Indication from SID frame Detection to Comfort Noise Generation; and RX\_TYPE from Mode Detection to Error Concealment. + +Figure 7: Block diagram of the receive side DTX functions + +### A.6.1 General operation + +Whatever their context (speech, SID, FACCH or none), the RSS continuously passes the received traffic frames to the RX DTX handler, individually marked by various pre-processing functions with RX\_TYPE as described in subclause 6.1.1 and table 2, which serves to classify the traffic frame. This classification allows the RX DTX handler to determine in a simple way how the received frame is to be handled. + +Table 4: RX\_TYPE identifiers + +| RX_TYPE Legend | Description | +|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| SPEECH_GOOD | Speech frame with CRC OK, Channel Decoder soft values also OK | +| SPEECH_DEGRADED | Speech frame with CRC OK, but 1B bits and class2 bits may be corrupted | +| SPEECH_BAD | ((likely) speech frame, bad CRC (or very bad Channel Decoder measures) | +| SID_FIRST | first SID marks the beginning of a comfort noise period | +| SID_UPDATE | SID update frame (with correct CRC) | +| SID_BAD | Corrupt SID update frame (bad CRC; applicable only for SID_UPDATE frames) | +| ONSET | ONSET frames precede the first speech frame of a speech burst | +| NO_DATA | Nothing useable (for the speech decoder) was received. This applies for the cases of no received frames (DTX) or received FACCH or RATSCCH or SID_FILLER signalling frames. | + +#### A.6.1.1 Functions of the RX radio subsystem + +The RX radio subsystem uses a combination of gross-bit markers, receiver measurements, and CRC checks to classify each received frame. The basic operation for each frame is outlined below: + +the receiver first searches for the RATSCCH, SID\_UPDATE, SID\_FIRST or ONSET gross bit markers. + +If the RATSCCH signalling is detected, then the RATSCCH frame (TCH/AFS) respectively the RATSCCH\_MARKER and RATSCCH\_DATA frames (TCH/AHS) shall be decoded and handled as described in 3GPP TS 25.009. They shall be passed to the RX DTX handler as a NO\_DATA frame(s). + +If the SID\_FIRST marker is detected the frame is passed to the RX DTX handler as a SID\_FIRST frame. + +If the SID\_UPDATE marker is detected, then the frame shall be decoded and passed to the RX DTX handler as a SID\_UPDATE or a SID\_BAD or a NO\_DATA frame, depending on the CRC and the information bits, along + +with the comfort noise parameters, if applicable. A NO\_DATA frame shall be passed on, if all information bits of a SID\_UPDATE frame are set to "1" and the CRC is bad (see SID\_FILLER in subclause 5.1.2.3). + +- If the ONSET marker is detected, then an ONSET frame shall be passed to the RX DTX handler. + +if neither SID\_UPDATE nor SID\_FIRST markers are detected, the frame shall be channel decoded assuming it to be a speech frame. Depending on the CRC for speech frame channel decoding along with other receiver measurements the frame shall then be passed to the RX DTX handler marked as either SPEECH\_GOOD, SPEECH\_DEGRADED, SPEECH\_BAD or NO\_DATA frame. + +#### A.6.1.2 Functions of the RX DTX handler + +The RX DTX handler is responsible for the overall DTX operation on the RX side. It consists of two main modes: SPEECH and COMFORT\_NOISE. The initial mode shall be SPEECH. + +The DTX operation on the RX side shall be as follows: + +The RX DTX handler shall enter mode SPEECH, when a frame classified as SPEECH\_GOOD or SPEECH\_DEGRADED is received. ONSET frames may be taken into account to identify the beginning of a speech burst; + +whenever a frame classified as SPEECH\_GOOD is received the RX DTX handler shall pass it directly on to the speech decoder; + +if the RX DTX handler is in mode SPEECH, then frames classified as SPEECH\_DEGRADED, SPEECH\_BAD or NO\_DATA shall be substituted and muted as defined in 3GPP TS 26.091. Frames classified as NO\_DATA shall be handled like SPEECH\_BAD frames without valid speech information; + +frames classified as SID\_FIRST, SID\_UPDATE or SID\_BAD shall bring the RX DTX handler into mode COMFORT\_NOISE and shall result in comfort noise generation, as defined in 3GPP TS 26.092. SID\_BAD frames shall be substituted and muted as defined in 3GPP TS 26.091. In mode COMFORT\_NOISE the RX DTX handler shall ignore all unusable frames (NO\_DATA, SPEECH\_BAD) delivered by the RSS; comfort noise generation shall continue, until timeout may apply (see 3GPP TS 26.091). + +# --- Annex B (normative): ETSI GSM-EFR SCR handler + +The interworking operation of AMR (only 12.2 kbit/s mode) with GSM-EFR is F.F.S. This annex provides the basis for the AMR operation under this condition. + +--- + +## Transmit (TX) side + +Speech coding internetworking aspects with ETSI-EFR are described in [TBD]. + +### General operation + +The TX SCR handler passes traffic frames, individually marked by TX\_TYPE, to the TX Framing Unit part of the Access Network. Each frame passed to the AN consists of bit fields containing the information bits, the codec mode indication, and the TX\_TYPE. TX\_TYPE shall be used to specify the contents of the frame. The table below provides an overview of the different TX\_TYPEs used and explains the required contents in the information bit and the mode indication bit fields. + +**Table 5: TX TYPE identifiers for GSM-EFR** + +| TX TYPE | Legend | Information Bits | Mode Indication | +|---------|------------|----------------------------------------------|--------------------------------------------------------------------------| +| 00 | SPEECH | speech frame, size depending on codec mode | current codec mode | +| 10 | SID_UPDATE | comfort noise information , information bits | the codec mode that would have been used if TX_TYPE had been 00 (SPEECH) | +| 11 | NO_DATA | no useful information | no useful information | + +TX\_TYPE = “NO\_DATA” indicates that the Information Bit and Codec Mode fields do not contain any useful data (and should not be transmitted over AN). The purpose of this TX\_TYPE is to provide the option to save network transmission between the transcoder and AN. + +The scheduling of the frames for transmission on the Access Network is controlled by the TX SCR handler by the use of the TX\_TYPE field and the given SCR operation mode. + +### Functions of the TX SCR handler + +## GSM-EFR SCR Timing procedures + +To allow an exact verification of the TX SCR handler functions, all frames before the reset of the system are treated as if there were speech frames of an infinitely long time. + +The SID\_UPDATE timing is according to ETSI GSM 06.81. + +## The TX part of the AN + +## Demands on the TX part of the Access Network + +The TX part of the AN operates in the following way regarding SCR: + +- frames marked with TX\_TYPE = (SPEECH) are scheduled for transmission. +- frames marked with TX\_TYPE = (SID\_UPDATE) are scheduled for transmission +- for frames marked with TX\_TYPE = (NO\_DATA) no processing or transmission is carried out. + +SPEECH frames shall override other frames in these exceptional cases. + +## Receive (RX) side + +Whatever their context (speech, SID, or none), the deframing unit after AN continuously passes the received traffic frames to the RX SCR handler, individually marked by various pre-processing functions with a 3 bit type indicator RX\_TYPE described in Table 4, which serve to classify the traffic frame. This classification allows the RX SCR handler to determine in a simple way how the received frame is to be handled. + +**Table 6: RX\_TYPE identifiers for GSM-EFR** + +| RX TYPE | Legend | Description | +|----------------|--------------------|----------------------------------------------------------------------------------------| +| 000 | SPEECH_GOOD | Speech frame with CRC OK, soft values in the RX part of AN also OK | +| 001 | SPARE | Spare | +| 010 | SPEECH_BAD | (likely) speech frame, bad CRC (or estimated to be very bad by the RX part of the AN ) | +| 011 | SPARE | Spare | +| 100 | SPARE | Spare | +| 101 | SID_UPDATE | Correct SID update frame | +| 110 | SID_BAD | Corrupt SID update frame (bad CRC ; applicable only for SID_UPDATE frames) | +| 111 | NO_DATA | Nothing useable was received. The synthesis mode of the previous frame type is used. | + +## SID Information format + +When the TX SCR handler is ordered by the network to operate in ETSI GSM-EFR mode with SCR operation turned on the SID\_UPDATE frame format is according to ETSI GSM 06.62. (38 +5 bits ). + +# --- Annex C (normative): TIA IS-641 SCR Handler + +The interworking operation of AMR (only 7.4 kbit/s mode) with IS-641 (TDMA-EFR) is F.F.S. This annex provides the basis for the AMR operation under this condition. + +## --- TX-side + +F.F.S + +## --- RX-side + +F.F.S + +## --- SID Information format + +When the TX SCR handler is ordered by the network to operate in IS-641 mode with SCR operation turned on the SID\_UPDATE frame format is according to IS-641-A Chapter 6 The SID\_UPDATE timing is according to IS 641-A. + +Speech coding internetworking aspects with IS-641 are described in [TBD]. + +# --- Annex D (normative): TIA TDMA-US1 SCR Handler + +The interworking operation of AMR (only 12.2 kbit/s mode) with TDMA-US1 is F.F.S. This annex provides the basis for the AMR operation under this condition. + +## --- TX-side + +F.F.S + +## --- RX-side + +F.F.S + +## --- SID Information format + +F.F.S. + +# --- Annex E (normative): ARIB PDC-EFR SCR Handler + +The interworking operation of AMR (only 6.7 kbit/s mode) with PDC-EFR-6.7 is F.F.S. This annex provides the basis for the AMR operation under this condition. + +--- + +## Transmit (TX) side + +### General operation + +The TX SCR handler passes traffic frames, individually marked by TX\_TYPE, to the TX Framing Unit part of the Access Network. Each frame passed to the AN consists of bit fields containing the information bits, the codec mode indication, and the TX\_TYPE. TX\_TYPE shall be used to specify the contents of the frame. The table below provides an overview of the different TX\_TYPEs used and explains the required contents in the information bit and the mode indication bit fields. + +**Table 7: TX TYPE identifiers for PDC\_EFR** + +| TX TYPE | Legend | Information Bits | Mode Indication | +|---------|-----------------------------------------------------------------|----------------------------------------------|--------------------------------------------------------------------------| +| 000 | SPEECH | speech frame, size depending on codec mode | current code mode | +| 010 | POST1 | comfort noise information , information bits | the codec mode that would have been used if TX_TYPE had been 00 (SPEECH) | +| 011 | NO_DATA | no useful information | no useful information | +| 001 | POST0

(end of speech marker,
start of CN generation ) | no useful information, | the codec mode that would have been used if TX_TYPE had been 00 (SPEECH) | +| 100 | PRE

(end of CN marker, start
of speech generation ) | no useful information, | the codec mode that would have been used if TX_TYPE had been 00 (SPEECH) | + +TX\_TYPE = “NO\_DATA” indicates that the Information Bit and Codec Mode fields do not contain any useful data (and should not be transmitted over AN). The purpose of this TX\_TYPE is to provide the option to save network transmission between the transcoder and AN. + +The scheduling of the frames for transmission on the Access Network is controlled by the TX SCR handler by the use of the TX\_TYPE field and the given SCR operation mode. + +Speech coding internetworking aspects with PDC-EFR are described in XX.YY.D.[TBD] + +### Functions of the TX SCR handler + +## PDC\_EFR SCR Timing procedures + +To allow an exact verification of the TX SCR handler functions, all frames before the reset of the system are treated as if there were speech frames of an infinitely long time. + +SID-frame timing is according to ARIB XXX. + +## The TX part of the AN + +## Demands on the TX part of the Access Network + +The TX part of the AN operates in the following way regarding SCR: + +- frames marked with TX\_TYPE = (SPEECH) are scheduled for transmission. +- frames marked with TX\_TYPE = (POST0) are scheduled for transmission. +- frames marked with TX\_TYPE = (POST1) are scheduled for transmission +- frames marked with TX\_TYPE = (PRE) are scheduled for transmission +- for frames marked with TX\_TYPE = (NO\_DATA) no processing or transmission is carried out. + +SPEECH frames shall override other frames in these exceptional cases. + +## Receive (RX) side + +Whatever their context (speech, SID, or none), the deframing unit after AN continuously passes the received traffic frames to the RX SCR handler, individually marked by various pre-processing functions with a 3 bit type indicator RX\_TYPE described in Table 6, which serve to classify the traffic frame. This classification allows the RX SCR handler to determine in a simple way how the received frame is to be handled. + +**Table 8: RX\_TYPE identifiers for PDC\_EFR** + +| RX TYPE | Legend | Description | +|----------------|--------------------|----------------------------------------------------------------------------------------| +| 000 | SPEECH_GOOD | Speech frame with CRC OK, soft values in the RX part of AN also OK | +| 001 | PRE | Next frame should be a Speech frame | +| 010 | SPEECH_BAD | (likely) speech frame, bad CRC (or estimated to be very bad by the RX part of the AN ) | +| 011 | SPARE | Spare | +| 100 | POST0 | This SID-frame marks the beginning of a comfort noise period. | +| 101 | POST1 | Correct SID update frame | +| 110 | POST1_BAD | Corrupt SID update frame (bad CRC; applicable only for POST1 frames) | +| 111 | NO_DATA | Nothing useable was received. The synthesis mode of the previous frame type is used. | + +## SID information format + +When the TX SCR Handler is ordered by the network to operate in PDC-EFR mode with SCR turned on the SID\_UPDATE frame format is according to ARIB TBD (134 bits). + +# Annex F (informative): Change history + +| History | | | | | | | | | | +|----------------|---------------------------|-----------|------|-----|-----|-----------------------------------------------------------------------------------------------------------------------|--------|--------|-------| +| 1999-06 | Approved at S#4 Plenary | | | | | | | | 3.0.0 | +| 1999-08 | Reformatted in 3GPP style | | | | | | | | 3.0.1 | +| Change history | | | | | | | | | | +| Date | TSG # | TSG Doc. | CR | Rev | Cat | Subject/Comment | Old | New | | +| - | - | SP-99570 | 0001 | 2 | - | Alignment to GSM 06.93 | 3.0.1 | 3.1.0 | | +| - | - | SP-00262 | 0002 | | - | Re-scheduling of stolen SID_UPDATE Frames for AMR | 3.1.0 | 3.2.0 | | +| - | - | SP-000574 | 0003 | 1 | - | Re-scheduling of stolen SID_UPDATE frames for AMR (Part 2) | 3.2.0 | 3.3.0 | | +| - | - | SP-000574 | 0005 | | - | Re-scheduling of stolen SID_UPDATE frames by SID_FIRST frames for AMR Clarification of Hangover period after Handover | 3.2.0 | 3.3.0 | | +| - | - | SP-000574 | 0004 | | - | Re-scheduling of stolen SID_UPDATE frames for AMR (Part 2) | 3.2.0 | 4.0.0 | | +| - | - | SP-000574 | 0006 | | - | Re-scheduling of stolen SID_UPDATE frames by SID_FIRST frames for AMR Clarification of Hangover period after Handover | 3.2.0 | 4.0.0 | | +| - | - | | | | - | Version for Release 5 | 4.0.0 | 5.0.0 | | +| - | - | SP-020436 | 0009 | | - | Correction of Codec Type Names | 5.0.0 | 5.1.0 | | +| - | - | SP-020688 | 0010 | 3 | - | Correction of uplink SCR operation activation for UMTS AMR | 5.1.0 | 5.2.0 | | +| - | - | SP-030086 | 0011 | | - | Handling of FACCH and RATSCCH during AMR DTX | 5.2.0 | 6.0.0 | | +| - | - | SP-060356 | 0012 | 2 | - | Correction of references | 6.0.0 | 6.1.0 | | +| - | - | - | - | - | - | Version for Release 7 | 6.1.0 | 7.0.0 | | +| 2008-12 | SP-42 | - | - | - | - | Version for Release 8 | 7.0.0 | 8.0.0 | | +| 2009-12 | SP-46 | | | | | Version for Release 9 | 8.0.0 | 9.0.0 | | +| 2011-03 | SP-51 | | | | | Version for Release 10 | 9.0.0 | 10.0.0 | | +| 2012-09 | SP-57 | | | | | Version for Release 11 | 10.0.0 | 11.0.0 | | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26094/124c6108c63173818afb8ed49521e22d_img.jpg b/marked/Rel-11/26_series/26094/124c6108c63173818afb8ed49521e22d_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..15d339b16345d480c8365ec39899eaed4d2701fb --- /dev/null +++ b/marked/Rel-11/26_series/26094/124c6108c63173818afb8ed49521e22d_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f3c364cb30cb4b3b799c4b32ee19e1847dd058838194ddfa2c3c1edb6f5fcc7 +size 73850 diff --git a/marked/Rel-11/26_series/26094/b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg b/marked/Rel-11/26_series/26094/b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..06985567e7f487e1e400fb997d1bef43ef2a3317 --- /dev/null +++ b/marked/Rel-11/26_series/26094/b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ead4185551e9a97f056fec69d34a54b6530f6de026fb546748c04e3f27065c0a +size 42309 diff --git a/marked/Rel-11/26_series/26094/d0abac95583b52a3b35f74a215567334_img.jpg b/marked/Rel-11/26_series/26094/d0abac95583b52a3b35f74a215567334_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7488ca2a654b654eea2e8b69c4b43eb5911d9efe --- /dev/null +++ b/marked/Rel-11/26_series/26094/d0abac95583b52a3b35f74a215567334_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75ee0796b9eacdd00a4b84bdb99271591989494956fff9b0900667084287d146 +size 70732 diff --git a/marked/Rel-11/26_series/26094/raw.md b/marked/Rel-11/26_series/26094/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..db0370980ffc786becf3ef7e34754f3ecabe589b --- /dev/null +++ b/marked/Rel-11/26_series/26094/raw.md @@ -0,0 +1,995 @@ + + + + + + +# Contents + +| | | +|----------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Technical Description of VAD Option 1 ..... | 5 | +| 3.1 Definitions, symbols and abbreviations ..... | 5 | +| 3.1.1 Definitions ..... | 5 | +| 3.1.2 Symbols ..... | 5 | +| 3.1.2.1 Variables ..... | 5 | +| 3.1.2.2 Constants..... | 6 | +| 3.1.2.3 Functions..... | 7 | +| 3.1.3 Abbreviations ..... | 7 | +| 3.2 General ..... | 7 | +| 3.3 Functional description..... | 7 | +| 3.3.1 Filter bank and computation of sub-band levels..... | 8 | +| 3.3.2 Pitch detection ..... | 10 | +| 3.3.3 Tone detection ..... | 10 | +| 3.3.4 Correlated Complex Signal Analysis (and detection) ..... | 11 | +| 3.3.5 VAD decision..... | 11 | +| 3.3.5.1 Hangover addition..... | 12 | +| 3.3.5.2 Background noise estimation..... | 14 | +| 4 Technical Description of VAD Option 2 ..... | 16 | +| 4.1 Definitions, symbols and abbreviations ..... | 16 | +| 4.1.1 Definitions ..... | 16 | +| 4.1.2 Symbols ..... | 16 | +| 4.1.2.1 Variables ..... | 16 | +| 4.1.2.2 Constants..... | 17 | +| 4.1.2.3 Functions..... | 17 | +| 4.1.3 Abbreviations ..... | 18 | +| 4.2 General ..... | 18 | +| 4.3 Functional description..... | 18 | +| 4.3.1 Frequency Domain Conversion ..... | 19 | +| 4.3.2 Channel Energy Estimator..... | 19 | +| 4.3.3 Channel SNR Estimator ..... | 20 | +| 4.3.4 Voice Metric Calculation ..... | 20 | +| 4.3.5 Frame SNR and Long-Term Peak SNR Calculation..... | 20 | +| 4.3.6 Negative SNR Sensitivity Bias..... | 21 | +| 4.3.7 VAD Decision ..... | 21 | +| 4.3.8 Spectral Deviation Estimator..... | 22 | +| 4.3.9 Sinewave Detection..... | 22 | +| 4.3.10 Background Noise Update Decision ..... | 23 | +| 4.3.10 Background Noise Estimate Update..... | 23 | +| 5 Computational details ..... | 24 | +| Annex A (informative) : Change history..... | 25 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document specifies two alternatives for the Voice Activity Detector (VAD) to be used in the Discontinuous Transmission (DTX) as described in [3]. Implementors of mobile station and infrastructure equipment conforming to the AMR specifications can choose which of the two VAD options to implement. There are no interoperability factors associated with this choice. + +The requirements are mandatory on any VAD to be used either in User Equipment (UE) or Base Station Systems (BSS)s that utilize the AMR speech codec. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. + - For a specific reference, subsequent revisions do not apply. + - For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. +- [1] 3GPP TS 26.073: "Adaptive Multi-Rate (AMR); ANSI C source code". +- [2] 3GPP TS 26.090: "Transcoding functions". +- [3] 3 GPP TS 26.093: "Source Controlled Rate operation". +- [4] ITU, The International Telecommunications Union, Blue Book, Vol. III, Telephone Transmission Quality, IXth Plenary Assembly, Melbourne, 14-25 November, 1988, Recommendation G.711, Pulse code modulation (PCM) of voice frequencies. + +# --- 3 Technical Description of VAD Option 1 + +## 3.1 Definitions, symbols and abbreviations + +### 3.1.1 Definitions + +For the purposes of the present document, the following terms and definitions apply: + +**frame:** time interval of 20 ms corresponding to the time segmentation of the speech transcoder + +### 3.1.2 Symbols + +For the purposes of the present document, the following symbols apply. + +#### 3.1.2.1 Variables + +| | | +|---------------------------|-------------------------------------------------------------------------------------------------------| +| bckr_est[n] | background noise estimate | +| burst_count | counts length of a speech burst, used by VAD hangover addition | +| hang_count | hangover counter, used by VAD hangover addition | +| complex_hang_count | hangover counter, used by CAD hangover addition | +| complex_hang_timer | hangover initiator, used for Complex Activity Estimation | +| lagcount | pitch detection counter | +| level[n] | signal level | +| new_speech | pointer of the speech encoder, points a buffer containing last received samples of a speech frame [2] | + +| | | +|------------------------|--------------------------------------------------------------------------| +| noise_level | average level of the background noise estimate | +| oldlagcount | lagcount of the previous frame | +| pitch | flag indicating presence of a periodic signal | +| complex_warning | flag indicating the presence of a complex signal. | +| best_corr_hp | normalized and limited value from maximum HP filtered correlation vector | +| corr_hp | filtered best_corr_hp values | +| pow_sum | power of the input frame | +| s(i) | samples of the input frame | +| snr_sum | measure between input frame and noise estimate | +| stat_count | stationarity counter | +| stat_rat | measure indicating stationary | +| T_op[n] | open-loop lags [2] | +| t0 | autocorrelation maxima calculated by the open-loop pitch analysis [2] | +| t1 | signal power related to the autocorrelation maxima t0 [2] | +| tone | flag indicating the presence of a tone | +| vad_thr | VAD threshold | +| VAD_flag | boolean VAD flag | +| vadreg | intermediate VAD decision | +| complex_low | intermediate complex signal decisions | +| complex_high | intermediate complex signal decisions | + +#### 3.1.2.2 Constants + +| | | +|-------------------------------|---------------------------------------------------------------------| +| ALPHA_UP1 | constant for updating noise estimate (see clause 3.3.5.2) | +| ALPHA_DOWN1 | constant for updating noise estimate (see clause 3.3.5.2) | +| ALPHA_UP2 | constant for updating noise estimate (see clause 3.3.5.2) | +| ALPHA_DOWN2 | constant for updating noise estimate (see clause 3.3.5.2) | +| ALPHA3 | constant for updating noise estimate (see clause 3.3.5.2) | +| ALPHA4 | constant for updating average signal level (see clause 3.3.5.2) | +| ALPHA5 | constant for updating average signal level (see clause 3.3.5.2) | +| BURST_LEN_HIGH_NOISE | constant for controlling VAD hangover addition (see clause 3.3.5.1) | +| BURST_LEN_LOW_NOISE | constant for controlling VAD hangover addition (see clause 3.3.5.1) | +| COEFF3 | coefficient for the filter bank (see clause 3.3.1) | +| COEFF5_1 | coefficient for the filter bank (see clause 3.3.1) | +| COEFF5_2 | coefficient for the filter bank (see clause 3.3.1) | +| HANG_LEN_HIGH_NOISE | constant for controlling VAD hangover addition (see clause 3.3.5.1) | +| HANG_LEN_LOW_NOISE | constant for controlling VAD hangover addition (see clause 3.3.5.2) | +| HANG_NOISE_THR | constant for controlling VAD hangover addition (see clause 3.3.5.2) | +| L_FRAME | size of a speech frame, 160 | +| L_NEXT | length for the lookahead of the speech encoder, 40 | +| LTHRESH | threshold for pitch detection (see clause 3.3.2) | +| NOISE_MAX | maximum value for noise estimate (see clause 3.3.5.2) | +| NOISE_MIN | minimum value for noise estimate (see clause 3.3.5.2) | +| NTHRESH | threshold for pitch detection (see clause 3.3.2) | +| POW_PITCH_THR | threshold for pitch detection (see clause 3.3.5) | +| POW_COMPLEX_THR | threshold for complex detection (see clause 3.3.5) | +| STAT_COUNT | threshold for stationary detection (see clause 3.3.5.2) | +| CAD_MIN_STAT_COUNT | minimum threshold after complex warning | +| STAT_THR | threshold for stationary detection (see clause 3.3.5.2) | +| STAT_THR_LEVEL | threshold for stationary detection (see clause 3.3.5.2) | +| TONE_THR | threshold for tone detection (see clause 3.3.3) | +| VAD_P1 | constant of computation for VAD threshold (see clause 3.3.5.2) | +| VAD_POW_LOW | constant for controlling VAD hangover addition (see clause 3.3.5.1) | +| VAD_SLOPE | constant of computation for VAD threshold (see clause 3.3.5) | +| VAD_THR_HIGH | constant of computation for VAD threshold (see clause 3.3.5) | +| CVAD_THRESH_ADAPT_HIGH | constant for updating complex_high | +| CVAD_THRESH_ADAPT_LOW | constant for updating complex_low | +| CVAD_THRESH_HANG | constant for updating complex_hang_timer | +| CVAD_HANG_LIMIT | constant for initiating complex_hang_count | +| CVAD_HANG_LENGTH | constant for resetting complex_hang_count | + +#### 3.1.2.3 Functions + +| | | +|---------------------|-------------------------------------------------------| +| + | addition | +| - | subtraction | +| * | multiplication | +| / | division | +| $ x $ | absolute value of x | +| AND | Boolean AND | +| OR | Boolean OR | +| $\sum_{n=a}^b x(n)$ | $= x(a) + x(a+1) + \dots + x(b-1) + x(b)$ | +| MIN(x,y) | $= \begin{cases} x, x \leq y \\ y, y < x \end{cases}$ | +| MAX(x,y) | $= \begin{cases} x, x \geq y \\ y, y > x \end{cases}$ | + +### 3.1.3 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|-------------|---------------------------------------| +| ANSI | American National Standards Institute | +| DTX | Discontinuous Transmission | +| VAD | Voice Activity Detector | +| CAD | Complex Activity Detection | +| CNG | Comfort Noise Generation | + +## 3.2 General + +The function of the VAD algorithm is to indicate whether each 20 ms frame contains signals that should be transmitted, i.e. speech, music or information tones. The output of the VAD algorithm is a Boolean flag (VAD\_flag) indicating presence of such signals. + +## 3.3 Functional description + +The block diagram of the VAD algorithm is depicted in figure 1. The VAD algorithm uses parameters of the speech encoder to compute the Boolean VAD flag (VAD\_flag). Samples of the Input frame ( $s(i)$ ) are divided into sub-bands and level of the signal in each band ( $level[n]$ ) is calculated. Input for the pitch detection function are open-loop lags ( $T\_op[n]$ ), which are calculated by open-loop pitch analysis of the speech encoder. The pitch detection function computes a flag (pitch) which indicates presence of pitch. Tone detection function calculates a flag (tone), which indicates presence of an information tone. Tones are detected based on pitch gain of the open-loop pitch analysis. The pitch gain is estimated using autocorrelation values ( $t0$ and $t1$ ) received from the pitch analysis. Complex Signal Detection function calculates a flag (complex\_warning), which indicates presence of a correlated complex signal such as music. Correlate complex signals are detected based on analysis of the correlation vector available in the open-loop pitch analysis. The VAD decision function estimates background noise levels. Intermediate VAD decision is calculated based on the comparison of the background noise estimate and levels of the input frame ( $level[n]$ ). Finally, the VAD flag is calculated by adding hangover to the intermediate VAD decision. + +![Simplified block diagram of the VAD algorithm: Option 1. The diagram shows a central 'VAD decision' block receiving inputs from four other blocks: 'Filter bank and computation of sub-band levels' (input s(i), output level[n]), 'Pitch detection' (input T_op[n], outputs pitch and tone), 'Tone detection' (input t0,t1, output complex_warning), and 'Complex signal analysis' (input OL-LTP correlation vector, output complex_timer). The 'VAD decision' block outputs the 'VAD_flag'.](d0abac95583b52a3b35f74a215567334_img.jpg) + +``` + +graph LR + s_i["s(i)"] --> FB["Filter bank and computation of sub-band levels"] + T_op_n["T_op[n]"] --> PD["Pitch detection"] + t0_t1["t0,t1"] --> TD["Tone detection"] + OL_LTP["OL-LTP correlation vector"] --> CSA["Complex signal analysis"] + FB -- level[n] --> VD["VAD decision"] + PD -- pitch --> VD + PD -- tone --> VD + TD -- complex_warning --> VD + CSA -- complex_timer --> VD + VD -- VAD_flag --> VF["VAD_flag"] + +``` + +Simplified block diagram of the VAD algorithm: Option 1. The diagram shows a central 'VAD decision' block receiving inputs from four other blocks: 'Filter bank and computation of sub-band levels' (input s(i), output level[n]), 'Pitch detection' (input T\_op[n], outputs pitch and tone), 'Tone detection' (input t0,t1, output complex\_warning), and 'Complex signal analysis' (input OL-LTP correlation vector, output complex\_timer). The 'VAD decision' block outputs the 'VAD\_flag'. + +Figure 3.1: Simplified block diagram of the VAD algorithm: Option 1 + +### 3.3.1 Filter bank and computation of sub-band levels + +The input signal is divided into frequency bands using a 9-band filter bank (figure 3.2). Cut-off frequencies for the filter bank are shown in table 3.1. + +Table 3.1. Cut-off frequencies for the filter bank + +| Band number | Frequencies | +|-------------|----------------| +| 1 | 0 - 250 Hz | +| 2 | 250 - 500 Hz | +| 3 | 500 - 750 Hz | +| 4 | 750 - 1000 Hz | +| 5 | 1000 - 1500 Hz | +| 6 | 1500 - 2000 Hz | +| 7 | 2000 - 2500 Hz | +| 8 | 2500 - 3000 Hz | +| 9 | 3000 - 4000 Hz | + +Input for the filter bank is the speech frame pointed by the new\_speech pointer of the speech encoder [1]. Input values for the filter bank are scaled down by one bit. This ensures safe scaling, i.e. saturation can not occur during calculation of the filter bank. + +![Figure 3.2: Filter bank diagram. The diagram shows a hierarchical decomposition of an input signal into multiple frequency bands using 5th and 3rd order filter blocks. The input signal enters a 5th order filter block. Its high-pass output is labeled '3k - 4 kHz'. Its low-pass output enters another 5th order filter block. The high-pass output of this second 5th order block is labeled '2.5 - 3 kHz'. Its low-pass output enters a 3rd order filter block. The high-pass output of this 3rd order block is labeled '2 - 2.5 kHz'. Its low-pass output enters another 3rd order filter block. The high-pass output of this 3rd order block is labeled '1.5 - 2 kHz'. Its low-pass output enters a 5th order filter block. The high-pass output of this 5th order block is labeled '1 - 1.5 kHz'. Its low-pass output enters a 3rd order filter block. The high-pass output of this 3rd order block is labeled '750 - 1000 Hz'. Its low-pass output enters another 3rd order filter block. The high-pass output of this 3rd order block is labeled '500 - 750 Hz'. Its low-pass output enters a final 3rd order filter block. The high-pass output of this 3rd order block is labeled '250 - 500 Hz'. The low-pass output of this final 3rd order block is labeled '0 - 250 Hz'.](b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg) + +Figure 3.2: Filter bank diagram. The diagram shows a hierarchical decomposition of an input signal into multiple frequency bands using 5th and 3rd order filter blocks. The input signal enters a 5th order filter block. Its high-pass output is labeled '3k - 4 kHz'. Its low-pass output enters another 5th order filter block. The high-pass output of this second 5th order block is labeled '2.5 - 3 kHz'. Its low-pass output enters a 3rd order filter block. The high-pass output of this 3rd order block is labeled '2 - 2.5 kHz'. Its low-pass output enters another 3rd order filter block. The high-pass output of this 3rd order block is labeled '1.5 - 2 kHz'. Its low-pass output enters a 5th order filter block. The high-pass output of this 5th order block is labeled '1 - 1.5 kHz'. Its low-pass output enters a 3rd order filter block. The high-pass output of this 3rd order block is labeled '750 - 1000 Hz'. Its low-pass output enters another 3rd order filter block. The high-pass output of this 3rd order block is labeled '500 - 750 Hz'. Its low-pass output enters a final 3rd order filter block. The high-pass output of this 3rd order block is labeled '250 - 500 Hz'. The low-pass output of this final 3rd order block is labeled '0 - 250 Hz'. + +**Figure 3.2: Filter bank** + +The filter bank consists of 5th and 3rd order filter blocks. Each filter block divides the input into high-pass and low-pass parts and decimates the sampling frequency by 2. The 5th order filter block is calculated as follows: + +$$x_{lp}(i) = 0.5 * (A_1(x(i-1)) + A_2(x(i))) \quad (3.1a)$$ + +$$x_{hp}(i) = 0.5 * (A_1(x(i-1)) - A_2(x(i))) \quad (3.1b)$$ + +where + +$x(i)$ input signal for a filter block + +$x_{lp}(i)$ low-pass component + +$x_{hp}(i)$ high-pass component + +The 3rd order filter block is calculated as follows: + +$$x_{lp}(i) = 0.5 * (x(i) + A_3(x(i-1))) \quad (3.2a)$$ + +$$x_{hp}(i) = 0.5 * (x(i) - A_3(x(i-1))) \quad (3.2b)$$ + +The filters $A_1()$ , $A_2()$ , and $A_3()$ are first order direct form all-pass filters, whose transfer function is given by: + +$$A(z) = \frac{C + z^{-1}}{1 + C^* z^{-1}}, \quad (3.3)$$ + +where $C$ is the filter coefficient. + +Coefficients for the all-pass filters $A_1()$ , $A_2()$ , and $A_3()$ are COEFF5\_1, COEFF5\_2, and COEFF3, respectively. + +Signal level is calculated at the output of the filter bank at each frequency band as follows: + +$$level(n) = \sum_{i=START_n}^{END_n} |x_n(i)|, \quad (3.4)$$ + +where: + +$n$ index for the frequency band + +$x_n(i)$ sample $i$ at the output of the filter bank at frequency band $n$ + +$$START_n = \begin{cases} -2, & n \leq 4 \\ -4, & 5 \leq n \leq 8 \\ -8, & n = 9 \end{cases}$$ + +$$END_n = \begin{cases} 9, & n \leq 4 \\ 19, & 5 \leq n \leq 8 \\ 39, & n = 9 \end{cases}$$ + +Negative indices of $x_n(i)$ refer to the previous frame. + +### 3.3.2 Pitch detection + +The purpose of the pitch detection function is to detect vowel sounds and other periodic signals. The pitch detection is based on comparison of open-loop lags ( $T\_op[n]$ ), which are calculated by the speech encoder [2]. If the difference of consecutive open-loop lags ( $T\_op[n]$ ) is smaller than a threshold, lagcount is incremented. If the sum of the lagcounts of two consecutive frames is high enough, the pitch flag is set. For 5.15 and 4.75 kbit/s rates, only one open-loop lag is calculated, and therefore only the first lag-comparison is made every frame. The pitch flag is calculated as follows: + +Lagcount = 0; + +If ( $|T\_op[-1] - T\_op[0]| < LTHRESH$ ) + +Lagcount = Lagcount + 1 + +If ( $|T\_op[0] - T\_op[1]| < LTHRESH$ ) + +Lagcount = Lagcount + 1 + +If (Lagcount + oldlagcount $\geq NTHRESH$ ) + +pitch = 1 + +else + +pitch = 0 + +oldlagcount = Lagcount + +$T\_op[-1]$ refers to the open-loop lag of the previous frame. + +### 3.3.3 Tone detection + +Tone detection is used to detect information tones, since the pitch detection function can not always detect these signals. Also, other signals which contain very strong periodic component are detected, because it may sound annoying if these signals are replaced by comfort noise. If the open-loop pitch gain is higher than the constant $TONE\_THR$ , tone is detected and tone flag is set. The pitch gain can be tested by comparing variables $t0$ and $t1$ as follows: + +if ( $t0 > TONE\_THR * t1$ ) + +tone = 1 + +The speech encoder calculates the pitch in three delay ranges, except for mode 10.2 kbit/s, where only one range is used. The above comparison is made once for each delay range and the tone flag should be set if the condition is true at least in one range. Otherwise, the tone flag should be set to zero. + +The variables $t0$ and $t1$ are calculated by the open-loop pitch analysis of the speech encoder [2]. The variable $t0$ is autocorrelation maxima given by: + +$$t0 = \sum_n s_w(n) s_w(n-k) \quad (3.5)$$ + +The variable $t1$ is the signal power related to the autocorrelation maxima $t0$ at the delay value $k$ : + +$$t1 = \sum_n s_w^2(n-k) \quad (3.6)$$ + +The open-loop pitch search and correspondingly the tone flag is computed twice in each frame, except for modes 5.15 kbit/s and 4.75 kbit/s, where it is computed only once. + +### 3.3.4 Correlated Complex Signal Analysis (and detection) + +Correlated complex signal detection is used to detect correlated signals in the highpass filtered weighted speech domain, since the pitch and tone detection functions can not always detect these signals. Signals which contain very strong correlation values in the high pass filtered domain are taken care of, because it may sound really annoying if these signals are replaced by comfort noise. If the statistics of the maximum normalized correlation value of a high pass filtered input signal indicates the presence of a correlated complex signal a flag **complex\_warning** is set. To reduce complexity the high band correlation analysis is performed in a simplified manner by analysing the high pass filtered fullband correlation vector which is available from the OL-LTP analysis performed by the speech encoder at least once in each frame. + +$best\_corr\_hp_m$ is the maximum normalized value of the high pass filtered correlation in the range 19-146 limited to be in the range [1.0, 0.0]. (Note that the $best\_corr\_hp$ value is delayed one frame). The high pass filter is a simple first order filter with coefficients [1, -1] The $best\_corr\_hp$ value is filtered according to : + +$$corr\_hp_{m+1} = (alpha) * corr\_hp_m + (1 - alpha) * best\_corr\_hp_m ,$$ + +where $alpha$ is varied between 0.98 and 0.8 as a function of $corr\_hp_m$ and $best\_corr\_hp_m$ + +The $corr\_hp$ output value is thresholded into two registers $complex\_high$ , $complex\_low$ and one $counter\_complex\_hang\_timer$ . + +$complex\_low$ is set to 1 if the $corr\_hp$ value is greater than CVAD\_THRESH\_ADAPT\_LOW. + +$complex\_high$ is set to 1 if the $corr\_hp$ value is greater than CVAD\_THRESH\_ADAPT\_HIGH. + +$complex\_hang\_timer$ is increased by 1 if the $corr\_hp$ value is greater than CVAD\_THRESH\_HANG. If the $corr\_hp$ value is lower than or equal to CVAD\_THRESH\_HANG the $complex\_hang\_timer$ value is set to 0. + +The flag **complex\_warning** is set if $complex\_low$ have been set for 15 consecutive frames or $complex\_high$ has been set for 8 consecutive frames. + +The open-loop pitch search and correspondingly the tone flag is computed twice in each frame, except for modes 5.15 kbit/s and 4.75 kbit/s, where it is computed only once. The computation of the $corr\_hp$ value is however always done only once per frame using the newest correlation vector available. + +### 3.3.5 VAD decision + +Power of the input frame is calculated as follows: + +$$pow\_sum = \sum_{i=-L\_NEXT}^{L\_FRAME-L\_NEXT-1} s(i) * s(i) , \quad (3.7)$$ + +where samples $s(i)$ of the input frame are pointed by the new\_speech pointer of the speech encoder. If the power of the input frame ( $pow\_sum$ ) is lower than the constant POW\_PITCH\_THR, last pitch flag is set to zero. If the power of the input frame ( $pow\_sum$ ) is lower than the constant POW\_COMPLEX\_THR, last $complex\_low$ flag is set to zero. + +The difference between the signal levels of the input frame and background noise estimate is calculated as follows: + +$$snr\_sum = \sum_{n=1}^9 MAX(1.0, \frac{level[n]}{bckr\_est[n]})^2, \quad (3.8)$$ + +where: + +level[n] signal level at band n + +bckr\_est[n] level of background noise estimate at band n + +VAD decision is made by comparing the variable snr\_sum to a threshold. The threshold (vad\_thr) is tuned to get desired sensitivity at each background noise level. The higher the noise level the lower is the threshold. Specially, a low threshold at high-level background noise is needed to detect speech reliably enough, although probability of detecting noise as speech also increases. + +Average level of background noise is calculated by adding noise estimates at each band: + +$$noise\_level = \sum_{n=1}^9 bckr\_est[n] \quad (3.9)$$ + +Threshold is calculated using average noise level as follows: + +$$vad\_thr = VAD\_SLOPE * (noise\_level - VAD\_PI) + VAD\_THR\_HIGH, \quad (3.10)$$ + +where VAD\_SLOPE, VAD\_PI, and VAD\_THR\_HIGH are constants. + +The variable vadreg indicates intermediate VAD decision and it is calculated as follows: + +if (snr\_sum > vad\_thr) + +vadreg = 1 + +else + +vadreg = 0 + +#### 3.3.5.1 Hangover addition + +Before the final VAD flag is given, a hangover is added. The hangover addition helps to detect low power endings of speech bursts, which are subjectively important but difficult to detect. Also a long hangover is added if the signal has been found to be of very complex nature for a long time (2 seconds) since the VAD is not likely to work reliably for such a complex signal. + +VAD flag is set to "1" if less than hang\_len frames with "0" decision have been elapsed since burst\_len consecutive "1" decisions have been detected. The variables hang\_len and burst\_len are set depending on the average noise level (noise\_level). The *vad\_flag* is also controlled by the *complex\_hang\_count* which indicates that the signal is too complex for the VAD and should not be used with a Comfort noise generation algorithm. The filtered correlation value *corr\_hp* is also used as an activity indication after the VAD has indicated noise for a while (during 200 ms), this will aid in situations where the VAD noise estimate has adapted to a rather stationary but still all to complex signal to make it sound well with CNG. + +The power of the input frame is compared to a threshold (VAD\_POW\_LOW). If the power is lower, the VAD flag is set to "0" and no hangover is added. The VAD\_flag is calculated as follows: + +if (noise\_level > HANG\_NOISE\_THR) + +burst\_len = BURST\_LEN\_HIGH\_NOISE + +hang\_len = HANG\_LEN\_HIGH\_NOISE + +else + +burst\_len = BURST\_LEN\_LOW\_NOISE + +hang\_len = HANG\_LEN\_LOW\_NOISE + +``` + +if(complex_hang_timer > CVAD_HANG_LIMIT) { + if(complex_hang_count < CVAD_HANG_LENGTH) { + complex_hang_count = CVAD_HANG_LENGTH; + } +} + +if(powsum < VAD_POW_LOW){ +burst_count = 0 +hang_count = 0 +complex_hang_count = 0; +complex_hang_timer = 0; +Vad_flag=0; +Goto Exit; +} + +VAD_flag=0; +if(complex_hang_count != 0){ + burst_count = BURST_LEN_HIGH_NOISE; + complex_hang_count = complex_hang_count - 1 ; + VAD_flag=1; + goto Exit +} else { + if( ( (the 10 last out of 11 vadreg values all are zero) AND + (corr_hp > CVAD_THRESH_IN_NOISE) ) ) { + VAD_flag = 1; + Goto Exit + } +} + +if(vadreg = 1){ + burst_count = burst_count + 1} +if(burst_count >= burst_len){ +hang_count = hang_len +} +VAD_flag = 1 +} else { + +``` + +``` + +burst_count = 0 +if (hang_count > 0){ + hang_count = hang_count - 1 + VAD_flag=1 +} +} +Label Exit + +``` + +#### 3.3.5.2 Background noise estimation + +Background noise estimate ( $bckr\_est[n]$ ) is updated using amplitude levels of the previous frame. Thus, the update is delayed by one frame to avoid undetected start of speech bursts to corrupt the noise estimate. If the internal VAD decision is "1" or if pitch has been detected, the noise estimate is not updated upwards. The update speed for the current frame is selected as follows: + +``` + +if ((vadreg for the last 4 frames has been zero) AND + (pitch for the last 4 frames has been zero) AND + (we are not in complex signal hangover)) + alpha_up = ALPHA_UP1 + alpha_down = ALPHA_DOWN1 +else + if ((stat_count = 0) AND (not in complex_signal hangover)) + alpha_up = ALPHA_UP2 + alpha_down = ALPHA_DOWN2 + else + alpha_up = 0 + alpha_down = ALPHA3 + +``` + +The variable $stat\_count$ indicates stationary and its propose is explained later in this clause. The variables $alpha\_up$ and $alpha\_down$ define the update speed to upwards and downwards. The update speed for each band $n$ is selected as follows: + +if ( $bckr\_est_m[n] < level_{m-1}[n]$ ) + +$alpha = alpha\_up$ + +else + +$alpha = alpha\_down$ + +Finally, noise estimate is updated as follows: + +$$bckr\_est_{m+1}[n] = (1.0 - alpha) * bckr\_est_m[n] + alpha * level_{m-1}[n], \quad (3.11)$$ + +where: + +$n$ index of the frequency band + +$m$ index of the frame + +Level of the background estimate (bckr\_est[n]) is limited between constants NOISE\_MIN and NOISE\_MAX. + +If level of background noise increases suddenly, vadreg will be set to "1" and background noise is not updated upwards. To recover from this situation, update of the background noise estimate is enabled if the intermediate VAD decision (vadreg) is "1" for enough long time and spectrum is stationary. Stationary (stat\_rat) is estimated using following equation: + +$$stat\_rat = \sum_{n=1}^9 \frac{MAX(STAT\_THR\_LEVEL, MAX(ave\_level\_m[n], level\_m[n]))}{MAX(STAT\_THR\_LEVEL, MIN(ave\_level\_m[n], level\_m[n]))} \quad (3.12)$$ + +If the stationary estimate (stat\_rat) is higher than a threshold, the stationary counter (stat\_count) is set to the initial value defined by constant STAT\_COUNT. The stationary counter (stat\_count) is also initialised if pitch or tone or a complex\_warning is detected. If the signal is not stationary but speech has been detected (VAD decision is "1"), stat\_count is decreased by one in each frame until it is zero. + +if (*complex\_warning*) { + +    If(stat\_count < CAD\_MIN\_STAT\_COUNT) + +        stat\_count = CAD\_MIN\_STAT\_COUNT + +} + +if ( ( 8 last vadreg flags have been zero) OR (2 last pitch flags have been one) OR (5 last tone flags have been one) ) + +    stat\_count = STAT\_COUNT + +else + +if (stat\_rat > STAT\_THR) + +    stat\_count = STAT\_COUNT + +else + +if ((vadreg) AND (stat\_count $\neq$ 0)) + +    stat\_count = stat\_count - 1 + +The average signal levels (ave\_level[n]) are calculated as follows: + +$$ave\_level_{m+1}[n] = (1.0 - \alpha) * ave\_level_m[n] + \alpha * level_m[n] \quad (3.13)$$ + +The update speed ( $\alpha$ ) for the previous equation is selected as follows: + +if (stat\_count = STAT\_COUNT) + +$\alpha = 1.0$ + +else if (vadreg = 1) + +$\alpha = \text{ALPHA5}$ + +else + +$\alpha = \text{ALPHA4}$ + +# 4 Technical Description of VAD Option 2 + +## 4.1 Definitions, symbols and abbreviations + +### 4.1.1 Definitions + +For the purposes of the present document, the following terms and definitions apply: + +**codec:** combination of an encoder and decoder in series (encoder/decoder) + +**compress:** process of compressing and expanding a signal. In this text, the process is described in terms of PCM [4] + +**Decoder:** generally, a device for the translation of a signal from a digital representation into an analog format. For the present document, a device which converts speech encoded in the format specified in the present document to analog or an equivalent PCM representation + +**DFT:** see Discrete Fourier Transform + +**Discrete Fourier Transform (DFT):** method of transforming a time domain sequence into a corresponding frequency domain sequence + +**Encoder:** generally, a device for the translation of a signal into a digital representation. For the present document, a device which converts speech from an analog or its equivalent PCM representation to the digital representation described in the present document + +**Fast Fourier Transform (FFT):** efficient implementation of the Discrete Fourier Transform + +**FFT:** see Fast Fourier Transform + +**Vocoder:** voice coder + +**frame:** time interval of 20 ms corresponding to the time segmentation of the speech transcoder + +### 4.1.2 Symbols + +For the purposes of the present document, the following symbols apply. + +#### 4.1.2.1 Variables + +| | | +|-------------------------------|-----------------------------------------------------------------------------------------------------------| +| $\alpha_{ch}(m)$ | channel energy smoothing factor | +| $\alpha(m)$ | exponential windowing factor | +| $\Delta_E(m)$ | estimated spectral deviation between current power spectrum and average long term power spectral estimate | +| $\phi(m)$ | spectral peak-to-average ratio | +| $\sigma_q^{(i)}$ | quantized channel SNR indices | +| $b(m)$ | burst count | +| $b_{th}$ | burst count threshold | +| $\{d(m)\}$ | overlapped portion of the frame buffer of input samples | +| $E_{ch}(m, i)$ | channel energy estimate; channel i, subframe m | +| $\mathbf{E}_{ch}(m)$ | vector of channel energy estimates, $0 \leq i < N_c$ | +| $E_{dB}(m, i)$ | estimated log power spectrum | +| $\mathbf{E}_{dB}(m)$ | vector of log power spectrum estimates, $0 \leq i < N_c$ | +| $\bar{E}_{dB}^{(m, i)}$ | average long term power spectral estimate | +| $\bar{\mathbf{E}}_{dB}^{(m)}$ | vector of average long term power spectral estimates, $0 \leq i < N_c$ | +| $E_n(m, i)$ | channel noise estimate | +| $\mathbf{E}_n(m)$ | vector of channel noise estimates, $0 \leq i < N_c$ | +| $E_{tn}(m)$ | total estimated noise energy | +| $E_{tot}(m)$ | total channel energy | +| $E'_{tot}(m)$ | modified total channel energy | +| $h(m)$ | hysteresis counter | +| $h_{cnt}$ | hangover count | + +| | | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------| +| $h_o(n)$ | overlap-and-add buffer of samples | +| $hyster\_cnt$ | hysteresis counter to avoid long term creeping of $update\_cnt$ | +| $last\_update\_cnt$ | previous value of $update\_cnt$ | +| $s_{hp}(n)$ | sample at the output of the speech encoder high pass filter | +| $sinewave\_flag$ | boolean flag, set TRUE when spectral peak-to-average ratio is greater than 10dB and the spectral deviation is less than DEV_THLD | +| $SNR$ | Signal to Noise ratio | +| $SNR_p(m)$ | long-term peak SNR | +| $SNR_q(m)$ | quantized version of $SNR_p(m)$ | +| $update\_cnt$ | counter gating noise estimate update process | +| $update\_flag$ | flag controlling noise estimate updating | +| $VAD(m)$ | boolean VAD flag for subframe m | +| $VAD\_flag$ | boolean VAD Flag | +| $v(m)$ | sum of voice metrics | +| $v_{th}$ | voice metric threshold | + +#### 4.1.2.2 Constants + +| | | +|-----------------|---------------------------------------------------------------| +| $\alpha_H$ | upper limit for values of $\alpha(m)$ | +| $\alpha_L$ | lower limit for values of $\alpha(m)$ | +| $\alpha_n$ | channel noise smoothing factor | +| $\zeta_p$ | pre-emphasis factor | +| $b_{table}$ | table to generate $b_{th}$ | +| D | overlap (delay) in sample intervals | +| DEV_THLD | threshold for setting $sinewave\_flag$ | +| $E_{floor}$ | low threshold for $E_{tot}(m)$ | +| $E_H$ | high energy endpoint for linear interpolation of $E_{tot}(m)$ | +| $E_{init}$ | minimum allowable channel noise initialisation energy | +| $E_L$ | low energy endpoint for linear interpolation of $E_{tot}(m)$ | +| $E_{min}$ | minimum allowable channel energy | +| $f_H$ | high channel combining table | +| $f_L$ | low channel combining table | +| $g(n)$ | trapezoidal window, $n = 0$ to $M$ | +| $G(k)$ | frequency domain transformation of $g(n)$ | +| $h_{table}$ | table to generate $h_{cnt}$ | +| HYSTER_CNT_THLD | threshold for $hyster\_cnt$ | +| L | subframe length in samples | +| M | DFT sequence length | +| $N_c$ | number of combined channels | +| NOISE_FLOOR_D | low threshold for $E_{tot}(m)$ in dB | +| UPDATE_CNT_THLD | threshold for $update\_cnt$ | +| UPDATE_THLD | threshold for $v(m)$ | +| V | voice metric table | +| $v_{table}$ | table to generate $v_{th}$ | + +#### 4.1.2.3 Functions + +| | | +|---------------------|--------------------------| +| + | addition | +| - | subtraction | +| * | multiplication | +| / | division | +| $\lfloor x \rfloor$ | largest integer $\leq x$ | +| AND | Boolean AND | +| OR | Boolean OR | + +$$\sum_{n=a}^b x(n) = x(a) + x(a+1) + \dots + x(b-1) + x(b)$$ + +### 4.1.3 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|------|---------------------------------------| +| ANSI | American National Standards Institute | +| DTX | Discontinuous Transmission | +| VAD | Voice Activity Detector | +| CAD | Complex Activity Detection | +| CNG | Comfort Noise Generation | + +## 4.2 General + +The function of the VAD algorithm is to indicate whether each 20 ms frame contains signals that should be transmitted, i.e. speech, music or information tones. The output of the VAD algorithm is a Boolean flag (*VAD\_flag*) indicating presence of such signals. + +## 4.3 Functional description + +The block diagram of the VAD algorithm is depicted in figure 4.1. The VAD algorithm uses parameters of the speech encoder to compute the Boolean VAD flag (*VAD\_flag*). + +![Block Diagram of the VAD algorithm: Option 2](124c6108c63173818afb8ed49521e22d_img.jpg) + +The block diagram illustrates the functional flow of the VAD algorithm. The input signal $s_{hp}(n)$ is processed through a 'Frequency Domain Conversion' block to produce $G(k)$ . This is then processed by a 'Channel Energy Estimator' to produce $E_{ch}(m)$ . The signal $s_{hp}(n)$ is also processed by three parallel blocks: 'Spectral Deviation Estimator', 'Peak-to-Average Ratio', and 'Voice Metric Calculation'. The 'Spectral Deviation Estimator' and 'Peak-to-Average Ratio' blocks both output to the 'Channel SNR Estimator', which also receives $E_{ch}(m)$ and produces $E_n(m)$ and $\{\sigma_q\}$ . The 'Voice Metric Calculation' block outputs to the 'Noise Update Decision' block. The 'Noise Update Decision' block also receives $E_{tot}(m)$ and $\Delta \epsilon(m)$ and produces $fupdate\_flag$ . The 'Background Noise Estimator' receives $E_n(m)$ and produces $E_{tot}(m)$ and $update\_flag$ . The 'VAD' block receives inputs from the 'Noise Update Decision' block ( $fupdate\_flag$ ), the 'Background Noise Estimator' ( $E_{tot}(m)$ and $v(m)$ ), and the 'Voice Metric Calculation' block. The output of the VAD block is *VAD\_flag*. + +Block Diagram of the VAD algorithm: Option 2 + +Figure 4.1: Block Diagram of the VAD algorithm: Option 2 + +### Input: + +The output of the High-Pass Filter, $\{s_{hp}(n)\}$ + +- *LTP\_flag* is generated by the comparison of the long-term prediction gain to a constant threshold *LTP\_THLD*, where the long-term prediction gain $\beta$ is derived from the speech encoder[2] open-loop pitch predictor. + +### Output: + +- The output of the vad is designated as *VAD\_flag* + +#### Initialization: + +The following variables shall be set to zero at initialization (frame $m = 0$ ): + +- The pre-emphasis memory + +The following shall be initialized to a startup value other than zero: + +The channel energy estimate, $E_{ch}(m)$ , (see clause 4.3.2) + +The long-term power spectral estimate, $\bar{E}_{dB}^{(m)}$ , (see clause 4.3.5) + +The channel noise estimate, $E_n(m)$ , (see clause 4.3.8) + +Processing: The following procedures shall be executed two times per 20 ms speech frame and the current 10 ms subframe shall be denoted $m$ . + +### 4.3.1 Frequency Domain Conversion + +The input signal is pre-emphasised and windowed prior to frequency domain conversion. This process is defined as: + +$$d(n) = s_{hp}(n) + \zeta_p s_{hp}(n-1), \quad 0 \leq n < L, \quad (4.1)$$ + +where $d(n)$ is the pre-emphasised speech buffer, $\zeta_p$ is the pre-emphasis factor, and $L$ is the subframe length. A rectangular window is then used to frame the speech prior to frequency domain conversion, which is expressed as: + +$$g(n) = \begin{cases} 0, & 0 \leq n < D, L + D \leq n < M \\ d(n - D), & D \leq n < L + D \end{cases}, \quad (4.2)$$ + +where $D$ is the zero-padding offset into the DFT buffer, and $M$ is the DFT length. The transformation of $g(n)$ to the frequency domain is performed using the Discrete Fourier Transform (DFT) defined1 as: + +$$G(k) = \frac{2}{M} \sum_{n=0}^{M-1} g(n) e^{-j2\pi nk/M}, \quad 0 \leq k < M \quad (4.3)$$ + +where $e^{j\omega}$ is a unit amplitude complex phasor with instantaneous radial position $\omega$ . + +### 4.3.2 Channel Energy Estimator + +Calculate the channel energy estimate $E_{ch}(m)$ for the current subframe, $m$ , as: + +$$E_{ch}(m, i) = \max \left\{ E_{\min}, \alpha_{ch}(m) E_{ch}(m-1, i) + (1 - \alpha_{ch}(m)) \frac{1}{f_H(i) - f_L(i) + 1} \sum_{k=f_L(i)}^{f_H(i)} |G(k)|^2 \right\}, \quad 0 \leq i < N_c \quad (4.4)$$ + +where $E_{\min}$ is the minimum allowable channel energy, $\alpha_{ch}(m)$ is the channel energy smoothing factor (defined below), $N_c$ is the number of combined channels, and $f_L(i)$ and $f_H(i)$ are the $i$ -th elements of the respective low and high channel combining tables. + +The channel energy smoothing factor, $\alpha_{ch}(m)$ , is defined as: + +$$\alpha_{ch}(m) = \begin{cases} 0, & m \leq 1 \\ 0.45, & m > 1 \end{cases} \quad (4.5)$$ + +1 This atypical definition is used to exploit the efficiencies of the complex Fast Fourier Transform (FFT). The $2/M$ scale factor results from preconditioning the $M$ point real sequence to form an $M/2$ point complex sequence that is transformed using an $M/2$ point complex FFT. Details on this technique can be found in Proakis, J. G. and Manolakis, D. G., *Introduction to Digital Signal Processing*, New York, Macmillan, 1988, pp. 721-722. + +So, this means that $\alpha_{ch}(m)$ assumes a value of zero for the first frame ( $m = 1$ ) and a value of 0.45 for all subsequent frames. This allows the channel energy estimate to be initialized to the unfiltered channel energy of the first frame. + +### 4.3.3 Channel SNR Estimator + +Estimate the channel SNR vector $\{ \sigma \}$ as: + +$$\sigma(i) = 10 \log_{10} \left( \frac{E_{ch}(m,i)}{E_n(m,i)} \right), \quad 0 \leq i < N_c \quad (4.6)$$ + +where $E_n(m)$ is the current channel noise energy estimate (see clause 4.3.8), and then quantify the channel SNR estimate in 3/8 dB steps to yield the channel SNR indices $\{ \sigma_q \}$ given as: + +$$\sigma_q(i) = \max \{ 0, \min \{ 89, \text{round} \{ \sigma(i) / 0.375 \} \} \}, \quad 0 \leq i < N_c \quad (4.7)$$ + +where the values of $\{ \sigma_q \}$ are constrained to be between 0 and 89, inclusive. + +### 4.3.4 Voice Metric Calculation + +Next, calculate the sum of voice metrics as: + +$$v(m) = \sum_{i=0}^{N_c-1} V(\sigma_q(i)) \quad (4.8)$$ + +where $V(k)$ is the $k^{\text{th}}$ value of the 90 element voice metric table V. + +### 4.3.5 Frame SNR and Long-Term Peak SNR Calculation + +The instantaneous frame SNR, $SNR$ , and long-term peak SNR, $SNR_p(m)$ , are used to calibrate the responsiveness of the VAD decision. When the frame count is less than or equal to four ( $m \leq 4$ ) or the forced update flag (sec 4.3.10) is set (fupdate\_flag == TRUE), then the SNR's are initialized as: + +$$SNR_p(m) = SNR = 56 - 10 \log_{10} \left( \sum_{i=0}^{N_c-1} E_n(m,i) \right) \quad (4.9)$$ + +Otherwise, the instantaneous frame SNR is generated by: + +$$SNR = 10 \log_{10} \left( \frac{1}{N_c} \sum_{i=0}^{N_c-1} 10^{\sigma(i)/10} \right) \quad (4.10)$$ + +and the long-term peak SNR is derived by the following expression: + +$$SNR_p(m) = \begin{cases} 0.9 SNR_p(m-1) + 0.1 SNR, & SNR > SNR_p(m-1) \\ 0.998 SNR_p(m-1) + 0.002 SNR, & 0.625 SNR_p(m-1) < SNR \leq SNR_p(m-1) \\ SNR_p(m-1), & \text{otherwise} \end{cases} \quad (4.11)$$ + +The long-term peak SNR is then quantized in 3 dB steps and limited to be between 0 and 19, as follows: + +$$SNR_q = \max \{ \min \{ \lfloor SNR_p(m) / 3 \rfloor, 19 \}, 0 \} \quad (4.12)$$ + +where $\lfloor x \rfloor$ is the largest integer $\leq x$ (floor function). + +### 4.3.6 Negative SNR Sensitivity Bias + +In order for the VAD decision to overcome the problem of being over-sensitive to fluctuating, non-stationary background noise conditions, a bias factor is used to increase the threshold on which the VAD decision is based. This bias factor is derived from an estimate of the variability of the background noise estimate. The variability estimate is further based on negative values of the instantaneous SNR. It is presumed that a negative SNR can only occur as a result of fluctuating background noise, and not from the presence of voice. Therefore, the bias factor $\mu(m)$ is derived by first calculating the variability factor $\psi(m)$ as: + +$$\psi(m) = \begin{cases} 0.99\psi(m-1) + 0.01SNR^2, & SNR < 0 \\ \psi(m-1) & otherwise \end{cases} \quad (4.13)$$ + +which is then clamped in magnitude to $0 \leq \psi(m) \leq 4.0$ . In addition, the variability factor is reset to zero when the frame count is less than or equal to four ( $m \leq 4$ ) or the forced update flag (sec 4.3.10) is set (*fupdate\_flag* == TRUE). The bias factor $\mu(m)$ is then calculated as: + +$$\mu(m) = \max\{12.0(\psi(m) - 0.65), 0\} \quad (4.14)$$ + +### 4.3.7 VAD Decision + +The quantized SNR $SNR_q$ is used to determine the respective voice metric threshold $v_{th}$ , hangover count $h_{cnt}$ , and burst count threshold $b_{th}$ parameters: + +$$v_{th} = v_{table}(SNR_q), \quad h_{cnt} = h_{table}(SNR_q), \quad b_{th} = b_{table}(SNR_q) \quad (4.15)$$ + +where $SNR_Q$ is the index of the respective table elements. The VAD decision can then be made according to the following pseudocode: + +``` +if ( v(m) > vth + μ(m) ) { /* if the voice metric > voice metric threshold*/ + VAD(m) = ON + b(m) = b(m-1) + 1 /* increment burst counter */ + if ( b(m) > bth ) { /* compare counter with threshold */ + h(m) = hcnt /* set hangover */ + } +} else { + b(m) = 0 /* clear burst counter */ + h(m) = h(m-1) - 1 /* decrement hangover / + if ( h(m) <= 0 ) { /* check for expired hangover / + VAD(m) = OFF + h(m) = 0 + } else { + VAD(m) = ON /* hangover not yet expired */ + } +} +} +``` + +Note that two 10 ms subframes are required to determine one VAD decision. The final decision is determined by the maximum of two subframe decisions, i.e. + +``` +if(VAD(m) == ON OR VAD(m-1) == ON) { + VAD_flag = TRUE +} else { + VAD_flag = FALSE +} +``` + +### 4.3.8 Spectral Deviation Estimator + +The spectral deviation estimator is used as a safeguard against erroneous updates of the background noise estimate. If the spectral deviation of the input signal is too high, then the background noise estimate update may not be permitted. Calculate the estimated log power spectrum as: + +$$E_{dB}(m,i) = 10\log_{10}(E_{ch}(m,i)), \quad 0 \leq i < N_c \quad (4.16)$$ + +Then, calculate the estimated spectral deviation between the current power spectrum and the average long-term power spectral estimate: + +$$\Delta_E(m) = \sum_{i=0}^{N_c-1} |E_{dB}(m,i) - \bar{E}_{dB}(m,i)| \quad (4.17)$$ + +where $\bar{E}_{dB}(m)$ is the average long-term power spectral estimate calculated during the previous subframe, as defined in Equation 4.20. The initial value of $\bar{E}_{dB}(m)$ , however, is defined to be the estimated log power spectrum of subframe 1, or: + +$$\bar{E}_{dB}(m) = E_{dB}(m), \quad m = 1 \quad (4.18)$$ + +The exponential windowing factor, $\alpha(m)$ , is then calculated as a function of the instantaneous frame SNR $SNR$ and the long-term peak SNR $SNR_p(m)$ , as: + +$$\alpha(m) = \alpha_H - \left( (\alpha_H - \alpha_L) \frac{SNR_p(m) - SNR}{SNR_p(m)} \right), \quad (4.19)$$ + +which is then limited to $\alpha_L \leq \alpha(m) \leq \alpha_H$ . + +The average long-term power spectral estimate is then updated for the next frame by: + +$$\bar{E}_{dB}(m+1,i) = \alpha(m)\bar{E}_{dB}(m,i) + (1-\alpha(m))E_{dB}(m,i), \quad 0 \leq i < N_c \quad (4.20)$$ + +where all the variables are previously defined. + +### 4.3.9 Sinewave Detection + +Next the *sinewave\_flag* is set TRUE when the spectral peak-to-average ratio $\phi(m)$ is greater than 10, i.e. + +$$\text{sinewave\_flag} = \begin{cases} \text{TRUE}, & \phi(m) > 10 \\ \text{FALSE}, & \text{otherwise} \end{cases} \quad (4.21)$$ + +where: + +$$\phi(m) = 10\log_{10} \left( \frac{\max\{E_{ch}(m,i)\}}{\sum_{j=0}^{N_c-1} E_{ch}(m,j)/N_c} \right), \quad 2 \leq i < N_c \quad (4.22)$$ + +### 4.3.10 Background Noise Update Decision + +The following logic, as shown in pseudo-code, demonstrates how the noise estimate update decision is ultimately made: + +``` + +/* Normal update logic */ +update_flag = fupdate_flag = FALSE +if ( v(m) ≤ UPDATE_THLD and b(m) == 0 ) { + update_flag = TRUE + update_cnt = 0 +} + +/* Forced update logic (for over-riding the normal update logic)*/ +else if ( ( E_tot > NOISE_FLOOR) and ( Δ_E(m) < DEV_THLD ) ) + +``` + +``` + +and ( sinewave_flag == FALSE ) and ( LTP_flag == FALSE ) ) { + update_cnt = update_cnt + 1 + if ( update_cnt ≥ UPDATE_CNT_THLD ) + update_flag = fupdate_flag = TRUE +} + +/* "Hysteresis" logic to prevent long-term creeping of update_cnt */ + +if ( update_cnt == last_update_cnt ) + hyster_cnt = hyster_cnt + 1 +else + hyster_cnt = 0 +last_update_cnt = update_cnt +if ( hyster_cnt > HYSTER_CNT_THLD ) + update_cnt = 0 + +``` + +where $E_{tot}$ is the total channel energy defined as: + +$$E_{tot} = \sum_{i=0}^{N_c-1} E_{ch}(m,i) \quad (4.23)$$ + +and *LTP\_flag* is generated by the comparison of the long-term prediction gain to a constant threshold LTP\_THLD, i.e.: + +$$LTP\_flag = \begin{cases} \text{TRUE}, & \beta > \text{LTP\_THLD} \\ \text{FALSE}, & \text{otherwise} \end{cases} \quad (4.24)$$ + +where the long-term prediction gain $\beta$ is derived from the speech encoder [2] open-loop pitch predictor, and can be expressed as: + +$$\beta = \frac{\sum_{n=0}^{N_p-1} s_w(n)s_w(n-k)}{\sum_{n=0}^{N_p-1} s_w^2(n)} \quad (4.25)$$ + +where $s_w(n)$ is the weighted speech, $k$ is the optimal open-loop lag, and $N_p$ is the pitch analysis frame length. This expression is calculated in the speech encoder on the previous frame. + +### 4.3.10 Background Noise Estimate Update + +If (and only if) the update flag is set (*update\_flag* == **TRUE**), then update the channel noise estimate for the next subframe by: + +$$E_n(m+1,i) = \max\{E_{min}, \alpha_n E_n(m,i) + (1-\alpha_n) E_{ch}(m,i)\}, \quad 0 \leq i < N_c \quad (4.26)$$ + +where $E_{min}$ is the minimum allowable channel energy, and $\alpha_n$ is the channel noise smoothing factor. The channel noise estimate shall be initialized for each of the first four frames to the estimated channel energy, i.e.: + +$$E_n(m,i) = \max\{E_{init}, E_{ch}(m,i)\}, \quad m \leq 4, \quad 0 \leq i < N_c, \quad (4.27)$$ + +where $E_{init}$ is the minimum allowable channel noise initialization energy. + +# 5 Computational details + +A low level description has been prepared in form of ANSI C source code [1]. + +# Annex A (informative) : Change history + +| Document history | | | | | | | | | +|-------------------------|--------------|--------------------------------------------------------------|-----------|------------|------------------------------------------------|------------|------------|------------| +| V. 2.0.0 | October 1999 | 3G TS 26.094 presented for approval to TSG#5 Plenary meeting | | | | | | | +| V. 3.0.0 | October 1999 | 3G TS 26.094 approved at TSG#5 Plenary meeting | | | | | | | +| Change history | | | | | | | | | +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | Old | New | +| 03-2001 | 11 | | | | Version for Release 4 | | | 4.0.0 | +| 06-2002 | 16 | | | | Version for Release 5 | 4.0.0 | | 5.0.0 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.0.0 | | 6.0.0 | +| 06-2006 | 32 | SP-060356 | 0001 | 2 | Correct the description error and syntax error | 6.0.0 | | 6.1.0 | +| 06-2007 | 36 | | | | Version for Release 7 | 6.1.0 | | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.0.0 | | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | 9.0.0 | | 10.0.0 | +| 09-2011 | 57 | | | | Version for Release 11 | 10.0.0 | | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26101/1d27fed9c01eb99f6535283f35fe3bbf_img.jpg b/marked/Rel-11/26_series/26101/1d27fed9c01eb99f6535283f35fe3bbf_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..864f2adb84efb156f3fb60d7ca6bb4c74957c873 --- /dev/null +++ b/marked/Rel-11/26_series/26101/1d27fed9c01eb99f6535283f35fe3bbf_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:294b892511e6881d3541b359a326386f137629222448dcc36b67a7db68c7b8fd +size 49703 diff --git a/marked/Rel-11/26_series/26101/ddc7460821484f1ae2835c67955c554c_img.jpg b/marked/Rel-11/26_series/26101/ddc7460821484f1ae2835c67955c554c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ad6ccee53bfca2420ed76d4309a5410dc2e17b8c --- /dev/null +++ b/marked/Rel-11/26_series/26101/ddc7460821484f1ae2835c67955c554c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c62c467567994e0857d1907d53dba7d3706a2555737795c5b3f418cb0e8b6e5b +size 32645 diff --git a/marked/Rel-11/26_series/26101/raw.md b/marked/Rel-11/26_series/26101/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..628fe311cb2b9b57fc377a96308db283afc5277f --- /dev/null +++ b/marked/Rel-11/26_series/26101/raw.md @@ -0,0 +1,705 @@ + + + + + + +# --- Contents + +| | | +|-----------------------------------------------------------------------------------|-----------| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and Abbreviations ..... | 5 | +| 3.1 Definitions..... | 5 | +| 3.2 Abbreviations ..... | 5 | +| 4 AMR codec frame format (AMR IF1)..... | 6 | +| 4.1 AMR Header and AMR Auxiliary Information ..... | 6 | +| 4.1.1 Frame Type, Mode Indication, and Mode Request ..... | 6 | +| 4.1.2 Frame Quality Indicator ..... | 7 | +| 4.1.3 Mapping to TX_TYPE and RX_TYPE..... | 7 | +| 4.1.4 Codec CRC ..... | 8 | +| 4.2 AMR Core Frame..... | 8 | +| 4.2.1 AMR Core Frame with speech bits: Bit ordering..... | 8 | +| 4.2.2 AMR Core Frame with speech bits: Class division..... | 9 | +| 4.2.3 AMR Core Frame with comfort noise bits ..... | 9 | +| 4.3 AMR frame composition..... | 10 | +| 4.4 GSM-EFR Frame Composition..... | 11 | +| 4.4.1 GSM-EFR Frame with speech bits..... | 12 | +| 4.4.2 GSM-EFR Frame with comfort noise bits..... | 12 | +| Annex A (informative): AMR Interface Format 2 (with octet alignment) ..... | 13 | +| Annex B (normative): Tables for AMR Core Frame bit ordering..... | 17 | +| Annex C (informative): Change history..... | 20 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document describes a generic frame format for the Adaptive Multi-Rate (AMR) speech codec and the Enhanced Full Rate (GSM-EFR) speech codec. This format shall be used as a common reference point when interfacing speech frames between different elements of the 3G system and between different systems. Appropriate mappings to and from this generic frame format will be used within and between each system element. + +Annex A describes a second frame format which shall be used when octet alignment of AMR frames is required. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] TS 26.090: "AMR Speech Codec; Speech Transcoding Functions". +- [2] TS 26.093: "AMR Speech Codec; Source Controlled Rate Operation". +- [3] TS 26.092: "AMR Speech Codec; Comfort Noise Aspects". +- [4] TS 46.060: "EFR Speech Codec; Speech Transcoding Functions". +- [5] TS 46.062: "EFR Speech Codec; Comfort Noise Aspects". + +# --- 3 Definitions and Abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the following terms and definitions apply: + +**AMR mode:** one of the eight AMR codec bit-rates denoted also with indices 0 to 7 where 0 maps to the 4.75 kbit/s mode and 7 maps to the 12.2 kbit/s mode. + +**AMR codec mode:** same as AMR mode. + +**RX\_TYPE:** classification of the received frame as defined in [2]. + +**TX\_TYPE:** classification of the transmitted frame as defined in [2]. + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|-----|------------------------------------------------| +| CRC | Cyclic Redundancy Check | +| FQI | Frame Quality Indicator | +| GSM | Global System for Mobile communication | +| LSB | Least Significant Bit | +| MSB | Most Significant Bit | +| RX | Receive | +| PDC | Personal Digital Communication (ARIB standard) | + +| | | +|------|------------------------------------------| +| SCR | Source Controlled Rate operation | +| SID | Silence Descriptor (Comfort Noise Frame) | +| TDMA | Time Division Multiple Access (IS-641) | +| TX | Transmit | + +# 4 AMR codec frame format (AMR IF1) + +This clause describes the generic frame format for both the speech and comfort noise frames of the AMR speech codec. This format is referred to as AMR Interface Format 1 (AMR IF1). Annex A describes AMR Interface Format 2 (AMR IF2). + +Each AMR codec mode follows the generic frame structure depicted in figure 1. The frame is divided into three parts: AMR Header, AMR Auxiliary Information, and AMR Core Frame. The AMR Header part includes the Frame Type and the Frame Quality Indicator fields. The AMR auxiliary information part includes the Mode Indication, Mode Request, and Codec CRC fields. The AMR Core Frame part consists of the speech parameter bits or, in case of a comfort noise frame, the comfort noise parameter bits. In case of a comfort noise frame, the comfort noise parameters replace Class A bits of AMR Core Frame while Class B and C bits are omitted. + +![Figure 1: Generic AMR frame structure. The diagram shows a vertical stack of fields grouped into three main sections: AMR Header, AMR Auxiliary Information, and AMR Core Frame. The AMR Header contains 'Frame Type (4 bits)' and 'Frame Quality Indicator (1 bit)'. The AMR Auxiliary Information contains 'Mode Indication (3 bits)', 'Mode Request (3 bits)', and 'Codec CRC (8 bits)', with a note '(for Mode Adaptation, and Error Detection)'. The AMR Core Frame contains 'Class A bits', 'Class B bits', and 'Class C bits', with a note '(speech or comfort noise data)'.](1d27fed9c01eb99f6535283f35fe3bbf_img.jpg) + +| | | +|---------------------------------|-------------------------------------------------------------------------| +| Frame Type (4 bits) | AMR Header | +| Frame Quality Indicator (1 bit) | | +| Mode Indication (3 bits) | AMR Auxiliary Information
(for Mode Adaptation, and Error Detection) | +| Mode Request (3 bits) | | +| Codec CRC (8 bits) | | +| Class A bits | AMR Core Frame (speech or comfort noise data) | +| Class B bits | | +| Class C bits | | + +Figure 1: Generic AMR frame structure. The diagram shows a vertical stack of fields grouped into three main sections: AMR Header, AMR Auxiliary Information, and AMR Core Frame. The AMR Header contains 'Frame Type (4 bits)' and 'Frame Quality Indicator (1 bit)'. The AMR Auxiliary Information contains 'Mode Indication (3 bits)', 'Mode Request (3 bits)', and 'Codec CRC (8 bits)', with a note '(for Mode Adaptation, and Error Detection)'. The AMR Core Frame contains 'Class A bits', 'Class B bits', and 'Class C bits', with a note '(speech or comfort noise data)'. + +Figure 1: Generic AMR frame structure + +## 4.1 AMR Header and AMR Auxiliary Information + +This subclause describes the AMR Header of figure 1. + +### 4.1.1 Frame Type, Mode Indication, and Mode Request + +Table 1a defines the 4-bit Frame Type field. Frame Type can indicate the use of one of the eight AMR codec modes, one of four different comfort noise frames, or an empty frame. In addition, three Frame Type Indices are reserved for future use. The same table is reused for the Mode Indication and Mode Request fields which are 3-bit fields each and are defined only in the range 0...7 to specify one of the eight AMR codec modes. + +**Table 1a: Interpretation of Frame Type, Mode Indication and Mode Request fields** + +| Frame Type | Mode Indication | Mode Request | Frame content (AMR mode, comfort noise, or other) | +|------------|-----------------|--------------|---------------------------------------------------| +| 0 | 0 | 0 | AMR 4,75 kbit/s | +| 1 | 1 | 1 | AMR 5,15 kbit/s | +| 2 | 2 | 2 | AMR 5,90 kbit/s | +| 3 | 3 | 3 | AMR 6,70 kbit/s (PDC-EFR) | +| 4 | 4 | 4 | AMR 7,40 kbit/s (TDMA-EFR) | +| 5 | 5 | 5 | AMR 7,95 kbit/s | +| 6 | 6 | 6 | AMR 10,2 kbit/s | +| 7 | 7 | 7 | AMR 12,2 kbit/s (GSM-EFR) | +| 8 | - | - | AMR SID | +| 9 | - | - | GSM-EFR SID | +| 10 | - | - | TDMA-EFR SID | +| 11 | - | - | PDC-EFR SID | +| 12-14 | - | - | For future use | +| 15 | - | - | No Data (No transmission/No reception) | + +### 4.1.2 Frame Quality Indicator + +The content of the Frame Quality Indicator field is defined in Table 1b. The field length is one bit. The Frame Quality Indicator indicates whether the data in the frame contains errors. + +**Table 1b: Definition of Frame Quality Indicator** + +| Frame Quality Indicator (FQI) | Quality of data | +|-------------------------------|--------------------------------------------------------------------------------| +| 0 | Bad frame or Corrupted frame
(bits may be used to assist error concealment) | +| 1 | Good frame | + +### 4.1.3 Mapping to TX\_TYPE and RX\_TYPE + +Table 1c shows how the AMR Header data (FQI and Frame Type) maps to the TX\_TYPE and RX\_TYPE frames defined in [2]. + +**Table 1c: Mapping of Frame Quality Indicator and Frame Type to TX\_TYPE and RX\_TYPE [2], respectively** + +| Frame Quality Indicator | Frame Type Index | TX_TYPE or RX_TYPE | Comment | +|-------------------------|------------------|-------------------------|-------------------------------------------------------------------------------------------------------------------------------| +| 1 | 0-7 | SPEECH_GOOD | The specific Frame Type Index depends on the bit-rate being used. | +| 0 | 0-7 | SPEECH_BAD | The specific Frame Type Index depends on the bit-rate being used. The corrupted data may be used to assist error concealment. | +| 1 | 8 | SID_FIRST or SID_UPDATE | For AMR: SID_FIRST and SID_UPDATE are differentiated using one Class A bit: STI. | +| 0 | 8 | SID_BAD | For AMR | +| 1 | 9 | GSM-EFR SID | For GSM-EFR | +| 0 | 9 | GSM-EFR SID_BAD | For GSM-EFR | +| 1 | 10-11 | SID_UPDATE | For TDMA-EFR and PDC-EFR | +| 0 | 10-11 | SID_BAD | For TDMA-EFR and PDC-EFR | +| 1 | 15 | NO_DATA | Typically a non-transmitted frame or an erased or stolen frame with no data usable to assist error concealment. | + +### 4.1.4 Codec CRC + +Generic AMR codec frames with Frame Type 0.11 are associated with an 8-bit CRC for error-detection purposes. The Codec CRC field of AMR Auxiliary Information in figure 1 contains the value of this CRC. These eight parity bits are generated by the cyclic generator polynomial: + +$$- G(x)=D^8 + D^6 + D^5 + D^4 + 1$$ + +which is computed over all Class A bits of AMR Core Frame. Class A bits for Frame Types 0.7 are defined in subclause 4.2.2 (for speech bits) and for Frame Types 8.11 in subclause 4.2.3 (for comfort noise bits). + +When Frame Type Index of table 1a is 15 the CRC field is not included in the Generic AMR frame. + +## 4.2 AMR Core Frame + +This subclause contains the description of AMR Core Frame of figure 1. The descriptions for AMR Core Frame with speech bits and with comfort noise bit are given separately. + +### 4.2.1 AMR Core Frame with speech bits: Bit ordering + +This subclause describes how AMR Core Frame carries the coded speech data. The bits produced by the speech encoder are denoted as $\{s(1), s(2), \dots, s(K)\}$ , where $K$ refers to the number of bits produced by the speech encoder as shown in table 2. The notation $s(i)$ follows that of [1]. The speech encoder output bits are ordered according to their subjective importance. This bit ordering can be utilized for error protection purposes when the speech data is, for example, carried over a radio interface. Tables B.1 to B.8 in Annex B define the AMR IF1 bit ordering for all the eight AMR codec modes. In these tables the speech bits are numbered in the order they are produced by the corresponding speech encoder as described in the relevant tables of TS 26.090 [1]. The reordered bits are denoted below, in the order of decreasing importance, as $\{d(0), d(1), \dots, d(K-1)\}$ . + +The ordering algorithm is described in pseudo code as: + +- for $j = 0$ to $K-1$ +- $d(j) := s(\text{table}_m(j)+1)$ ; + +where $\text{table}_m(j)$ refers to the relevant table in Annex B depending on the AMR mode $m=0..7$ . The Annex B tables should be read line by line from left to right. The first element of the table has the index 0. + +### 4.2.2 AMR Core Frame with speech bits: Class division + +The reordered bits are further divided into three indicative classes according to their subjective importance. This class division is only informative and provides supporting information for mapping this generic format into specific formats. The three different importance classes can then be subject to different error protection in the network. + +The importance classes are Class A, Class B, and Class C. Class A contains the bits most sensitive to errors and any error in these bits typically results in a corrupted speech frame which should not be decoded without applying appropriate error concealment. This class is protected by the Codec CRC in AMR Auxiliary Information. Classes B and C contain bits where increasing error rates gradually reduce the speech quality, but decoding of an erroneous speech frame is usually possible without annoying artefacts. Class B bits are more sensitive to errors than Class C bits. The importance ordering applies also within the three different classes and there are no significant step-wise changes in subjective importance between neighbouring bits at the class borders. + +The number of speech bits in each class (Class A, Class B, and Class C) for each AMR mode is shown in table 2. The classification in table 2 and the importance ordering $d(j)$ , together, are sufficient to assign all speech bits to their correct classes. For example, when the AMR codec mode is 4.75, then the Class A bits are $d(0)..d(41)$ , Class B bits are $d(42)..d(94)$ , and there are no Class C bits. + +**Table 2: Number of bits in Classes A, B, and C for each AMR codec mode** + +| Frame Type | AMR codec mode | Total number of bits | Class A | Class B | Class C | +|------------|----------------|----------------------|---------|---------|---------| +| 0 | 4,75 | 95 | 42 | 53 | 0 | +| 1 | 5,15 | 103 | 49 | 54 | 0 | +| 2 | 5,90 | 118 | 55 | 63 | 0 | +| 3 | 6,70 | 134 | 58 | 76 | 0 | +| 4 | 7,40 | 148 | 61 | 87 | 0 | +| 5 | 7,95 | 159 | 75 | 84 | 0 | +| 6 | 10,2 | 204 | 65 | 99 | 40 | +| 7 | 12,2 | 244 | 81 | 103 | 60 | + +### 4.2.3 AMR Core Frame with comfort noise bits + +The AMR Core Frame content for the additional frame type with Frame Type Index 8 in table 1a is described in this subclause. This consists of the frame related to Source Controlled Rate Operation specified in [2]. + +The data content (comfort noise bits) of the additional frame types is carried in AMR Core Frame. The comfort noise bits are all mapped to Class A of AMR Core Frame and Classes B and C are not used. This is a notation convention only and the class division has no meaning for comfort noise bits. + +The number of bits in each class (Class A, Class B, and Class C) for the AMR comfort noise bits (Frame Type Index 8) is shown in table 3. The contents of SID\_UPDATE and SID\_FIRST are divided into three parts (SID Type Indicator (STI), Mode Indication ( $mi(i)$ ), and Comfort Noise Parameters ( $s(i)$ ) as defined in [2]. In case of SID\_FIRST the Comfort Noise Parameters bits ( $s(i)$ ) shall be set to “0”. + +The comfort noise parameter bits produced by the AMR speech encoder are denoted as $s(i) = \{s(1), s(2), \dots, s(35)\}$ . The notation $s(i)$ follows that of [3]. These bits are numbered in the order they are produced by the AMR encoder without any reordering. These bits are followed by the SID Type Indicator **STI** and the Mode Indication $mi(i) = \{mi(0), mi(1), mi(2)\} = \{LSB \dots MSB\}$ . Thus, the AMR SID or comfort noise bits $\{d(0), d(1), \dots, d(38)\}$ are formed as defined by the pseudo code below. + +- for $j = 0$ to 34; +- $d(j) := s(j+1)$ ; +- $d(35) := STI$ ; +- for $j = 36$ to 38; +- $d(j) := mi(j-36)$ . Note: This mapping is different to the usual mapping: LSB first. + +Note: The alternative would be: $d(j) := mi(38-j)$ : MSB first. + +**Table 3. Bit classification for Frame Type 8 (AMR SID)** + +| Frame Type Index | FQI | AMR TX_TYPE or RX_TYPE | Total number of bits | Class A | | | Class B | Class C | +|------------------|-----|------------------------|----------------------|--------------------------|-------------------------|--------------------------------|---------|---------| +| | | | | SID Type Indicator (STI) | Mode Indication $mi(i)$ | Comfort Noise Parameter $s(i)$ | | | +| 8 | 1 | SID_UPDATE | 39 | 1 (= "1") | 3 | 35 | 0 | 0 | +| 8 | 1 | SID_FIRST | 39 | 1 (= "0") | 3 | 35 (= "0") | 0 | 0 | +| 8 | 0 | SID_BAD | 39 | 1 | 3 | 35 | 0 | 0 | + +The number of bits in each class (Class A, Class B, and Class C) for the comfort noise bits of Frame Types 9-11 is shown in Table 7. + +**Table 4: void** + +## 4.3 AMR frame composition + +The generic AMR frame is formed as a concatenation of AMR Header, AMR Auxiliary Information and the AMR Core Frame, in this order. The MSB of the Frame Type is placed in bit 8 of the first octet (see example in table 5 below), the LSB of the Frame Type is placed in bit 5. Then the next parameter follows, which is the Frame Quality Indicator, and so on. Between Mode Request and Codec CRC five spare bits are inserted to align the Codec CRC and the AMR Core frame to the octet boundary. The first bit of the AMR Core frame d(0) is placed in bit 8 of octet 4. The last bit of the generic AMR frame is the last bit of AMR Core Frame, which is the last bit of speech bits or the last bit of comfort noise bits, as defined in subclauses 4.2.1 and 4.2.3. Table 5 shows the composition for the example of the Codec Mode 6.7kbit/s and table 6 shows the composition for the AMR SID frame. + +**Table 5: Mapping of an AMR speech coding mode into the generic AMR frame, AMR IF1, example: AMR 6.7 kbit/s, "good frame", Mode Request = 1.** + +| Octet | MSB | Mapping of bits
AMR 6.7 | | | | | | LSB | +|-------|---------------------------|----------------------------|--------|--------|--------|----------------------|-----------|--------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Frame Type (=3) | | | | FQI | Mode Indication (=3) | | | +| | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | +| 2 | Mode Request (=1) | | | spare | | | | | +| | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | +| 3 | Codec CRC | | | | | | | | +| | CRC(7) | CRC(6) | CRC(5) | CRC(4) | CRC(3) | CRC(2) | CRC(1) | CRC(0) | +| 4 | AMR Core Frame (octet 1) | | | | | | | | +| | d(0) | d(1) | d(2) | d(3) | d(4) | d(5) | d(6) | d(7) | +| 5..19 | | | | | | | | | +| 20 | AMR Core Frame (octet 17) | | | | | | undefined | | +| | d(128) | d(129) | d(130) | d(131) | d(132) | d(133) | | | + +**Table 6: Mapping of an AMR SID frame into the generic AMR frame, AMR IF1, example: AMR SID\_Update, "good frame", Mode Indication = 3, Mode Request = 2.** + +| Octet | MSB | Mapping of bits
AMR SID | | | | | | LSB | +|-------|--------------------------|----------------------------|------------------|--------|----------------------|-----------------|--------|--------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Frame Type (=8) | | | | FQI | Mode Indication | | | +| | 1 | 0 | 0 | 0 | 1 | undefined | | | +| 2 | Mode Request (=2) | | | spare | | | | | +| | MSB | ... | LSB | | | | | | +| | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | +| 3 | Codec CRC | | | | | | | | +| | CRC(7) | CRC(6) | CRC(5) | CRC(4) | CRC(3) | CRC(2) | CRC(1) | CRC(0) | +| 4 | AMR Core Frame (octet 1) | | | | | | | | +| | d(0)=s(1) | d(1)=s(2) | d(2) | d(3) | d(4) | d(5) | d(6) | d(7) | +| 5..7 | | | | | | | | | +| 8 | | | | STI | Mode Indication (=3) | | | undef. | +| | | | | | LSB | ... | MSB | | +| | d(32) | d(33) | d(34) =
s(35) | 1 | 1 | 1 | 0 | | + +Table 7 summarizes all possible AMR frame format combinations in terms of number of bits in each field. + +**Table 7. Number of bits for different fields in different AMR frame compositions** + +| Frame Type Index | Frame Type | Frame Quality Indicator | Mode Indication | Mode Request | Codec CRC | Class A | Class B | Class C | Total | +|------------------|-----------------------|-------------------------|-----------------|--------------|-----------|---------|---------|---------|-------| +| | AMR Core Frame | | | | | | | | | +| 0 | 4 | 1 | 3 | 3 | 8 | 42 | 53 | 0 | 114 | +| 1 | 4 | 1 | 3 | 3 | 8 | 49 | 54 | 0 | 122 | +| 2 | 4 | 1 | 3 | 3 | 8 | 55 | 63 | 0 | 137 | +| 3 | 4 | 1 | 3 | 3 | 8 | 58 | 76 | 0 | 153 | +| 4 | 4 | 1 | 3 | 3 | 8 | 61 | 87 | 0 | 167 | +| 5 | 4 | 1 | 3 | 3 | 8 | 75 | 84 | 0 | 178 | +| 6 | 4 | 1 | 3 | 3 | 8 | 65 | 99 | 40 | 223 | +| 7 | 4 | 1 | 3 | 3 | 8 | 81 | 103 | 60 | 263 | +| 8 | 4 | 1 | 3 | 3 | 8 | 39 | 0 | 0 | 58 | +| 9 | 4 | 1 | 3 | 3 | 8 | 43 | 0 | 0 | 62 | +| 10 | 4 | 1 | 3 | 3 | 8 | 38 | 0 | 0 | 57 | +| 11 | 4 | 1 | 3 | 3 | 8 | 37 | 0 | 0 | 56 | +| 12 | Not used | | | | | | | | | +| 13 | Not used | | | | | | | | | +| 14 | Not used | | | | | | | | | +| 15 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | + +## 4.4 GSM-EFR Frame Composition + +This subclause contains the description of the generic GSM-EFR Frame of Figure 1. The descriptions for the generic GSM-EFR Frame with speech bits and with comfort noise bit are given separately. + +### 4.4.1 GSM-EFR Frame with speech bits + +The generic GSM-EFR frame for speech data bits is formed like for the AMR mode 12.2 kbit/s. + +The same Frame Type (Frame Type 7) is used also for GSM-EFR. The Mode Indication and Mode Request fields are set to “7”. The GSM-EFR Core Frame for speech data bits is identical to the AMR Core Frame for speech data bits in the AMR mode with 12.2 kbit/s. + +### 4.4.2 GSM-EFR Frame with comfort noise bits + +The GSM-EFR Frame content for the additional frame type with Frame Type Index 9 in Table 1a are described in this subclause. This consists of the frame related to GSM-EFR Comfort Noise Aspects as specified in [4] and [5]. + +The comfort noise bits are all mapped to Class A. Classes B and C are not used (see Table 7). + +The contents of GSM-EFR SID is the Comfort Noise Parameters ( $s(i)$ ) as defined in [4]. The Comfort noise parameters are computed as described in [5] by the GSM-EFR speech encoder and are denoted as $s(i) = \{s(1), s(2), \dots, s(38), s(87), s(88), \dots, s(91)\}$ . The notation $s(i)$ follows that of [4] (Table 6). The notation $d(j) = \{d(0) \dots d(42)\}$ is local to the present document and is formed as defined by the pseudo code below. + +``` + +for j = 0 to 37 + $d(j) := s(j+1)$ ; /* LSP parameters in s(1) to s(38) */ + +for j = 38 to 42 + $d(j) := s(j+49)$ ; /* fixed codebook gain parameter in s(87)-s(91) */ + +``` + +Table 8 shows the composition for the generic GSM-EFR SID frame. + +**Table 8: Mapping of the GSM-EFR SID frame into the generic AMR frame format, AMR IF1, +Example of a good GSM-EFR SID frame (FQI=1).** + +| Octet | MSB | Mapping of bits for GSM-EFR SID | | | | | | LSB | +|-------|----------------------|---------------------------------|-------------|--------|-------------|----------------------|-------------|-------------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Frame Type (=9) | | | | FQI | Mode Indication (=7) | | | +| | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | +| 2 | Mode Request (=7) | | | spare | | | | | +| | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | +| 3 | Codec CRC | | | | | | | | +| | CRC(7) | CRC(6) | CRC(5) | CRC(4) | CRC(3) | CRC(2) | CRC(1) | CRC(0) | +| 4 | Core Frame (octet 1) | | | | | | | | +| | d(0)=s(1) | d(1)=s(2) | d(2) | d(3) | d(4) | d(5) | d(6) | d(7) | +| 5..7 | | | | | | | | | +| 8 | | | | | | | | | +| | d(32) | d(33) | d(34) | d(35) | d(36)=s(37) | d(37)=s(38) | d(38)=s(87) | d(39)=s(88) | +| 9 | spare | | | | | | | | +| | d(40)=s(89) | d(41)=s(90) | d(42)=s(91) | 0 | 0 | 0 | 0 | 0 | + +# Annex A (informative): AMR Interface Format 2 (with octet alignment) + +This annex defines an octet-aligned frame format for the AMR codec. This format is useful, for example, when the AMR codec is used in connection with applicable ITU-T H-series of recommendations. The format is referred to as AMR Interface Format 2 (AMR IF2). + +The AMR IF2 frame is formed by concatenation of the 4-bit Frame Type field (as defined for AMR IF1 in subclause 4.1.1) and the AMR Core Frame (as defined for AMR IF1 in subclause 4.2) as shown in figure A.1. The length of the AMR Core Frame field depends on the particular Frame Type. The total number of bits in the AMR IF2 speech frames in the different modes is typically not a multiple of eight and bit stuffing is needed to achieve an octet structure. + +![Figure A.1: Frame structure for AMR IF2. The diagram shows a vertical stack of five boxes representing the frame components. From top to bottom: 'Frame Type (4 bits)', 'Class A bits', 'Class B bits', 'Class C bits', and 'Bit Stuffing'. A line connects the 'Class B bits' box to a separate box labeled 'AMR Core Frame (speech or comfort noise data)'.](ddc7460821484f1ae2835c67955c554c_img.jpg) + +Figure A.1: Frame structure for AMR IF2. The diagram shows a vertical stack of five boxes representing the frame components. From top to bottom: 'Frame Type (4 bits)', 'Class A bits', 'Class B bits', 'Class C bits', and 'Bit Stuffing'. A line connects the 'Class B bits' box to a separate box labeled 'AMR Core Frame (speech or comfort noise data)'. + +**Figure A.1: Frame structure for AMR IF2** + +Table A.1a shows an example how the AMR 6.7 kbit/s mode is mapped into AMR IF2. The four LSBs of the first octet (octet 1) consist of the Frame Type(=3) for the AMR 6.7 kbit/s mode (see table 1a in AMR IF1 specification). This data field is followed by the 134 AMR Core Frame speech bits ( $d(0)\dots d(133)$ ) which consist of 58 Class A bits and 76 Class B bits as described in table 2 for AMR IF1. This results in a total of 138 bits and 6 bits are needed for Bit Stuffing to arrive to the closest multiple of 8 which is 144 bits. + +**Table A.1a: Example mapping of the AMR speech coding mode 6.7kbit/s into AMR IF2. +The bits used for Bit Stuffing are denoted as UB (for "unused bit").** + +| Octet | MSB | Mapping of bits
AMR 6.7 | | | | | | LSB | +|-------|---------------|----------------------------|-------|-------|------------------|-------|--------|--------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | | | | | Frame Type (= 3) | | | | +| | | | | | MSB | ..... | | LSB | +| 2 | d(3) | d(2) | d(1) | d(0) | 0 | 0 | 1 | 1 | +| 3 | d(11) | d(10) | d(9) | d(8) | d(7) | d(6) | d(5) | d(4) | +| 18 | ... | ... | ... | ... | ... | ... | ... | d(12) | +| 19 | Stuffing bits | | | | | | d(133) | d(132) | +| | UB | UB | UB | UB | UB | UB | d(133) | d(132) | + +Table A.1b shows the composition of AMR IF2 frames for all Frame Types in terms of how many bits are used for each field of figure A.1. + +Tables A.2 to A.5 specify how the AMR Core Frame comfort noise bits of Frame Types 8-11 are mapped to AMR IF2. Table A.6 specifies the mapping for an empty frame ("no transmission"). + +**Table A.1b: Composition of AMR IF2 Frames for all Frame Types.** + +| Frame Type Index | Frame content | Number of bits in Frame Type | Number of Bits in AMR Core Frame | Number of Bits in Bit Stuffing | Number of octets (N) | +|------------------|----------------|------------------------------|----------------------------------|--------------------------------|----------------------| +| 0 | AMR 4,75 | 4 | 95 | 5 | 13 | +| 1 | AMR 5,15 | 4 | 103 | 5 | 14 | +| 2 | AMR 5,90 | 4 | 118 | 6 | 16 | +| 3 | AMR 6,70 | 4 | 134 | 6 | 18 | +| 4 | AMR 7,40 | 4 | 148 | 0 | 19 | +| 5 | AMR 7,95 | 4 | 159 | 5 | 21 | +| 6 | AMR 10,2 | 4 | 204 | 0 | 26 | +| 7 | AMR 12,2 | 4 | 244 | 0 | 31 | +| 8 | AMR SID | 4 | 39 | 5 | 6 | +| 9 | GSM-EFR SID | 4 | 43 | 1 | 6 | +| 10 | TDMA-EFR SID | 4 | 38 | 6 | 6 | +| 11 | PDC-EFR SID | 4 | 37 | 7 | 6 | +| 12-14 | For future use | - | - | - | - | +| 15 | No Data | 4 | 0 | 4 | 1 | + +**Table A.2: Mapping of bits for Frame Type 8 (AMR SID) +(Bits s1 to s35 refer to TS 26.092)** + +| | MSB | Mapping of bits
AMR SID | | | | | | LSB | +|-------|----------------------------------------|----------------------------------------|-------|-------|------------------|--------------------------|-------|----------------------------------------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Index of 1 st LSF subvector | index of LSF reference vector | | | Frame Type (= 8) | | | | +| | s4 | s3 | s2 | s1 | MSB
1 | .....
0 | 0 | LSB
0 | +| 2 | Index of 2 nd LSF subvector | index of 1 st LSF subvector | | | | | | | +| | s12 | s11 | s10 | s9 | s8 | s7 | s6 | s5 | +| 3 | | index of 2 nd LSF subvector | | | | | | | +| | s20 | s19 | s18 | s17 | s16 | s15 | s14 | s13 | +| 4 | | index of 3 rd LSF subvector | | | | | | | +| | s28 | s27 | s26 | s25 | s24 | s23 | s22 | s21 | +| 5 | SID Type Indicator | frame energy | | | | | | index of 3 rd LSF subvector | +| | t1 | s35 | s34 | s33 | s32 | s31 | s30 | s29 | +| 6 | | Stuffing bits | | | | Mode Indication
mi(i) | | | +| | UB | UB | UB | UB | UB | MSB
mi(2) | mi(1) | LSB
mi(0) | + +Definitions of additional descriptor bits needed for the silence descriptor in the table are as follows: SID-type Indicator STI is {0=SID\_FIRST, 1=SID\_UPDATE }, Mode Indication (mi(0)- mi(2)) is the AMR codec mode according to the first eight entries in table 1a. + +**Table A.3: Mapping of bits for Frame Type 9 (GSM-EFR SID)** + (Bits s1 to s91 refer to GSM 46.060) + +| | MSB | Mapping of bits
GSM-EFR SID | | | | | | LSB | +|-------|----------------------------------------|--------------------------------|-------|-------|----------------------------------------|----------------------------------------|----------------------------------------|-------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Index of 1 st LSF subMatrix | | | | Frame Type (= 9) | | | | +| | s4 | s3 | s2 | s1 | 1 | 0 | 0 | 1 | +| 2 | Index of 2 nd LSF submatrix | | | | index of 1 st LSF subMatrix | | | | +| | s12 | s11 | s10 | s9 | s8 | s7 | s6 | s5 | +| 3 | Index of 3 rd LSF submatrix | | | | Index of 2 nd LSF submatrix | | | | +| | s20 | s19 | s18 | s17 | s16 | s15 | s14 | s13 | +| 4 | index of 4 th LSF submatrix | | | | sign of 3 rd LSF submatrix | index of 3 rd LSF submatrix | | | +| | s28 | s27 | s26 | s25 | s24 | s23 | s22 | s21 | +| 5 | index of 5 th LSF submatrix | | | | index of 4 th LSF submatrix | | | | +| | s36 | s35 | s34 | s33 | s32 | s31 | s30 | s29 | +| 6 | Stuffing bit | fixed codebook gain | | | | | index of 5 th LSF submatrix | | +| | UB | s91 | s90 | s89 | s88 | s87 | s38 | s37 | + +**Table A.4: Mapping of bits for Frame Type 10 (TDMA-EFR SID)** + (Bits cn0 to cn37 refer to IS-641-A) + +| | MSB | Mapping of bits
TDMA-EFR SID | | | | | | LSB | +|-------|-----------------------------------------|---------------------------------|----------------------------------------|----------------------------------------|----------------------------------------|-------|-----------------------------------------|-------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Index of 1 st LSF subvector | | | | Frame Type (= 10) | | | | +| | cn3 | cn2 | cn1 | cn0 | 1 | 0 | 1 | 0 | +| 2 | Index of 2 nd LSF subvector | | | | index of 1 st LSF subvector | | | | +| | cn11 | Cn10 | cn9 | cn8 | cn7 | cn6 | cn5 | cn4 | +| 3 | Index of 3 rd LSF subvector | | | Index of 2 nd LSF subvector | | | | | +| | cn19 | cn18 | cn17 | cn16 | cn15 | cn14 | cn13 | cn12 | +| 4 | Random Excitation Gain | | index of 3 rd LSF subvector | | | | | | +| | cn27 | cn26 | cn25 | cn24 | cn23 | cn22 | cn21 | cn20 | +| 5 | Index of 1 st RESC parameter | | Random Excitation Gain | | | | | | +| | cn35 | cn34 | cn33 | cn32 | cn31 | cn30 | cn29 | cn28 | +| 6 | Stuffing bits | | | | | | Index of 2 nd RESC parameter | | +| | UB | UB | UB | UB | UB | UB | cn37 | cn36 | + +**Table A.5: Mapping of bits for Frame Type 11 (PDC-EFR SID)** + (Bits s1 to s35 refer to ARIB xx) + +| | MSB | Mapping of bits
PDC-EFR SID | | | | | | LSB | +|-------|----------------------------------------|----------------------------------------|-------|-------|-------------------|-------|-------|----------------------------------------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | index of 1 st LSF subvector | index of LSF reference vector | | | Frame Type (= 11) | | | | +| | s4 | s3 | s2 | s1 | 1 | 0 | 1 | 1 | +| 2 | index of 2 nd LSF subvector | index of 1 st LSF subvector | | | | | | | +| | s12 | s11 | s10 | s9 | s8 | s7 | s6 | s5 | +| 3 | index of 2 nd LSF subvector | | | | | | | | +| | s20 | s19 | s18 | s17 | s16 | s15 | s14 | s13 | +| 4 | index of 3 rd LSF subvector | | | | | | | | +| | s28 | s27 | s26 | s25 | s24 | s23 | s22 | s21 | +| 5 | SID type | frame energy | | | | | | Index of 3 rd LSF subvector | +| | t1 | s35 | s34 | s33 | s32 | s31 | s30 | s29 | +| 6 | Stuffing bits | | | | | | | SID type | +| | UB | UB | UB | UB | UB | UB | UB | t2 | + +Definition of additional descriptor bits needed for the table is as follows: SID-type is {0=POST0, 1=POST1(SID\_UPDATE), 2=PRE, 3=POST1\_BAD }, where LSB of SID\_type is t1 and MSB of SID-type is t2. + +**Table A.6: Mapping of bit for Frame Type 15 (No Data)** + +| | MSB | Mapping of Bits
No Data | | | | | | LSB | +|-------|---------------|----------------------------|-------|-------|-------------------|-------|-------|-------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Stuffing bits | | | | Frame Type (= 15) | | | | +| | UB | UB | UB | UB | 1 | 1 | 1 | 1 | + +# Annex B (normative): Tables for AMR Core Frame bit ordering + +This annex contains the tables required for ordering the AMR Core Frame speech bits corresponding to the different AMR modes. These tables represent $table_m(j)$ in subclause 4.2.1 where $m=0..7$ is the AMR mode. The tables are read from left to right so that the first element (top left corner) of the table has index 0 and the last element (the rightmost element of the last row) has the index $K-1$ where $K$ is the total number of speech bits in the specific mode. For example, $table_0(20)=27$ , as defined in table B.1. + +**Table B.1: Ordering of the speech encoder bits for the 4.75 kbit/s mode: $table_0(j)$** + +| $j=0$ | $j=1$ | $j=2$ | ... | ... | ... | ... | ... | ... | ... | +|-------|-------|-------|-----|-----|-----|-----|-----|-----|-----| +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +| 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 | 25 | 26 | +| 27 | 28 | 48 | 49 | 61 | 62 | 82 | 83 | 47 | 46 | +| 45 | 44 | 81 | 80 | 79 | 78 | 17 | 18 | 20 | 22 | +| 77 | 76 | 75 | 74 | 29 | 30 | 43 | 42 | 41 | 40 | +| 38 | 39 | 16 | 19 | 21 | 50 | 51 | 59 | 60 | 63 | +| 64 | 72 | 73 | 84 | 85 | 93 | 94 | 32 | 33 | 35 | +| 36 | 53 | 54 | 56 | 57 | 66 | 67 | 69 | 70 | 87 | +| 88 | 90 | 91 | 34 | 55 | 68 | 89 | 37 | 58 | 71 | +| 92 | 31 | 52 | 65 | 86 | | | | | | + +**Table B.2: Ordering of the speech encoder bits for the 5.15 kbit/s mode: $table_1(j)$** + +| | | | | | | | | | | +|----|----|----|-----|-----|-----|----|----|----|----| +| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 15 | 14 | +| 13 | 12 | 11 | 10 | 9 | 8 | 23 | 24 | 25 | 26 | +| 27 | 46 | 65 | 84 | 45 | 44 | 43 | 64 | 63 | 62 | +| 83 | 82 | 81 | 102 | 101 | 100 | 42 | 61 | 80 | 99 | +| 28 | 47 | 66 | 85 | 18 | 41 | 60 | 79 | 98 | 29 | +| 48 | 67 | 17 | 20 | 22 | 40 | 59 | 78 | 97 | 21 | +| 30 | 49 | 68 | 86 | 19 | 16 | 87 | 39 | 38 | 58 | +| 57 | 77 | 35 | 54 | 73 | 92 | 76 | 96 | 95 | 36 | +| 55 | 74 | 93 | 32 | 51 | 33 | 52 | 70 | 71 | 89 | +| 90 | 31 | 50 | 69 | 88 | 37 | 56 | 75 | 94 | 34 | +| 53 | 72 | 91 | | | | | | | | + +**Table B.3: Ordering of the speech encoder bits for the 5.9 kbit/s mode: $table_2(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|----|-----|-----|-----| +| 0 | 1 | 4 | 5 | 3 | 6 | 7 | 2 | 13 | 15 | +| 8 | 9 | 11 | 12 | 14 | 10 | 16 | 28 | 74 | 29 | +| 75 | 27 | 73 | 26 | 72 | 30 | 76 | 51 | 97 | 50 | +| 71 | 96 | 117 | 31 | 77 | 52 | 98 | 49 | 70 | 95 | +| 116 | 53 | 99 | 32 | 78 | 33 | 79 | 48 | 69 | 94 | +| 115 | 47 | 68 | 93 | 114 | 46 | 67 | 92 | 113 | 19 | +| 21 | 23 | 22 | 18 | 17 | 20 | 24 | 111 | 43 | 89 | +| 110 | 64 | 65 | 44 | 90 | 25 | 45 | 66 | 91 | 112 | +| 54 | 100 | 40 | 61 | 86 | 107 | 39 | 60 | 85 | 106 | +| 36 | 57 | 82 | 103 | 35 | 56 | 81 | 102 | 34 | 55 | +| 80 | 101 | 42 | 63 | 88 | 109 | 41 | 62 | 87 | 108 | +| 38 | 59 | 84 | 105 | 37 | 58 | 83 | 104 | | | + +**Table B.4: Ordering of the speech encoder bits for the 6.7 kbit/s mode: $table_3(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 1 | 4 | 3 | 5 | 6 | 13 | 7 | 2 | 8 | +| 9 | 11 | 15 | 12 | 14 | 10 | 28 | 82 | 29 | 83 | +| 27 | 81 | 26 | 80 | 30 | 84 | 16 | 55 | 109 | 56 | +| 110 | 31 | 85 | 57 | 111 | 48 | 73 | 102 | 127 | 32 | +| 86 | 51 | 76 | 105 | 130 | 52 | 77 | 106 | 131 | 58 | +| 112 | 33 | 87 | 19 | 23 | 53 | 78 | 107 | 132 | 21 | +| 22 | 18 | 17 | 20 | 24 | 25 | 50 | 75 | 104 | 129 | +| 47 | 72 | 101 | 126 | 54 | 79 | 108 | 133 | 46 | 71 | +| 100 | 125 | 128 | 103 | 74 | 49 | 45 | 70 | 99 | 124 | +| 42 | 67 | 96 | 121 | 39 | 64 | 93 | 118 | 38 | 63 | +| 92 | 117 | 35 | 60 | 89 | 114 | 34 | 59 | 88 | 113 | +| 44 | 69 | 98 | 123 | 43 | 68 | 97 | 122 | 41 | 66 | +| 95 | 120 | 40 | 65 | 94 | 119 | 37 | 62 | 91 | 116 | +| 36 | 61 | 90 | 115 | | | | | | | + +**Table B.5: Ordering of the speech encoder bits for the 7.4 kbit/s mode: $table_4(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +| 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 87 | 27 | +| 88 | 28 | 89 | 29 | 90 | 30 | 91 | 51 | 80 | 112 | +| 141 | 52 | 81 | 113 | 142 | 54 | 83 | 115 | 144 | 55 | +| 84 | 116 | 145 | 58 | 119 | 59 | 120 | 21 | 22 | 23 | +| 17 | 18 | 19 | 31 | 60 | 92 | 121 | 56 | 85 | 117 | +| 146 | 20 | 24 | 25 | 50 | 79 | 111 | 140 | 57 | 86 | +| 118 | 147 | 49 | 78 | 110 | 139 | 48 | 77 | 53 | 82 | +| 114 | 143 | 109 | 138 | 47 | 76 | 108 | 137 | 32 | 33 | +| 61 | 62 | 93 | 94 | 122 | 123 | 41 | 42 | 43 | 44 | +| 45 | 46 | 70 | 71 | 72 | 73 | 74 | 75 | 102 | 103 | +| 104 | 105 | 106 | 107 | 131 | 132 | 133 | 134 | 135 | 136 | +| 34 | 63 | 95 | 124 | 35 | 64 | 96 | 125 | 36 | 65 | +| 97 | 126 | 37 | 66 | 98 | 127 | 38 | 67 | 99 | 128 | +| 39 | 68 | 100 | 129 | 40 | 69 | 101 | 130 | | | + +**Table B.6: Ordering of the speech encoder bits for the 7.95 kbit/s mode: $table_5(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 14 | 16 | 9 | +| 10 | 12 | 13 | 15 | 11 | 17 | 20 | 22 | 24 | 23 | +| 19 | 18 | 21 | 56 | 88 | 122 | 154 | 57 | 89 | 123 | +| 155 | 58 | 90 | 124 | 156 | 52 | 84 | 118 | 150 | 53 | +| 85 | 119 | 151 | 27 | 93 | 28 | 94 | 29 | 95 | 30 | +| 96 | 31 | 97 | 61 | 127 | 62 | 128 | 63 | 129 | 59 | +| 91 | 125 | 157 | 32 | 98 | 64 | 130 | 1 | 0 | 25 | +| 26 | 33 | 99 | 34 | 100 | 65 | 131 | 66 | 132 | 54 | +| 86 | 120 | 152 | 60 | 92 | 126 | 158 | 55 | 87 | 121 | +| 153 | 117 | 116 | 115 | 46 | 78 | 112 | 144 | 43 | 75 | +| 109 | 141 | 40 | 72 | 106 | 138 | 36 | 68 | 102 | 134 | +| 114 | 149 | 148 | 147 | 146 | 83 | 82 | 81 | 80 | 51 | +| 50 | 49 | 48 | 47 | 45 | 44 | 42 | 39 | 35 | 79 | +| 77 | 76 | 74 | 71 | 67 | 113 | 111 | 110 | 108 | 105 | +| 101 | 145 | 143 | 142 | 140 | 137 | 133 | 41 | 73 | 107 | +| 139 | 37 | 69 | 103 | 135 | 38 | 70 | 104 | 136 | | + +**Table B.7: Ordering of the speech encoder bits for the 10.2 kbit/s mode: $table_6(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 16 | 15 | +| 14 | 13 | 12 | 11 | 10 | 9 | 8 | 26 | 27 | 28 | +| 29 | 30 | 31 | 115 | 116 | 117 | 118 | 119 | 120 | 72 | +| 73 | 161 | 162 | 65 | 68 | 69 | 108 | 111 | 112 | 154 | +| 157 | 158 | 197 | 200 | 201 | 32 | 33 | 121 | 122 | 74 | +| 75 | 163 | 164 | 66 | 109 | 155 | 198 | 19 | 23 | 21 | +| 22 | 18 | 17 | 20 | 24 | 25 | 37 | 36 | 35 | 34 | +| 80 | 79 | 78 | 77 | 126 | 125 | 124 | 123 | 169 | 168 | +| 167 | 166 | 70 | 67 | 71 | 113 | 110 | 114 | 159 | 156 | +| 160 | 202 | 199 | 203 | 76 | 165 | 81 | 82 | 92 | 91 | +| 93 | 83 | 95 | 85 | 84 | 94 | 101 | 102 | 96 | 104 | +| 86 | 103 | 87 | 97 | 127 | 128 | 138 | 137 | 139 | 129 | +| 141 | 131 | 130 | 140 | 147 | 148 | 142 | 150 | 132 | 149 | +| 133 | 143 | 170 | 171 | 181 | 180 | 182 | 172 | 184 | 174 | +| 173 | 183 | 190 | 191 | 185 | 193 | 175 | 192 | 176 | 186 | +| 38 | 39 | 49 | 48 | 50 | 40 | 52 | 42 | 41 | 51 | +| 58 | 59 | 53 | 61 | 43 | 60 | 44 | 54 | 194 | 179 | +| 189 | 196 | 177 | 195 | 178 | 187 | 188 | 151 | 136 | 146 | +| 153 | 134 | 152 | 135 | 144 | 145 | 105 | 90 | 100 | 107 | +| 88 | 106 | 89 | 98 | 99 | 62 | 47 | 57 | 64 | 45 | +| 63 | 46 | 55 | 56 | | | | | | | + +**Table B.8: Ordering of the speech encoder bits for the 12.2 kbit/s mode: $table_7(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +| 10 | 11 | 12 | 13 | 14 | 23 | 15 | 16 | 17 | 18 | +| 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 38 | +| 141 | 39 | 142 | 40 | 143 | 41 | 144 | 42 | 145 | 43 | +| 146 | 44 | 147 | 45 | 148 | 46 | 149 | 47 | 97 | 150 | +| 200 | 48 | 98 | 151 | 201 | 49 | 99 | 152 | 202 | 86 | +| 136 | 189 | 239 | 87 | 137 | 190 | 240 | 88 | 138 | 191 | +| 241 | 91 | 194 | 92 | 195 | 93 | 196 | 94 | 197 | 95 | +| 198 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 50 | 100 | +| 153 | 203 | 89 | 139 | 192 | 242 | 51 | 101 | 154 | 204 | +| 55 | 105 | 158 | 208 | 90 | 140 | 193 | 243 | 59 | 109 | +| 162 | 212 | 63 | 113 | 166 | 216 | 67 | 117 | 170 | 220 | +| 36 | 37 | 54 | 53 | 52 | 58 | 57 | 56 | 62 | 61 | +| 60 | 66 | 65 | 64 | 70 | 69 | 68 | 104 | 103 | 102 | +| 108 | 107 | 106 | 112 | 111 | 110 | 116 | 115 | 114 | 120 | +| 119 | 118 | 157 | 156 | 155 | 161 | 160 | 159 | 165 | 164 | +| 163 | 169 | 168 | 167 | 173 | 172 | 171 | 207 | 206 | 205 | +| 211 | 210 | 209 | 215 | 214 | 213 | 219 | 218 | 217 | 223 | +| 222 | 221 | 73 | 72 | 71 | 76 | 75 | 74 | 79 | 78 | +| 77 | 82 | 81 | 80 | 85 | 84 | 83 | 123 | 122 | 121 | +| 126 | 125 | 124 | 129 | 128 | 127 | 132 | 131 | 130 | 135 | +| 134 | 133 | 176 | 175 | 174 | 179 | 178 | 177 | 182 | 181 | +| 180 | 185 | 184 | 183 | 188 | 187 | 186 | 226 | 225 | 224 | +| 229 | 228 | 227 | 232 | 231 | 230 | 235 | 234 | 233 | 238 | +| 237 | 236 | 96 | 199 | | | | | | | + +# Annex C (informative): Change history + +| Change history | | | | | | | | +|----------------|---------|-----------|-----|-----|-----------------------------------------------------------------------------------------------------------------|--------|--------| +| Date | TSG SA# | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 1999-12 | 6 | SP-990562 | | | Approved at TSG-SA#6 Plenary | | 3.0.0 | +| 2000-03 | 7 | SP-000025 | 001 | | Correction of indices in Annex B table | 3.0.0 | 3.1.0 | +| 2000-03 | 7 | SP-000025 | 002 | | Addition of comfort noise bit ordering | 3.0.0 | 3.1.0 | +| 2000-03 | 7 | SP-000025 | 003 | | Correction of table indexing for AMR Core Frame class division | 3.0.0 | 3.1.0 | +| 2000-03 | 7 | SP-000025 | 004 | | Clarification of bit transmission order for AMR frame structure parameters for AMR Interface Format 1 (AMR IF1) | 3.0.0 | 3.1.0 | +| 2001-03 | 11 | | | | Version for Release 4 | | 4.0.0 | +| 2001-06 | 12 | SP-010305 | 006 | | Correction to SID Frame Mapping | 4.0.0 | 4.1.0 | +| 2002-03 | 15 | SP-020077 | 008 | | Correction of AMR codec output bitstream | 4.1.0 | 4.2.0 | +| 2002-06 | 16 | | | | Version for Release 5 | 4.2.0 | 5.0.0 | +| | | | | | | | | +| 2004-09 | 25 | SP-040644 | 009 | 2 | Generic Frame Structure for GSM-EFR SID | 5.0.0 | 6.0.0 | +| 2004-09 | 25 | SP-040644 | 010 | 1 | Error Corrections | 5.0.0 | 6.0.0 | +| 2007-06 | 36 | | | | Version for Release 7 | 6.0.0 | 7.0.0 | +| 2008-12 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 2009-12 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 2011-03 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 2012-09 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26131/0332672e127cd13bb6d2fc8d1e27bfa2_img.jpg b/marked/Rel-11/26_series/26131/0332672e127cd13bb6d2fc8d1e27bfa2_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..399fcf5563b6f150e49ac097f65c84a8165e3f9b --- /dev/null +++ b/marked/Rel-11/26_series/26131/0332672e127cd13bb6d2fc8d1e27bfa2_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1f161fd3c3a4e890eec2c32ffec3bd927fca785eb93dd492d50f1f882283820 +size 91409 diff --git a/marked/Rel-11/26_series/26131/0a8d173734e4e46c344178e8d21bcbc3_img.jpg b/marked/Rel-11/26_series/26131/0a8d173734e4e46c344178e8d21bcbc3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e7f151fc485a15282a3cea7cc1ac0d53c1ad545 --- /dev/null +++ b/marked/Rel-11/26_series/26131/0a8d173734e4e46c344178e8d21bcbc3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7318b6ee404fefe3b71b59565e3ab461193a20f0e5ce16fbf67ec0c2f6ec974f +size 117804 diff --git a/marked/Rel-11/26_series/26131/4dfe30ac5a87d018364a0ac42ea533fe_img.jpg b/marked/Rel-11/26_series/26131/4dfe30ac5a87d018364a0ac42ea533fe_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7cfb0fb1099c1a9a960f7e270b7110cf54467fbe --- /dev/null +++ b/marked/Rel-11/26_series/26131/4dfe30ac5a87d018364a0ac42ea533fe_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e137fdbb5d8b01548d4d6da40b7c3d4bfd3cbbe2663bec7ae14501aeb86552d +size 96408 diff --git a/marked/Rel-11/26_series/26131/5adf12d50dfea82178ca002a2c48641b_img.jpg b/marked/Rel-11/26_series/26131/5adf12d50dfea82178ca002a2c48641b_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..527ea7d4588594cea7084ad8afe07414f664cf59 --- /dev/null +++ b/marked/Rel-11/26_series/26131/5adf12d50dfea82178ca002a2c48641b_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d8850c40b025443f97567f75671c6d74ead14b399aa039ff57d5a52b5ba230b +size 30083 diff --git a/marked/Rel-11/26_series/26131/602ada2a012ff3cc38d91de2eec5b450_img.jpg b/marked/Rel-11/26_series/26131/602ada2a012ff3cc38d91de2eec5b450_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..89c1f13c88baa42e09bae80c1547eab96826abe4 --- /dev/null +++ b/marked/Rel-11/26_series/26131/602ada2a012ff3cc38d91de2eec5b450_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03b4eb22625a0e7e0daac2aedcb1274fa676919bd1a7afb730692dda19ba29b1 +size 91870 diff --git a/marked/Rel-11/26_series/26131/85b10db535b22e64c7d37f362705ddbf_img.jpg b/marked/Rel-11/26_series/26131/85b10db535b22e64c7d37f362705ddbf_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a7334143ba03a53bdbf6e8c5d11c97e710c2c9d8 --- /dev/null +++ b/marked/Rel-11/26_series/26131/85b10db535b22e64c7d37f362705ddbf_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c7c679de494124a0734ff0259bb2746c9910a3c7288920efb29712a1957b282 +size 117951 diff --git a/marked/Rel-11/26_series/26131/953203b3208524d293d4a65c0569324c_img.jpg b/marked/Rel-11/26_series/26131/953203b3208524d293d4a65c0569324c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2a37ac225a62cae6d638c17cab863d0315ceda09 --- /dev/null +++ b/marked/Rel-11/26_series/26131/953203b3208524d293d4a65c0569324c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d108a5fc819267a0d9aff1a37ce2cb6bd9a9739586ec636d21a81fd715b30626 +size 114411 diff --git a/marked/Rel-11/26_series/26131/98ee20ceb85cd84e2415b20b1eda1bcf_img.jpg b/marked/Rel-11/26_series/26131/98ee20ceb85cd84e2415b20b1eda1bcf_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e7f151fc485a15282a3cea7cc1ac0d53c1ad545 --- /dev/null +++ b/marked/Rel-11/26_series/26131/98ee20ceb85cd84e2415b20b1eda1bcf_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7318b6ee404fefe3b71b59565e3ab461193a20f0e5ce16fbf67ec0c2f6ec974f +size 117804 diff --git a/marked/Rel-11/26_series/26131/9c8070d46f1d2480a875239e792f1ef6_img.jpg b/marked/Rel-11/26_series/26131/9c8070d46f1d2480a875239e792f1ef6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..82f54a6e0d1cf9bf1ee7ef488b5975e96364586f --- /dev/null +++ b/marked/Rel-11/26_series/26131/9c8070d46f1d2480a875239e792f1ef6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97f5b5dc88bc6ca266e1f7a8dcc7c23b44fec41fb491e34bf3cda23ff50e40f0 +size 97675 diff --git a/marked/Rel-11/26_series/26131/bf30e154f82662d212f21fccdfa2980f_img.jpg b/marked/Rel-11/26_series/26131/bf30e154f82662d212f21fccdfa2980f_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..20b79295d8f940eae9c5a256535643fbb2e4c47a --- /dev/null +++ b/marked/Rel-11/26_series/26131/bf30e154f82662d212f21fccdfa2980f_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5876e0d52cfb8e80d7821640016e584e8695695408ee3ec55c9d4dfce93606a +size 29149 diff --git a/marked/Rel-11/26_series/26131/c17eaf807acd5faec68da19dd16929be_img.jpg b/marked/Rel-11/26_series/26131/c17eaf807acd5faec68da19dd16929be_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4a3b9d529381c6aec40f735022e3a9415c295194 --- /dev/null +++ b/marked/Rel-11/26_series/26131/c17eaf807acd5faec68da19dd16929be_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a62138aa59f0ab95f8aa3df56f0f8a6e487d00cf96a421f2d2e326bfda710fd9 +size 117871 diff --git a/marked/Rel-11/26_series/26131/cbc4516eb885829fe8c9dabc0946dcbe_img.jpg b/marked/Rel-11/26_series/26131/cbc4516eb885829fe8c9dabc0946dcbe_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..265ab9345a708a41ca0fbd771f9f4e1c461995fd --- /dev/null +++ b/marked/Rel-11/26_series/26131/cbc4516eb885829fe8c9dabc0946dcbe_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f4b9a625ba99de697819aac503e3acf7285c8d4fb0ffa992274be3f1aa5dc96 +size 90882 diff --git a/marked/Rel-11/26_series/26131/d0abac95583b52a3b35f74a215567334_img.jpg b/marked/Rel-11/26_series/26131/d0abac95583b52a3b35f74a215567334_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f8ad09b9bf39f0c67e144711384926bb6c8f358a --- /dev/null +++ b/marked/Rel-11/26_series/26131/d0abac95583b52a3b35f74a215567334_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5520072b700eeb1525f11aba60a9fd338bd7c275a1e795ef4d05ecf1e862ae2 +size 94609 diff --git a/marked/Rel-11/26_series/26131/d1c99a42332e5ee19f3b840281c26681_img.jpg b/marked/Rel-11/26_series/26131/d1c99a42332e5ee19f3b840281c26681_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b486cf50fffe2159ce7b7fb9eba080a6a6de04dc --- /dev/null +++ b/marked/Rel-11/26_series/26131/d1c99a42332e5ee19f3b840281c26681_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20d58f00597046e414f4f39609fc22c806269f090f5135be48f97a88223c7eb1 +size 115663 diff --git a/marked/Rel-11/26_series/26131/d6a5f8423065d7cef55e11a0007014d9_img.jpg b/marked/Rel-11/26_series/26131/d6a5f8423065d7cef55e11a0007014d9_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1c429d51630a11ffc583f59bb56c155832c13e9b --- /dev/null +++ b/marked/Rel-11/26_series/26131/d6a5f8423065d7cef55e11a0007014d9_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c1c6e84221aa347ec9111d14bb521310fd9a54e6a12c83ce60c923916dac460 +size 97260 diff --git a/marked/Rel-11/26_series/26131/fed39b841ae2dce01088b84bfc1e2789_img.jpg b/marked/Rel-11/26_series/26131/fed39b841ae2dce01088b84bfc1e2789_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f6fa47e22c6569d9c8bfbffad1da7b40395384ea --- /dev/null +++ b/marked/Rel-11/26_series/26131/fed39b841ae2dce01088b84bfc1e2789_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc38c363e86d189b4b1efed8ab717c1f01af41715a9f98485598d9efe4ae8a54 +size 89645 diff --git a/marked/Rel-11/26_series/26131/raw.md b/marked/Rel-11/26_series/26131/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..669e48b2dd4ab7725d2763e101e7060bb2d0831a --- /dev/null +++ b/marked/Rel-11/26_series/26131/raw.md @@ -0,0 +1,1436 @@ + + + + + + +# Contents + +| | | +|-------------------------------------------------------------------------------|----| +| Foreword ..... | 5 | +| Introduction ..... | 5 | +| 1 Scope..... | 6 | +| 2 References..... | 6 | +| 3 Definitions, symbols and abbreviations..... | 7 | +| 3.1 Definitions..... | 7 | +| 3.2 Abbreviations ..... | 7 | +| 4 Interfaces..... | 7 | +| 5 Narrowband telephony transmission performance ..... | 9 | +| 5.1 Applicability..... | 9 | +| 5.2 Overall loss/loudness ratings..... | 9 | +| 5.2.1 General ..... | 9 | +| 5.2.2 Connections with handset UE ..... | 9 | +| 5.2.3 Connections with desktop and vehicle-mounted hands-free UE..... | 10 | +| 5.2.4 Connections with hand-held hands-free UE..... | 10 | +| 5.2.5 Connections with headset UE..... | 10 | +| 5.3 Idle channel noise (handset and headset UE)..... | 11 | +| 5.3.1 Sending ..... | 11 | +| 5.3.2 Receiving..... | 11 | +| 5.4 Sensitivity/frequency characteristics..... | 11 | +| 5.4.1 Handset and headset UE sending ..... | 11 | +| 5.4.2 Handset and headset UE receiving..... | 12 | +| 5.4.3 Desktop and vehicle-mounted hands-free UE sending..... | 13 | +| 5.4.4 Desktop and vehicle-mounted hands-free UE receiving ..... | 14 | +| 5.4.5 Hand-held hands-free UE sending..... | 15 | +| 5.4.6 Hand-held hands-free UE receiving ..... | 16 | +| 5.5 Sidetone characteristics (handset and headset UE)..... | 17 | +| 5.5.1 Sidetone loss..... | 17 | +| 5.5.2 Sidetone delay ..... | 17 | +| 5.6 Stability loss ..... | 18 | +| 5.7 Acoustic echo control..... | 18 | +| 5.7.1 General ..... | 18 | +| 5.7.2 Acoustic echo control in desktop and vehicle-mounted hands-free UE..... | 18 | +| 5.7.3 Acoustic echo control in hand-held hands-free UE..... | 19 | +| 5.7.4 Acoustic echo control in a handset UE..... | 19 | +| 5.7.5 Acoustic echo control in a headset UE..... | 19 | +| 5.8 Distortion..... | 19 | +| 5.8.1 Sending distortion..... | 19 | +| 5.8.2 Receiving..... | 20 | +| 5.9 Void..... | 21 | +| 5.10 Information on other parameters (not normative)..... | 21 | +| 5.11 Sending performance in the presence of ambient noise..... | 21 | +| 5.11.1 General ..... | 21 | +| 5.11.2 Connections with handset UE ..... | 21 | +| 5.12 Delay ..... | 21 | +| 5.12.1 Handset UE..... | 21 | +| 5.12.2 Headset UE..... | 21 | +| 5.12.2.1 Wired headset ..... | 21 | +| 5.12.2.2 Wireless headset ..... | 22 | +| 5.13 Echo control characteristics ..... | 22 | +| 5.13.1 Handset..... | 23 | +| 5.13.2 Headset ..... | 23 | +| 5.13.3 Handheld hands-free..... | 23 | +| 5.13.4 Desktop and vehicle mounted hands-free..... | 23 | + +| | | | +|------------------------|-------------------------------------------------------------------------|----| +| 6 | Wideband telephony transmission performance ..... | 23 | +| 6.1 | Applicability..... | 23 | +| 6.2 | Overall loss/loudness ratings..... | 23 | +| 6.2.1 | General ..... | 23 | +| 6.2.2 | Connections with handset UE ..... | 24 | +| 6.2.3 | Connections with desktop and vehicle-mounted hands-free UE..... | 24 | +| 6.2.4 | Connections with hand-held hands-free UE..... | 24 | +| 6.2.5 | Connections with headset UE..... | 25 | +| 6.3 | Idle channel noise (handset and headset UE)..... | 25 | +| 6.3.1 | Sending ..... | 25 | +| 6.3.2 | Receiving..... | 25 | +| 6.4 | Sensitivity/frequency characteristics..... | 25 | +| 6.4.1 | Handset and headset UE sending ..... | 26 | +| 6.4.2 | Handset and headset UE receiving..... | 26 | +| 6.4.3 | Desktop and vehicle-mounted hands-free UE sending..... | 27 | +| 6.4.4 | Desktop and vehicle-mounted hands-free UE receiving..... | 28 | +| 6.4.5 | Hand-held hands-free UE sending..... | 29 | +| 6.4.6 | Hand-held hands-free UE receiving ..... | 30 | +| 6.5 | Sidetone characteristics (handset and headset UE)..... | 32 | +| 6.5.1 | Sidetone loss ..... | 32 | +| 6.5.2 | Sidetone delay ..... | 32 | +| 6.6 | Stability loss ..... | 32 | +| 6.7 | Acoustic echo control..... | 33 | +| 6.7.1 | General ..... | 33 | +| 6.7.2 | Acoustic echo control in desktop and vehicle-mounted hands-free UE..... | 33 | +| 6.7.3 | Acoustic echo control in hand-held hands-free UE..... | 33 | +| 6.7.4 | Acoustic echo control in a handset UE..... | 33 | +| 6.7.5 | Acoustic echo control in a headset UE..... | 34 | +| 6.8 | Distortion..... | 34 | +| 6.8.1 | Sending distortion..... | 34 | +| 6.8.2 | Receiving..... | 35 | +| 6.9 | Void..... | 36 | +| 6.10 | Sending performance in the presence of ambient noise..... | 36 | +| 6.10.1 | General ..... | 36 | +| 6.10.2 | Connections with handset UE ..... | 36 | +| 6.11 | Delay ..... | 36 | +| 6.11.1 | Handset UE..... | 36 | +| 6.11.2 | Headset UE..... | 37 | +| 6.11.2.1 | Wired headset ..... | 37 | +| 6.11.2.2 | Wireless headset ..... | 37 | +| 6.12 | Echo control characteristics ..... | 37 | +| 6.12.1 | Handset..... | 38 | +| 6.12.2 | Headset ..... | 38 | +| 6.12.3 | Handheld hands-free..... | 38 | +| 6.12.4 | Desktop and vehicle mounted hands-free..... | 38 | +| Annex A (informative): | Change history..... | 39 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- Introduction + +The present document specifies minimum performance requirements for the acoustic characteristics of 3G terminals when used to provide narrowband or wideband telephony. + +The objective for narrowband services is to reach a quality as close as possible to ITU-T standards for PSTN circuits. However, due to technical and economic factors, there cannot be full compliance with the general characteristics of international telephone connections and circuits recommended by the ITU-T. + +The performance requirements are specified in the main body of the text; the test methods and considerations are described in TS 26.132. + +# --- 1 Scope + +The present document is applicable to any terminal capable of supporting narrowband or wideband telephony, either as a stand-alone service or as the telephony component of a multimedia service. The present document specifies minimum performance requirements for the acoustic characteristics of 3G terminals when used to provide narrowband or wideband telephony. + +The set of minimum performance requirements enables a guaranteed level of speech quality while taking possible physical limits of the terminal design into account. Some performance objectives are also defined, if such design limits can be overcome. Care must be taken in applying performance objectives in isolation, not to degrade overall end-user speech quality. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TS 26.132: "Speech and video telephony terminal acoustic test specification". +- [2] ITU-T Recommendation B.12 (1988): "Use of the decibel and the neper in telecommunications" +- [3] ITU-T Recommendation G.103 (1998): "Hypothetical reference connections". +- [4] ITU-T Recommendation G.111 (1993): "Loudness ratings (LRs) in an international connection". +- [5] ITU-T Recommendation G.121 (1993): "Loudness ratings (LRs) of national systems". +- [6] ITU-T Recommendation G.122 (1993): "Influence of national systems on stability and talker echo in international connections". +- [7] ITU-T Recommendation G.711 (1988): "Pulse code modulation (PCM) of voice frequencies". +- [8] ITU-T Recommendation P.11 (1993): "Effect of transmission impairments". +- [9] ITU-T Recommendation P. 380 (2003): "Electro-acoustic measurements on headsets". +- [10] ITU-T Recommendation P.50 (1993): "Artificial voices". +- [11] ITU-T Recommendation P.79 (1999) with Annex G (2001): "Calculation of loudness ratings for telephone sets". +- [12] ITU-T Recommendation G.223: "Assumptions for the calculation of noise on hypothetical reference circuits for telephony". +- [13] ITU-T Recommendation P.340: "Transmission characteristics and speech quality parameters of hands-free terminals". +- [14] ITU-T Recommendation P.501: "Test signals for use in telephonometry". +- [15] ITU-T Recommendation P.502: "Objective test methods for speech communication systems using complex test signals". +- [16] 3GPP TS 06.77 (R99): "Minimum Performance Requirements for Noise Suppressor Application to the AMR Speech Encoder". + +# --- 3 Definitions, symbols and abbreviations + +## 3.1 Definitions + +For the purposes of the present document the term *narrowband* shall refer to signals sampled at 8 kHz; *wideband* shall refer to signals sampled at 16 kHz. + +For the purposes of the present document, the terms dB, dBr, dBm0, dBm0p and dBA, shall be interpreted as defined in ITU-T Recommendation B.12 [2]; the term dBPa shall be interpreted as the sound pressure level relative to 1 pascal expressed in dB (0 dBPa is equivalent to 94 dB SPL). + +A 3GPP softphone is a telephony system running on a general purpose computer or PDA complying with the 3GPP terminal acoustic requirements (TS 26.131 and 26.132). + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|-------|--------------------------------------| +| ADC | Analogue to Digital Converter | +| DAC | Digital to Analogue Converter | +| DAI | Digital Audio Interface | +| DRP | Eardrum Reference Point | +| DTX | Discontinuous Transmission | +| EEC | Electrical Echo Control | +| EL | Echo Loss | +| ERP | Ear Reference Point | +| HATS | Head and Torso Simulator | +| LSTR | Listener Sidetone Rating | +| MRP | Mouth Reference Point | +| OLR | Overall Loudness Rating | +| PCM | Pulse Code Modulation | +| PDA | Personal Digital Assistant | +| POI | Point of Interconnection (with PSTN) | +| PSTN | Public Switched Telephone Network | +| RLR | Receive Loudness Rating | +| SLR | Send Loudness Rating | +| STMR | Sidetone Masking Rating | +| SS | System Simulator | +| TX | Transmission | +| UE | User Equipment | +| UPCMI | 13-bit Uniform PCM Interface | + +# --- 4 Interfaces + +The interfaces required to define terminal acoustic characteristics are shown in figure 0. These are the air interface and the point of interconnect (POI). + +![Diagram of 3G interfaces for specification and testing of terminal acoustic characteristics. The diagram shows three acoustic interfaces (Headset, Handset, Handsfree) connected to user equipment (UE) blocks containing analogue processing, ADC, and DAC. The UE is connected to the air interface, which leads to the access network and core network. The core network contains 4-wire TX, Speech transcoder, and Note 1 blocks. The point of interconnect (POI) is also shown.](d0abac95583b52a3b35f74a215567334_img.jpg) + +The diagram illustrates the acoustic interfaces for 3G terminals. On the left, three acoustic interfaces are shown: Headset, Handset, and Handsfree. Each interface is connected to a block labeled 'analogue processing'. The Headset interface includes MRP (Microphone Reference Point) and ERP (Ear Reference Point). The Handset and Handsfree interfaces also include MRP and ERP. The 'analogue processing' blocks are connected to a central block containing 'ADC' (Analog-to-Digital Converter) and 'DAC' (Digital-to-Analog Converter). The 'ADC' and 'DAC' are connected to a 'Speech transcoder' block. The 'Speech transcoder' block is connected to the 'air interface', represented by two vertical dashed lines with antenna symbols. The 'air interface' connects to the 'access network and core network'. Inside the core network, the signal passes through a '4-wire TX' (Transceiver) block, then a 'Speech transcoder' block, and finally a '4-wire TX' block. The '4-wire TX' blocks are connected to 'Note 1' and 'Note 2' blocks. The 'point of interconnect (POI)' is indicated by a vertical dashed line at the far right. A horizontal double-headed arrow at the bottom distinguishes between 'user equipment (UE)' on the left and 'access network and core network' on the right. + +Diagram of 3G interfaces for specification and testing of terminal acoustic characteristics. The diagram shows three acoustic interfaces (Headset, Handset, Handsfree) connected to user equipment (UE) blocks containing analogue processing, ADC, and DAC. The UE is connected to the air interface, which leads to the access network and core network. The core network contains 4-wire TX, Speech transcoder, and Note 1 blocks. The point of interconnect (POI) is also shown. + +NOTE 1: Includes DTX functionality. + +NOTE 2: Connection to PSTN should include electrical echo control (EEC). + +**Figure 0: 3G Interfaces for specification and testing of terminal acoustic characteristics** + +The Air Interface is specified by the 3G 25 series specifications and is required to achieve user equipment (UE) transportability. Analogue measurements can be made at this point using a system simulator (SS) comprising the appropriate radio terminal equipment and speech transcoder. The losses and gains introduced by the test speech transcoder will need to be specified. + +The POI with the public switched telephone network (PSTN) is considered to have a relative level of 0 dBr, where signals will be represented by 8-bit A-law, according to ITU-T Recommendation G.711 [7]. Analogue measurements may be made at this point using a standard send and receive side, as defined in ITU-T Recommendations. + +Five classes of acoustic interface are considered in this specification: + +- Handset UE including softphone UE used as a handset; + +- Headset UE including softphone UE used with headset; +- Desktop-mounted hands-free UE including softphone UE with external loudspeaker(s) used in hands-free mode; +- Vehicle-mounted hands-free UE including softphone UE mounted in a vehicle; +- Hand-held hands-free UE including softphone UE with internal loudspeaker(s) used in hands-free mode. + +(See definition of softphone in Clause 3.1) + +**NOTE:** The requirements and performance objectives for a softphone UE shall be derived according to the following rules: + +- When using a softphone UE as a handset: requirements and performance objectives shall correspond to handset mode. +- When using a softphone UE with headset: requirements and performance objectives shall correspond to headset mode. +- When a softphone UE is mounted in a vehicle: requirements and performance objectives shall correspond to vehicle-mounted handsfree mode. +- When using a softphone UE in hands-free mode: + - When using internal loudspeaker(s), requirements and performance objectives shall correspond to hand-held hands-free. + - When using external loudspeaker(s), requirements and performance objectives shall correspond to desktop-mounted hands-free. + +# --- 5 Narrowband telephony transmission performance + +## 5.1 Applicability + +The performance requirements in this sub-clause shall apply when UE is used to provide narrowband telephony, either as a stand-alone service, or as part of a multimedia service. + +## 5.2 Overall loss/loudness ratings + +### 5.2.1 General + +An international connection involving a 3G network and the PSTN should meet the overall loudness rating (OLR) limits in ITU-T Recommendation G.111 [4]. The national parts of the connection should therefore meet the send and receive loudness rating (SLR, RLR) limits in ITU-T Recommendation G.121 [5]. + +For the case where digital routings are used to connect the 3G network to the international chain of circuits, the SLR and RLR of the national extension will be largely determined by the SLR and RLR of the 3G network. The limits given below are consistent with the national extension limits and long term objectives in ITU-T Recommendation G.121 [5]. + +The SLR and RLR values for the 3G network apply up to the POI. However, the main determining factors are the characteristics of the UE, including the analogue to digital conversion (ADC) and digital to analogue conversion (DAC). In practice, it is convenient to specify loudness ratings to the Air Interface. For the normal case, where the 3G network introduces no additional loss between the Air Interface and the POI, the loudness ratings to the PSTN boundary (POI) will be the same as the loudness ratings measured at the Air Interface. However, in some cases loss adjustment may be needed for interworking situations in individual countries. + +### 5.2.2 Connections with handset UE + +The nominal values of SLR/RLR to the POI shall be: + +SLR = $8 \pm 3$ dB; + +RLR = $2 \pm 3$ dB. + +Where a user-controlled receiving volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. When the control is set to maximum, the RLR shall not be $\leq$ (equal or louder than) -13 dB. + +With the volume control set to the minimum position the RLR shall not be $\geq$ (equal or quieter than) 18 dB. + +Compliance shall be checked by the relevant tests described in TS 26.132. + +### 5.2.3 Connections with desktop and vehicle-mounted hands-free UE + +The nominal values of SLR/RLR to/from the POI shall be: + +$SLR = 13 \pm 4$ dB; + +$RLR = 2 \pm 4$ dB (for vehicle-mounted hands-free UE); + +$RLR = 5 \pm 4$ dB (for desktop hands-free UE). + +1. For a vehicle-mounted hands-free UE: + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. It is recommended that a volume control giving at least 15 dB increase from the nominal RLR (louder) is provided for hands-free units intended to work in the vehicle environment. This is to allow for the increased acoustic noise level in a moving vehicle. + +RLR at the maximum volume control setting should be $\leq$ (equal or louder than) -2 dB. + +2. For a desktop hands-free UE: + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. It is recommended that a volume control giving at least 15 dB increase from the nominal RLR (louder) is provided for hands-free units. This is to allow for the increased acoustic noise level in the usage environment. + +RLR at the maximum volume control setting should be $\leq$ (equal or louder than) 1 dB. + +Compliance shall be checked by the relevant tests described in TS 26.132. + +NOTE: The target value for nominal RLR, as recommended in ITU-T G.111 Annex B – Table B.1 [4], lies between 1 and 3 dB. The higher RLR requirement of 5 dB for desktop hands-free is appreciative of the limitations in transducer output with current typical form factors. + +### 5.2.4 Connections with hand-held hands-free UE + +The nominal values of SLR/RLR to/from the POI shall be: + +$SLR = 13 \pm 4$ dB; + +$RLR = 9 \pm 9 / -7$ dB. + +As a performance objective it is recommended that the RLR at the maximum volume control setting is $\leq$ (equal or louder than) 2 dB. + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. It is recommended that a volume control range $\geq 15$ dB be provided. Compliance shall be checked by the relevant tests described in TS 26.132. + +NOTE: The target value for nominal RLR, as recommended in ITU-T G.111 Annex B – Table B.1 [4], lies between 1 and 3 dB. The higher RLR requirement of 9 dB for hand-held hands-free is appreciative of the limitations in transducer output with typical form factors. + +### 5.2.5 Connections with headset UE + +The nominal values of SLR/RLR to/from the POI shall be: + +$SLR = 8 \pm 3$ dB; + +$RLR = 2 \pm 3$ dB; + +RLR (binaural headset) = $8 \pm 3$ dB for each earphone. + +Where a user-controlled receiving volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. When the control is set to maximum, the RLR shall not be $\leq$ (equal or louder than) -13 dB. + +With the volume control set to the minimum position the RLR shall not be $\geq$ (equal or quieter than) 18 dB and shall not be $\geq$ (equal or quieter than) 24 dB for a binaural headset. + +Compliance shall be checked by the relevant tests described in 3GPP TS 26.132. + +## 5.3 Idle channel noise (handset and headset UE) + +### 5.3.1 Sending + +The maximum noise level produced by the apparatus at the output of the SS under silent conditions in the sending direction shall be $\leq$ -64 dBm0p. + +NOTE 1: This level includes the eventual noise contribution of an acoustic echo canceller under the condition that no signal is received. + +NOTE 2: This figure applies to the total noise level with psophometric weighting. It is recommended that the level of single frequency disturbances should be $\leq$ -74 dBm0p in the frequency range from 300 Hz to 3.4 kHz. + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 5.3.2 Receiving + +The maximum (acoustic) A-weighted noise level at the handset and headset UE when no signal is applied to the input of the SS shall be as follows: + +If no user-controlled receiving volume control is provided, or, if it is provided, at the setting of the user-controlled receiving volume control at which the RLR is equal to the nominal value, the noise measured at the DRP with diffuse-field correction contributed by the receiving equipment alone shall be $\leq$ -57 dBPa(A). + +Where a volume control is provided, the measured noise shall be $\leq$ -54 dBPa(A) at the maximum setting of the volume control. + +For the nominal volume control setting, the level of single frequency disturbances should be $\leq$ -60 dBPa(A) in the frequency range from 100 Hz to 10 kHz. As a performance objective it is recommended that the level should be $\leq$ -64 dBPa(A). + +NOTE: In a connection with the PSTN, noise conditions as described in ITU-T Recommendation G.103 [3] can be expected at the input (POI) of the 3G network. The characteristics of this noise may be influenced by the speech transcoding process (for further study). + +Compliance shall be checked by the relevant test described in 3GPP TS 26.132. + +## 5.4 Sensitivity/frequency characteristics + +### 5.4.1 Handset and headset UE sending + +The sensitivity/frequency characteristics shall be as follows: + +The sending sensitivity frequency response, measured either from the mouth reference point (MRP) to the digital interface or from the MRP to the SS audio output (digital output of the reference speech decoder of the SS), shall be within a mask, which can be drawn between the points given in table 1. The mask is drawn with straight lines between the breaking points in table 1 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 1: Handset and headset sending sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 100 | -12 | | +| 200 | 0 | | +| 300 | 0 | -12 | +| 1 000 | 0 | -6 | +| 2 000 | 4 | -6 | +| 3 000 | 4 | -6 | +| 3 400 | 4 | -9 | +| 4 000 | 0 | | + +NOTE: All sensitivity values are expressed in dB on an arbitrary scale. + +![Figure 1: Handset and headset sending sensitivity/frequency mask graph. The x-axis is Frequency [Hz] on a logarithmic scale from 100 to 10000. The y-axis is sensitivity in dB on a linear scale from -10 to 10. The graph shows two shaded regions representing the upper and lower limits of the mask. The upper limit is a horizontal line at 5 dB from 200 Hz to 10000 Hz. The lower limit is a line that starts at -12 dB at 300 Hz, rises to -6 dB at 1000 Hz, stays at -6 dB until 3000 Hz, then drops to -9 dB at 3400 Hz, and finally drops to -12 dB at 4000 Hz. The area between these limits is shaded with diagonal lines.](602ada2a012ff3cc38d91de2eec5b450_img.jpg) + +Figure 1: Handset and headset sending sensitivity/frequency mask graph. The x-axis is Frequency [Hz] on a logarithmic scale from 100 to 10000. The y-axis is sensitivity in dB on a linear scale from -10 to 10. The graph shows two shaded regions representing the upper and lower limits of the mask. The upper limit is a horizontal line at 5 dB from 200 Hz to 10000 Hz. The lower limit is a line that starts at -12 dB at 300 Hz, rises to -6 dB at 1000 Hz, stays at -6 dB until 3000 Hz, then drops to -9 dB at 3400 Hz, and finally drops to -12 dB at 4000 Hz. The area between these limits is shaded with diagonal lines. + +**Figure 1: Handset and headset sending sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 5.4.2 Handset and headset UE receiving + +The sensitivity/frequency characteristics shall be as follows: + +The receiving sensitivity frequency response, measured either from the digital interface to the DRP with diffuse-field correction or from the SS audio input (analogue or digital input of the reference speech encoder of the SS) to the DRP with diffuse-field correction shall be within a mask, which can be drawn with straight lines between the breaking points in table 2 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 2: Handset and headset receiving sensitivity/frequency mask for 8N application force** + +| Frequency (Hz) | Upper limit
$8 \pm 2$ N | Lower limit
$8 \pm 2$ N | +|----------------|----------------------------|----------------------------| +| 100 | 6 | | +| 300 | 6 | -6 | +| 3 400 | 6 | -6 | +| 4 000 | 6 | | + +NOTE 1: All sensitivity values are expressed in dB on an arbitrary scale + +NOTE 2: The basis for the target frequency responses in send and receive is the orthotelephonic reference response measured between 2 subjects 1 m apart under free-field conditions and assumes an ideal receive characteristic. Under these conditions the overall frequency response shows a rising slope. The present document no longer uses the ERP as the reference point for receive but the diffuse-field. With the concept of diffuse-field based receive measurements a rising slope for the overall frequency response is achieved by a flat target frequency response in send and a flat diffuse-field based receive frequency response. + +![Figure 2: Handset and headset receiving sensitivity/frequency mask for 8N application force. The graph shows two shaded regions representing the sensitivity masks on a logarithmic frequency scale (100 to 10000 Hz) versus linear dB sensitivity scale (-10 to 10 dB). The upper mask (handset) is a horizontal band from approximately 5 dB to 10 dB, starting at 300 Hz. The lower mask (headset) is a trapezoidal band starting at -10 dB at 300 Hz, rising to -6 dB at 1000 Hz, staying at -6 dB until 3000 Hz, and then falling back to -10 dB at 10000 Hz.](98ee20ceb85cd84e2415b20b1eda1bcf_img.jpg) + +Figure 2: Handset and headset receiving sensitivity/frequency mask for 8N application force. The graph shows two shaded regions representing the sensitivity masks on a logarithmic frequency scale (100 to 10000 Hz) versus linear dB sensitivity scale (-10 to 10 dB). The upper mask (handset) is a horizontal band from approximately 5 dB to 10 dB, starting at 300 Hz. The lower mask (headset) is a trapezoidal band starting at -10 dB at 300 Hz, rising to -6 dB at 1000 Hz, staying at -6 dB until 3000 Hz, and then falling back to -10 dB at 10000 Hz. + +**Figure 2: Handset and headset receiving sensitivity/frequency mask for 8N application force** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 5.4.3 Desktop and vehicle-mounted hands-free UE sending + +The sending sensitivity frequency response from the MRP to the SS audio output (digital output of the reference speech decoder of the SS) shall be as follows: + +The sending sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 3 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 3: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|-------------------------------------------------------------------------|-------------|-------------| +| 100 | -12 | | +| 200 | 0 | | +| 300 | 0 | -12 | +| 1 000 | 0 | -6 | +| 2 000 | 4 | -6 | +| 3 000 | 4 | -6 | +| 3 400 | 4 | -9 | +| 4 000 | 0 | | +| NOTE: All sensitivity values are expressed in dB on an arbitrary scale. | | | + +![Figure 3: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask. The graph shows two shaded regions on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is dB sensitivity from -10 to 10. The upper region is a horizontal band from 5 dB to 10 dB, starting at 315 Hz and ending at 10000 Hz. The lower region is a band that starts at -10 dB at 200 Hz, rises to -6 dB at 315 Hz, stays at -6 dB until 3100 Hz, and then falls back to -10 dB at 10000 Hz.](0332672e127cd13bb6d2fc8d1e27bfa2_img.jpg) + +Figure 3: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask. The graph shows two shaded regions on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is dB sensitivity from -10 to 10. The upper region is a horizontal band from 5 dB to 10 dB, starting at 315 Hz and ending at 10000 Hz. The lower region is a band that starts at -10 dB at 200 Hz, rises to -6 dB at 315 Hz, stays at -6 dB until 3100 Hz, and then falls back to -10 dB at 10000 Hz. + +**Figure 3: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 5.4.4 Desktop and vehicle-mounted hands-free UE receiving + +The receiving sensitivity frequency response from the SS audio input (analogue or digital input of the reference speech encoder of the SS) to the free-field shall be as follows: + +The receiving sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 4 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 4: Desktop and vehicle-mounted hands-free receiving sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|-------------------------------------------------------------------------|-------------|-------------| +| 200 | 6 | | +| 315 | 6 | -9 | +| 400 | 6 | -6 | +| 3 100 | 6 | -6 | +| 4 000 | 6 | | +| NOTE: All sensitivity values are expressed in dB on an arbitrary scale. | | | + +![Figure 4: Desktop and vehicle-mounted receiving sensitivity/frequency mask. The graph shows two shaded regions on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is dB sensitivity from -10 to 10. The upper shaded region is bounded by a red line that is flat at 5 dB from approximately 300 Hz to 10000 Hz. The lower shaded region is bounded by a red line that starts at -10 dB at 100 Hz, rises to -6 dB at 300 Hz, stays flat at -6 dB until 3000 Hz, and then falls back to -10 dB at 10000 Hz.](0a8d173734e4e46c344178e8d21bcbc3_img.jpg) + +Figure 4: Desktop and vehicle-mounted receiving sensitivity/frequency mask. The graph shows two shaded regions on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is dB sensitivity from -10 to 10. The upper shaded region is bounded by a red line that is flat at 5 dB from approximately 300 Hz to 10000 Hz. The lower shaded region is bounded by a red line that starts at -10 dB at 100 Hz, rises to -6 dB at 300 Hz, stays flat at -6 dB until 3000 Hz, and then falls back to -10 dB at 10000 Hz. + +**Figure 4: Desktop and vehicle-mounted receiving sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 5.4.5 Hand-held hands-free UE sending + +The sending sensitivity frequency response from the MRP to the SS audio output (digital output of the reference speech decoder of the SS) shall be as follows: + +The sending sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 5 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 5: Hand-held hands-free sending sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|-------------------------------------------------------------------------|-------------|-------------| +| 100 | -12 | | +| 200 | 0 | | +| 300 | 0 | -12 | +| 1 000 | 0 | -6 | +| 2 000 | 4 | -6 | +| 3 000 | 4 | -6 | +| 3 400 | 4 | -9 | +| 4 000 | 0 | | +| NOTE: All sensitivity values are expressed in dB on an arbitrary scale. | | | + +![Figure 5: Hand-held hands-free sending sensitivity/frequency mask. The graph shows a shaded region representing the sensitivity mask on a plot of dB sensitivity versus Frequency [Hz] on a logarithmic scale. The x-axis ranges from 100 to 10000 Hz, and the y-axis ranges from -10 to 10 dB. The mask is bounded by a red line that is flat at 6 dB from 200 Hz to 4000 Hz, and then drops to -6 dB at 8000 Hz. The area above the red line is shaded with diagonal lines.](cbc4516eb885829fe8c9dabc0946dcbe_img.jpg) + +Figure 5: Hand-held hands-free sending sensitivity/frequency mask. The graph shows a shaded region representing the sensitivity mask on a plot of dB sensitivity versus Frequency [Hz] on a logarithmic scale. The x-axis ranges from 100 to 10000 Hz, and the y-axis ranges from -10 to 10 dB. The mask is bounded by a red line that is flat at 6 dB from 200 Hz to 4000 Hz, and then drops to -6 dB at 8000 Hz. The area above the red line is shaded with diagonal lines. + +**Figure 5: Hand-held hands-free sending sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 5.4.6 Hand-held hands-free UE receiving + +The receiving sensitivity frequency response from the SS audio input (analogue or digital input of the reference speech encoder of the SS) to the free-field shall be as follows: + +The receiving sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 6 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 6: Hand-held hands-free receiving sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 200 | 6 | | +| 500 | 6 | -9 (Note 2) | +| 630 | 6 | -6 (Note 2) | +| 800 | 6 | -6 | +| 3 100 | 6 | -6 | +| 4 000 | 6 | | + +NOTE 1: All sensitivity values are expressed in dB on an arbitrary scale. +NOTE 2: The values stated in the Table 6 for 500 and 630 Hz are listed for performance objective purposes. (not mandatory) + +![Figure 6: Hand-held hands-free receiving sensitivity/frequency mask. The graph shows a frequency mask on a grid with Frequency [Hz] on the x-axis (logarithmic scale from 100 to 4000) and sensitivity in dB on the y-axis (linear scale from -10 to 10). The mask is defined by two red lines: one horizontal line at 5 dB from 100 Hz to 4000 Hz, and another horizontal line at -6 dB from approximately 800 Hz to 4000 Hz. The area above the 5 dB line is shaded with diagonal lines. The area between the 5 dB line and the -6 dB line is unshaded. The area below the -6 dB line is shaded with dots. The transition between the two horizontal lines is a smooth curve starting at 100 Hz and ending at 800 Hz.](fed39b841ae2dce01088b84bfc1e2789_img.jpg) + +Figure 6: Hand-held hands-free receiving sensitivity/frequency mask. The graph shows a frequency mask on a grid with Frequency [Hz] on the x-axis (logarithmic scale from 100 to 4000) and sensitivity in dB on the y-axis (linear scale from -10 to 10). The mask is defined by two red lines: one horizontal line at 5 dB from 100 Hz to 4000 Hz, and another horizontal line at -6 dB from approximately 800 Hz to 4000 Hz. The area above the 5 dB line is shaded with diagonal lines. The area between the 5 dB line and the -6 dB line is unshaded. The area below the -6 dB line is shaded with dots. The transition between the two horizontal lines is a smooth curve starting at 100 Hz and ending at 800 Hz. + +**Figure 6: Hand-held hands-free receiving sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +## 5.5 Sidetone characteristics (handset and headset UE) + +### 5.5.1 Sidetone loss + +The talker sidetone masking rating (STMR) shall be $\geq 15$ dB and should be $\leq 23$ dB for the nominal setting of the volume control. For all other positions of the volume control, the STMR shall be $\geq 10$ dB. + +In case the STMR is below the lower limit also when the electrical sidetone path has been disabled, the result shall not be regarded as a failure. + +Compliance shall be checked by the relevant test described in 3GPP TS 26.132. The bandwidth for the sidetone path provided by the UE may in some terminals not be restricted to the narrowband range. In case the sidetone path operates in a mode other than narrowband (to be declared by the manufacturer), compliance shall be checked using the test described for “Wideband telephony transmission performance”. + +NOTE 1: Where a user-controlled receiving volume control is provided, it is recommended that the sidetone loss is independent of the volume control setting. + +NOTE 2: In general, it is recommended to provide a terminal sidetone path for handset and headset UEs. + +NOTE 3: In case the human air-conducted sidetone paths are obstructed (one example being some binaural insert type headset UEs), it is important to provide a terminal sidetone path. + +NOTE 4: The STMR calculation algorithm being used was developed for quantifying the audibility of the electrical sidetone path using a sealed coupler. The air-conducted path was not intended to be included in the test setup. A lower STMR limit was specified to avoid annoying effects (e.g. howling, increase of ambient noise level in the ear) of an excessive electrical sidetone. In HATS-based measurements, the air-conducted path cannot be avoided in the test setup. With some UE form factors the air-conducted path can be substantial resulting in low STMR figures also when there are no annoying effects from any excessive electrical sidetone. See ITU-T Recommendation P.76 for definitions of sidetone paths. + +### 5.5.2 Sidetone delay + +The maximum sidetone delay should be $\leq 5$ ms, measured in an echo-free setup. + +NOTE: The measured result is only applicable where the level of the electrical sidetone is sufficiently high to be measured. While the STMR value may indicate the presence of sidetone it should be ensured that this is not primarily due to the acoustical or mechanical sidetone path when interpreting sidetone delay results. + +Compliance shall be checked by the relevant test described in TS 26.132. + +## 5.6 Stability loss + +The stability loss presented to the PSTN by the 3G network at the POI should meet the principles of the requirements in clauses 2 and 3 of ITU-T Recommendation G.122 [6]. These requirements will be met if the attenuation between the digital input and digital output at the POI is $\geq 6$ dB at all frequencies in the range 200 Hz to 4 kHz under the worst case acoustic conditions at the UE (any acoustic echo control should be enabled). For the normal case of digital connection between the Air Interface and the POI, the stability requirement can be applied at the Air Interface. + +The worst case acoustic conditions will be as follows (with volume control set to maximum for each following condition): + +**Handset UE:** the handset lying on, and the transducers facing, a hard surface with the ear-piece uncapped; + +**Headset UE:** for further study; + +**Hands-free UE:** no requirement other than echo loss. + +NOTE: The test procedure must take into account the switching effects of echo control and discontinuous transmission (DTX). + +## 5.7 Acoustic echo control + +### 5.7.1 General + +The echo loss (EL) presented by the 3G network at the POI should be sufficient during single-talk. This takes into account the fact that the UE is likely to be used in connections with high transmission delay and in a wide range of noise environments. + +See ITU-T Recommendation G.131 for general guidance. + +The use of acoustic echo control is not mandated for 3G networks and the connection between the UE and the POI is zero loss. Therefore the acoustic echo control provided in the UE should provide a sufficient TCLw at the POI over the likely range of acoustic end delays. + +If acoustic echo control is provided by voice switching, comfort noise should be injected. This comfort noise shall operate in the same way as that used in DTX. + +### 5.7.2 Acoustic echo control in desktop and vehicle-mounted hands-free UE + +The TCLw for the desktop and vehicle-mounted hands-free UE shall be $\geq 40$ dB for any setting of the volume control. + +The TCLw for the desktop hands-free and vehicle-mounted hands-free UE shall be $\geq 46$ dB when measured under free-field conditions at the nominal setting of the volume control. + +NOTE: A TCLw for the desktop hands-free and vehicle-mounted hands-free UE of $\geq 55$ dB is recommended as a performance objective when measured under free-field conditions at the nominal setting of the volume control. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be designed to cope with the expected reverberation and dispersion. In the case of the hands-free UE, this reverberation and dispersion may be time variant. Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +### 5.7.3 Acoustic echo control in hand-held hands-free UE + +The TCLw for hand-held hands-free UE shall be $\geq 40$ dB for any setting of the volume control. + +The TCLw for hand-held hands-free UE shall be $\geq 46$ dB at the nominal setting of the volume control. + +NOTE: A TCLw for the hand-held hands-free UE of $\geq 55$ dB is recommended as a performance objective when measured under free-field conditions at the nominal setting of the volume control. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be designed to cope with the expected reverberation and dispersion. In the case of the hands-free UE, this reverberation and dispersion may be time variant. Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +### 5.7.4 Acoustic echo control in a handset UE + +The TCLw for handset UE shall be $\geq 46$ dB for any setting of the volume control. + +The TCLw for handset UE should be $\geq 55$ dB at the nominal setting of the volume control. + +NOTE: It is recommended that the volume control should be set back to nominal after each call unless TCLw $\geq 55$ dB can also be maintained with the maximum volume setting. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be capable of dealing with the variations in handset positions when in normal use. The implications of this are under study. Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +### 5.7.5 Acoustic echo control in a headset UE + +The TCLw for headset UE shall be $\geq 46$ dB for any setting of the volume control. + +The TCLw for headset UE should be $\geq 55$ dB at the nominal setting of the volume control. + +NOTE: It is recommended that the volume control should be set back to nominal after each call unless TCLw $\geq 55$ dB can also be maintained with the maximum volume setting. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be designed to cope with the expected reverberation and dispersion. + +Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +## 5.8 Distortion + +### 5.8.1 Sending distortion + +The sending part shall meet the following distortion requirements: + +NOTE 1: Digital signal processing other than the transcoder itself is included in this requirement (e.g. echo cancelling). + +Distortion shall be measured between the MRP and the SS audio output (output of the reference speech decoder of the SS). The ratio of signal-to-total distortion power measured with the proper noise weighting (see table 4 of ITU-T Recommendation G.223) shall be above the limits given in table 7. + +**Table 7: Limits for signal-to-total distortion ratio** + +| Sending level
(dBPa at the MRP) | Sending Ratio (dB) | +|------------------------------------|--------------------| +| 5 | 30 | +| 0 | 35 | +| -4,7 | 35 | +| -10 | 33 | +| -15 | 30 | +| -20 | 27 | + +Limits for intermediate levels are found by drawing straight lines between the breaking points in table 7 on a linear (dB signal level) - linear (dB ratio) scale. + +Compliance of the sending distortion shall be checked by the test described in TS 26.132. + +NOTE 2: It should be ensured that the test signal is treated by speech processing algorithms as a speech-like signal, and not a noise-like signal. Test signals with a time-stationary envelope may be treated by certain algorithms, e.g., noise suppression algorithms defined in 3GPP TS 06.77 R99 [16], as a noise-like signal. If speech processing algorithms, including but not limited to noise suppression algorithms, are shown to treat the test signal as a noise-like signal, even where an activation signal has been utilized, then the test should be repeated with said speech processing algorithms disabled. The results of both sets of tests and the state of the processing algorithms should be documented in the test report. + +### 5.8.2 Receiving + +The receiving part between the SS audio input (input of the reference speech encoder of the SS) and the DRP with diffuse-field correction shall meet the requirements in this sub-clause at the nominal setting of the volume control: + +The ratio of signal-to-total distortion power measured with the proper noise weighting (see table 4 of ITU-T Recommendation G.223) shall be above the limits given in table 8 when the sound pressure at the DRP with diffuse-field correction is up to 10 dBPa. For a sound pressure $\geq 10$ dBPa at the DRP with diffuse-field correction there is no distortion requirement. + +**Table 8: Limits for signal-to-total distortion ratio** + +| Receiving level at the digital interface (dBm0) | Receiving Ratio (dB) | +|--------------------------------------------------------|-----------------------------| +| 0 | 25,5 | +| -3 | 31,2 | +| -10 | 33,5 | +| -20 | 33,0 | +| -30 | 30,5 | +| -40 (*) | 22,5 (*) | +| -45 (*) | 17,5 (*) | + +NOTE : (\*) For levels -40 and -45 dBm0, the stated limits are recommendations; hence a lower signal-to-distortion ratio shall not be regarded as a failing result. However, the obtained results shall be reported. + +Limits for intermediate levels are found by drawing straight lines between the breaking points in the table on a linear (dB signal level) - linear (dB ratio) scale. + +Compliance of the receiving distortion shall be checked by the appropriate test method in TS 26.132. + +NOTE 1: It should be ensured that the test signal is treated by speech processing algorithms as a speech-like signal, and not a noise-like signal. Test signals with a time-stationary envelope may be treated by certain algorithms, e.g. noise suppression algorithms defined in 3GPP TS 06.77 R99 [16], as a noise-like signal. If speech processing algorithms, including but not limited to noise suppression algorithms, are shown to treat the test signal as a noise-like signal, even where an activation signal has been utilized, then the test should be repeated with said speech processing algorithms disabled. The results of both sets of tests and the state of the processing algorithms should be documented in the test report. + +## 5.9 Void + +## 5.10 Information on other parameters (not normative) + +Information about additional parameters relevant to speech quality, e.g., for terminals where signal processing is used, can be found in ITU-T Recommendations P.340, P.501 and P.502. + +## 5.11 Sending performance in the presence of ambient noise + +### 5.11.1 General + +For sending, in handset mode, the UE shall reduce the ambient noise picked up by the microphone(s) without significantly degrading the quality of the speech signal. + +### 5.11.2 Connections with handset UE + +The UE shall comply with the following requirements: + +#### S-MOS-LQOn + +- The average of S-MOS-LQOn scores across all test conditions shall be $\geq 3.0$ +- As a performance objective, the average of the S-MOS-LQOn scores across all test conditions should be $\geq 3.5$ + +#### N-MOS-LQOn + +- The average of the N-MOS-LQOn scores across all test conditions shall be $\geq 2.3$ +- As a performance objective, the average of N-MOS-LQOn scores across all test conditions should be $\geq 3.0$ + +#### G-MOS-LQOn + +- No requirement. + +Compliance shall be checked by the relevant tests described in 3GPP TS 26.132. + +## 5.12 Delay + +### 5.12.1 Handset UE + +It is in general desirable to minimize UE delays to ensure low enough end-to-end delays and hence a good conversational experience, guidance is found in ITU-T Recommendation G.114. + +For UMTS circuit-switched AMR speech codec operation, the sum of the UE delays in sending and receiving directions ( $T_S + T_R$ ) shall in any case be $\leq 220\text{ms}$ and should be $\leq 185\text{ms}$ . + +NOTE: A delay $\leq 185\text{ ms}$ might not be achievable in some cases due to UE implementation trade-offs between delay and other parameters such as speech quality enhancement, performance of noise reduction or UE power consumption optimization, and UE implementation issues such as rebuffering between components. + +Compliance shall be checked by the relevant test described in 3GPP TS 26.132. + +### 5.12.2 Headset UE + +#### 5.12.2.1 Wired headset + +It is in general desirable to minimize UE delays to ensure low enough end-to-end delays and hence a good conversational experience, guidance is found in ITU-T Recommendation G.114. + +For UMTS circuit-switched AMR speech codec operation, the sum of the UE delays in sending and receiving directions ( $T_S + T_R$ ) shall in any case be $\leq 220\text{ms}$ and should be $\leq 185\text{ms}$ . + +NOTE: A delay $\leq 185\text{ ms}$ might not be achievable in some cases due to UE implementation trade-offs between delay and other parameters such as speech quality enhancement, performance of noise reduction or UE power consumption optimization, and UE implementation issues such as rebuffering between components. + +Compliance shall be checked by the relevant test described in 3GPP TS 26.132. + +#### 5.12.2.2 Wireless headset + +For further study. + +## 5.13 Echo control characteristics + +Echo cancellation is commonly deployed in the UE to fulfil the Acoustic echo control requirements. Echo cancellers are complex devices of which the subjective performance is affected by several attributes. The main attribute is its ability to suppress echo. The process of suppressing the echo may introduce impairments to the near-end speech signal, mainly manifested as distortion or clipping of the near-end signal during simultaneous speech from both the far and near-end (“double-talk”). + +To characterise the echo control performance, the activity (in % of total time) and averaged level difference (in dB) of the duration of any level difference according to Figure 6a and Table 8a between the clean near-end signal and the send-signal shall be reported for “double-talk” as well as the far-end single talk periods adjacent to the “double-talk”. + +NOTE: The limits for specifying the categories in Figure 6a and Table 8a are provisional pending further analysis and validation. + +NOTE: The categories in Figure 6a and Table 8a are labelled in a functional order and the subjective impression of the respective categories is for further study. + +All percentage values and averaged level differences described in the relevant test of 3GPP TS 26.132 shall be reported. + +![Figure 6a: Classification of echo canceller performance. A graph showing Level difference [dB] on the y-axis (from -15 to 4) versus Duration [ms] on the x-axis (from 0 to 150). The graph is divided into regions: A1 (top, 4 to -4 dB), A2 (middle, -4 to -15 dB), E (top-left, >4 dB, <25 ms), F (top-middle, >4 dB, 25-150 ms), G (top-right, >4 dB, >150 ms), B (bottom-left, <-15 dB, <25 ms), C (bottom-middle, <-15 dB, 25-150 ms), and D (bottom-right, <-15 dB, >150 ms).](5adf12d50dfea82178ca002a2c48641b_img.jpg) + +Figure 6a: Classification of echo canceller performance. A graph showing Level difference [dB] on the y-axis (from -15 to 4) versus Duration [ms] on the x-axis (from 0 to 150). The graph is divided into regions: A1 (top, 4 to -4 dB), A2 (middle, -4 to -15 dB), E (top-left, >4 dB, <25 ms), F (top-middle, >4 dB, 25-150 ms), G (top-right, >4 dB, >150 ms), B (bottom-left, <-15 dB, <25 ms), C (bottom-middle, <-15 dB, 25-150 ms), and D (bottom-right, <-15 dB, >150 ms). + +Figure 6a: Classification of echo canceller performance + +Table 8a: Categories for echo canceller performance classification + +| Category | Description | +|----------|-----------------------------------------------| +| A1 | Full-duplex and full transparency | +| A2 | Full-duplex with level loss in Tx | +| B | Very short clipping | +| C | Short clipping resulting in loss of syllables | +| D | Clipping resulting in loss of words | +| E | Very short residual echo | +| F | Echo bursts | +| G | Continuous echo | + +### 5.13.1 Handset + +Requirements are for further study. + +### 5.13.2 Headset + +Requirements are for further study. + +### 5.13.3 Handheld hands-free + +Requirements are for further study. + +### 5.13.4 Desktop and vehicle mounted hands-free + +Requirements are for further study. + +# --- 6 Wideband telephony transmission performance + +## 6.1 Applicability + +The performance requirements in this clause shall apply when UE is used to provide wideband telephony, either as a stand-alone service, or as part of a multimedia service. The requirements in the clause apply only when the far-end terminal is also providing wideband, and not narrowband telephony. When a wideband-enabled terminal is providing narrowband telephony, the requirements in clause 5, 'narrowband telephony transmission performance' shall apply. + +## 6.2 Overall loss/loudness ratings + +### 6.2.1 General + +An international connection involving a 3G network and the PSTN should meet the overall loudness rating (OLR) limits in ITU-T Recommendation G.111 [4]. The national parts of the connection should therefore meet the send and receive loudness rating (SLR, RLR) limits in ITU-T Recommendation G.121 [5]. + +For the case where digital routings are used to connect the 3G network to the international chain of circuits, the SLR and RLR of the national extension will be largely determined by the SLR and RLR of the 3G network. The limits given below are consistent with the national extension limits and long term objectives in ITU-T Recommendation G.121 [5]. + +The SLR and RLR values for the 3G network apply up to the POI. However, the main determining factors are the characteristics of the UE, including the analogue to digital conversion (ADC) and digital to analogue conversion (DAC). In practice, it is convenient to specify loudness ratings to the Air Interface. For the normal case, where the 3G network introduces no additional loss between the Air Interface and the POI, the loudness ratings to the PSTN boundary (POI) will be the same as the loudness ratings measured at the Air Interface. However, in some cases loss adjustment may be needed for interworking situations in individual countries. + +### 6.2.2 Connections with handset UE + +The nominal values of SLR/RLR to the POI shall be: + +$$\text{SLR} = 8 \pm 3 \text{ dB};$$ + +$$\text{RLR} = 2 \pm 3 \text{ dB}.$$ + +Where a user-controlled receiving volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. When the control is set to maximum, the RLR shall not be $\leq$ (equal or louder than) -13 dB and shall not be $\geq$ (equal or quieter than) -3 dB. + +With the volume control set to the minimum position the RLR shall not be $\geq$ (equal or quieter than) 18 dB. + +Compliance shall be checked by the relevant tests described in TS 26.132. + +### 6.2.3 Connections with desktop and vehicle-mounted hands-free UE + +The nominal values of SLR/RLR to/from the POI shall be: + +$$\text{SLR} = 13 \pm 4 \text{ dB};$$ + +$$\text{RLR} = 2 \pm 4 \text{ dB (for vehicle-mounted hands-free UE);}$$ + +$$\text{RLR} = 5 \pm 4 \text{ dB (for desktop hands-free UE).}$$ + +1. For a vehicle-mounted hands-free UE: + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. It is recommended that a volume control giving at least 15 dB increase from the nominal RLR (louder) is provided for hands-free units intended to work in the vehicle environment. This is to allow for + +the increased acoustic noise level in a moving vehicle. + +RLR at the maximum volume control setting should be $\leq$ (equal or louder than) -2 dB. + +#### 2. For a desktop hands-free UE: + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. It is recommended that a volume control giving at least 15 dB increase from the nominal RLR (louder) is provided for hands-free units. This is to allow for increased acoustic noise level in the usage environment. + +RLR at the maximum volume control setting should $\leq$ (equal or louder than) 1 dB. + +Compliance shall be checked by the relevant tests described in TS 26.132. + +NOTE: The target value for nominal RLR, as recommended in ITU-T G.111 Annex B – Table B.1 [4], lies between 1 and 3 dB. The higher RLR requirement of 5 dB for desktop hands-free is appreciative of the limitations in transducer output with current typical form factors. + +### 6.2.4 Connections with hand-held hands-free UE + +The nominal values of SLR/RLR to/from the POI shall be: + +SLR = $13 \pm 4$ dB; + +RLR = $9 +9/-7$ dB. + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. + +The value of RLR at the maximum volume control shall be $\leq$ (equal or louder than) 12 dB. As a performance objective it is recommended that the RLR at the maximum volume control setting is $\leq$ (equal or louder than) 2 dB. + +Where a user-controlled volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. It is recommended that a volume control range $\geq 15$ dB be provided. + +Compliance shall be checked by the relevant tests described in TS 26.132. + +### 6.2.5 Connections with headset UE + +The SLR and RLR should be measured and computed using methods given in ITU-T Recommendation P.380 [9]. This Recommendation currently gives a measuring technique for supra-aural earphone and insert type receivers. Study is continuing on other types of ear-pieces in ITU-T Study Group 12. + +The nominal values of SLR/RLR to/from the POI shall be: + +SLR = $8 \pm 3$ dB; + +RLR = $2 \pm 3$ dB; + +RLR (binaural headset) = $8 \pm 3$ dB for each earphone. + +Where a user-controlled receiving volume control is provided, the RLR shall meet the nominal value for at least one setting of the control. When the control is set to maximum, the RLR shall not be $\leq$ (equal or louder than) -13 dB. + +With the volume control set to the minimum position the RLR shall not be $\geq$ (equal or quieter than) 18 dB and shall not be $\geq$ (equal or quieter than) 24 dB for a binaural headset. + +Compliance shall be checked by the relevant tests described in 3GPP TS 26.132. + +## 6.3 Idle channel noise (handset and headset UE) + +### 6.3.1 Sending + +The maximum noise level produced by the apparatus at the output of the SS under silent conditions in the sending direction shall not exceed -64 dBm0(A). + +NOTE 1: This level includes the eventual noise contribution of an acoustic echo canceller under the condition that no signal is received. + +NOTE 2: This figure applies to the total noise level with A-weighting. It is recommended that the level of single frequency disturbances should be $\leq -74$ dBm0(A) in the frequency range from 100 Hz to 8 kHz. + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 6.3.2 Receiving + +The maximum (acoustic) noise level at the handset and headset UE when no signal is transmitted to the input of the SS shall be as follows: + +If no user-controlled receiving volume control is provided, or, if it is provided, at the setting of the user-controlled receiving volume control at which the RLR is equal to the nominal value, the noise measured at the DRP with diffuse-field correction contributed by the receiving equipment alone shall not exceed $-57$ dBPa(A). + +Where a volume control is provided, the measured noise shall be $\leq -54$ dBPa(A) at the maximum setting of the volume control. + +For the nominal volume control setting, the level of single frequency disturbances shall be $\leq -60$ dBPa(A) in the frequency range from 100 Hz to 10 kHz. As a performance objective it is recommended that the level should be $\leq -64$ dBPa(A). + +NOTE: In a connection with the PSTN, noise conditions as described in ITU-T Recommendation G.103 [3] can be expected at the input (POI) of the 3G network. The characteristics of this noise may be influenced by the speech transcoding process (for further study). + +Compliance shall be checked by the relevant test described in TS 26.132. + +## 6.4 Sensitivity/frequency characteristics + +In general it is recommended for all configurations to have a flat sending frequency response. + +### 6.4.1 Handset and headset UE sending + +The sensitivity/frequency characteristics shall be as follows: + +The sending sensitivity frequency response, measured either from the mouth reference point (MRP) to the digital interface or from the MRP to the SS audio output (digital output of the reference speech decoder of the SS), shall be within a mask, which can be drawn between the points given in table 9. The mask is drawn with straight lines between the breaking points in table 1 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 9: Handset and headset sending sensitivity/frequency mask** + +| Send sensitivity/frequency response Frequency (Hz) | Upper limit | Lower limit | +|-------------------------------------------------------------------------|-------------|-------------| +| 100 | 0 | | +| 200 | 5 | -5 | +| 5 000 | 5 | -5 | +| 6 300 | 5 | -10 | +| 8 000 | 5 | | +| NOTE: All sensitivity values are expressed in dB on an arbitrary scale. | | | + +![Figure 9: Handset and headset sending sensitivity/frequency mask. The graph shows a red line representing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) and linear dB scale (-10 to 10 dB). The mask is defined by two shaded regions: an upper region starting at 200 Hz and 5 dB, and a lower region starting at 200 Hz and -10 dB, with a break at 300 Hz. The upper region is bounded by a horizontal line at 5 dB, and the lower region is bounded by a line that is -6 dB from 300 Hz to 5000 Hz, then drops to -12 dB at 6300 Hz, and finally rises to -10 dB at 8000 Hz.](c17eaf807acd5faec68da19dd16929be_img.jpg) + +Figure 9: Handset and headset sending sensitivity/frequency mask. The graph shows a red line representing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) and linear dB scale (-10 to 10 dB). The mask is defined by two shaded regions: an upper region starting at 200 Hz and 5 dB, and a lower region starting at 200 Hz and -10 dB, with a break at 300 Hz. The upper region is bounded by a horizontal line at 5 dB, and the lower region is bounded by a line that is -6 dB from 300 Hz to 5000 Hz, then drops to -12 dB at 6300 Hz, and finally rises to -10 dB at 8000 Hz. + +**Figure 9: Handset and headset sending sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 6.4.2 Handset and headset UE receiving + +The sensitivity/frequency characteristics shall be as follows: + +The receiving sensitivity frequency response, measured either from the digital interface to the DRP with diffuse-field correction or from the SS audio input (analogue or digital input of the reference speech encoder of the SS) to the DRP with diffuse-field correction, shall be within a mask, which can be drawn with straight lines between the breaking points in table 10 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 10: Handset and headset receiving sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit
$8 \pm 2$ N | Lower limit
$8 \pm 2$ N | +|-------------------------------------------------------------------------|----------------------------|----------------------------| +| 100 | 6 | | +| 200 | 6 | -10 | +| 300 | 6 | -6 | +| 1 000 | 6 | -6 | +| 2 000 | 8 | -6 | +| 5 000 | 8 | -6 | +| 6 300 | 8 | -12 | +| 8 000 | 8 | | +| NOTE: All sensitivity values are expressed in dB on an arbitrary scale. | | | + +NOTE: The limits in the table above are enforced but are under evaluation. The values are expected to be modified taking into account that the change from ERP to diffuse-field correction is reflected in the table. + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 6.4.3 Desktop and vehicle-mounted hands-free UE sending + +The sending sensitivity frequency response from the MRP to the SS audio output (digital output of the reference speech decoder of the SS) shall be as follows: + +The sending sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 11 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 11: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 100 | 0 | | +| 200 | 5 | -5 | +| 5 000 | 5 | -5 | +| 6 300 | 5 | -10 | +| 8 000 | 5 | | + +NOTE: All sensitivity values are expressed in dB on an arbitrary scale. + +![Figure 11: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask. The graph shows a shaded region representing the sensitivity mask on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is dB sensitivity from -10 to 10. The upper limit is a horizontal line at 5 dB from 200 Hz to 8000 Hz. The lower limit is a horizontal line at -5 dB from 200 Hz to 5000 Hz, then drops to -10 dB at 6300 Hz, and returns to -5 dB at 8000 Hz. The area between these limits is shaded.](d6a5f8423065d7cef55e11a0007014d9_img.jpg) + +Figure 11: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask. The graph shows a shaded region representing the sensitivity mask on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is dB sensitivity from -10 to 10. The upper limit is a horizontal line at 5 dB from 200 Hz to 8000 Hz. The lower limit is a horizontal line at -5 dB from 200 Hz to 5000 Hz, then drops to -10 dB at 6300 Hz, and returns to -5 dB at 8000 Hz. The area between these limits is shaded. + +**Figure 11: Desktop and vehicle-mounted hands-free sending sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 6.4.4 Desktop and vehicle-mounted hands-free UE receiving + +The receiving sensitivity frequency response from the SS audio input (analogue or digital input of the reference speech encoder of the SS) to the free-field shall be as follows: + +The receiving sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 12 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 12: Desktop and vehicle-mounted hands-free receiving sensitivity/frequency mask** + +| Frequency | Upper limit | Lower limit | +|-----------|-------------|-------------| +| 125 Hz | 8 | | +| 200 Hz | 8 | -12 | +| 250 Hz | 8 | -9 | +| 315 Hz | 7 | -6 | +| 400 Hz | 6 | -6 | +| 5 000 Hz | 6 | -6 | +| 6 300 Hz | 6 | -9 | +| 8 000 Hz | 6 | $-\infty$ | + +NOTE: The limits for intermediate frequencies lie on a straight line drawn between the given values on a linear (dB) - logarithmic (Hz) scale. +All sensitivity values are expressed in dB on an arbitrary scale. + +![Figure 12: Desktop and vehicle-mounted hands-free receiving sensitivity/frequency mask. The graph shows a shaded region representing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) versus linear dB sensitivity scale (-10 to 10 dB). The upper limit is a horizontal line at 5 dB starting from 200 Hz. The lower limit is a piecewise linear line starting at -18 dB at 200 Hz, rising to -12 dB at 315 Hz, remaining at -12 dB until 6300 Hz, and then dropping to -18 dB at 8000 Hz.](85b10db535b22e64c7d37f362705ddbf_img.jpg) + +Figure 12: Desktop and vehicle-mounted hands-free receiving sensitivity/frequency mask. The graph shows a shaded region representing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) versus linear dB sensitivity scale (-10 to 10 dB). The upper limit is a horizontal line at 5 dB starting from 200 Hz. The lower limit is a piecewise linear line starting at -18 dB at 200 Hz, rising to -12 dB at 315 Hz, remaining at -12 dB until 6300 Hz, and then dropping to -18 dB at 8000 Hz. + +**Figure 12: Desktop and vehicle-mounted hands-free receiving sensitivity/frequency mask** + +It is recommended as a performance objective that the receiving sensitivity frequency response be within the mask which can be drawn with straight lines between the breaking points in table 12.a on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 12a: Performance objective for desktop and vehicle-mounted hands-free receiving sensitivity/frequency response** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 100 | 0 | | +| 200 | 0 | -18 | +| 250 | 0 | -15 | +| 315 | 0 | -12 | +| 6 300 | 0 | -12 | +| 8 000 | 0 | | + +![Figure 12a: Performance objective for desktop and vehicle-mounted hands-free receiving sensitivity/frequency response. This graph is identical to Figure 12, showing the same shaded sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) versus linear dB sensitivity scale (-10 to 10 dB).](9c8070d46f1d2480a875239e792f1ef6_img.jpg) + +Figure 12a: Performance objective for desktop and vehicle-mounted hands-free receiving sensitivity/frequency response. This graph is identical to Figure 12, showing the same shaded sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) versus linear dB sensitivity scale (-10 to 10 dB). + +**Figure 12a: Performance objective for desktop and vehicle-mounted hands-free receiving sensitivity/frequency response** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 6.4.5 Hand-held hands-free UE sending + +The sending sensitivity frequency response from the MRP to the SS audio output (digital output of the reference speech decoder of the SS) shall be as follows: + +The sending sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 13 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 13: Hand-held hands-free sending sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 100 | 0 | | +| 200 | 5 | -5 | +| 5 000 | 5 | -5 | +| 6 300 | 5 | -10 | +| 8 000 | 5 | | + +NOTE: All sensitivity values are expressed in dB on an arbitrary scale. + +![Figure 13: Hand-held hands-free sending sensitivity/frequency mask. A graph showing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) and linear dB scale (-10 to 10 dB). The upper limit is a horizontal line at 5 dB from 200 Hz to 8000 Hz. The lower limit is a line that starts at -10 dB at 200 Hz, rises to -5 dB at 1000 Hz, stays at -5 dB until 5000 Hz, and then drops to -10 dB at 6300 Hz, remaining at -10 dB until 8000 Hz. The area between these limits is shaded.](953203b3208524d293d4a65c0569324c_img.jpg) + +Figure 13: Hand-held hands-free sending sensitivity/frequency mask. A graph showing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) and linear dB scale (-10 to 10 dB). The upper limit is a horizontal line at 5 dB from 200 Hz to 8000 Hz. The lower limit is a line that starts at -10 dB at 200 Hz, rises to -5 dB at 1000 Hz, stays at -5 dB until 5000 Hz, and then drops to -10 dB at 6300 Hz, remaining at -10 dB until 8000 Hz. The area between these limits is shaded. + +**Figure 13: Hand-held hands-free sending sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +### 6.4.6 Hand-held hands-free UE receiving + +The receiving sensitivity frequency response from the SS audio input (analogue or digital input of the reference speech encoder of the SS) to the free-field shall be as follows: + +The receiving sensitivity frequency response shall be within the mask which can be drawn with straight lines between the breaking points in table 14 on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 14: Hand-held hands-free receiving sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 315 | 6 | | +| 630 | 6 | -12 | +| 800 | 6 | -6 | +| 4 000 | 6 | -6 | +| 6 300 | 6 | -12 | +| 8 000 | 6 | | + +NOTE: All sensitivity values are expressed in dB on an arbitrary scale. + +![Figure 14: Hand-held hands-free receiving sensitivity/frequency mask. A graph showing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) and linear sensitivity scale (-10 to 10 dB). The upper limit is a constant 6 dB. The lower limit is -12 dB from 315 Hz to 630 Hz, -6 dB from 630 Hz to 4000 Hz, and -12 dB from 4000 Hz to 6300 Hz. The area between the limits is shaded.](d1c99a42332e5ee19f3b840281c26681_img.jpg) + +Figure 14: Hand-held hands-free receiving sensitivity/frequency mask. A graph showing the sensitivity mask on a logarithmic frequency scale (100 to 10000 Hz) and linear sensitivity scale (-10 to 10 dB). The upper limit is a constant 6 dB. The lower limit is -12 dB from 315 Hz to 630 Hz, -6 dB from 630 Hz to 4000 Hz, and -12 dB from 4000 Hz to 6300 Hz. The area between the limits is shaded. + +**Figure 14: Hand-held hands-free receiving sensitivity/frequency mask** + +It is recommended as a performance requirement that the receiving sensitivity frequency response be within the mask which can be drawn with straight lines between the breaking points in table 14a on a logarithmic (frequency) - linear (dB sensitivity) scale. + +**Table 14a: Performance objective for hand-held hands-free receiving sensitivity/frequency mask** + +| Frequency (Hz) | Upper limit | Lower limit | +|----------------|-------------|-------------| +| 315 | 6 | | +| 400 | 6 | -12 | +| 500 | 6 | -6 | +| 4 000 | 6 | -6 | +| 6 300 | 6 | -12 | +| 8 000 | 6 | | + +NOTE: All sensitivity values are expressed in dB on an arbitrary scale. + +![Figure 14.a: Performance objective for hand-held hands-free receiving sensitivity/frequency mask. The graph shows a frequency mask on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is sensitivity in dB from -10 to 10. A red line represents the mask boundary. The mask is shaded with diagonal lines. The mask is at 5 dB from 1000 Hz to 10000 Hz, and at -10 dB from 100 Hz to 1000 Hz. The mask is at -6 dB from 1000 Hz to 10000 Hz.](4dfe30ac5a87d018364a0ac42ea533fe_img.jpg) + +| Frequency [Hz] | Sensitivity [dB] | +|----------------|------------------| +| 100 | -10 | +| 1000 | -6 | +| 10000 | -6 | + +Figure 14.a: Performance objective for hand-held hands-free receiving sensitivity/frequency mask. The graph shows a frequency mask on a log-linear plot. The x-axis is Frequency [Hz] from 100 to 10000. The y-axis is sensitivity in dB from -10 to 10. A red line represents the mask boundary. The mask is shaded with diagonal lines. The mask is at 5 dB from 1000 Hz to 10000 Hz, and at -10 dB from 100 Hz to 1000 Hz. The mask is at -6 dB from 1000 Hz to 10000 Hz. + +**Figure 14.a: Performance objective for hand-held hands-free receiving sensitivity/frequency mask** + +Compliance shall be checked by the relevant test described in TS 26.132. + +## 6.5 Sidetone characteristics (handset and headset UE) + +### 6.5.1 Sidetone loss + +The talker sidetone masking rating (STMR) shall be $\geq 15$ dB and should be $\leq 23$ dB for the nominal setting of the volume control. For all other positions of the volume control, the STMR shall be $\geq 10$ dB. + +In case the STMR is below the lower limit also when the electrical sidetone path has been disabled, the result shall not be regarded as a failure. + +Compliance shall be checked by the relevant test described in TS 26.132. + +NOTE 1: Where a user-controlled receiving volume control is provided, it is recommended that the sidetone loss is independent of the volume control setting. + +NOTE 2: In general, it is recommended to provide a terminal sidetone path for handset and headset UEs. + +NOTE 3: In case the human air-conducted sidetone paths are obstructed (one example being some binaural insert type headset UEs), it is important to provide a terminal sidetone path. + +NOTE 4: The STMR calculation algorithm being used was developed for quantifying the audibility of the electrical sidetone path using a sealed coupler. The air-conducted path was not intended to be included in the test setup. A lower STMR limit was specified to avoid annoying effects (e.g. howling, increase of ambient noise level in the ear) of an excessive electrical sidetone. In HATS-based measurements, the air-conducted path cannot be avoided in the test setup. With some UE form factors the air-conducted path can be substantial resulting in low STMR figures also when there are no annoying effects from any excessive electrical sidetone. See ITU-T Recommendation P.76 for definitions of sidetone paths. + +### 6.5.2 Sidetone delay + +The maximum sidetone delay shall be $\leq 5$ ms, measured in an echo-free setup. + +NOTE: The measured result is only applicable where the level of the electrical sidetone is sufficiently high to be measured. While the STMR value may indicate the presence of sidetone it should be ensured that this is not primarily due to the acoustical or mechanical sidetone path when interpreting sidetone delay results. + +Compliance shall be checked by the relevant test described in TS 26.132. + +## 6.6 Stability loss + +The stability loss presented to the PSTN by the 3G network at the POI should meet the principles of the requirements in clauses 2 and 3 of ITU-T Recommendation G.122 [6]. These requirements will be met if the attenuation between the digital input and digital output at the POI is $\geq 6$ dB at all frequencies in the range 100 Hz to 8 kHz under the worst case acoustic conditions at the UE (any acoustic echo control should be enabled). For the normal case of digital connection between the Air Interface and the POI, the stability requirement can be applied at the Air Interface. + +The worst case acoustic conditions will be as follows (with volume control set to maximum for each following condition): + +**Handset UE:** the handset lying on, and the transducers facing, a hard surface with the ear-piece uncapped; + +**Headset UE:** for further study; + +**Hands-free UE:** no requirement other than echo loss. + +NOTE: The test procedure must take into account the switching effects of echo control and discontinuous transmission (DTX). + +## 6.7 Acoustic echo control + +### 6.7.1 General + +The echo loss (EL) presented by the 3G network at the POI should be sufficient during single-talk. This takes into account the fact that the UE is likely to be used in connections with high transmission delay and in a wide range of noise environments. + +The use of acoustic echo control is not mandated for 3G networks and the connection between the UE and the POI is zero loss. Therefore the acoustic echo control provided in the UE should provide a sufficient TCLw at the POI over the likely range of acoustic end delays. + +If acoustic echo control is provided by voice switching, comfort noise should be injected. This comfort noise shall operate in the same way as that used in DTX. + +### 6.7.2 Acoustic echo control in desktop and vehicle-mounted hands-free UE + +The TCLw for the desktop and vehicle-mounted hands-free UE shall be $\geq 40$ dB for any setting of the volume control. + +The TCLw for the desktop hands-free and vehicle-mounted hands-free UE shall be $\geq 46$ dB when measured under free-field conditions at the nominal setting of the volume control. + +NOTE: A TCLw for desktop hands-free and vehicle-mounted hands-free UE of $\geq 55$ dB is recommended as a performance objective when measured under free-field conditions at the nominal setting of the volume control. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be designed to cope with the expected reverberation and dispersion. In the case of the hands-free UE, this reverberation and dispersion may be time variant. Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +### 6.7.3 Acoustic echo control in hand-held hands-free UE + +The TCLw for hand-held hands-free UE shall be $\geq 40$ dB for any setting of the volume control. + +The TCLw for hand-held hands-free UE shall be $\geq 46$ dB at the nominal setting of the volume control. + +NOTE: A TCLw for the hand-held hands-free UE of $\geq 55$ dB is recommended as a performance objective when measured under free-field conditions at the nominal setting of the volume control. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be designed to cope with the expected reverberation and dispersion. In the case of the hands-free UE, this reverberation and dispersion may be time variant. Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +### 6.7.4 Acoustic echo control in a handset UE + +The TCLw for handset UE shall be $\geq 46$ dB for any setting of the volume control. + +The TCLw for handset UE should be $\geq 55$ dB at the nominal setting of the volume control. + +With the volume control set to maximum TCLw should be $\geq 55$ dB. + +It is recommended that the volume control should be set back to nominal after each call unless TCLw $\geq 55$ dB can also be maintained with the maximum volume setting. + +NOTE. Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +The echo canceller should be capable of dealing with the variations in handset positions when in normal use. The implications of this are under study. + +Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +### 6.7.5 Acoustic echo control in a headset UE + +The TCLw for headset UE shall be $\geq 46$ dB for any setting of the volume control. + +The TCLw for headset UE shall be $\geq 55$ dB at the nominal setting of the volume control. + +The volume control shall be set back to nominal after each call unless a TCLw $\geq 55$ dB can also be maintained with the maximum volume setting. + +NOTE: Depending on the UE idle channel noise in the sending direction, it may not always be possible to measure an echo loss $\geq 55$ dB. + +Due to the obstacle effect of the head in this type of terminal, careful design might mean that no active echo control is necessary. + +The echo cancellation algorithm should be designed to cope with the expected reverberation and dispersion. + +Compliance with this requirement shall be checked by the relevant test described in TS 26.132. + +## 6.8 Distortion + +### 6.8.1 Sending distortion + +The sending part shall meet the following distortion requirements: + +NOTE 1: Digital signal processing other than the transcoder itself is included in this requirement (e.g., echo cancelling). + +Distortion shall be measured between the MRP and the SS audio output (output of the reference speech decoder of the SS). The ratio of signal-to-total distortion power measured with the proper noise weighting (see table 4 of ITU-T Recommendation G.223) shall be above the limits given in table 15. + +NOTE 2: Frequencies from 315 Hz to 816 Hz do not apply to the hands-free UE case, but only to handset and headset UE. + +**Table 15: Limits for signal-to-total distortion ratio** + +| Frequency (Hz) | Sending level (dBPa at the MRP) | Sending Ratio (dB) | +|----------------|---------------------------------|--------------------| +| 315 | -4,7 | 28 | +| 408 | -4,7 | 32 | +| 510 | -4,7 | 32 | +| 816 | -4,7 | 32 | +| 1 020 | 5 | 30 | +| | 0 | 35 | +| | -4,7 | 35 | +| | -10 | 33 | +| | -15 | 30 | +| | -20 | 27 | + +Limits for intermediate levels are found by drawing straight lines between the breaking points in table 15 on a linear (dB signal level) - linear (dB ratio) scale. + +Compliance of the sending distortion shall be checked by the test described in TS 26.132. + +NOTE 3: It should be ensured that the test signal is treated by speech processing algorithms as a speech-like signal, and not a noise-like signal. Test signals with a time-stationary envelope may be treated by certain algorithms, e.g., noise suppression algorithms defined in 3GPP TS 06.77 R99 [16], as a noise-like signal. If speech processing algorithms, including but not limited to noise suppression algorithms, are shown to treat the test signal as a noise-like signal, even where an activation signal has been utilized, then the test should be repeated with said speech processing algorithms disabled. The results of both sets of tests and the state of the processing algorithms should be documented in the test report. + +### 6.8.2 Receiving + +The receiving part between the SS audio input (input of the reference speech encoder of the SS) and the DRP with diffuse-field correction shall meet the requirements in this sub-clause at the nominal setting of the volume control (except where another volume setting is specified): + +The ratio of signal-to-total distortion power measured with the proper noise weighting (see table 4 of ITU-T Recommendation G.223) shall be above the limits given in table 16 when the sound pressure at the DRP with diffuse-field correction is $< 10$ dBPa. For a sound pressure $\geq 10$ dBPa at the DRP with diffuse-field correction there is no distortion requirement. + +NOTE 1: Frequencies from 315 Hz to 816 Hz do not apply to the hands-free UE case, only to handset and headset UE. + +**Table 16: Limits for signal-to-total distortion ratio** + +| Frequency (Hz) | Receiving level at the digital interface (dBm0) | Receiving ratio at nominal volume setting (dB) | Receiving ratio at maximum volume setting (dB) | +|----------------|-------------------------------------------------|------------------------------------------------|------------------------------------------------| +| 315 | -16 | tbd | | +| 408 | -16 | tbd | | +| 510 | -16 | tbd | | +| 816 | -16 | tbd | | +| 1 020 | 0 | 25,5 | tbd | +| | -3 | 31,5 | tbd | +| | -10 | 33,5 | tbd | +| | -16 | tbd | tbd | +| | -20 | tbd | tbd | +| | -30 | tbd | tbd | +| | -40 | tbd | tbd | +| | -45 | tbd | tbd | + +Limits for intermediate levels are found by drawing straight lines between the breaking points in the table on a linear (dB signal level) - linear (dB ratio) scale. + +Compliance of the receiving distortion shall be checked by the appropriate method in TS 26.132. + +NOTE 2: It should be ensured that the test signal is treated by speech processing algorithms as a speech-like signal, and not a noise-like signal. Test signals with a time-stationary envelope may be treated by certain algorithms, e.g., noise suppression algorithms defined in 3GPP TS 06.77 R99 [16], as a noise-like signal. + +NOTE 3: The informative values for limits for signal-to-total distortion ratio shown in Table 16a have been under consideration but are not in force. + +**Table 16a (INFORMATIVE): Informative values for limits for signal-to-total distortion ratio** + +| Frequency (Hz) | Receiving level at the digital interface (dBm0) | Receiving ratio at nominal volume setting (dB) | Receiving ratio at maximum volume setting (dB) | +|----------------|-------------------------------------------------|------------------------------------------------|------------------------------------------------| +| 315 | -16 | 20 | | +| 408 | -16 | 28 | | +| 510 | -16 | 28 | | +| 816 | -16 | 28 | | +| 1 020 | -16 | 33,5 | | +| | -20 | 33 | | +| | -30 | 30,5 | | +| | -40 (*) | 22,5 (*) | | +| | -45 (*) | 17,5 (*) | | + +NOTE: (\*)For levels -40 and -45 dBm0 a lower signal-to-total distortion ratio may not be possible, and hence would not be regarded as a failing result. However, the obtained results would be reported. + +## 6.9 Void + +## 6.10 Sending performance in the presence of ambient noise + +### 6.10.1 General + +For sending, in handset mode, the UE shall reduce the ambient noise picked up by the microphone(s) without significantly degrading the quality of the speech signal. + +### 6.10.2 Connections with handset UE + +The UE shall comply with the following requirements: + +#### S-MOS-LQOw + +- The average of S-MOS-LQOw scores across all test conditions shall be $\geq 3.0$ +- As a performance objective, the average of the S-MOS-LQOw scores across all test conditions should be $\geq 3.5$ + +#### N-MOS-LQOw + +- The average of the N-MOS-LQOw scores across all test conditions shall be $\geq 2.3$ +- As a performance objective, the average of N-MOS-LQOw scores across all test conditions should be $\geq 3.0$ + +#### G-MOS-LQOw + +- No requirement. + +Compliance shall be checked by the relevant tests described in 3GPP TS 26.132. + +## 6.11 Delay + +### 6.11.1 Handset UE + +It is in general desirable to minimize UE delays to ensure low enough end-to-end delays and hence a good conversational experience, guidance is found in ITU-T Recommendation G.114. + +For UMTS circuit-switched AMR-WB speech codec operation, the sum of the UE delays in sending and receiving directions ( $T_S + T_R$ ) shall in any case be $\leq 220\text{ms}$ and should be $\leq 185\text{ms}$ . + +NOTE: A delay $\leq 185$ ms might not be achievable in some cases due to UE implementation trade-offs between delay and other parameters such as speech quality enhancement, performance of noise reduction or UE power consumption optimization, and UE implementation issues such as rebuffering between components. + +Compliance shall be checked by the relevant test described in 3GPP TS 26.132. + +### 6.11.2 Headset UE + +#### 6.11.2.1 Wired headset + +It is in general desirable to minimize UE delays to ensure low enough end-to-end delays and hence a good conversational experience, guidance is found in ITU-T Recommendation G.114. + +For UMTS circuit-switched AMR-WB speech codec operation, the sum of the UE delays in sending and receiving directions ( $T_S + T_R$ ) shall in any case be $\leq 220$ ms and should be $\leq 185$ ms. + +NOTE: A delay $\leq 185$ ms might not be achievable in some cases due to UE implementation trade-offs between delay and other parameters such as speech quality enhancement, performance of noise reduction or UE power consumption optimization, and UE implementation issues such as rebuffering between components. + +Compliance shall be checked by the relevant test described in 3GPP TS 26.132. + +#### 6.11.2.2 Wireless headset + +For further study. + +## 6.12 Echo control characteristics + +Echo cancellation is commonly deployed in the UE to fulfil the Acoustic echo control requirements. Echo cancellers are complex devices of which the subjective performance is affected by several attributes. The main attribute is its ability to suppress echo. The process of suppressing the echo may introduce impairments to the near-end speech signal, mainly manifested as distortion or clipping of the near-end signal during simultaneous speech from both the far and near-end (“double-talk”). + +To characterise the echo control performance, the activity (in % of total time) and averaged level difference (in dB) of the duration of any level difference according to Figure 14b and Table 16b between the clean near-end signal and the send-signal shall be reported for “double-talk” as well as the far-end single talk periods adjacent to the “double-talk”. + +NOTE: The limits for specifying the categories in Figure 14b and Table 16b are provisional pending further analysis and validation. + +NOTE: The categories in Figure 14b and Table 16b are labelled in a functional order and the subjective impression of the respective categories is for further study. + +All percentage values and averaged level differences described in the relevant test of 3GPP TS 26.132 shall be reported. + +![Figure 14b: Classification of echo canceller performance. A graph showing Level difference [dB] on the y-axis (values: 4, -4, -15) versus Duration [ms] on the x-axis (values: 25, 150). The graph is divided into regions labeled A1, A2, B, C, D, E, F, and G by dashed lines. A1 and A2 are in the upper middle region. B, C, and D are in the lower region. E, F, and G are in the upper region.](bf30e154f82662d212f21fccdfa2980f_img.jpg) + +Figure 14b: Classification of echo canceller performance. A graph showing Level difference [dB] on the y-axis (values: 4, -4, -15) versus Duration [ms] on the x-axis (values: 25, 150). The graph is divided into regions labeled A1, A2, B, C, D, E, F, and G by dashed lines. A1 and A2 are in the upper middle region. B, C, and D are in the lower region. E, F, and G are in the upper region. + +Figure 14b: Classification of echo canceller performance + +Table 16b: Categories for echo canceller performance classification + +| Category | Description | +|----------|-----------------------------------------------| +| A1 | Full-duplex and full transparency | +| A2 | Full-duplex with level loss in Tx | +| B | Very short clipping | +| C | Short clipping resulting in loss of syllables | +| D | Clipping resulting in loss of words | +| E | Very short residual echo | +| F | Echo bursts | +| G | Continuous echo | + +### 6.12.1 Handset + +Requirements are for further study. + +### 6.12.2 Headset + +Requirements are for further study. + +### 6.12.3 Handheld hands-free + +Requirements are for further study. + +### 6.12.4 Desktop and vehicle mounted hands-free + +Requirements are for further study. + +# Annex A (informative): Change history + +| 3.0.0 | | December 1999 | | Approved at TSG-SA#6 Plenary | | | | +|----------------|-------|---------------|------|------------------------------|--------------------------------------------------------------------------------------------|--------|--------| +| Change history | | | | | | | | +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2000-06 | 8 | SP-000264 | 001 | 2 | CR on Addition of a chapter pointing to ITU-T Recommendations for extended parameters | 3.0.0 | 3.1.0 | +| 2000-06 | 8 | SP-000264 | 002 | | CR on Listener side tone (LSTR) and talker side tone (STMR) requirements | 3.0.0 | 3.1.0 | +| 2000-06 | 8 | SP-000264 | 003 | 1 | CR on Change of Handset and headset UE receiving sensitivity/frequency characteristic mask | 3.0.0 | 3.1.0 | +| 2000-06 | 8 | SP-000264 | 004 | 1 | CR on Acoustic requirements for Handheld-type hands-free user equipment | 3.0.0 | 3.1.0 | +| 2001-03 | 11 | SP-010106 | 005 | 1 | Harmonisation of narrow-band acoustic requirements between 3GPP and GSM | 3.1.0 | 3.2.0 | +| 2001-03 | 11 | | | | Release 4 | | 4.0.0 | +| 2001-03 | 11 | SP-010106 | 006 | 3 | Wideband acoustic requirements | 4.0.0 | 5.0.0 | +| 2001-09 | 13 | SP-010453 | 009 | | Introduction of ANR tolerance of 3 dB | 5.0.0 | 5.1.0 | +| 2002-09 | 17 | SP-020435 | 014 | | Correction on the ANR requirement for hands-free UEs | 5.1.0 | 5.2.0 | +| 2004-09 | 25 | SP-040649 | 022 | | Change of sending distortion requirement | 5.2.0 | 6.0.0 | +| 2007-03 | 35 | SP-070026 | 0023 | 1 | Minimum echo loss requirements | 6.0.0 | 6.1.0 | +| 2007-03 | 35 | SP-070026 | 0024 | 1 | Correcting wrong reference to ITU-T G.223 | 6.0.0 | 6.1.0 | +| 2007-03 | 35 | SP-070026 | 0025 | 1 | Update of reference [11] to P.79-2001 Annex G | 6.0.0 | 6.1.0 | +| 2007-03 | 35 | SP-070026 | 0027 | 1 | Sending distortion requirements for WB-AMR | 6.0.0 | 6.1.0 | +| 2007-06 | 36 | | | | Version for Release 7 | 6.1.0 | 7.0.0 | +| 2007-12 | 38 | SP-070759 | 0028 | 2 | Creating a sidetone requirement for the case where HATS method is used | 7.0.0 | 7.1.0 | +| 2008-12 | 42 | SP-080682 | 0030 | 1 | Receiving characteristics harmonization | 7.1.0 | 8.0.0 | +| 2008-12 | 42 | SP-080682 | 0031 | 1 | Updated requirements and performance objectives for wideband terminal acoustics | 7.1.0 | 8.0.0 | +| 2009-03 | 43 | SP-090017 | 0029 | 2 | Terminal acoustic characteristics for telephony | 8.0.0 | 9.0.0 | +| 2009-06 | 44 | SP-090257 | 0033 | | Receiving sensitivity/frequency mask correction | 9.0.0 | 9.1.0 | +| 2009-09 | 45 | SP-090568 | 0035 | 1 | Correction of STMR calculation | 9.1.0 | 9.2.0 | +| 2010-03 | 47 | SP-100021 | 0036 | 1 | Correction of distortion measurements | 9.2.0 | 9.3.0 | +| 2010-09 | 49 | SP-100470 | 0039 | 4 | Enhancement of STMR requirements | 9.3.0 | 10.0.0 | +| 2011-03 | 51 | SP-110042 | 0041 | 3 | Alignment of 3GPP Audio Test Requirements | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110149 | 0044 | 3 | Correction of WB receive distortion requirements | 10.0.0 | 10.1.0 | +| 2011-06 | 52 | SP-110304 | 0040 | 3 | Remaining modifications to EAAT WI | 10.1.0 | 10.2.0 | +| 2011-09 | 53 | SP-110549 | 0046 | 1 | Note on applicability of WB sidetone delay | 10.2.0 | 10.3.0 | +| 2011-11 | 54 | SP-110793 | 0047 | | Correction of sending idle channel noise requirement | 10.3.0 | 10.4.0 | +| 2011-11 | 54 | SP-110793 | 0048 | | Corrections to volume control setting | 10.3.0 | 10.4.0 | +| 2012-09 | 57 | SP-120503 | 0052 | 3 | Addition of UE delay requirement | 10.4.0 | 11.0.0 | +| 2012-09 | 57 | SP-120503 | 0053 | 1 | Extension of Acoustic Test Requirements | 10.4.0 | 11.0.0 | +| 2012-12 | 58 | SP-120760 | 0054 | 2 | Minor clarification of UMTS UE Delay Requirements | 11.0.0 | 11.1.0 | +| 2013-03 | 59 | SP-130017 | 0055 | 1 | Voiding of ambient noise rejection test cases | 11.1.0 | 11.2.0 | +| 2013-12 | 62 | SP-130563 | 0060 | 2 | STMR - adaptation to modern form factors | 11.2.0 | 11.3.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26140/raw.md b/marked/Rel-11/26_series/26140/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..01299d21b22bc2f2ee86a3e9905f7a24f792b86e --- /dev/null +++ b/marked/Rel-11/26_series/26140/raw.md @@ -0,0 +1,351 @@ + + + + + + +# --- Contents + +| | | +|-------------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and abbreviations ..... | 8 | +| 3.1 Definitions..... | 8 | +| 3.2 Abbreviations ..... | 8 | +| 4 Media formats ..... | 8 | +| 4.1 Text..... | 9 | +| 4.2 Speech ..... | 9 | +| 4.3 Audio..... | 9 | +| 4.4 Synthetic audio..... | 10 | +| 4.5 Still Image ..... | 10 | +| 4.6 Bitmap graphics..... | 10 | +| 4.7 Video ..... | 10 | +| 4.8 Vector graphics ..... | 11 | +| 4.9 File Format for video and associated speech/audio media types ..... | 11 | +| 4.10 Media synchronization and presentation format ..... | 11 | +| 4.11 Timed text ..... | 11 | +| 4.12 Digital Rights Management ..... | 12 | +| 4.13 PIM..... | 12 | +| 4.14 Dynamic and Interactive Multimedia Scene ..... | 12 | +| Annex A (informative): Change history..... | 13 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +The 3GPP Multimedia messaging service (MMS) specification consists of three 3GPP TSs; 3GPP TS 22.140, 3GPP TS 23.140 and the present document. The TS 3GPP TS 22.140 [22] provides a set of requirements which shall be supported for the provision of non real-time multimedia messaging service, seen primarily from the subscriber's and service providers' points of view. The TS 23.140 [23] identifies the functional capabilities and information flows needed to support the MMS. The present document provides the details of media types, formats and codecs used by the MMS service + +The issue of codecs ad for MMS services has been addressed initially in TS 23.140, owned by the 3GPP T2 group. During the TSG-T WG2 group meeting in Edinburgh in September 2001, the TSG-T WG2 group sent a Liaison statement (S4-AHP040) to the 3GPP SA WG4 group, requesting that the responsibility for the specification of codecs and formats to be used in MMS services is transferred to SA WG4 group starting with Release 5. + +After the SA WG4 group agreed to take over this responsibility, and the present document is the result of such commitment on Release 6. + +For the sake of interoperability and alignment it is important there is no contradiction between the recommendations made in the present document and in the 26.234 specification [14]. + +# --- 1 Scope + +The present document specifies the media types, formats and codecs for the MMS within the 3GPP system. The scope of the present document extends to codecs for speech, audio, video, still images, bitmap graphics, and other media in general, as well as scene description, multimedia integration and synchronization schemes. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. + - For a specific reference, subsequent revisions do not apply. + - For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. +- [1] 3GPP TR 21.905: "Vocabulary for 3GPP Specifications". +- [2] The Unicode Consortium: "The Unicode Standard", Version 2.0, Addison-Wesley Developers Press, 1996. URL: . +- [3] ANSI X3.4, 1986: "Information Systems; Coded Character Set 7 Bit; American National Standard Code for Information Interchange". +- [4] ISO/IEC 8859-1:1998: "Information technology; 8-bit single-byte coded graphic character sets; Part 1: Latin alphabet No. 1". +- [5] IETF; RFC 2279: "UTF-8, A Transformation format of ISO 10646", URL: . +- [6] 3GPP TS 24.011: "Point-to-Point (PP) Short Message Service (SMS) support on mobile radio interface". +- [7] 3GPP TS 26.090: "AMR speech Codec Transcoding functions". +- [8] ITU-T Recommendation T.81: "Information technology; Digital compression and coding of continuous-tone still images: Requirements and guidelines". +- [9] "JPEG File Interchange Format", Version 1.02, September 1, 1992. +- [10] ITU-T Recommendation H.263 (02/98): "Video coding for low bit rate communication". +- [11] ITU-T Recommendation H.263 – Annex X (03/04): "Annex X: Profiles and levels definition". +- [12] ISO/IEC 14496-2 (2004): "Information technology - Coding of audio-visual objects - Part 2: Visual". +- [13] (void). +- [14] 3GPP TS 26.234: "End-to-end transparent streaming Service; Protocols and codecs". +- [15] CompuServe Incorporated: "GIF Graphics Interchange Format: A Standard defining a mechanism for the storage and transmission of raster-based graphics information", Columbus, OH, USA, 1987. +- [16] Compuserve Incorporated, Columbus, Ohio (1990): "Graphics Interchange Format (Version 89a)". +- [17] IETF RFC 2083: "PNG (Portable Networks Graphics) Specification version 1.0 ", T. Boutell, et. al., March 1997. +- [18] ITU-T Recommendation H.263 (1998): "Video coding for low bit rate communication - Annex X, Profiles and Levels Definition". + +- [19] ISO/IEC 14496-3:2001, "Information technology -- Coding of audio-visual objects -- Part 3: Audio". +- [20] W3C Last Call Working Draft: "Scalable Vector Graphics (SVG) 1.2", , October 2004. +- [21] W3C Last Call Working Draft: "Mobile SVG Profile: SVG Tiny, Version 1.2", , August 2004. +- [22] 3GPP 22.140: "Service Aspects; Stage 1; Multimedia Messaging Service". +- [23] 3GPP 23.140: "Multimedia Messaging Service (MMS); Functional Description; Stage 2". +- [24] W3C Recommendation: "Synchronized Multimedia Integration Language (SMIL 2.0)", , August 2001. +- [25] IETF RFC 2046: "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types". +- [26] 3GPP TS 26.071: "Mandatory Speech Codec speech processing functions; AMR Speech Codec; General description". +- [27] 3GPP TS 26.171: "Speech codec speech processing functions; Adaptive Multi-Rate - Wideband (AMR-WB) speech codec; General description". +- [28] Scalable Polyphony MIDI Specification Version 1.0, RP-34, MIDI Manufacturers Association, Los Angeles, CA, February 2002. +- [29] Scalable Polyphony MIDI Device 5-to-24 Note Profile for 3GPP, RP-35, MIDI Manufacturers Association, Los Angeles, CA, February 2002. +- [30] WAP Forum Specification: "XHTML Mobile Profile", , October 2001. +- [31] "Standard MIDI Files 1.0", RP-001, in "The Complete MIDI 1.0 Detailed Specification, Document Version 96.1" The MIDI Manufacturers Association, Los Angeles, CA, USA, February 1996. +- [32] IETF RFC 3267: "RTP payload format and file storage format for the Adaptive Multi-Rate (AMR) Adaptive Multi-Rate Wideband (AMR-WB) audio codecs ", March 2002. +- [33] 3GPP TS 26.244: "Transparent end-to-end packet switched streaming service (PSS); 3GPP file format (3GP)". +- [34] 3GPP TS 26.246: "Transparent end-to-end packet switched streaming service (PSS); 3GPP SMIL Language Profile". +- [35] 3GPP TS 26.245: "Transparent end-to-end packet switched streaming service (PSS); Timed text format". +- [36] IETF RFC 1952 "GZIP file format specification version 4.3", Deutsch P, May 1996. +- [37] (void) +- [38] Mobile DLS, MMA specification v1.0. RP-41 Los Angeles, CA, USA. 2004. +- [39] Mobile XMF Content Format Specification, MMA specification v1.0., RP-42, Los Angeles, CA, USA. 2004. +- [40] 3GPP TS 26.090: "Mandatory Speech Codec speech processing functions; Adaptive Multi-Rate (AMR) speech codec; Transcoding functions". +- [41] 3GPP TS 26.073: "ANSI-C code for the Adaptive Multi Rate (AMR) speech codec". +- [42] 3GPP TS 26.104: "ANSI-C code for the floating-point Adaptive Multi Rate (AMR) speech codec". +- [43] 3GPP TS 26.190: "Speech Codec speech processing functions; AMR Wideband speech codec; Transcoding functions". + +- [44] 3GPP TS 26.173: "ANSI-C code for the Adaptive Multi Rate - Wideband (AMR-WB) speech codec". +- [45] 3GPP TS 26.204: "ANSI-C code for the Floating-point Adaptive Multi-Rate Wideband (AMR-WB) speech codec". +- [46] 3GPP TS 26.290: "Extended AMR Wideband codec; Transcoding functions". +- [47] 3GPP TS 26.304: "ANSI-C code for the Floating-point; Extended AMR Wideband codec". +- [48] 3GPP TS 26.273: "ANSI-C code for the Fixed-point; Extended AMR Wideband codec". +- [49] 3GPP TS 26.401: "General audio codec audio processing functions; Enhanced aacPlus general audio codec; General description". +- [50] 3GPP TS 26.410: "General audio codec audio processing functions; Enhanced aacPlus general audio codec; Floating-point ANSI-C code". +- [51] 3GPP TS 26.411: "General audio codec audio processing functions; Enhanced aacPlus general audio codec; Fixed-point ANSI-C code". +- [52] ITU-T Recommendation H.264 (01/2012): "Advanced video coding for generic audiovisual services" | ISO/IEC 14496-10:2010: "Information technology – Coding of audio-visual objects – Part 10: Advanced Video Coding". +- [53] ISO/IEC 14496-10/FDAM1: "AVC Fidelity Range Extensions". +- [54] "Exchangeable image file format for digital still cameras: EXIF 2.2", Specification by the Japan Electronics and Information Technology Industries Association (JEITA), April 2002, URL: +- [55] Standard ECMA-327: "ECMAScript 3rd Edition Compact Profile", June 2001. +- [56] "Digital Rights Management", Open Mobile Alliance™, OMA-Download-DRM-v1\_0, +- [57] "DRM Rights Expression Language", Open Mobile Alliance™, OMA-Download-DRMREL-v1\_0, +- [58] "DRM Content Format", Open Mobile Alliance™, OMA-Download-DRMCF-v1\_0, +- [59] "vObject Minimum Interoperability Profile", Open Mobile Alliance™, OMA-TS-vObjectOMAProfile-V1\_0, +- [60] 3GPP TR 26.936: "Performance characterization of 3GPP audio codecs". +- [61] 3GPP TS 26.142: "Dynamic and Interactive Multimedia Scene". + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the following terms and definitions apply: + +**continuous media:** media with an inherent notion of time, in the present document speech, audio and video + +**discrete media:** media that itself does not contain an element of time, in the present document all media not defined as continuous media + +**scene description:** description of the spatial layout and temporal behaviour of a presentation, it can also contain hyperlinks + +## 3.2 Abbreviations + +For the purposes of the present document, the abbreviations given in 3GPP TR 21.905 [1] and the following apply: + +| | | +|------------------|-------------------------------------------------------------| +| 3GP | 3GPP file format | +| AAC | Advanced Audio Coding | +| AVC | Advanced Video Coding | +| CC/PP | Composite Capability/Preference Profiles | +| CPB | Coding Picture Buffer | +| DIMS | Dynamic and Interactive Multimedia Scene | +| DLS | Downloadable Sounds | +| DRM | Digital Rights Management | +| Enhanced aacPlus | MPEG-4 High Efficiency AAC plus MPEG-4 Parametric Stereo | +| EXIF | Exchangeable image file format | +| GIF | Graphics Interchange Format | +| H.263 | ITU-T video codec | +| HDTV | High-definition television | +| ITU-T | International Telecommunications Union - Telecommunications | +| JFIF | JPEG File Interchange Format | +| JPEG | Joint Picture Expert Group | +| MIDI | Musical Instrument Digital Interface | +| MIME | Multipurpose Internet Mail Extensions | +| MM | Multimedia Message | +| MMS | Multimedia Messaging Service | +| MPEG | Motion Picture Expert Group | +| MP4 | MPEG-4 file format | +| PIM | Personal Information Manager | +| PSS | Packet-switched Streaming Service | +| SBR | Spectral Band Replication | +| SP-MIDI | Scalable Polyphony MIDI | +| SVG | Scalable Vector Graphics | +| UTF-8 | Unicode Transformation Format (the 8-bit form) | +| VCL | Video Coding Layer | +| XMF | Extensible Music Format | + +# --- 4 Media formats + +Multiple media elements shall be combined into a composite single MM using MIME multipart format as defined in RFC 2046 [25]. The media type of a single MM element shall be identified by its appropriate MIME type whereas the media format shall be indicated by its appropriate MIME subtype. + +In order to guarantee a minimum support and compatibility between multimedia messaging capable terminals, MMS User Agent supporting specific media types shall comply with the following selection of media formats: + +## 4.1 Text + +Plain text. Any character encoding (charset) that contains a subset of the logical characters in Unicode [2] shall be used (e.g. US-ASCII [3], ISO-8859-1 [4], UTF-8 [5], Shift\_JIS, etc.). + +Unrecognized subtypes of "text" shall be treated as subtype "plain" as long as the MIME implementation knows how to handle the charset. Any other unrecognized subtype and unrecognized charset shall be treated as "application/octet-stream". + +Interoperability with SMS text type is according to [23]. + +## 4.2 Speech + +If speech is supported, the AMR codec shall be supported for narrow-band speech [26][40][41][42]. + +The AMR wideband speech codec [27][43][44][45] shall be supported when wideband speech working at 16 kHz sampling frequency is supported. + +When using speech media type alone, AMR or AMR-WB data is stored according to the file format specified in [32]. + +Multi-channel sessions shall not be used. + +## 4.3 Audio + +If audio is supported, then one or both of the following two audio codecs should be supported: + +- Enhanced aacPlus [49] [50] [51] +- Extended AMR-WB [46] [47] [48] + +There is no requirement that a terminal supporting decoding by one of the codecs shall also support encoding by that codec. + +Specifically, based on the audio codec selection test results Extended AMR-WB is strong for the scenarios marked with blue, Enhanced aacPlus is strong for the scenarios marked with orange, and both are strong for the scenarios marked with green colour in the table below: + +| Content type | Music | Speech over Music | Speech between Music | Speech | +|----------------|-------|-------------------|----------------------|--------| +| Bit rate | | | | | +| 14 kbps mono | | | | | +| 18 kbps stereo | | | | | +| 24 kbps stereo | | | | | +| 24 kbps mono | | | | | +| 32 kbps stereo | | | | | +| 48 kbps stereo | | | | | + +More recent information on the performance of the codecs based on more recent versions of the codecs can be found in TR 26.936 [60]. + +Enhanced aacPlus decoder is also able to decode MPEG-4 AAC LC content. + +Extended AMR-WB decoder is also able to decode AMR-WB content. + +In addition, MPEG-4 AAC Low Complexity and MPEG-4 AAC Long Term Prediction object types [19] may be supported. The maximum sampling rate to be supported by the decoder is 48 kHz. The channel configurations to be supported are mono (1/0) and stereo (2/0). + +## 4.4 Synthetic audio + +If synthetic audio is supported, the Scalable Polyphony MIDI (SP-MIDI) content format defined in Scalable Polyphony MIDI Specification [28] and the device requirements defined in Scalable Polyphony MIDI Device 5-to-24 Note Profile for 3GPP [29] should be supported. + +SP-MIDI content is delivered in the structure specified in Standard MIDI Files 1.0 [31], either in format 0 or format 1. + +In addition the Mobile DLS instrument format defined in [38] and the Mobile XMF content format defined in [39] should be supported. + +A MMS client supporting Mobile DLS shall meet the minimum device requirements defined in [38] in section 1.3 and the requirements for the common part of the synthesizer voice as defined in [29] in sections 1.2.1.2. If Mobile DLS is supported, wavetables encoded with the G.711 A-law codec (wFormatTag value 0x0006, as defined in [38]) shall also be supported. The optional group of processing blocks as defined in [39] may be supported. Mobile DLS resources are delivered either in the file format defined in [38], or within Mobile XMF as defined in [39]. For Mobile DLS files + +delivered outside of Mobile XMF, the loading application should unload Mobile DLS instruments so that the sound bank required by the SP-MIDI profile [29] is not persistently altered by temporary loadings of Mobile DLS files. + +Content that pairs Mobile DLS and SP-MIDI resources is delivered in the structure specified in Mobile XMF [39]. As defined in [39], a Mobile XMF file shall contain one SP-MIDI SMF file and no more than one Mobile DLS file. MMS clients supporting Mobile XMF must not support any other resource types in the Mobile XMF file. Media handling behaviours for the SP-MIDI SMF and Mobile DLS resources contained within Mobile XMF are defined in [39]. + +## 4.5 Still Image + +If still images are supported, ISO/IEC JPEG [8] together with JFIF [9] shall be supported. The support for ISO/IEC JPEG only apply to the following two modes: + +- mandatory: baseline DCT, non-differential, Huffman coding, as defined in table B.1, symbol 'SOF0' in [8]; +- optional: progressive DCT, non-differential, Huffman coding, as defined in table B.1, symbol 'SOF2' [8]. + +For JPEG baseline DCT, EXIF compressed image file format should also be supported, as defined in [54]. In that case there is no requirement for the MMS client to interpret or present the EXIF parameters recorded in the file. + +## 4.6 Bitmap graphics + +If bitmap graphics is supported, the following bitmap graphics formats should be supported: + +- GIF87a [15]; +- GIF89a, [16]; +- PNG, [17]. + +## 4.7 Video + +If video is supported, ITU-T Recommendation H.264 / MPEG-4 (Part 10) AVC [52] Constrained Baseline Profile (CBP) Level 1.3 shall be supported. In addition, + +- ITU-T Recommendation H.264 / MPEG-4 (Part 10) AVC [52] High Profile Level 3.1 with `frame_mbs_only_flag=1` should be supported by MMS clients supporting HDTV video content at a resolution of 1280x720 (720p) with progressive scan at 30 frames per second. Maximum VCL Bit Rate shall be constrained to 14Mbps by `cpbBrVclFactor` & `cpbBrNalFactor` being fixed to 1000 and 1200 respectively, irrespective of the profile. Note that peak Bit Rate is determined by the CPB size. +- ITU-T Recommendation H.263 profile 0 level 45 [10][11] should be supported for compatibility with earlier content and UEs. + +If stereoscopic 3D video is supported, ITU-T Recommendation H.264 / MPEG-4 (Part 10) AVC [52] Stereo High Profile (SHP) Level 3.1 with `frame_mbs_only_flag=1` should be supported. When an H.264 (AVC) SHP sub-bitstream containing the base view only complies with Level 1.3 or below, it should be constrained as follows: the value of the `profile_idc` should be equal to 66 and the value of the `constraint_set1_flag` should be equal to 1 in all active sequence parameter sets, i.e. the H.264 (AVC) Constrained Baseline Profile should be indicated to be used for the base view. + +NOTE: When the base view sub-bitstream of the MM complies with H.264 (AVC) CPB Level 1.3 or below, the base view of an MM can be played back by any MMS (Release 11) client supporting video, or the MM can be modified without re-encoding to an MM including 2D video to be played back in H.264 (AVC) CPB compatible MMS clients. + +There are no requirements on output timing conformance of H.264 (AVC) decoding (Annex C of [52]). + +A video buffer model defined in Annex G of document [14] should be used with H.263 and MPEG-4. It shall not be used with H.264 (AVC). + +## 4.8 Vector graphics + +If 2D vector graphics is supported, Scalable Vector Graphics (SVG) Tiny 1.2 [20][21] and ECMAScript [55] shall be supported. + +NOTE 1: The compression format for SVG content is GZIP [35], in accordance with the SVG specification [20]. + +NOTE 2: Only media formats supported by MMS, as specified in clause 4 of this specification, shall be used. MMS clients do not support the Ogg Vorbis format. + +NOTE 3: Content creators of SVG Tiny 1.2 for MMS clients are strongly recommended to follow the content creation guidelines provided for PSS clients in Annex L of [14]. + +NOTE 4: If SVG Tiny 1.2 will not be published within a reasonable timeframe, the decision to adopt SVG Tiny 1.2 in favour of SVG Tiny 1.1 may be reconsidered. + +## 4.9 File Format for video and associated speech/audio media types + +To ensure interoperability for the transport of video and associated speech/audio and timed text in an MM, the 3GPP file format with Basic profile shall be supported. + +The usage of the 3GPP file format shall follow the technical specifications and the implementation guidelines specified in TS 26.233 [33] + +NOTE: When using speech media type alone, AMR or AMR-WB data is stored according to the file format specified in [32]. + +## 4.10 Media synchronization and presentation format + +The 3GPP MMS uses a subset of SMIL 2.0 [24] for media synchronization and scene description. MMS clients and servers with support for media synchronization and scene descriptions shall support the 3GPP SMIL Language Profile defined in [34]. + +This profile is a subset of the SMIL 2.0 Language Profile but a superset of the SMIL 2.0 Basic Language Profile. Document [34] also includes an informative annex A that provides guidelines for SMIL content authors. + +Additionally, XHTML Mobile Profile [30] for scene description should be supported. MMS clients and servers with support for scene descriptions based on XHTML shall support XHTML Mobile Profile [30], defined by the WAP Forum. + +XHTML Mobile Profile is a subset of XHTML 1.1 but a superset of XHTML Basic. + +## 4.11 Timed text + +If timed text is supported, MMS clients shall support [35] with 3GP files using Basic profile [33]. + +## 4.12 Digital Rights Management + +If Rights Management is supported, OMA Digital Rights Management (DRM) 1.0 [56][57][58] shall be supported. + +## 4.13 PIM + +If Personal Data Interchange is supported this shall be done according to the OMA vObject Minimum Interoperability Profile [59]. + +## 4.14 Dynamic and Interactive Multimedia Scene + +If dynamic and interactive multimedia scene is supported, MMS clients and servers shall support 3GPP TS 26.142 [61]. + +# Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|-----------------------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2002-03 | 15 | SP-020075 | | | Version 2.0.0 presented for approval | 2.0.0 | 5.0.0 | +| 2002-06 | 16 | SP-020224 | 001 | | Correcting the reference to AMR and AMR-WB RTP payload | 5.0.0 | 5.1.0 | +| 2002-12 | 18 | SP-020691 | 002 | | Code points for H.263 | 5.1.0 | 5.2.0 | +| 2002-12 | 18 | SP-020691 | 003 | 1 | File Format name change from MP4 to 3GP | 5.1.0 | 5.2.0 | +| | | | | | | | | +| 2004-09 | 25 | SP-040641 | 006 | 2 | Introduction of Extended AMR-WB and Enhanced aacPlus into MMS service | 5.2.0 | 6.0.0 | +| 2004-09 | 25 | SP-040650 | 007 | 1 | Update of MMS codecs and formats with Release 6 functionality | 5.2.0 | 6.0.0 | +| 2004-09 | 25 | SP-040655 | 008 | 1 | Update of MMS codecs and formats with H.264 | 5.2.0 | 6.0.0 | +| 2004-12 | 26 | SP-040838 | 009 | 1 | Support for EXIF in MMS | 6.0.0 | 6.1.0 | +| 2004-12 | 26 | SP-040838 | 010 | | Adoption of SVG Tiny 1.2 for MMS | 6.0.0 | 6.1.0 | +| 2005-12 | 27 | SP-050175 | 011 | 2 | Introduction of PIM and DRM | 6.1.0 | 6.2.0 | +| 2006-03 | 31 | SP-060009 | 0012 | 1 | Addition of a reference to TR 26.936 | 6.2.0 | 6.3.0 | +| 2006-09 | 33 | SP-060600 | 0013 | | Editorial correction of references | 6.3.0 | 7.0.0 | +| 2007-06 | 36 | SP-070319 | 0014 | 2 | Inclusion of DIMS in MMS | 7.0.0 | 7.1.0 | +| 2008-12 | 42 | | | | Version for Release 8 | 7.1.0 | 8.0.0 | +| 2009-12 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 2011-03 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 2012-03 | 55 | SP-120026 | 0016 | 4 | On MMS video enhancements | 10.0.0 | 11.0.0 | +| 2012-09 | 57 | SP-120509 | 0017 | 2 | Inclusion of MVC support for MMS | 11.0.0 | 11.1.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26171/997233d405f0d4b89ddeb7683e047f66_img.jpg b/marked/Rel-11/26_series/26171/997233d405f0d4b89ddeb7683e047f66_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f447d3f43500baeddb7bc4740bff816e0a0404b3 --- /dev/null +++ b/marked/Rel-11/26_series/26171/997233d405f0d4b89ddeb7683e047f66_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d56d2999778daefa5917c230ddb7993968b362853914cba12850f9bc72d39f46 +size 170983 diff --git a/marked/Rel-11/26_series/26171/raw.md b/marked/Rel-11/26_series/26171/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..4acc44837fc84a2af54348c40ee835f9bfc8a7a0 --- /dev/null +++ b/marked/Rel-11/26_series/26171/raw.md @@ -0,0 +1,317 @@ + + + + + + +# --- Contents + +| | | +|------------------------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 Normative references ..... | 5 | +| 3 Definitions and abbreviations ..... | 5 | +| 3.1 Abbreviations ..... | 5 | +| 4 General ..... | 6 | +| 5 Adaptive Multi-Rate Wideband speech codec transcoding functions ..... | 8 | +| 6 Adaptive Multi-Rate Wideband speech codec ANSI C-code..... | 8 | +| 7 Adaptive Multi-Rate Wideband speech codec test vectors..... | 8 | +| 8 Adaptive Multi-Rate Wideband speech codec source controlled rate operation ..... | 9 | +| 9 Adaptive Multi-Rate Wideband speech codec voice activity detection..... | 9 | +| 10 Adaptive Multi-Rate Wideband speech codec comfort noise insertion..... | 10 | +| 11 Adaptive Multi-Rate Wideband speech codec error concealment of lost frames..... | 10 | +| 12 Adaptive Multi-Rate Wideband speech codec frame structure ..... | 10 | +| 13 Adaptive Multi-Rate Wideband speech codec interface to RAN ..... | 10 | +| 14 Adaptive Multi-Rate Wideband speech codec performance characterisation ..... | 11 | +| Annex A (informative): Change history..... | 12 | + +# --- Foreword + +This Technical Specification has been produced by the 3GPP. + +The present document is an introduction to the speech processing parts of the wideband telephony speech service employing the Adaptive Multi-Rate Wideband (AMR-WB) speech coder within the 3GPP system. + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of this TS, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 Indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +# --- 1 Scope + +The present document is an introduction to the speech processing parts of the wideband telephony speech service employing the Adaptive Multi-Rate Wideband (AMR-WB) speech coder. A general overview of the speech processing functions is given, with reference to the documents where each function is specified in detail. + +# --- 2 Normative references + +This TS incorporates by dated and undated reference, provisions from other publications. These normative references are cited at the appropriate places in the text and the publications are listed hereafter. For dated references, subsequent amendments to or revisions of any of these publications apply to this TS only when incorporated in it by amendment or revision. For undated references, the latest edition of the publication referred to applies. + +- [1] GSM 03.50 : "Digital cellular telecommunications system (Phase 2); Transmission planning aspects of the speech service in the GSM Public Land Mobile Network (PLMN) system". +- [2] 3GPP TS 26.190 : "AMR Wideband Speech Codec; Transcoding functions". +- [3] 3GPP TS 26.173 : "AMR Wideband Speech Codec; ANSI-C code". +- [4] 3GPP TS 26.174 : "AMR Wideband Speech Codec; Test sequences". +- [5] 3GPP TS 26.193 : "AMR Wideband Speech Codec; Source Controlled Rate operation". +- [6] 3GPP TS 26.194 : "AMR Wideband Speech Codec; Voice Activity Detection (VAD)". +- [7] 3GPP TS 26.192 : "AMR Wideband Speech Codec; Comfort Noise Aspects". +- [8] 3GPP TS 26.191 : "AMR Wideband Speech Codec; Error Concealment of Lost Frames". +- [9] 3GPP TS 26.201 : "AMR Wideband Speech Codec; Frame Structure". +- [10] 3GPP TS 26.202 : "AMR Wideband Speech Codec; Interface to RAN". +- [11] 3GPP TR 26.976 : "Performance characterization of the Adaptive Multi-Rate Wideband (AMR-WB) speech codec". + +# --- 3 Definitions and abbreviations + +## 3.1 Abbreviations + +For the purposes of this TS, the following abbreviations apply: + +| | | +|--------|-------------------------------------------------------------------------------------------------| +| ACELP | Algebraic Code Excited Linear Prediction | +| AMR | Adaptive Multi-Rate | +| AMR-WB | Adaptive Multi-Rate Wideband | +| BFI | Bad Frame Indication | +| CHD | Channel Decoder | +| CHE | Channel Encoder | +| GSM | Global System for Mobile communications | +| ITU-T | International Telecommunication Union – Telecommunication standardisation sector (former CCITT) | +| PCM | Pulse Code Modulation | +| PLMN | Public Land Mobile Network | +| PSTN | Public Switched Telephone Network | +| RX | Receive | +| SCR | Source Controlled Rate | +| SPD | SPeech Decoder | +| SPE | SPeech Encoder | +| TC | Transcoder | +| TX | Transmit | + +UE + +User Equipment (terminal) + +# --- 4 General + +The AMR-WB speech coder consists of the multi-rate speech coder, a source controlled rate scheme including a voice activity detector and a comfort noise generation system, and an error concealment mechanism to combat the effects of transmission errors and lost packets. + +The multi-rate speech coder is a single integrated speech codec with nine source rates from 6.60 kbit/s to 23.85 kbit/s, and a low rate background noise encoding mode. The speech coder is capable of switching its bit-rate every 20 ms speech frame upon command. + +A reference configuration where the various speech processing functions are identified is given in Figure 1. In this figure, the relevant specifications for each function are also indicated. + +In Figure 1, the audio parts including analogue to digital and digital to analogue conversion are included, to show the complete speech path between the audio input/output in the User Equipment (UE) and the digital interface of the network. The detailed specification of the audio parts is not within the scope of this document. These aspects are only considered to the extent that the performance of the audio parts affect the performance of the speech transcoder. + +![Figure 1: Overview of audio processing functions. A complex block diagram showing the Transmit and Receive sides of an audio processing system with various functional blocks labeled with TS and GSM standards and circled numbers 1-11.](997233d405f0d4b89ddeb7683e047f66_img.jpg) + +``` + + graph TD + subgraph TRANSMIT_SIDE [TRANSMIT SIDE] + direction TB + BSS_WB[BSS side only wideband speech] --> WB_14bit[14-bit uniform 2] + BSS_NB[BSS side only narrowband speech] --> NB_Conv[8bit / A-law to 14-bit uniform 1] + NB_Conv -- TS 26.190 --> UpSamp[Up sampling 1:2] + MS_Side[MS side only] --> LPF_TX[LPF] + LPF_TX -- GSM 03.50 --> AD[A/D] + + WB_14bit --> Sum1((2)) + UpSamp --> Sum1 + AD --> Sum1 + + Sum1 --> SpeechEnc[Speech Encoder] + + subgraph TS_26_194 [TS 26.194] + VAD_Det[Voice Activity Detector] --> VAD_Flag((3)) + end + + SpeechEnc -- TS 26.190 --> SpeechFrame((4)) + SpeechEnc -- TS 26.190 --> SID_TX((6)) + + subgraph TS_26_192 [TS 26.192] + CN_TX[Comfort Noise TX Functions] --> SID_Frame((5)) + end + + VAD_Flag --> DTX_TX[DTX Control and Operation TS 26.193] + SpeechFrame --> DTX_TX + SID_Frame --> DTX_TX + + DTX_TX --> SP_Flag[SP flag 6] + DTX_TX --> Info_Bits_Out[Info. bits 7] + end + + subgraph RECEIVE_SIDE [RECEIVE SIDE] + direction TB + Info_Bits_In[Info. bits 8] --> DTX_RX[DTX Control and Operation TS 26.193] + BFI_In[BFI 9] --> DTX_RX + SID_In[SID 10] --> DTX_RX + TAF_In[TAF 11] --> DTX_RX + + DTX_RX -- TS 26.191 --> FrameSub[Speech frame substitution] + DTX_RX -- TS 26.190 --> SpeechFrame_RX((4)) + DTX_RX -- TS 26.192 --> CN_RX[Comfort Noise RX Functions] + CN_RX --> SID_Frame_RX((5)) + + FrameSub --> SpeechDec[Speech Decoder TS 26.190] + SpeechFrame_RX --> SpeechDec + SID_Frame_RX --> SpeechDec + + SpeechDec --> Sum2((2)) + + Sum2 --> WB_Out[BSS side only wideband speech: 14-bit uniform 2] + Sum2 --> NB_Out[BSS side only narrowband speech: Down sampling 2:1 to 14-bit uniform to 8bit / A-law 1] + Sum2 --> MS_Out[MS side only: D/A to LPF GSM 03.50] + end + +``` + +Figure 1: Overview of audio processing functions. A complex block diagram showing the Transmit and Receive sides of an audio processing system with various functional blocks labeled with TS and GSM standards and circled numbers 1-11. + +**Figure 1: Overview of audio processing functions** + +- 1) 8-bit A-law or $\mu$ -law PCM (ITU-T recommendation G.711), 8000 samples/s +- 2) 14-bit uniform PCM, 16 000 samples/s +- 3) Voice Activity Detector (VAD) flag +- 4) Encoded speech frame, 50 frames/s, number of bits/frame depending on the AMR-WB codec mode +- 5) Silence Descriptor (SID) frame. +- 6) TX\_TYPE, 3 bits, indicates whether information bits are available and if they are speech or SID information +- 7) Information bits delivered to the 3G AN +- 8) Information bits received from the 3G AN +- 9) RX\_TYPE, the type of frame received quantized into three bits +- 10) Silence Descriptor (SID) flag + +11) Time Alignment Flag (TAF), marks the position of the SID frame within the SACCH multiframe + +# 5 Adaptive Multi-Rate Wideband speech codec transcoding functions + +The adaptive multi-rate wideband speech codec is described in [2]. + +As shown in Figure 1, the speech encoder takes its input as a 14-bit uniform Pulse Code Modulated (PCM) signal either from the audio part of the UE or from the network side [TBD] or from the Public Switched Telephone Network (PSTN) via a narrowband 13-bit A-law or -law to wideband 14-bit uniform PCM conversion. An upsampling by factor of 2 has to be performed between narrowband and wideband speech signals. The encoded speech at the output of the speech encoder is packetized and delivered to the network interface. In the receive direction, the inverse operations take place. + +The detailed mapping between input blocks of 320 speech samples in 14-bit uniform PCM format to encoded blocks (in which the number of bits depends on the presently used codec mode) and from these to output blocks of 320 reconstructed speech samples is described in [2]. The coding scheme is Multi-Rate Algebraic Code Excited Linear Prediction. The bit-rates of the source codec are listed in Table 1. + +An AMR-WB speech codec capable UE shall support all source rates listed in Table 1. + +**Table 1: Source codec bit-rates for the AMR-WB codec** + +| Codec mode | Source codec bit-rate | +|--------------|-----------------------| +| AMR-WB_23.85 | 23.85 kbit/s | +| AMR-WB_23.05 | 23.05 kbit/s | +| AMR-WB_19.85 | 19.85 kbit/s | +| AMR-WB_18.25 | 18.25 kbit/s | +| AMR-WB_15.85 | 15.85 kbit/s | +| AMR-WB_14.25 | 14.25 kbit/s | +| AMR-WB_12.65 | 12.65 kbit/s | +| AMR-WB_8.85 | 8.85 kbit/s | +| AMR-WB_6.60 | 6.60 kbit/s | +| AMR-WB_SID | 1.75 kbit/s * | + +(\*) Assuming SID frames are continuously transmitted + +# 6 Adaptive Multi-Rate Wideband speech codec ANSI C-code + +The ANSI –C-code of the speech codec, VAD and CNG system are described in [3]. The ANSI C-code is mandatory. + +# 7 Adaptive Multi-Rate Wideband speech codec test vectors + +A set of digital test sequences is specified in [4], thus enabling the verification of compliance, i.e. bit-exactness, to a high degree of confidence. + +The test sequences are defined separately for: + +- The speech codec described in [2], +- The VAD described in [6], +- The CN generation described in [7]. + +The adaptive multi-rate wideband speech transcoder, VAD, SCR system and comfort noise parts of the audio processing functions (see Figure 1) are defined in bit exact arithmetic. Consequently, they shall react on a given input + +sequence always with the corresponding bit exact output sequence, provided that the internal state variables are also always exactly in the same state at the beginning of the test. + +The input test sequences provided shall force the corresponding output test sequences, provided that the tested modules are in their home-state when starting. + +The modules may be set into their home states by provoking the appropriate homing-functions. + +NOTE: This is normally done during reset (initialisation of the codec). + +Special inband signalling frames (encoder-homing-frame and decoder-homing-frame) described in [2] have been defined to provoke these homing-functions also in remotely placed modules. + +At the end of the first received homing frame, the audio functions that are defined in a bit exact way shall go into their predefined home states. The output corresponding to the first homing frame is dependent on the codec state when the frame was received. Any consecutive homing frames shall produce corresponding homing frames at the output. + +# --- 8 Adaptive Multi-Rate Wideband speech codec source controlled rate operation + +The source controlled rate operation of the adaptive multi-rate wideband speech codec is defined in [5]. + +During a normal telephone conversation, the participants alternate so that, on the average, each direction of transmission is occupied about 50 % of the time. Source controlled rate (SCR) is a mode of operation where the speech encoder encodes speech frames containing only background noise with a lower bit-rate than normally used for encoding speech. A network may adapt its transmission scheme to take advantage of the varying bit-rate. This may be done for the following two purposes: + +- 1) In the UE, battery life will be prolonged or a smaller battery could be used for a given operational duration. +- 2) The average required bit-rate is reduced, leading to a more efficient transmission with decreased load and hence increased capacity. + +The following functions are required for the source controlled rate operation: + +- a Voice Activity Detector (VAD) on the TX side; +- evaluation of the background acoustic noise on the TX side, in order to transmit characteristic parameters to the RX side; +- generation of comfort noise on the RX side during periods when no normal speech frames are received. + +The transmission of comfort noise information to the RX side is achieved by means of a Silence Descriptor (SID) frame, which is sent at regular intervals. + +# --- 9 Adaptive Multi-Rate Wideband speech codec voice activity detection + +The adaptive multi-rate wideband VAD function is described in [6]. + +The input to the VAD is the input speech itself together with a set of parameters computed by the adaptive multi-rate wideband speech encoder. The VAD uses this information to decide whether each 20 ms speech coder frame contains speech or not. + +The VAD algorithm is described in [6], and the corresponding C-code is defined in [3]. The verification of compliance to [6], is achieved by use of digital test sequences applied to the same interface as the test sequences for the speech codec. + +# --- 10 Adaptive Multi-Rate Wideband speech codec comfort noise insertion + +The adaptive multi-rate wideband comfort noise insertion function is described in [7]. + +When speech is absent, the synthesis in the speech decoder is different from the case when normal speech frames are received. The synthesis of an artificial noise based on the received non-speech parameters is termed comfort noise generation. + +The comfort noise generation process is as follows: + +- the evaluation of the acoustic background noise in the transmitter; +- the noise parameter encoding (SID frames) and decoding, and +- the generation of comfort noise in the receiver. + +The comfort noise processes and the algorithm for updating the noise parameters during speech pauses are defined in detail in [7], and the corresponding C-code is defined in [3]. The comfort noise mechanism is based on the adaptive multi-rate wideband speech codec defined in [2]. + +# --- 11 Adaptive Multi-Rate Wideband speech codec error concealment of lost frames + +The adaptive multi-rate wideband speech codec error concealment of erroneous or lost frames is described in [8]. + +Frames may be erroneous due to transmission errors or frames may be lost due to frame stealing in a wireless environment or packet loss in a transport network.. The methods described in [8] may be used as a basis for error concealment. + +In order to mask the effect of isolated erroneous/lost frames, the speech decoder shall be informed about erroneous/lost frames and the error concealment actions shall be initiated, whereby a set of predicted parameters are used in the speech synthesis. Insertion of speech signal independent silence frames is not allowed. For several subsequent erroneous/lost frames, a muting technique shall be used to indicate to the listener that transmission has been interrupted. + +# --- 12 Adaptive Multi-Rate Wideband speech codec frame structure + +The adaptive multi-rate wideband speech frame structure is described in [9]. The output interface format from the encoder and input interface format to the decoder is divided into two parts; the core speech data part, which is the speech coded bits, and the other part is an additional data part with mode information. + +The interface format described in [9] is termed AMR-WB interface format 1 (AMR-WB IF1). + +Annex A of [9] describes an octet aligned frame format which shall be used in applications requiring octet alignment, such as for 3G H.324. This format is termed AMR-WB interface format 2 (AMR-WB IF2). + +# --- 13 Adaptive Multi-Rate Wideband speech codec interface to RAN + +The adaptive multi-rate wideband speech service interface to RAN is described in [10]. + +# --- 14 Adaptive Multi-Rate Wideband speech codec performance characterisation + +The adaptive multi-rate wideband speech channel performance characterisation is described in [11]. + +# --- Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|-------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 03-2001 | 11 | SP-010082 | | | Version 2.0.0 provided for approval | | 5.0.0 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.0.0 | 6.0.0 | +| 09-2006 | 33 | SP-060600 | 0001 | | Editorial correction of reference | 6.0.0 | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26190/0f26e70157bd4c45f825795cdcd20fbd_img.jpg b/marked/Rel-11/26_series/26190/0f26e70157bd4c45f825795cdcd20fbd_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..06081af7976a842c68937e35029c9ae538385fa2 --- /dev/null +++ b/marked/Rel-11/26_series/26190/0f26e70157bd4c45f825795cdcd20fbd_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be8877aca6cf4cf2bd6fdf6fe23a8b54f1808cee2444eb80a3d0718194977a7 +size 102987 diff --git a/marked/Rel-11/26_series/26190/33a8f3f01dfa8bce75d23017855a13c5_img.jpg b/marked/Rel-11/26_series/26190/33a8f3f01dfa8bce75d23017855a13c5_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c1dc1cc08a48454a92a646f873ff6dd2f583565d --- /dev/null +++ b/marked/Rel-11/26_series/26190/33a8f3f01dfa8bce75d23017855a13c5_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf7c2b353e8c74aa8aa339220da8b1e2ed57f2c2ef8245886675652d84b66f8b +size 14557 diff --git a/marked/Rel-11/26_series/26190/7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg b/marked/Rel-11/26_series/26190/7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..20d0026fda1b8840f367dd0eb040bcba4e1ef0f5 --- /dev/null +++ b/marked/Rel-11/26_series/26190/7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:749226a4120c7d69cb28f0ba25705c218598d3b76f863ec4046b9d90641d730d +size 27336 diff --git a/marked/Rel-11/26_series/26190/8d66c9c295023a1380f9986d3663bb1e_img.jpg b/marked/Rel-11/26_series/26190/8d66c9c295023a1380f9986d3663bb1e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..31d5a40504f2e630ae3a1f706d1d26db7f7625b4 --- /dev/null +++ b/marked/Rel-11/26_series/26190/8d66c9c295023a1380f9986d3663bb1e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dd554f90345cd24f7541abfa93d760aab5681159ac9683fc119a1d6c2940369 +size 60679 diff --git a/marked/Rel-11/26_series/26190/raw.md b/marked/Rel-11/26_series/26190/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..8b46e41d8a46ba225482f31769d7f0658c21fe5e --- /dev/null +++ b/marked/Rel-11/26_series/26190/raw.md @@ -0,0 +1,1870 @@ + + + + + + +# Contents + +| | | +|-----------------------------------------------------------------------------------|----| +| Foreword ..... | 5 | +| 1 Scope..... | 6 | +| 2 Normative references ..... | 6 | +| 3 Definitions, symbols and abbreviations ..... | 6 | +| 3.1 Definitions..... | 6 | +| 3.2 Symbols..... | 7 | +| 3.3 Abbreviations ..... | 12 | +| 4 Outline description..... | 12 | +| 4.1 Functional description of audio parts ..... | 12 | +| 4.2 Preparation of speech samples ..... | 13 | +| 4.3 Principles of the adaptive multi-rate wideband speech encoder ..... | 13 | +| 4.4 Principles of the adaptive multi-rate speech decoder..... | 16 | +| 4.5 Sequence and subjective importance of encoded parameters ..... | 16 | +| 5 Functional description of the encoder ..... | 16 | +| 5.1 Pre-processing ..... | 16 | +| 5.2 Linear prediction analysis and quantization..... | 17 | +| 5.2.1 Windowing and auto-correlation computation ..... | 17 | +| 5.2.2 Levinson-Durbin algorithm ..... | 17 | +| 5.2.3 LP to ISP conversion ..... | 18 | +| 5.2.4 ISP to LP conversion ..... | 19 | +| 5.2.5 Quantization of the ISP coefficients ..... | 20 | +| 5.2.6 Interpolation of the ISPs..... | 21 | +| 5.3 Perceptual weighting..... | 21 | +| 5.4 Open-loop pitch analysis..... | 22 | +| 5.4.1 6.60 kbit/s mode ..... | 22 | +| 5.4.2 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 and 23.85 kbit/s modes ..... | 23 | +| 5.5 Impulse response computation..... | 24 | +| 5.6 Target signal computation..... | 24 | +| 5.7 Adaptive codebook..... | 24 | +| 5.8 Algebraic codebook..... | 26 | +| 5.8.1 Codebook structure..... | 26 | +| 5.8.1.1 23.85 and 23.05 kbit/s mode..... | 26 | +| 5.8.1.2 19.85 kbit/s mode..... | 26 | +| 5.8.1.3 18.25 kbit/s mode..... | 27 | +| 5.8.1.4 15.85 kbit/s mode..... | 27 | +| 5.8.1.5 14.25 kbit/s mode..... | 27 | +| 5.8.1.6 12.65 kbit/s mode..... | 28 | +| 5.8.1.7 8.85 kbit/s mode..... | 28 | +| 5.8.1.8 6.60 kbit/s mode..... | 28 | +| 5.8.2 Pulse indexing ..... | 29 | +| 5.8.3 Codebook search ..... | 32 | +| 5.9 Quantization of the adaptive and fixed codebook gains ..... | 35 | +| 5.10 Memory update ..... | 36 | +| 5.11 High-band gain generation..... | 36 | +| 6 Functional description of the decoder ..... | 36 | +| 6.1 Decoding and speech synthesis ..... | 37 | +| 6.2 High-pass filtering, up-scaling and interpolation..... | 39 | +| 6.3 High frequency band ..... | 40 | +| 6.3.1 Generation of high-band excitation ..... | 40 | +| 6.3.2 LP filter for the high frequency band ..... | 40 | +| 6.3.2.1 6.60 kbit/s mode..... | 40 | +| 6.3.2.2 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes..... | 41 | +| 6.3.3 High band synthesis..... | 41 | + +7 Detailed bit allocation of the adaptive multi-rate wideband codec..... 41 + +8 Homing sequences ..... 47 + +8.1 Functional description ..... 47 + +8.2 Definitions ..... 48 + +8.3 Encoder homing ..... 48 + +8.4 Decoder homing ..... 48 + +9 Bibliography..... 50 + +Annex A (informative): Change history..... 51 + +# --- Foreword + +The present document describes the detailed mapping of the wideband telephony speech service employing the Adaptive Multi-Rate (AMR-WB) speech coder within the 3GPP system. + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of this TS, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 Indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +# --- 1 Scope + +This Telecommunication Standard (TS) describes the detailed mapping from input blocks of 320 speech samples in 16-bit uniform PCM format to encoded blocks of 132, 177, 253, 285, 317, 365, 397, 461 and 477 bits and from encoded blocks of 132, 177, 253, 285, 317, 365, 397, 461 and 477 bits to output blocks of 320 reconstructed speech samples. The sampling rate is 16 000 samples/s leading to a bit rate for the encoded bit stream of 6.60, 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s. The coding scheme for the multi-rate coding modes is the so-called Algebraic Code Excited Linear Prediction Coder, hereafter referred to as ACELP. The multi-rate wideband ACELP coder is referred to as MRWB-ACELP. + +# --- 2 Normative references + +This TS incorporates by dated and undated reference, provisions from other publications. These normative references are cited in the appropriate places in the text and the publications are listed hereafter. For dated references, subsequent amendments to or revisions of any of these publications apply to this TS only when incorporated in it by amendment or revision. For undated references, the latest edition of the publication referred to applies. + +- [1] GSM 03.50: " Digital cellular telecommunications system (Phase 2); Transmission planning aspects of the speech service in the GSM Public Land Mobile Network (PLMN) system" +- [2] 3GPP TS 26.201 : "AMR wideband speech codec; Frame structure". +- [3] 3GPP TS 26.194: "AMR wideband speech codec; Voice Activity Detection (VAD)". +- [4] 3GPP TS 26.173: "AMR wideband speech codec; ANSI-C code". +- [5] 3GPP TS 26.174: "AMR wideband speech codec; Test sequences". +- [6] ITU-T Recommendation G.711 (1988): "Coding of analogue signals by pulse code modulation Pulse code modulation (PCM) of voice frequencies". + +# --- 3 Definitions, symbols and abbreviations + +## 3.1 Definitions + +For the purposes of this TS, the following definitions apply: + +**adaptive codebook:** The adaptive codebook contains excitation vectors that are adapted for every subframe. The adaptive codebook is derived from the long-term filter state. The lag value can be viewed as an index into the adaptive codebook. + +**algebraic codebook:** A fixed codebook where algebraic code is used to populate the excitation vectors (innovation vectors). The excitation contains a small number of nonzero pulses with predefined interlaced sets of potential positions. The amplitudes and positions of the pulses of the $k^{\text{th}}$ excitation codevector can be derived from its index $k$ through a rule requiring no or minimal physical storage, in contrast with stochastic codebooks whereby the path from the index to the associated codevector involves look-up tables. + +**anti-sparseness processing:** An adaptive post-processing procedure applied to the fixed codebook vector in order to reduce perceptual artifacts from a sparse fixed codebook vector. + +**closed-loop pitch analysis:** This is the adaptive codebook search, i.e., a process of estimating the pitch (lag) value from the weighted input speech and the long term filter state. In the closed-loop search, the lag is searched using error minimization loop (analysis-by-synthesis). In the adaptive multi-rate wideband codec, closed-loop pitch search is performed for every subframe. + +**direct form coefficients:** One of the formats for storing the short term filter parameters. In the adaptive multi-rate wideband codec, all filters which are used to modify speech samples use direct form coefficients. + +**fixed codebook:** The fixed codebook contains excitation vectors for speech synthesis filters. The contents of the codebook are non-adaptive (i.e., fixed). In the adaptive multi-rate wideband codec, the fixed codebook is implemented using an algebraic codebook. + +**fractional lags:** A set of lag values having sub-sample resolution. In the adaptive multi-rate wideband codec a sub-sample resolution of 1/4th or 1/2nd of a sample is used. + +**frame:** A time interval equal to 20 ms (320 samples at an 16 kHz sampling rate). + +**Immittance Spectral Frequencies:** (see Immittance Spectral Pair) + +**Immittance Spectral Pair:** Transformation of LPC parameters. Immittance Spectral Pairs are obtained by decomposing the inverse filter transfer function $A(z)$ to a set of two transfer functions, one having even symmetry and the other having odd symmetry. The Immittance Spectral Pairs (also called as Immittance Spectral Frequencies) are the roots of these polynomials on the z-unit circle. + +**integer lags:** A set of lag values having whole sample resolution. + +**interpolating filter:** An FIR filter used to produce an estimate of sub-sample resolution samples, given an input sampled with integer sample resolution. In this implementation, the interpolating filter has low pass filter characteristics. Thus the adaptive codebook consists of the low-pass filtered interpolated past excitation. + +**inverse filter:** This filter removes the short term correlation from the speech signal. The filter models an inverse frequency response of the vocal tract. + +**lag:** The long term filter delay. This is typically the true pitch period, or its multiple or sub-multiple. + +**LP analysis window:** For each frame, the short term filter coefficients are computed using the high pass filtered speech samples within the analysis window. In the adaptive multi-rate wideband codec, the length of the analysis window is always 384 samples. For all the modes, a single asymmetric window is used to generate a single set of LP coefficients. The 5 ms look-ahead is used in the analysis. + +**LP coefficients:** Linear Prediction (LP) coefficients (also referred as Linear Predictive Coding (LPC) coefficients) is a generic descriptive term for the short term filter coefficients. + +**mode:** When used alone, refers to the source codec mode, i.e., to one of the source codecs employed in the AMR-WB codec. + +**open-loop pitch search:** A process of estimating the near optimal lag directly from the weighted speech input. This is done to simplify the pitch analysis and confine the closed-loop pitch search to a small number of lags around the open-loop estimated lags. In the adaptive multi-rate wideband codec, an open-loop pitch search is performed in every other subframe. + +**residual:** The output signal resulting from an inverse filtering operation. + +**short term synthesis filter:** This filter introduces, into the excitation signal, short term correlation which models the impulse response of the vocal tract. + +**perceptual weighting filter:** This filter is employed in the analysis-by-synthesis search of the codebooks. The filter exploits the noise masking properties of the formants (vocal tract resonances) by weighting the error less in regions near the formant frequencies and more in regions away from them. + +**subframe:** A time interval equal to 5 ms (80 samples at 16 kHz sampling rate). + +**vector quantization:** A method of grouping several parameters into a vector and quantizing them simultaneously. + +**zero input response:** The output of a filter due to past inputs, i.e. due to the present state of the filter, given that an input of zeros is applied. + +**zero state response:** The output of a filter due to the present input, given that no past inputs have been applied, i.e., given that the state information in the filter is all zeroes. + +## 3.2 Symbols + +For the purposes of this TS, the following symbols apply: + +$A(z)$ The inverse filter with unquantized coefficients + +| | | +|-------------------------------|---------------------------------------------------------------------------------------| +| $\hat{A}(z)$ | The inverse filter with quantized coefficients | +| $H(z) = \frac{1}{\hat{A}(z)}$ | The speech synthesis filter with quantized coefficients | +| $a_i$ | The unquantized linear prediction parameters (direct form coefficients) | +| $\hat{a}_i$ | The quantified linear prediction parameters | +| $m$ | The order of the LP model | +| $W(z)$ | The perceptual weighting filter (unquantized coefficients) | +| $\gamma_1$ | The perceptual weighting factor | +| $T$ | The integer pitch lag nearest to the closed-loop fractional pitch lag of the subframe | +| $\beta$ | The adaptive pre-filter coefficient (the quantified pitch gain) | +| $H_{h1}(z)$ | Pre-processing high-pass filter | +| $w(n)$ | LP analysis window | +| $L_1$ | Length of the first part of the LP analysis window $w(n)$ | +| $L_2$ | Length of the second part of the LP analysis window $w(n)$ | +| $r(k)$ | The auto-correlations of the windowed speech $s'(n)$ | +| $w_{lag}(i)$ | Lag window for the auto-correlations (60 Hz bandwidth expansion) | +| $f_0$ | The bandwidth expansion in Hz | +| $f_s$ | The sampling frequency in Hz | +| $r'(k)$ | The modified (bandwidth expanded) auto-correlations | +| $E(i)$ | The prediction error in the $i$ th iteration of the Levinson algorithm | +| $k_i$ | The $i$ th reflection coefficient | +| $a_j^{(i)}$ | The $j$ th direct form coefficient in the $i$ th iteration of the Levinson algorithm | +| $F_1'(z)$ | Symmetric ISF polynomial | +| $F_2'(z)$ | Antisymmetric ISF polynomial | +| $F_1(z)$ | Polynomial $F_1'(z)$ | + +| | | +|-----------------------------------------|---------------------------------------------------------------------------------------| +| $F_2(z)$ | Polynomial $F_2'(z)$ with roots $z = 1$ and $z = -1$ eliminated | +| $q_i$ | The immittance spectral pairs (ISPs) in the cosine domain | +| $\mathbf{q}$ | An ISP vector in the cosine domain | +| $\hat{\mathbf{q}}_i^{(n)}$ | The quantified ISP vector at the $i$ th subframe of the frame $n$ | +| $\omega_i$ | The immittance spectral frequencies (ISFs) | +| $T_m(x)$ | A $m$ th order Chebyshev polynomial | +| $f_1(i), f_2(i)$ | The coefficients of the polynomials $F_1(z)$ and $F_2(z)$ | +| $f_1'(i), f_2'(i)$ | The coefficients of the polynomials $F_1'(z)$ and $F_2'(z)$ | +| $f(i)$ | The coefficients of either $F_1(z)$ or $F_2(z)$ | +| $C(x)$ | Sum polynomial of the Chebyshev polynomials | +| $x$ | Cosine of angular frequency $\omega$ | +| $\lambda_k$ | Recursion coefficients for the Chebyshev polynomial evaluation | +| $f_i$ | The immittance spectral frequencies (ISFs) in Hz | +| $\mathbf{f}^t = [f_1 f_2 \dots f_{16}]$ | The vector representation of the ISFs in Hz | +| $\mathbf{z}(n)$ | The mean-removed ISF vector at frame $n$ | +| $\mathbf{r}(n)$ | The ISF prediction residual vector at frame $n$ | +| $\mathbf{p}(n)$ | The predicted ISF vector at frame $n$ | +| $\hat{\mathbf{r}}(n-1)$ | The quantified residual vector at the past frame | +| $\hat{\mathbf{r}}_i^k$ | The quantified ISF subvector $i$ at quantization index $k$ | +| $d_i$ | The distance between the immittance spectral frequencies $f_{i+1}$ and $f_{i-1}$ | +| $h(n)$ | The impulse response of the weighted synthesis filter | +| $H(z)W(z)$ | The weighted synthesis filter | +| $T_1$ | The integer nearest to the fractional pitch lag of the previous (1st or 3rd) subframe | +| $s'(n)$ | The windowed speech signal | +| $s_w(n)$ | The weighted speech signal | + +| | | +|------------------------------------------|---------------------------------------------------------------------------------------------------------------------| +| $\hat{s}(n)$ | Reconstructed speech signal | +| $x(n)$ | The target signal for adaptive codebook search | +| $x_2(n)$ , $\mathbf{x}_2^t$ | The target signal for algebraic codebook search | +| $res_{LP}(n)$ | The LP residual signal | +| $c(n)$ | The fixed codebook vector | +| $v(n)$ | The adaptive codebook vector | +| $y(n) = v(n)*h(n)$ | The filtered adaptive codebook vector | +| $y_k(n)$ | The past filtered excitation | +| $u(n)$ | The excitation signal | +| $\hat{u}'(n)$ | The gain-scaled emphasized excitation signal | +| $T_{op}$ | The best open-loop lag | +| $t_{min}$ | Minimum lag search value | +| $t_{max}$ | Maximum lag search value | +| $R(k)$ | Correlation term to be maximized in the adaptive codebook search | +| $R(k)_t$ | The interpolated value of $R(k)$ for the integer delay $k$ and fraction $t$ | +| $A_k$ | Correlation term to be maximized in the algebraic codebook search at index $k$ | +| $C_k$ | The correlation in the numerator of $A_k$ at index $k$ | +| $E_{D_k}$ | The energy in the denominator of $A_k$ at index $k$ | +| $\mathbf{d} = \mathbf{H}^t \mathbf{x}_2$ | The correlation between the target signal $x_2(n)$ and the impulse response $h(n)$ , i.e., backward filtered target | +| $\mathbf{H}$ | The lower triangular Toeplitz convolution matrix with diagonal $h(0)$ and lower diagonals $h(1), \dots, h(63)$ | +| $\Phi = \mathbf{H}^t \mathbf{H}$ | The matrix of correlations of $h(n)$ | +| $d(n)$ | The elements of the vector $\mathbf{d}$ | +| $\phi(i, j)$ | The elements of the symmetric matrix $\Phi$ | +| $\mathbf{c}_k$ | The innovation vector | + +| | | +|---------------------------|-------------------------------------------------------------------------| +| $C$ | The correlation in the numerator of $A_k$ | +| $m_i$ | The position of the $i$ th pulse | +| $\vartheta_i$ | The amplitude of the $i$ th pulse | +| $N_p$ | The number of pulses in the fixed codebook excitation | +| $E_D$ | The energy in the denominator of $A_k$ | +| $res_{LTP}(n)$ | The normalized long-term prediction residual | +| $b(n)$ | The signal used for presetting the signs in algebraic codebook search | +| $s_b(n)$ | The sign signal for the algebraic codebook search | +| $d'(n)$ | Sign extended backward filtered target | +| $\phi'(i,j)$ | The modified elements of the matrix $\Phi$ , including sign information | +| $z^t, z(n)$ | The fixed codebook vector convolved with $h(n)$ | +| $E(n)$ | The mean-removed innovation energy (in dB) | +| $\bar{E}$ | The mean of the innovation energy | +| $\tilde{E}(n)$ | The predicted energy | +| $[b_1 \ b_2 \ b_3 \ b_4]$ | The MA prediction coefficients | +| $\hat{R}(k)$ | The quantified prediction error at subframe $k$ | +| $E_I$ | The mean innovation energy | +| $R(n)$ | The prediction error of the fixed-codebook gain quantization | +| $E_Q$ | The quantization error of the fixed-codebook gain quantization | +| $e(n)$ | The states of the synthesis filter $1/\hat{A}(z)$ | +| $e_w(n)$ | The perceptually weighted error of the analysis-by-synthesis search | +| $\eta$ | The gain scaling factor for the emphasized excitation | +| $g_c$ | The fixed-codebook gain | +| $g'_c$ | The predicted fixed-codebook gain | +| $\hat{g}_c$ | The quantified fixed codebook gain | + +| | | +|----------------------------|-------------------------------------------------------------------------| +| $g_p$ | The adaptive codebook gain | +| $\hat{g}_p$ | The quantified adaptive codebook gain | +| $\gamma_{gc} = g_c / g'_c$ | A correction factor between the gain $g_c$ and the estimated one $g'_c$ | +| $\hat{\gamma}_{gc}$ | The optimum value for $\gamma_{gc}$ | +| $\gamma_{sc}$ | Gain scaling factor | + +## 3.3 Abbreviations + +For the purposes of this TS, the following abbreviations apply. + +| | | +|------------|-----------------------------------------------| +| ACELP | Algebraic Code Excited Linear Prediction | +| AGC | Adaptive Gain Control | +| AMR | Adaptive Multi-Rate | +| AMR-WB | Adaptive Multi-Rate Wideband | +| CELP | Code Excited Linear Prediction | +| FIR | Finite Impulse Response | +| ISF | Immittance Spectral Frequency | +| ISP | Immittance Spectral Pair | +| ISPP | Interleaved Single-Pulse Permutation | +| LP | Linear Prediction | +| LPC | Linear Predictive Coding | +| LTP | Long Term Predictor (or Long Term Prediction) | +| MA | Moving Average | +| MRWB-ACELP | Wideband Multi-Rate ACELP | +| S-MSVQ | Split-MultiStage Vector Quantization | +| WB | Wideband | + +# --- 4 Outline description + +This TS is structured as follows: + +Section 4.1 contains a functional description of the audio parts including the A/D and D/A functions. Section 4.2 describes input format for the AMR-WB encoder and the output format for the AMR-WB decoder. Sections 4.3 and 4.4 present a simplified description of the principles of the AMR-WB codec encoding and decoding process respectively. In subclause 4.5, the sequence and subjective importance of encoded parameters are given. + +Section 5 presents the functional description of the AMR-WB codec encoding, whereas clause 6 describes the decoding procedures. In section 7, the detailed bit allocation of the AMR-WB codec is tabulated. Section 8 describes the homing operation. + +## 4.1 Functional description of audio parts + +The analogue-to-digital and digital-to-analogue conversion will in principle comprise the following elements: + +- 1) Analogue to uniform digital PCM + - microphone; + - input level adjustment device; + - input anti-aliasing filter; + - sample-hold device sampling at 16 kHz; + - analogue-to-uniform digital conversion to 14-bit representation. + +The uniform format shall be represented in two's complement. + +### 2) Uniform digital PCM to analogue + +- conversion from 14-bit/16 kHz uniform PCM to analogue; +- a hold device; +- reconstruction filter including $x/\sin(x)$ correction; +- output level adjustment device; +- earphone or loudspeaker. + +In the terminal equipment, the A/D function may be achieved + +- by direct conversion to 14-bit uniform PCM format; + +For the D/A operation, the inverse operations take place. + +## 4.2 Preparation of speech samples + +The encoder is fed with data comprising of samples with a resolution of 14 bits left justified in a 16-bit word. The decoder outputs data in the same format. Outside the speech codec further processing must be applied if the traffic data occurs in a different representation. + +## 4.3 Principles of the adaptive multi-rate wideband speech encoder + +The AMR-WB codec consists of nine source codecs with bit-rates of 23.85, 23.05, 19.85, 18.25, 15.85, 14.25, 12.65, 8.85 and 6.60 kbit/s. + +The codec is based on the code-excited linear predictive (CELP) coding model. The input signal is pre-emphasized using the filter $H_{pre-emph}(z) = 1 - \mu z^{-1}$ . The CELP model is then applied to the pre-emphasized signal. A 16th order linear prediction (LP), or short-term, synthesis filter is used which is given by: + +$$H(z) = \frac{1}{\hat{A}(z)} = \frac{1}{1 + \sum_{i=1}^m \hat{a}_i z^{-i}}, \quad (1)$$ + +where $\hat{a}_i, i=1, \dots, m$ are the (quantized) linear prediction (LP) parameters, and $m = 16$ is the predictor order. The long-term, or pitch, synthesis filter is usually given by: + +$$\frac{1}{B(z)} = \frac{1}{1 - g_p z^{-T}}, \quad (2)$$ + +where $T$ is the pitch delay and $g_p$ is the pitch gain. The pitch synthesis filter is implemented using the so-called adaptive codebook approach. + +The CELP speech synthesis model is shown in Figure 1. In this model, the excitation signal at the input of the short-term LP synthesis filter is constructed by adding two excitation vectors from adaptive and fixed (innovative) codebooks. The speech is synthesized by feeding the two properly chosen vectors from these codebooks through the short-term synthesis filter. The optimum excitation sequence in a codebook is chosen using an analysis-by-synthesis search procedure in which the error between the original and synthesized speech is minimized according to a perceptually weighted distortion measure. + +The perceptual weighting filter used in the analysis-by-synthesis search technique is given by: + +$$W(z) = A(z/\gamma_1) H_{de-emph}(z), \quad (3)$$ + +where $A(z)$ is the unquantized LP filter, $H_{de-emph} = \frac{1}{1 - 0.68z^{-1}}$ , and $\gamma_1 = 0.92$ is the perceptual weighting factor. The weighting filter uses the unquantized LP parameters. + +The encoder performs the analysis of the LPC, LTP and fixed codebook parameters at 12.8 kHz sampling rate. The coder operates on speech frames of 20 ms. At each frame, the speech signal is analysed to extract the parameters of the CELP model (LP filter coefficients, adaptive and fixed codebooks' indices and gains). In addition to these parameters, high-band gain indices are computed in 23.85 kbit/s mode. These parameters are encoded and transmitted. At the decoder, these parameters are decoded and speech is synthesized by filtering the reconstructed excitation signal through the LP synthesis filter. + +The signal flow at the encoder is shown in Figure 2. After decimation, high-pass and pre-emphasis filtering is performed. LP analysis is performed once per frame. The set of LP parameters is converted to immittance spectrum pairs (ISP) and vector quantized using split-multistage vector quantization (S-MSVQ). The speech frame is divided into 4 subframes of 5 ms each (64 samples at 12.8 kHz sampling rate). The adaptive and fixed codebook parameters are transmitted every subframe. The quantized and unquantized LP parameters or their interpolated versions are used depending on the subframe. An open-loop pitch lag is estimated in every other subframe or once per frame based on the perceptually weighted speech signal. + +Then the following operations are repeated for each subframe: + +- The target signal $x(n)$ is computed by filtering the LP residual through the weighted synthesis filter $W(z)H(z)$ with the initial states of the filters having been updated by filtering the error between LP residual and excitation (this is equivalent to the common approach of subtracting the zero input response of the weighted synthesis filter from the weighted speech signal). +- The impulse response, $h(n)$ of the weighted synthesis filter is computed. +- Closed-loop pitch analysis is then performed (to find the pitch lag and gain), using the target $x(n)$ and impulse response $h(n)$ , by searching around the open-loop pitch lag. Fractional pitch with 1/4th or 1/2nd of a sample resolution (depending on the mode and the pitch lag value) is used. The interpolating filter in fractional pitch search has low pass frequency response. Further, there are two potential low-pass characteristics in the the adaptive codebook and this information is encoded with 1 bit. +- The target signal $x(n)$ is updated by removing the adaptive codebook contribution (filtered adaptive codevector), and this new target, $x_2(n)$ , is used in the fixed algebraic codebook search (to find the optimum innovation). +- The gains of the adaptive and fixed codebook are vector quantified with 6 or 7 bits (with moving average (MA) prediction applied to the fixed codebook gain). +- Finally, the filter memories are updated (using the determined excitation signal) for finding the target signal in the next subframe. + +The bit allocation of the AMR-WB codec modes is shown in Table 1. In each 20 ms speech frame, 132, 177, 253, 285, 317, 365, 397, 461 and 477 bits are produced, corresponding to a bit-rate of 6.60, 8.85 ,12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s. More detailed bit allocation among the codec parameters is given in tables 12a-12i. Note that the most significant bits (MSB) are always sent first. + +**Table 1: Bit allocation of the AMR-WB coding algorithm for 20 ms frame** + +| Mode | Parameter | 1st subframe | 2nd subframe | 3rd subframe | 4th subframe | total per frame | +|--------------|----------------|--------------|--------------|--------------|--------------|-----------------| +| 23.85 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 88 | 88 | 88 | 88 | 352 | +| | Codebook gain | 7 | 7 | 7 | 7 | 28 | +| | HB-energy | 4 | 4 | 4 | 4 | 16 | +| | Total | | | | | 477 | +| 23.05 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 88 | 88 | 88 | 88 | 352 | +| | Gains | 7 | 7 | 7 | 7 | 28 | +| | Total | | | | | 461 | +| 19.85 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 72 | 72 | 72 | 72 | 288 | +| | Codebook gain | 7 | 7 | 7 | 7 | 28 | +| | Total | | | | | 397 | +| 18.25 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 64 | 64 | 64 | 64 | 256 | +| | Gains | 7 | 7 | 7 | 7 | 28 | +| | Total | | | | | 365 | +| 15.85 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 52 | 52 | 52 | 52 | 208 | +| | Gains | 7 | 7 | 7 | 7 | 28 | +| | Total | | | | | 317 | +| 14.25 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 44 | 44 | 44 | 44 | 176 | +| | Gains | 7 | 7 | 7 | 7 | 28 | +| | Total | | | | | 285 | +| 12.65 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | LTP-filtering | 1 | 1 | 1 | 1 | 4 | +| | Pitch delay | 9 | 6 | 9 | 6 | 30 | +| | Algebraic code | 36 | 36 | 36 | 36 | 144 | +| | Gains | 7 | 7 | 7 | 7 | 28 | +| | Total | | | | | 253 | +| 8.85 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 46 | +| | Pitch delay | 8 | 5 | 8 | 5 | 26 | +| | Algebraic code | 20 | 20 | 20 | 20 | 80 | +| | Gains | 6 | 6 | 6 | 6 | 24 | +| | Total | | | | | 177 | +| 6.60 kbit/s | VAD-flag | | | | | 1 | +| | ISP | | | | | 36 | +| | Pitch delay | 8 | 5 | 5 | 5 | 23 | +| | Algebraic code | 12 | 12 | 12 | 12 | 48 | +| | Gains | 6 | 6 | 6 | 6 | 24 | +| | Total | | | | | 132 | + +## 4.4 Principles of the adaptive multi-rate speech decoder + +The signal flow at the decoder is shown in Figure 3. At the decoder, the transmitted indices are extracted from the received bitstream. The indices are decoded to obtain the coder parameters at each transmission frame. These parameters are the ISP vector, the 4 fractional pitch lags, the 4 LTP filtering parameters, the 4 innovative codevectors, and the 4 sets of vector quantized pitch and innovative gains. In 23.85 kbit/s mode, also high-band gain index is decoded. The ISP vector is converted to the LP filter coefficients and interpolated to obtain LP filters at each subframe. Then, at each 64-sample subframe: + +- The excitation is constructed by adding the adaptive and innovative codevectors scaled by their respective gains. +- The 12.8 kHz speech is reconstructed by filtering the excitation through the LP synthesis filter. +- The reconstructed speech is de-emphasized. + +Finally, the reconstructed speech is upsampled to 16 kHz and high-band speech signal is added to the frequency band from 6 kHz to 7 kHz. + +## 4.5 Sequence and subjective importance of encoded parameters + +The encoder will produce the output information in a unique sequence and format, and the decoder must receive the same information in the same way. In table 12a-12i, the sequence of output bits and the bit allocation for each parameter is shown. + +The different parameters of the encoded speech and their individual bits have unequal importance with respect to subjective quality. The output and input frame formats for the AMR wideband speech codec are given in [2], where a reordering of bits take place. + +# 5 Functional description of the encoder + +In this clause, the different functions of the encoder represented in Figure 2 are described. + +## 5.1 Pre-processing + +The encoder performs the analysis of the LPC, LTP and fixed codebook parameters at 12.8 kHz sampling rate. Therefore, the input signal has to be decimated from 16 kHz to 12.8 kHz. The decimation is performed by first upsampling by 4, then filtering the output through lowpass FIR filter $H_{decim}(z)$ that has the cut off frequency at 6.4 kHz. Then, the signal is downsampled by 5. The filtering delay is compensated by adding zeroes into the end of the input vector. + +After the decimation, two pre-processing functions are applied to the signal prior to the encoding process: high-pass filtering and pre-emphasizing (and signal down-scaling). + +(Down-scaling consists of dividing the input by a factor of 2 to reduce the possibility of overflows in the fixed-point implementation.) + +The high-pass filter serves as a precaution against undesired low frequency components. A filter at a cut off frequency of 50 Hz is used, and it is given by + +$$H_{hp}(z) = \frac{0.989502 - 1.979004z^{-1} + 0.989502z^{-2}}{1 - 1.978882z^{-1} + 0.979126z^{-2}}. \quad (4)$$ + +(Both down-scaling and high-pass filtering are combined by dividing the coefficients at the numerator of $H_{hp}(z)$ by 2.) + +In the pre-emphasis, a first order high-pass filter is used to emphasize higher frequencies, and it is given by + +$$H_{pre-emph}(z) = 1 - 0.68z^{-1} \quad (5)$$ + +## 5.2 Linear prediction analysis and quantization + +Short-term prediction, or LP, analysis is performed once per speech frame using the autocorrelation approach with 30 ms asymmetric windows. An overhead of 5 ms is used in the autocorrelation computation. The frame structure is depicted below. + +![Diagram of frame structure showing overlapping windowing frames n-1 and n, and a frame n consisting of 4 subframes of 5 ms each.](33a8f3f01dfa8bce75d23017855a13c5_img.jpg) + +The diagram illustrates the frame structure for speech processing. It shows a horizontal sequence of 10 small squares representing subframes. Above the first 6 subframes is a dashed box labeled 'windowing frame n-1'. Above the last 6 subframes is a dashed box labeled 'windowing frame n'. Below the 4th, 5th, and 6th subframes is a solid box labeled 'frame n (4 x 5 ms)'. The 4th, 5th, and 6th subframes are shaded gray, while the others are white. + +Diagram of frame structure showing overlapping windowing frames n-1 and n, and a frame n consisting of 4 subframes of 5 ms each. + +The autocorrelations of windowed speech are converted to the LP coefficients using the Levinson-Durbin algorithm. Then the LP coefficients are transformed to the ISP domain for quantization and interpolation purposes. The interpolated quantized and unquantized filters are converted back to the LP filter coefficients (to construct the synthesis and weighting filters at each subframe). + +### 5.2.1 Windowing and auto-correlation computation + +LP analysis is performed once per frame using an asymmetric window. The window has its weight concentrated at the fourth subframe and it consists of two parts: the first part is a half of a Hamming window and the second part is a quarter of a Hamming-cosine function cycle. The window is given by: + +$$\begin{aligned} w(n) &= 0.54 - 0.46 \cos\left(\frac{2\pi n}{2L_1 - 1}\right), & n &= 0, \dots, L_1 - 1, \\ &= \cos\left(\frac{2\pi(n - L_1)}{4L_2 - 1}\right), & n &= L_1, \dots, L_1 + L_2 - 1 \end{aligned} \quad (6)$$ + +where the values $L_1=256$ and $L_2=128$ are used. + +The autocorrelations of the windowed speech $s'(n), n=0, \dots, 383$ are computed by + +$$r(k) = \sum_{n=k}^{383} s'(n)s'(n-k), \quad k = 0, \dots, 16, \quad (7)$$ + +and a 60 Hz bandwidth expansion is used by lag windowing the autocorrelations using the window [2] + +$$w_{lag}(i) = \exp\left[-\frac{1}{2}\left(\frac{2\pi f_0 i}{f_s}\right)^2\right], \quad i = 1, \dots, 16, \quad (8)$$ + +where $f_0=60$ Hz is the bandwidth expansion and $f_s=12800$ Hz is the sampling frequency. Further, $r(0)$ is multiplied by the white noise correction factor 1.0001 which is equivalent to adding a noise floor at -40 dB. + +### 5.2.2 Levinson-Durbin algorithm + +The modified autocorrelations $r'(0) = 1.0001 r(0)$ and $r'(k) = r(k)w_{lag}(k), k = 1, \dots, 16$ , are used to obtain the LP filter coefficients $a_k, k=1, \dots, 16$ by solving the set of equations. + +$$\sum_{k=1}^{16} a_k r'(|i-k|) = -r'(i), \quad i = 1, \dots, 16. \quad (9)$$ + +The set of equations in (9) is solved using the Levinson-Durbin algorithm [2]. This algorithm uses the following recursion: + +$$\begin{aligned} +E(0) &= r'(0) \\ +\text{For } i &= 1 \text{ to } 16 \text{ do} \\ +k_i &= -\left[ r'(i) + \sum_{j=1}^{i-1} a_j^{i-1} r'(i-j) \right] / E(i-1) \\ +a_i^{(i)} &= k_i \\ +\text{For } j &= 1 \text{ to } i-1 \text{ do} \\ +a_j^{(i)} &= a_j^{(i-1)} + k_i a_{i-j}^{(i-1)} \\ +E(i) &= (1 - k_i^2) E(i-1) +\end{aligned}$$ + +The final solution is given as $a_j = a_j^{(16)}$ , $j=1, \dots, 16$ . + +The LP filter coefficients are converted to the ISP representation [4] for quantization and interpolation purposes. The conversions to the ISP domain and back to the LP filter domain are described in the next two sections. + +### 5.2.3 LP to ISP conversion + +The LP filter coefficients $a_k$ , $k=1, \dots, 16$ , are converted to the ISP representation for quantization and interpolation purposes. For a 16th order LP filter, the ISPs are defined as the roots of the sum and difference polynomials + +$$f_1'(z) = A(z) + z^{-16} A(z^{-1}) \quad (10)$$ + +and + +$$f_2'(z) = A(z) - z^{-16} A(z^{-1}) \quad (11)$$ + +respectively. (The polynomials $f_1'(z)$ and $f_2'(z)$ are symmetric and antisymmetric, respectively). It can be proven that all roots of these polynomials are on the unit circle and they alternate each other [5]. $f_2'(z)$ has two roots at $z = 1$ ( $\omega=0$ ) and $z = -1$ ( $\omega = \pi$ ). To eliminate these two roots, we define the new polynomials + +$$f_1(z) = f_1'(z) \quad (12)$$ + +and + +$$f_2(z) = f_2'(z)/(1-z^{-2}). \quad (13)$$ + +Polynomials $f_1(z)$ and $f_2(z)$ have 8 and 7 conjugate roots on the unit circle ( $e^{\pm j\omega_i}$ ) respectively. Therefore, the polynomials can be written as + +$$F_1(z) = (1 + a[16]) \prod_{i=0,2,\dots,14} (1 - 2q_i z^{-1} + z^{-2}) \quad (14)$$ + +and + +$$F_2(z) = (1 - a[16]) \prod_{i=1,3,\dots,13} (1 - 2q_i z^{-1} + z^{-2}) \quad (15)$$ + +where $q_i = \cos(\omega_i)$ with $\omega_i$ being the immittance spectral frequencies (ISF) and $a[16]$ is the last predictor coefficient. ISFs satisfy the ordering property $0 < \omega_1 < \omega_2 < \dots < \omega_{16} < \pi$ . We refer to $q_i$ as the ISPs in the cosine domain. + +Since both polynomials $f_1(z)$ and $f_2(z)$ are symmetric only the first 8 and 7 coefficients of each polynomial, respectively, and the last predictor coefficient need to be computed. + +The coefficients of these polynomials are found by the recursive relations + +for $i=0$ to 7 + +$$\begin{aligned} +f_1(i) &= a_i + a_{m-i}, \\ +f_2(i) &= a_i - a_{m-i} + f_2(i-2). \\ +f_1(8) &= 2a_8 +\end{aligned} +\tag{16}$$ + +where $m=16$ is the predictor order, and $f_2(-2) = f_2(-1) = 0$ . + +The ISPs are found by evaluating the polynomials $F_1(z)$ and $F_2(z)$ at 100 points equally spaced between 0 and $\pi$ and checking for sign changes. A sign change signifies the existence of a root and the sign change interval is then divided 4 times to better track the root. The Chebyshev polynomials are used to evaluate $F_1(z)$ and $F_2(z)$ [6]. In this method the roots are found directly in the cosine domain $\{q_i\}$ . The polynomials $F_1(z)$ and $F_2(z)$ evaluated at $z = e^{j\omega}$ can be written as + +$$F_1(\omega) = 2e^{-j8\omega} C_1(x) \quad \text{and} \quad F_2(\omega) = 2e^{-j7\omega} C_2(x) \tag{17}$$ + +with + +$$\begin{aligned} +C_1(x) &= \sum_{i=0}^7 f_1(i) T_{8-i}(x) + f_1(8)/2, & C_2(x) &= \sum_{i=0}^6 f_2(i) T_{8-i}(x) + f_2(7)/2, \\ +& \text{and} +\end{aligned} +\tag{18}$$ + +where $T_m = \cos(m\omega)$ is the $m$ th order Chebyshev polynomial, $f(i)$ are the coefficients of either $F_1(z)$ or $F_2(z)$ , computed using the equations in (16). The polynomial $C(x)$ is evaluated at a certain value of $x = \cos(\omega)$ using the recursive relation: + +$$\begin{aligned} +& \text{for } k = n_f - 1 \text{ down to } 1 \\ +& \quad b_k = 2xb_{k+1} - b_{k+2} + f(n_f - k) \\ +& \text{end} \\ +& C(x) = xb_1 - b_2 + f(n_f)/2, +\end{aligned}$$ + +where $n_f=8$ in case of $C_1(x)$ and $n_f=7$ in case of $C_2(x)$ , with initial values $b_{n_f}=f(0)$ and $b_{n_f+1}=0$ . The details of the Chebyshev polynomial evaluation method are found in [6]. + +### 5.2.4 ISP to LP conversion + +Once the ISPs are quantized and interpolated, they are converted back to the LP coefficient domain $\{a_k\}$ . The conversion to the LP domain is done as follows. The coefficients of $F_1(z)$ and $F_2(z)$ are found by expanding Equations (14) and (15) knowing the quantized and interpolated ISPs $q_i, i=0, \dots, m-1$ , where $m=16$ . The following recursive relation is used to compute $f_1(z)$ + +$$\begin{aligned} +& \text{for } i = 2 \text{ to } m/2 \\ +& \quad f_1(i) = -2q_{2i-2}f_1(i-1) + 2f_1(i-2) \\ +& \quad \text{for } j = i-1 \text{ down to } 2 \\ +& \quad \quad f_1(j) = f_1(j) - 2q_{2i-2}f_1(j-1) + f_1(j-2) \\ +& \quad \text{end} \\ +& \quad f_1(1) = f_1(1) - 2q_{2i-2} \\ +& \text{end} +\end{aligned}$$ + +with initial values $f_1(0)=1$ and $f_1(1)=-2q_0$ . The coefficients $f_2(i)$ are computed similarly by replacing $q_{2i-2}$ by $q_{2i-1}$ and $m/2$ by $m/2-1$ , and with initial conditions $f_2(0)=1$ and $f_2(1)=-2q_1$ . + +Once the coefficients $f_1(z)$ and $f_2(z)$ are found, $F_2(z)$ is multiplied by $1-z^{-2}$ , to obtain $F'_2(z)$ ; that is + +$$\begin{aligned} +f'_2(i) &= f_2(i) - f_2(i-2), & i &= 2, \dots, m/2 - 1, \\ +f'_1(i) &= f_1(i) & i &= 0, \dots, m/2 +\end{aligned} +\tag{19}$$ + +Then $F'_1(z)$ and $F'_2(z)$ are multiplied by $1+q_{m-1}$ and $1-q_{m-1}$ , respectively. That is + +$$\begin{aligned} f'_2(i) &= (1 - q_{m-1}) f'^2(i), & i &= 0, \dots, m/2 - 1, \\ f'_1(i) &= (1 + q_{m-1}) f'^1(i) & i &= 0, \dots, m/2 \end{aligned}$$ + +Finally the LP coefficients are found by + +$$\begin{aligned} a_i &= 0.5 f'_1(i) + 0.5 f'_2(i), & i &= 1, \dots, m/2 - 1, \\ &0.5 f'_1(i) - 0.5 f'_2(i), & i &= m/2 + 1, \dots, m - 1, \\ &0.5 f'_1(m/2), & i &= m/2, \\ &q_{m-1}, & i &= m. \end{aligned} \quad (20)$$ + +This is directly derived from the relation $A(z) = (F'_1(z) + F'_2(z))/2$ , and considering the fact that $F'_1(z)$ and $F'_2(z)$ are symmetric and antisymmetric polynomials, respectively. + +### 5.2.5 Quantization of the ISP coefficients + +The LP filter coefficients are quantized using the ISP representation in the frequency domain; that is + +$$\begin{aligned} f_i &= \frac{f_s}{2\pi} \arccos(q_i), & i &= 0, \dots, 14, \\ &= \frac{f_s}{4\pi} \arccos(q_i), & i &= 15, \end{aligned} \quad (21)$$ + +where $f_i$ are the ISFs in Hz [0,6400] and $f_s=12800$ is the sampling frequency. The ISF vector is given by $\mathbf{f}^t = [f_0, \dots, f_{15}]$ , with $t$ denoting transpose. + +A 1st order MA prediction is applied, and the residual ISF vector is quantified using a combination of split vector quantization (SVQ) and multi-stage vector quantization (MSVQ). The prediction and quantization are performed as follows. Let $\mathbf{z}^{(n)}$ denote the mean-removed ISF vector at frame $n$ . The prediction residual vector $\mathbf{r}(n)$ is given by: + +$$\mathbf{r}(n) = \mathbf{z}(n) - \mathbf{p}(n) \quad (22)$$ + +where $\mathbf{p}(n)$ is the predicted LSF vector at frame $n$ . First order moving-average (MA) prediction is used where: + +$$\mathbf{p}(n) = \frac{1}{3} \hat{\mathbf{r}}(n-1), \quad (23)$$ + +where $\hat{\mathbf{r}}(n-1)$ is the quantized residual vector at the past frame. + +The ISF residual vector $\mathbf{r}$ is quantized using split-multistage vector quantization S-MSVQ. The vector is split into 2 subvectors $\mathbf{r}_1(n)$ and $\mathbf{r}_2(n)$ of dimensions 9 and 7, respectively. The 2 subvectors are quantized in two stages. In the first stage $\mathbf{r}_1(n)$ is quantized with 8 bits and $\mathbf{r}_2(n)$ with 8 bits. + +For 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes, the quantization error vectors + +$\mathbf{r}_i^{(2)} = \mathbf{r}_i - \hat{\mathbf{r}}_i, i = 1, 2$ are split in the next stage into 3 and 2 subvectors, respectively. The subvectors are quantized using the bit-rates described in Table 2. + +**Table 2. Quantization of ISP vector for the 8.85 ,12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes** + +| 1. UNQUANTIZED 16-ELEMENT-LONG ISP VECTOR | | | | | +|--------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------| +| 2. STAGE 1 ( $\Gamma_1$ ) 8 bits | | | 2. STAGE 1 ( $\Gamma_2$ ) 8 bits | | +| 3. STAGE 2
( $\mathbf{r}^{(2)}_{1,0-2}$ )
6 bits | 3. STAGE 2
( $\mathbf{r}^{(2)}_{1,3-5}$ )
7 bits | 3. STAGE 2
( $\mathbf{r}^{(2)}_{1,6-8}$ )
7 bits | 3. STAGE 2
( $\mathbf{r}^{(2)}_{2,0-2}$ )
5 bits | 3. STAGE 2
( $\mathbf{r}^{(2)}_{2,3-6}$ )
5 bits | + +For 6.60 kbit/s mode, the quantization error vectors $\mathbf{r}_i^{(2)} = \mathbf{r}_i - \hat{\mathbf{r}}_i, i = 1,2$ are split in the next stage into 2 and 1 subvectors, respectively. The subvectors are quantized using the bit-rates described in Table 3. + +**Table 3. Quantization of ISP vector for the 6.60 kbit/s mode** + +| 1. UNQUANTIZED 16-ELEMENT-LONG ISP VECTOR | | | +|--------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------| +| 2. STAGE 1 ( $\Gamma_1$ ) 8 bits | | 2. STAGE 1 ( $\Gamma_2$ ) 8 bits | +| 3. STAGE 2
( $\mathbf{r}^{(2)}_{1,0-4}$ )
7 bits | 3. STAGE 2
( $\mathbf{r}^{(2)}_{1,5-8}$ )
7 bits | 3. STAGE 2
( $\mathbf{r}^{(2)}_{2,0-6}$ )
6 bits | + +A squared error ISP distortion measure is used in the quantization process. In general, for an input ISP or error residual subvector $\mathbf{r}_i, i=1,2$ and a quantized vector at index $k$ , $\hat{\mathbf{r}}_i^k$ , the quantization is performed by finding the index $k$ which minimizes + +$$E = \sum_{i=m}^n [r_i - \hat{r}_i^k]^2, \quad (24)$$ + +where $m$ and $n$ are the first and last elements of the subvector. + +### 5.2.6 Interpolation of the ISPs + +The set of quantized (and unquantized) LP parameters is used for the fourth subframe whereas the first, second, and third subframes use a linear interpolation of the parameters in the adjacent frames. The interpolation is performed on the ISPs in the $q$ domain. Let $\hat{\mathbf{q}}_4^{(n)}$ be the ISP vector at the 4th subframe of the frame, and $\hat{\mathbf{q}}_4^{(n-1)}$ the ISP vector at the 4th subframe of the past frame $n-1$ . The interpolated ISP vectors at the 1st, 2nd, and 3rd subframes are given by + +$$\begin{aligned} \hat{\mathbf{q}}_1^{(n)} &= 0.55\hat{\mathbf{q}}_4^{(n-1)} + 0.45\hat{\mathbf{q}}_4^{(n)}, \\ \hat{\mathbf{q}}_2^{(n)} &= 0.2\hat{\mathbf{q}}_4^{(n-1)} + 0.8\hat{\mathbf{q}}_4^{(n)}, \\ \hat{\mathbf{q}}_3^{(n)} &= 0.04\hat{\mathbf{q}}_4^{(n-1)} + 0.96\hat{\mathbf{q}}_4^{(n)}. \end{aligned}$$ + +The same formula is used for interpolation of the unquantized ISPs. The interpolated ISP vectors are used to compute a different LP filter at each subframe (both quantized and unquantized) using the ISP to LP conversion method described in Section 5.2.4. + +## 5.3 Perceptual weighting + +The traditional perceptual weighting filter $W(z) = A(z/\gamma_1)/A(z/\gamma_2)$ has inherent limitations in modelling the formant structure and the required spectral tilt concurrently. The spectral tilt is more pronounced in wideband signals due to the wide dynamic range between low and high frequencies. A solution to this problem is to introduce the preemphasis filter at the input, compute the LP filter $A(z)$ based on the preemphasized speech $s(n)$ , and use a modified filter $W(z)$ by fixing its denominator. This structure substantially decouples the formant weighting from the tilt. + +A weighting filter of the form $W(z) = A(z/\gamma_1)H_{de-emph}(z)$ is used, where $H_{de-emph} = \frac{1}{1 - \beta_1 z^{-1}}$ and $\beta_1=0.68$ . + +Because $A(z)$ is computed based on the preemphasized speech signal $s(n)$ , the tilt of the filter $1/A(z/\gamma_1)$ is less pronounced compared to the case when $A(z)$ is computed based on the original speech. Since deemphasis is performed at the decoder end, it can be shown that the quantization error spectrum is shaped by a filter having a transfer function $W^{-1}(z)H_{de-emph}(z)=1/A(z/\gamma_1)$ . Thus, the spectrum of the quantization error is shaped by a filter whose transfer function is $1/A(z/\gamma_1)$ , with $A(z)$ computed based on the preemphasized speech signal. + +## 5.4 Open-loop pitch analysis + +Depending on the mode, open-loop pitch analysis is performed once per frame (each 10 ms) or twice per frame (each 10 ms) to find two estimates of the pitch lag in each frame. This is done in order to simplify the pitch analysis and confine the closed loop pitch search to a small number of lags around the open-loop estimated lags. + +Open-loop pitch estimation is based on the weighted speech signal $s_w(n)$ which is obtained by filtering the input speech signal through the weighting filter $W(z) = A(z/\gamma_1)H_{de-emph}(z)$ , where $H_{de-emph} = \frac{1}{1 - \beta_1 z^{-1}}$ and $\beta_1=0.68$ . That is, in a subframe of size $L$ , the weighted speech is given by + +$$s_w(n) = s(n) + \sum_{i=1}^{16} a_i \gamma_1^i s(n-i) + \beta_1 s_w(n-1), n = 0, \dots, L-1. \quad (25)$$ + +The open-loop pitch analysis is performed to a signal decimated by two. The decimated signal is obtained by filtering $s_w(n)$ through a fourth order FIR filter $H_{decim2}(z)$ and then downsampling the output by two to obtain the signal $s_{wd}(n)$ . + +### 5.4.1 6.60 kbit/s mode + +Open-loop pitch analysis is performed once per frame (every 20 ms) to find an estimate of the pitch lag in each frame. + +The open-loop pitch analysis is performed as follows. First, the correlation of decimated weighted speech is determined for each pitch lag value $d$ by: + +$$C(d) = \sum_{n=0}^{128} s_{wd}(n) s_{wd}(n-d) w(d), d = 17, \dots, 115, \quad (26)$$ + +where $w(d)$ is a weighting function. The estimated pitch-lag is the delay that maximises the weighted correlation function $C(d)$ . The weighting emphasises lower pitch lag values reducing the likelihood of selecting a multiple of the correct delay. The weighting function consists of two parts: a low pitch lag emphasis function, $w_l(d)$ , and a previous frame lag neighbouring emphasis function, $w_n(d)$ : + +$$w(d) = w_l(d) w_n(d). \quad (27)$$ + +The low pitch lag emphasis function is a given by: + +$$w_l(d) = cw(d) \quad (28)$$ + +where $cw(d)$ is defined by a table in the fixed point computational description. The previous frame lag neighbouring emphasis function depends on the pitch lag of previous speech frames: + +$$w_n(d) = \begin{cases} cw(|T_{old} - d| + 98), & v > 0.8, \\ 1.0, & \text{otherwise,} \end{cases} \quad (29)$$ + +where $T_{old}$ is the median filtered pitch lag of 5 previous voiced speech half-frames and $v$ is an adaptive parameter. If the frame is classified as voiced by having the open-loop gain $g > 0.6$ , then the $v$ -value is set to 1.0 for the next frame. Otherwise, the $v$ -value is updated by $v = 0.9v$ . The open loop gain is given by: + +$$g = \frac{\sum_{n=0}^{127} s_{wd}(n)s_{wd}(n-d_{max})}{\sqrt{\sum_{n=0}^{127} s_{wd}^2(n) \sum_{n=0}^{127} s_{wd}^2(n-d_{max})}} \quad (30)$$ + +where $d_{max}$ is the pitch delay that maximizes $C(d)$ . The median filter is updated only during voiced speech frames. The weighting depends on the reliability of the old pitch lags. If previous frames have contained unvoiced speech or silence, the weighting is attenuated through the parameter $v$ . + +### 5.4.2 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 and 23.85 kbit/s modes + +Open-loop pitch analysis is performed twice per frame (every 10 ms) to find two estimates of the pitch lag in each frame. + +The open-loop pitch analysis is performed as follows. First, the correlation of decimated weighted speech is determined for each pitch lag value $d$ by: + +$$C(d) = \sum_{n=0}^{63} s_{wd}(n)s_{wd}(n-d)w(d), d = 17, \dots, 115 \quad (31)$$ + +where $w(d)$ is a weighting function. The estimated pitch-lag is the delay that maximises the weighted correlation function $C(d)$ . The weighting emphasises lower pitch lag values reducing the likelihood of selecting a multiple of the correct delay. The weighting function consists of two parts: a low pitch lag emphasis function, $w_l(d)$ , and a previous frame lag neighbouring emphasis function, $w_n(d)$ : + +$$w(d) = w_l(d)w_n(d) \quad (32)$$ + +The low pitch lag emphasis function is given by: + +$$w_l(d) = cw(d) \quad (33)$$ + +where $cw(d)$ is defined by a table in the fixed point computational description. The previous frame lag neighbouring emphasis function depends on the pitch lag of previous speech frames: + +$$w_n(d) = \begin{cases} cw(|T_{old} - d| + 98), & v > 0.8, \\ 1.0, & \text{otherwise,} \end{cases} \quad (34)$$ + +where $T_{old}$ is the median filtered pitch lag of 5 previous voiced speech half-frames and $v$ is an adaptive parameter. If the frame is classified as voiced by having the open-loop gain $g > 0.6$ , then the $v$ -value is set to 1.0 for the next frame. Otherwise, the $v$ -value is updated by $v = 0.9v$ . The open loop gain is given by: + +$$g = \frac{\sum_{n=0}^{63} s_{wd}(n)s_{wd}(n-d_{max})}{\sqrt{\sum_{n=0}^{63} s_{wd}^2(n) \sum_{n=0}^{63} s_{wd}^2(n-d_{max})}} \quad (35)$$ + +where $d_{max}$ is the pitch delay that maximizes $C(d)$ . The median filter is updated only during voiced speech frames. The weighting depends on the reliability of the old pitch lags. If previous frames have contained unvoiced speech or silence, the weighting is attenuated through the parameter $v$ . + +## 5.5 Impulse response computation + +The impulse response, $h(n)$ , of the weighted synthesis filter $H(z)W(z) = A(z/\gamma_1)H_{de-emph}(z)/\hat{A}(z)$ is computed each subframe. This impulse response is needed for the search of adaptive and fixed codebooks. The impulse response $h(n)$ is computed by filtering the vector of coefficients of the filter $A(z/\gamma_1)$ extended by zeros through the two filters $1/\hat{A}(z)$ and $H_{de-emph}(z)$ . + +## 5.6 Target signal computation + +The target signal for adaptive codebook search is usually computed by subtracting the zero-input response of the weighted synthesis filter $H(z)W(z) = A(z/\gamma_1)H_{de-emph}(z)/\hat{A}(z)$ from the weighted speech signal $s_w(n)$ . This is performed on a subframe basis. + +An equivalent procedure for computing the target signal, which is used in this codec, is the filtering of the LP residual signal $r(n)$ through the combination of synthesis filter $1/\hat{A}(z)$ and the weighting filter $A(z/\gamma_1)H_{de-emph}(z)$ . After determining the excitation for the subframe, the initial states of these filters are updated by filtering the difference between the LP residual and excitation. The memory update of these filters is explained in Section 5.10. + +The residual signal $r(n)$ which is needed for finding the target vector is also used in the adaptive codebook search to extend the past excitation buffer. This simplifies the adaptive codebook search procedure for delays less than the subframe size of 64 as will be explained in the next section. The LP residual is given by + +$$r(n) = s(n) + \sum_{i=1}^{16} \hat{a}_i s(n-i), n = 0, \dots, 63. \quad (36)$$ + +## 5.7 Adaptive codebook + +Adaptive codebook search is performed on a subframe basis. It consists of performing closed loop pitch search, and then computing the adaptive codevector by interpolating the past excitation at the selected fractional pitch lag. + +The adaptive codebook parameters (or pitch parameters) are the delay and gain of the pitch filter. In the search stage, the excitation is extended by the LP residual to simplify the closed-loop search. + +In 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes, in the first and third subframes, a fractional pitch + +delay is used with resolutions $\frac{3}{4}$ in the range $[34, 127 \frac{3}{4}]$ , resolutions $\frac{1}{2}$ in the range $[128, 159 \frac{1}{2}]$ , and integers only in the range $[160, 231]$ . For the second and fourth subframes, a pitch resolution of $\frac{1}{4}$ is always used in the range $[T_1-8, T_1+7 \frac{3}{4}]$ , where $T_1$ is nearest integer to the fractional pitch lag of the previous (1st or 3rd) subframe. + +In 8.85 kbit/s mode, in the first and third subframes, a fractional pitch delay is used with resolutions $\frac{1}{2}$ in the range $[34, 91 \frac{1}{2}]$ , and integers only in the range $[92, 231]$ . For the second and fourth subframes, a pitch resolution of $\frac{1}{2}$ is always used in the range $[T_1-8, T_1+7 \frac{1}{2}]$ , where $T_1$ is nearest integer to the fractional pitch lag of the previous (1st or 3rd) subframe. + +In 6.60 kbit/s mode, in the first subframe, a fractional pitch delay is used with resolutions $\frac{1}{2}$ in the range $[34, 91 \frac{1}{2}]$ , and integers only in the range $[92, 231]$ . For the second, third and fourth subframes, a pitch resolution of $\frac{1}{2}$ is always used in the range $[T_1-8, T_1+7 \frac{1}{2}]$ , where $T_1$ is nearest integer to the fractional pitch lag of the first subframe. + +Closed-loop pitch analysis is performed around the open-loop pitch estimates on a subframe basis. In 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes, in the first (and third) subframe the range $T_{op} \pm 7$ , bounded by 34...231, is searched. In 6.60 kbit/s mode, in the first subframe the range $T_{op} \pm 7$ , bounded by 34...231, is searched. For all the modes, for the other subframes, closed-loop pitch analysis is performed around the integer pitch selected in the previous subframe, as described above. In 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes, the pitch delay is encoded with 9 bits in the first and third subframes and the relative delay of the other subframes is encoded with 6 bits. In 8.85 kbit/s mode, the pitch delay is encoded with 8 bits in the first and third subframes and the relative delay of the other subframes is encoded with 5 bits. In 6.60 kbit/s mode, the pitch delay is encoded with 8 bits in the first subframe and the relative delay of the other subframes is encoded with 5 bits. + +The closed loop pitch search is performed by minimizing the mean-square weighted error between the original and synthesized speech. This is achieved by maximizing the term + +$$T_k = \frac{\sum_{n=0}^{63} x(n)y_k(n)}{\sqrt{\sum_{n=0}^{63} y_k(n)y_k(n)}}, \quad (37)$$ + +where $x(n)$ is the target signal and $y_k(n)$ is the past filtered excitation at delay $k$ (past excitation convolved with $h(n)$ ). Note that the search range is limited around the open-loop pitch as explained earlier. + +The convolution $y_k(n)$ is computed for the first delay in the searched range, and for the other delays, it is updated using the recursive relation + +$$y_k(n) = y_{k-1}(n-1) + u(-k)h(n) \quad (38)$$ + +where $u(n), n = -(231+17), \dots, 63$ , is the excitation buffer. Note that in search stage, the samples $u(n), n = 0, \dots, 63$ , are not known, and they are needed for pitch delays less than 64. To simplify the search, the LP residual is copied to $u(n)$ in order to make the relation in Equation (38) valid for all delays. + +Once the optimum integer pitch delay is determined, the fractions from $-\frac{3}{4}$ to $\frac{3}{4}$ with a step of $\frac{1}{4}$ around that integer are tested. The fractional pitch search is performed by interpolating the normalized correlation in Equation (37) and searching for its maximum. Once the fractional pitch lag is determined, $v'(n)$ is computed by interpolating the past excitation signal $u(n)$ at the given phase (fraction). (The interpolation is performed using two FIR filters (Hamming windowed sinc functions); one for interpolating the term in Equation (34) with the sinc truncated at $\pm 17$ and the other for interpolating the past excitation with the sinc truncated at $\pm 63$ ). The filters have their cut-off frequency (-3 dB) at 6000 Hz in the oversampled domain, which means that the interpolation filters exhibit low-pass frequency response. Thus, even when the pitch delay is an integer value, the adaptive codebook excitation consists of a low-pass filtered version of the past excitation at the given delay and not a direct copy thereof. Further, for delays smaller than the subframe size, the adaptive codebook excitation is completed based on the low-pass filtered interpolated past excitation and not by repeating the past excitation. + +In order to enhance the pitch prediction performance in wideband signals, a frequency-dependant pitch predictor is used. This is important in wideband signals since the periodicity doesn't necessarily extend over the whole spectrum. In this algorithm, there are two signal paths associated to respective sets of pitch codebook parameters, wherein each signal path comprises a pitch prediction error calculating device for calculating a pitch prediction error of a pitch codevector from a pitch codebook search device. One of these two paths comprises a low-pass filter for filtering the pitch codevector and the pitch prediction error is calculated for these two signal paths. The signal path having the lowest calculated pitch prediction error is selected, along with the associated pitch gain. + +The low pass filter used in the second path is in the form $B_{LP}(z) = 0.18z + 0.64 + 0.18z^{-1}$ . Note that 1 bit is used to encode the chosen path. + +Thus, for 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes, there are two possibilities to generate the + +adaptive codebook $v(n)$ , $v(n) = v'(n)$ in the first path, or $v(n) = \sum_{i=-1}^1 b_{LP}(i+1)v'(n+i)$ in the second path, where $\mathbf{b}_{LP} = [0.18, 0.64, 0.18]$ . The path which results in minimum energy of the target signal $x_2(n)$ defined in Equation (40) is + +selected for the filtered adaptive codebook vector. For 6.60 and 8.85 kbit/s modes, $v(n)$ is always + +$$v(n) = \sum_{i=-1}^1 b_{LP}(i+1)v'(n+i)$$ + +The adaptive codebook gain is then found by + +$$g_p = \frac{\sum_{n=0}^{63} x(n)y(n)}{\sum_{n=0}^{63} y(n)y(n)}, \quad \text{bounded by } 0 \leq g_p \leq 1.2, \quad (39)$$ + +where $y(n) = v(n) * h(n)$ is the filtered adaptive codebook vector (zero-state response of $H(z)W(z)$ to $v_i(n)$ ). To insure stability, the adaptive codebook gain $g_p$ is bounded by 0.95, if the adaptive codebook gains of the previous subframes have been small and the LP filters of the previous subframes have been close to being unstable. + +## 5.8 Algebraic codebook + +### 5.8.1 Codebook structure + +The codebook structure is based on interleaved single-pulse permutation (ISPP) design. The 64 positions in the codevector are divided into 4 tracks of interleaved positions, with 16 positions in each track. The different codebooks at the different rates are constructed by placing a certain number of signed pulses in the tracks (from 1 to 6 pulses per track). The codebook index, or codeword, represents the pulse positions and signs in each track. Thus, no codebook storage is needed, since the excitation vector at the decoder can be constructed through the information contained in the index itself (no lookup tables). + +An important feature of the used codebook is that it is a dynamic codebook consisting of an algebraic codebook followed by an adaptive prefilter $F(z)$ which enhances special spectral components in order to improve the synthesis speech quality. A prefilter relevant to wideband signals is used whereby $F(z)$ consists of two parts: a periodicity enhancement part $1/(1-0.85z^{-T})$ and a tilt part $(1 - \beta_1 z^{-1})$ , where $T$ is the integer part of the pitch lag and $\beta_1$ is related to the voicing of the previous subframe and is bounded by $[0.0, 0.5]$ . The codebook search is performed in the algebraic domain by combining the filter $F(z)$ with the weighed synthesis filter prior to the codebook search. Thus, the impulse response $h(n)$ must be modified to include the prefilter $F(z)$ . That is, $h(n) \leftarrow h(n) * f(n)$ . + +The codebook structures of different bit rates are given below. + +#### 5.8.1.1 23.85 and 23.05 kbit/s mode + +In this codebook, the innovation vector contains 24 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each track contains six pulses, as shown in Table 4. + +**Table 4. Potential positions of individual pulses in the algebraic codebook, 23.85 and 23.05 kbit/s** + +| Track | Pulse | Positions | +|-------|--------------------------------------------|--------------------------------------------------------------| +| 1 | $i_0, i_4, i_8, i_{12}, i_{16}, i_{20}$ | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | $i_1, i_5, i_9, i_{13}, i_{17}, i_{21}$ | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | $i_2, i_6, i_{10}, i_{14}, i_{18}, i_{22}$ | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | $i_3, i_7, i_{11}, i_{15}, i_{19}, i_{23}$ | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +The six pulses in one track are encoded with 22 bits. + +This gives a total of 88 bits (22+22+22+22) for the algebraic code. + +#### 5.8.1.2 19.85 kbit/s mode + +In this codebook, the innovation vector contains 18 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each of the first two tracks contains five pulses and each of the other tracks contains four pulses, as shown in Table 5. + +**Table 5. Potential positions of individual pulses in the algebraic codebook, 19.85 kbit/s** + +| Track | Pulse | Positions | +|-------|--------------------------------------------------------------------------------------|--------------------------------------------------------------| +| 1 | i 0 , i 4 , i 8 , i 12 , i 16 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | i 1 , i 5 , i 9 , i 13 , i 17 | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | i 2 , i 6 , i 10 , i 14 | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | i 3 , i 7 , i 11 , i 15 | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +The five pulses in one track are encoded with 20 bits. The four pulses in one track is encoded with 16 bits. + +This gives a total of 72 bits (20+20+16+16) for the algebraic code. + +#### 5.8.1.3 18.25 kbit/s mode + +In this codebook, the innovation vector contains 16 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each track contains four pulses, as shown in Table 6. + +**Table 6. Potential positions of individual pulses in the algebraic codebook, 18.25 kbit/s** + +| Track | Pulse | Positions | +|-------|---------------------------------------------------------------------|--------------------------------------------------------------| +| 1 | i 0 , i 4 , i 8 , i 12 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | i 1 , i 5 , i 9 , i 13 | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | i 2 , i 6 , i 10 , i 14 | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | i 3 , i 7 , i 11 , i 15 | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +The four pulses in one track are encoded with 16 bits. + +This gives a total of 64 bits (16+16+16+16) for the algebraic code. + +#### 5.8.1.4 15.85 kbit/s mode + +In this codebook, the innovation vector contains 12 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each track contains three pulses, as shown in Table 7. + +**Table 7. Potential positions of individual pulses in the algebraic codebook, 15.85 kbit/s** + +| Track | Pulse | Positions | +|-------|---------------------------------------------------|--------------------------------------------------------------| +| 1 | i 0 , i 4 , i 8 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | i 1 , i 5 , i 9 | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | i 2 , i 6 , i 10 | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | i 3 , i 7 , i 11 | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +The three pulses in one track are encoded with 13 bits. + +This gives a total of 52 bits (13+13+13+13) for the algebraic code. + +#### 5.8.1.5 14.25 kbit/s mode + +In this codebook, the innovation vector contains 10 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each track contains two or three pulses, as shown in Table 8. + +**Table 8. Potential positions of individual pulses in the algebraic codebook, 14.25 kbit/s** + +| Track | Pulse | Positions | +|-------|--------------------------------------------------|--------------------------------------------------------------| +| 1 | i 0 , i 4 , i 8 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | i 1 , i 5 , i 9 | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | i 2 , i 6 | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | i 3 , i 7 | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +Each two pulse positions in one track are encoded with 8 bits (4 bits for the position of every pulse), and the sign of the first pulse in the track is encoded with 1 bit. + +The three pulse in one track are encoded with 13 bits. + +This gives a total of 44 bits (13+13+9+9) for the algebraic code. + +#### 5.8.1.6 12.65 kbit/s mode + +In this codebook, the innovation vector contains 8 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each track contains two pulses, as shown in Table 9. + +**Table 9. Potential positions of individual pulses in the algebraic codebook, 12.65 kbit/s** + +| Track | Pulse | Positions | +|-------|---------------------------------|--------------------------------------------------------------| +| 1 | i 0 , i 4 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | i 1 , i 5 | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | i 2 , i 6 | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | i 3 , i 7 | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +Each two pulse positions in one track are encoded with 8 bits (total of 32 bits, 4 bits for the position of every pulse), and the sign of the first pulse in the track is encoded with 1 bit (total of 4 bits). This gives a total of 36 bits for the algebraic code. + +#### 5.8.1.7 8.85 kbit/s mode + +In this codebook, the innovation vector contains 4 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 4 tracks, where each track contains one pulse, as shown in Table 10. + +**Table 10. Potential positions of individual pulses in the algebraic codebook, 8.85 kbit/s** + +| Track | Pulse | Positions | +|-------|----------------|--------------------------------------------------------------| +| 1 | i 0 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | i 1 | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | i 2 | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | i 3 | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +Each pulse position in one track are encoded with 4 bits and the sign of the pulse in the track is encoded with 1 bit. This gives a total of 20 bits for the algebraic code. + +#### 5.8.1.8 6.60 kbit/s mode + +In this codebook, the innovation vector contains 2 non-zero pulses. All pulses can have the amplitudes +1 or -1. The 64 positions in a subframe are divided into 2 tracks, where each track contains one pulse, as shown in Table 11. + +**Table 11. Potential positions of individual pulses in the algebraic codebook, 6.60 kbit/s** + +| Track | Pulse | Positions | +|-------|----------------|---------------------------------------------------------------------------------------------------------------------------| +| 1 | i 0 | 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62 | +| 2 | i 1 | 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63 | + +Each pulse position in one track are encoded with 5 bits and the sign of the pulse in the track is encoded with 1 bit. This gives a total of 12 bits for the algebraic code. + +### 5.8.2 Pulse indexing + +In the above section, the number of bits needed to encode a number of pulses in a track was given. In this section, the procedures used for encoding from 1 to 6 pulses per track will be described. The description will be given for the case of 4 tracks per subframe, with 16 positions per track and pulse spacing of 4 (which is the case for all modes except the 6.6 kbit/s mode). + +#### Encoding 1 signed pulse per track + +The pulse position index is encoded with 4 bits and the sign index with 1 bit. The position index is given by the pulse position in the subframe divided by the pulse spacing (integer division). The division remainder gives the track index. For example, a pulse at position 31 has a position index of $31/4 = 7$ and it belongs to the track with index 3 (4th track). + +The sign index here is set to 0 for positive signs and 1 for negative signs. + +The index of the signed pulse is given by + +$$I_{1p} = p + s \times 2^M$$ + +where $p$ is the position index, $s$ is the sign index, and $M=4$ is the number of bits per track. + +#### Encoding 2 signed pulses per track + +In case of two pulses per track of $K=2^M$ potential positions (here $M=4$ ), each pulse needs 1 bit for the sign and $M$ bits for the position, which gives a total of $2M+2$ bits. However, some redundancy exists due to the unimportance of the pulse ordering. For example, placing the first pulse at position $p$ and the second pulse at position $q$ is equivalent to placing the first pulse at position $q$ and the second pulse at position $p$ . One bit can be saved by encoding only one sign and deducing the second sign from the ordering of the positions in the index. Here the index is given by + +$$I_{2p} = p_1 + p_0 \times 2^M + s \times 2^{2M}$$ + +where $s$ is the sign index of the pulse at position index $p_0$ . If the two signs are equal then the smaller position is set to $p_0$ and the larger position is set to $p_1$ . On the other hand, if the two signs are not equal then the larger position is set to $p_0$ and the smaller position is set to $p_1$ . At the decoder, the sign of the pulse at position $p_0$ is readily available. The second sign is deduced from the pulse ordering. If $p_0$ is larger than $p_1$ then the sign of the pulse at position $p_1$ is opposite to that at position $p_0$ . If this is not the case then the two signs are set equal + +#### Encoding 3 signed pulses per track + +In case of three pulses per track, similar logic can be used as in the case of two pulses. For a track with $2^M$ positions, $3M+1$ bits are needed instead of $3M+3$ bits. A simple way of indexing the pulses is to divide the track positions in two sections (or halves) and identify a section that contains at least two pulses. The number of positions in the section is $K/2 = 2^M/2 = 2^{M-1}$ , which can be represented with $M-1$ bits. The two pulses in the section containing at least two pulses are encoded with the procedure for encoding 2 signed pulses which requires $2(M-1)+1$ bits and the remaining pulse which can be anywhere in the track (in either section) is encoded with the $M+1$ bits. Finally, the index of the section that contains the two pulses is encoded with 1 bit. Thus the total number of required bits is $2(M-1)+1 + M+1 + 1 = 3M+1$ . + +A simple way of checking if two pulses are positioned in the same section is done by checking whether the most significant bits (MSB) of their position indices are equal or not. Note that a MSB of 0 means that the position belongs to the lower half of the track (0-7) and MSB of 1 means it belongs to the upper half (8-15). If the two pulses belong to the upper half, they need to be shifted to the range (0-7) before encoding them using $2 \times 3 + 1$ bits. This can be done by masking the $M-1$ least significant bits (LSB) with a mask consisting of $M-1$ ones (which corresponds to the number 7 in this case). + +The index of the 3 signed pulses is given by + +$$I_{3p} = I_{2p} + k \times 2^{2M-1} + I_{1p} \times 2^{2M}$$ + +where $I_{2p}$ is the index of the two pulses in the same section, $k$ is the section index (0 or 1), and $I_{1p}$ is the index of the third pulse in the track. + +#### Encoding 4 signed pulses per track + +The 4 signed pulses in a track of length $K=2^M$ can be encoded using $4M$ bits. Similar to the case of 3 pulses, the $K$ positions in the track are divided into 2 sections (two halves) where each section contains $K/2=8$ positions. Here we denote the sections as Section A with positions 0 to $K/2-1$ and Section B with positions $K/2$ to $K-1$ . Each section can contain from 0 to 4 pulses. The table below shows the 5 cases representing the possible number of pulses in each section: + +| case | Pulses in Section A | Pulses in Section B | Bits needed | +|-------------|----------------------------|----------------------------|--------------------| +| 0 | 0 | 4 | $4M-3$ | +| 1 | 1 | 3 | $4M-2$ | + +| | | | | +|---|---|---|--------| +| 2 | 2 | 2 | $4M-2$ | +| 3 | 3 | 1 | $4M-2$ | +| 4 | 4 | 0 | $4M-3$ | + +In cases 0 or 4, the 4 pulses in a section of length $K/2=2^{M-1}$ can be encoded using $4(M-1)+1=4M-3$ bits (this will be explained later on). + +In cases 1 or 3, the 1 pulse in a section of length $K/2=2^{M-1}$ can be encoded with $M-1+1 = M$ bits and the 3 pulses in the other section can be encoded with $3(M-1)+1 = 3M-2$ bits. This gives a total of $M+3M-2 = 4M-2$ bits. + +In case 2, the pulses in a section of length $K/2=2^{M-1}$ can be encoded with $2(M-1)+1 = 2M-1$ bits. Thus for both sections, $2(2M-1) = 4M-2$ bits are required. + +Now the case index can be encoded with 2 bits (4 possible cases) assuming cases 0 and 4 are combined. Then for cases 1, 2, or 3, the number of needed bits is $4M-2$ . This gives a total of $4M-2 + 2 = 4M$ bits. For cases 0 or 4, one bit is needed for identifying either case, and $4M-3$ bits are needed for encoding the 4 pulses in the section. Adding the 2 bits needed for the general case, this gives a total of $1+4M-3+2= 4M$ bits. + +The index of the 4 signed pulses is given by + +$$I_{4p} = I_{AB} + k \times 2^{4M-2}$$ + +where $k$ is the case index (2 bits), and $I_{AB}$ is the index of the pulses in both sections for each individual case. + +For cases 0 and 1, $I_{AB}$ is given by + +$$I_{AB\_0,4} = I_{4p\_section} + j \times 2^{4M-3}$$ + +where $j$ is a 1-bit index identifying the section with 4 pulses and $I_{4p\_section}$ is the index of the 4 pulses in that section (which requires $4M-3$ bits). + +For case 1, $I_{AB}$ is given by + +$$I_{AB\_1} = I_{3p\_B} + I_{1p\_A} \times 2^{3(M-1)+1}$$ + +where $I_{3p\_B}$ is the index of the 3 pulses in Section B ( $3(M-1)+1$ bits) and $I_{1p\_A}$ is the index of the pulse in Section A ( $(M-1)+1$ bits). + +For case 2, $I_{AB}$ is given by + +$$I_{AB\_2} = I_{2p\_B} + I_{2p\_A} \times 2^{2(M-1)+1}$$ + +where $I_{2p\_B}$ is the index of the 2 pulses in Section B ( $2(M-1)+1$ bits) and $I_{2p\_A}$ is the index of the two pulses in Section A ( $2(M-1)+1$ bits). + +Finally, for case 3, $I_{AB}$ is given by + +$$I_{AB\_3} = I_{1p\_B} + I_{3p\_A} \times 2^M$$ + +where $I_{1p\_B}$ is the index of the pulse in Section B ( $(M-1)+1$ bits) and $I_{3p\_A}$ is the index of the 3 pulses in Section A ( $3(M-1)+1$ bits). + +For cases 0 and 4, it was mentioned that the 4 pulses in one section are encoded using $4(M-1)+1$ bits. This is done by further dividing the section into 2 subsections of length $K/4=2^{M-2}$ ( $=4$ in this case); identifying a subsection that contains at least 2 pulses; coding the 2 pulses in that subsection using $2(M-2)+1=2M-3$ bits; coding the index of the subsection that contains at least 2 pulses using 1 bit; and coding the remaining 2 pulses, assuming that they can be anywhere in the section, using $2(M-1)+1=2M-1$ bits. This gives a total of $(2M-3)+(1)+(2M-1) = 4M-3$ bits + +#### Encoding 5 signed pulses per track + +The 5 signed pulses in a track of length $K=2^M$ can be encoded using $5M$ bits. Similar to the case of 4 pulses, the $K$ positions in the track are divided into 2 sections A and B. Each section can contain from 0 to 5 pulses. A simple approach to encode the 5 pulses is to identify a section that contains at least 3 pulses and to encode the 3 pulses in that section using $3(M-1)+1 = 3M-2$ bits, and to encode the remaining 2 pulses in the whole track using $2M+1$ bits. This gives $5M-1$ bits. An extra bit is needed to identify the section that contains at least 3 pulses. Thus a total of $5M$ bits are needed to encode the 5 signed pulses. + +The index of the 5 signed pulses is given by + +$$I_{5p} = I_{2p} + I_{3p} \times 2^{2M} + k \times 2^{2M-1}$$ + +Where $k$ is the index of the section that contains at least 3 pulses, $I_{3p}$ is the index of the 3 pulses in that section ( $3(M-1)+1$ bits), and $I_{2p}$ is the index of the remaining 2 pulses in the track ( $2M+1$ bits). + +#### Encoding 6 signed pulses per track + +The 6 signed pulses in a track of length $K=2^M$ are encoded using $6M-2$ bits. Similar to the case of 5 pulses, the $K$ positions in the track are divided into 2 sections A and B. Each section can contain from 0 to 6 pulses. The table below shows the 7 cases representing the possible number of pulses in each sections: + +| case | Pulses in Section A | Pulses in Section B | Bits needed | +|-------------|----------------------------|----------------------------|--------------------| +| 0 | 0 | 6 | $6M-5$ | +| 1 | 1 | 5 | $6M-5$ | +| 2 | 2 | 4 | $6M-5$ | +| 3 | 3 | 3 | $6M-4$ | +| 4 | 4 | 2 | $6M-5$ | +| 5 | 5 | 1 | $6M-5$ | +| 6 | 6 | 0 | $6M-5$ | + +Note that cases 0 and 6 are similar except that the 6 pulses are in different section. Similarly, cases 1 and 5 as well as cases 2 and 4 differ only in the section that contains more pulses. Therefore these cases can be coupled and an extra bit can be assigned to identify the section that contains more pulses. Since these cases initially need $6M-5$ bits, the coupled cases need $6M-4$ bits taking into account the Section bit. Thus, we have now 4 states of coupled cases, that is (0,6), (1,5), (2,4), and (3),with 2 extra bits needed for the state. This gives a total of $6M-4+2=6M-2$ bits for the 6 signed pulses. + +In cases 0 and 6, 1 bit is needed to identify the section which contains 6 pulses. 5 pulses in that section are encoded using $5(M-1)$ bits (since the pulses are confined to that section), and the remaining pulse is encoded using $(M-1)+1$ bits. Thus a total of $1+5(M-1)+M=6M-4$ bits are needed for this coupled case. Extra 2 bits are needed to encode the state of the coupled case, giving a total of $6M-2$ bits. For this coupled case, the index of the 6 pulses is given by + +$$I_{6p} = I_{1p} + I_{5p} \times 2^M + j \times 2^{6M-5} + k \times 2^{6M-4}$$ + +where $k$ is the index of the coupled case (2 bits), $j$ is the index of the section containing 6 pulses (1 bit), $I_{5p}$ is the index of 5 pulses in that section ( $5(M-1)$ bits), and $I_{1p}$ is the index of the remaining pulse in that section ( $(M-1)+1$ bits). + +In cases 1 and 5, 1 bit is needed to identify the section which contains 5 pulses. The 5 pulses in that section are encoded using $5(M-1)$ bits and the pulse in the other section is encoded using $(M-1)+1$ bits. For this coupled case, the index of the 6 pulses is given by + +$$I_{6p} = I_{1p} + I_{5p} \times 2^M + j \times 2^{6M-5} + k \times 2^{6M-4}$$ + +where $k$ is the index of the coupled case (2 bits), $j$ is the index of the section containing 5 pulses (1 bit), $I_{5p}$ is the index of the 5 pulses in that section ( $5(M-1)$ bits), and $I_{1p}$ is the index of the pulse in the other section ( $(M-1)+1$ bits). + +In cases 2 or 4, 1 bit is needed to identify the section which contains 4 pulses. The 4 pulses in that section are encoded using $4(M-1)$ bits and the 2 pulses in the other section are encoded using $2(M-1)+1$ bits. For this coupled case, the index of the 6 pulses is given by + +$$I_{6p} = I_{2p} + I_{4p} \times 2^{2(M-1)+1} + j \times 2^{6M-5} + k \times 2^{6M-4}$$ + +where $k$ is the index of the coupled case (2 bits), $j$ is the index of the section containing 4 pulses (1 bit), $I_{4p}$ is the index of 4 pulses in that section ( $4(M-1)$ bits), and $I_{2p}$ is the index of the 2 pulses in the other section ( $2(M-1)+1$ bits). + +In case 3, the 3 pulses in each section are encoded using $3(M-1)+1$ bits in each Section. For this case, the index of the 6 pulses is given by + +$$I_{6p} = I_{3pB} + I_{3pA} \times 2^{3(M-1)+1} + k \times 2^{6M-4}$$ + +where $k$ is the index of the coupled case (2 bits), $I_{3pB}$ is the index of 3 pulses Section B ( $3(M-1)+1$ bits), and $I_{3pA}$ is the index of the 3 pulses in Section A ( $3(M-1)+1$ bits). + +### 5.8.3 Codebook search + +The algebraic codebook is searched by minimizing the mean square error between the weighted input speech and the weighted synthesis speech. The target signal used in the closed-loop pitch search is updated by subtracting the adaptive codebook contribution. That is + +$$x_2(n) = x(n) - g_p y(n), \quad n = 0, \dots, 63, \quad (40)$$ + +where $y(n) = v(n) * h(n)$ is the filtered adaptive codebook vector and $g_p$ is the unquantized adaptive codebook gain. + +The matrix $\mathbf{H}$ is defined as the lower triangular Toeplitz convolution matrix with diagonal $h(0)$ and lower diagonals $h(1), \dots, h(63)$ , and $\mathbf{d} = \mathbf{H}' \mathbf{x}_2$ is the correlation between the target signal $x_2(n)$ and the impulse response $h(n)$ (also known as the backward filtered target vector), and $\Phi = \mathbf{H}' \mathbf{H}$ is the matrix of correlations of $h(n)$ . + +The elements of the vector $\mathbf{d}$ are computed by + +$$d(n) = \sum_{i=n}^{63} x_2(i)h(i-n), \quad n = 0, \dots, 63, \quad (41)$$ + +and the elements of the symmetric matrix $\Phi$ are computed by + +$$\phi(i, j) = \sum_{n=j}^{63} h(n-i)h(n-j), \quad i = 0, \dots, 63, \quad j = i, \dots, 63. \quad (42)$$ + +If $\mathbf{c}_k$ is the algebraic codevector at index $k$ , then the algebraic codebook is searched by maximizing the search criterion + +$$Q_k = \frac{(\mathbf{x}_2' \mathbf{H} \mathbf{c}_k)^2}{\mathbf{c}_k' \mathbf{H}' \mathbf{H} \mathbf{c}_k} = \frac{(\mathbf{d}' \mathbf{c}_k)^2}{\mathbf{c}_k' \Phi \mathbf{c}_k} = \frac{(R_k)^2}{E_k}. \quad (43)$$ + +The vector $\mathbf{d}$ and the matrix $\Phi$ are usually computed prior to the codebook search. + +The algebraic structure of the codebooks allows for very fast search procedures since the innovation vector $\mathbf{c}_k$ contains only a few nonzero pulses. The correlation in the numerator of Equation (43) is given by + +$$C = \sum_{i=0}^{N_p-1} a_i d(m_i) \quad (44)$$ + +where $m_i$ is the position of the $i$ th pulse, $a_i$ is its amplitude, and $N_p$ is the number of pulses. The energy in the denominator of Equation (43) is given by + +$$E = \sum_{i=0}^{N_p-1} \phi(m_i, m_i) + 2 \sum_{i=0}^{N_p-2} \sum_{j=i+1}^{N_p-1} a_i a_j \phi(m_i, m_j) \quad (45)$$ + +To simplify the search procedure, the pulse amplitudes are predetermined based on a certain reference signal $b(n)$ . In this so-called signal-selected pulse amplitude approach, the sign of a pulse at position $i$ is set equal to the sign of the reference signal at that position. Here, the reference signal $b(n)$ is given by + +$$b(n) = \sqrt{\frac{E_d}{E_r}} r_{LTP}(n) + \alpha d(n) \quad (46)$$ + +where $E_d = \mathbf{d}' \mathbf{d}$ is the energy of the signal $d(n)$ and $E_r = \mathbf{r}_{LTP}' \mathbf{r}_{LTP}$ is the energy of the signal $r_{LTP}(n)$ which is the residual signal after long term prediction. The scaling factor $\alpha$ controls the amount of dependence of the reference signal on + +$d(n)$ , and it is lowered as the bit rate is increased. Here $\alpha=2$ for 6.6 and 8.85 modes; $\alpha=1$ for 12.65, 14.25, and 15.85 modes; $\alpha=0.8$ for 18.25 mode; $\alpha=0.75$ for 19.85 mode; and $\alpha=0.5$ for 23.05 and 23.85 modes. + +To simplify the search the signal $d(n)$ and matrix $\Phi$ are modified to incorporate the pre-selected signs. Let $s_b(n)$ denote the vector containing the signs of $b(n)$ . The modified signal $d'(n)$ is given by + +$$d'(n) = s_b(n)d(n) \quad n=0, \dots, N-1$$ + +and the modified autocorrelation matrix $\Phi'$ is given by + +$$\phi'(i, j) = s_b(i)s_b(j)\phi(i, j), \quad i=0, \dots, N-1; \quad j=i, \dots, N-1.$$ + +The correlation at the numerator of the search criterion $Q_k$ is now given by + +$$R = \sum_{i=0}^{N_p-1} d'(m_i)$$ + +and the energy at the denominator of the search criterion $Q_k$ is given by + +$$E = \sum_{i=0}^{N_p-1} \phi'(m_i, m_i) + 2 \sum_{i=0}^{N_p-2} \sum_{j=i+1}^{N_p-1} \phi'(m_i, m_j)$$ + +The goal of the search now is to determine the codevector with the best set of $N_p$ pulse positions assuming amplitudes of the pulses have been selected as described above. The basic selection criterion is the maximization of the above mentioned ratio $Q_k$ . + +In order to reduce the search complexity, a fast search procedure known as depth-first tree search procedure is used, whereby the pulse positions are determined $N_m$ pulses at a time. More precisely, the $N_p$ available pulses are partitioned into $M$ non-empty subsets of $N_m$ pulses respectively such that $N_1+N_2+\dots+N_{m-1}+N_m=N_p$ . A particular choice of positions for the first $J=N_1+N_2+\dots+N_{m-1}$ pulses considered is called a level- $m$ path or a path of length $J$ . The basic criterion for a path of $J$ pulse positions is the ratio $Q_k(J)$ when only the $J$ relevant pulses are considered. + +The search begins with subset #1 and proceeds with subsequent subsets according to a tree structure whereby subset $m$ is searched at the $m^{\text{th}}$ level of the tree. The purpose of the search at level 1 is to consider the $N_1$ pulses of subset #1 and their valid positions in order to determine one, or a number of, candidate path(s) of length $N_1$ which are the tree nodes at level 1. The path at each terminating node of level $m-1$ is extended to length $N_1+N_2+\dots+N_m$ at level $m$ by considering $N_m$ new pulses and their valid positions. One, or a number of, candidate extended path(s) are determined to constitute level- $m$ nodes. The best codevector corresponds to that path of length $N_p$ which maximizes the criterion $Q_k(N_p)$ with respect to all level- $M$ nodes. + +A special form of the depth-first tree search procedure is used here, in which two pulses are searched at a time, that is, $N_m=2$ , and these 2 pulses belong to two consecutive tracks. Further, instead of assuming that the matrix $\Phi$ is precomputed and stored, which requires a memory of $N \times N$ words ( $64 \times 64 = 4k$ words), a memory-efficient approach is used which reduces the memory requirement. In this approach, the search procedure is performed in such a way that only a part of the needed elements of the correlation matrix are precomputed and stored. This part corresponds to the correlations of the impulse response corresponding to potential pulse positions in consecutive tracks, as well as the correlations corresponding to $\phi(j, j), j=0, \dots, N-1$ (that is the elements of the main diagonal of matrix $\Phi$ ). + +In order to reduce complexity, while testing possible combinations of two pulses, a limited number of potential positions of the first pulse are tested. Further, in case of large number of pulses, some pulses in the higher levels of the search tree are fixed. In order to guess intelligently which potential pulse positions are considered for the first pulse or in order to fix some pulse positions, a "pulse-position likelihood-estimate vector" $\mathbf{b}$ is used, which is based on speech-related signals. The $p^{\text{th}}$ component $b(p)$ of this estimate vector $\mathbf{b}$ characterizes the probability of a pulse occupying position $p$ ( $p = 0, 1, \dots, N-1$ ) in the best codevector we are searching for. Here the estimate vector $\mathbf{b}$ is the same vector used for preselecting the amplitudes and given in Equation (46). + +The search procedures for all bit rate modes are similar. Two pulses are searched at a time, and these two pulses always correspond to consecutive tracks. That is the two searched pulses are in tracks $T_0-T_1$ , $T_1-T_2$ , $T_2-T_3$ , or $T_3-T_0$ . + +Before searching the positions, the sign of at pulse a potential position $n$ is set the sign of $b(n)$ at that position. Then the modified signal $d'(n)$ is computed as described above by including the predetermined signs. + +For the first 2 pulses (1st tree level), the correlation at the numerator of the search criterion is given by + +$$R = d'(m_0) + d'(m_1)$$ + +and the energy at the denominator of the search criterion $Q_k$ is given by + +$$E = \phi'(m_0, m_0) + \phi'(m_1, m_1) + 2\phi'(m_0, m_1)$$ + +where the correlations $\phi'(m_i, m_j)$ has been modified to include the preselected signs at positions $m_i$ and $m_j$ . + +For subsequent levels, the numerator and denominator are updated by adding the contribution of two new pulses. Assuming that two new pulses at a certain tree level with positions $m_k$ and $m_{k+1}$ from two consecutive tracks are searched, then the updated value of $R$ is given by + +$$R = R + d'(m_k) + d'(m_{k+1}) \quad (47)$$ + +and the updated energy is given by + +$$E = E + \phi'(m_k, m_k) + \phi'(m_{k+1}, m_{k+1}) + 2\phi'(m_k, m_{k+1}) + 2R_{hv}(m_k) + 2R_{hv}(m_{k+1}) \quad (48)$$ + +where $R_{hv}(m)$ is the correlation between the impulse response $h(n)$ and a vector $v_h(n)$ containing the addition of delayed versions of impulse response at the previously determined positions. That is, + +$$v_h(n) = \sum_{i=0}^{k-1} h(n - m_i)$$ + +and + +$$R_{hv}(m) = \sum_{n=m}^{N-1} h(n)v_h(n - m)$$ + +At each tree level, the values of $R_{hv}(m)$ are computed online for all possible positions in each of the two tracks being tested. It can be seen from Equation (48) that only the correlations $\phi'(m_k, m_{k+1})$ corresponding to pulse positions in two consecutive tracks need to be stored ( $4 \times 16 \times 16$ words), along with the correlations $\phi'(m_k, m_k)$ corresponding to the diagonal of the matrix $\Phi$ (64 words). Thus the memory requirement in the present algebraic structure is 1088 words instead of $64 \times 64 = 4096$ words. + +The search procedures at the different bit rates modes are similar. The difference is in the number of pulses, and accordingly, the number of levels in the tree search. In order to keep a comparable search complexity across the different codebooks, the number of tested positions is kept similar. + +The search in the 12.65 kbit/s mode will be described as an example. In this mode, 2 pulses are placed in each track giving a total of 8 pulses per subframe of length 64. Two pulses are searched at a time, and these two pulses always correspond to consecutive tracks. That is the two searched pulses are in tracks $T_0-T_1$ , $T_1-T_2$ , $T_2-T_3$ , or $T_3-T_0$ . The tree has 4 levels in this case. At the first level, pulse $P_0$ is assigned to track $T_0$ and pulse $P_1$ to track $T_1$ . In this level, no search is performed and the two pulse positions are set to the maximum of $b(n)$ in each track. In the second level, pulse $P_2$ is assigned to track $T_2$ and pulse $P_3$ to track $T_3$ . 4 positions for pulse $P_2$ are tested against all 16 positions of pulse $P_3$ . The 4 tested positions of $P_2$ are determined based on the maxima of $b(n)$ in the track. In the third level, pulse $P_4$ is assigned to track $T_1$ and pulse $P_5$ to track $T_2$ . 8 positions for pulse $P_4$ are tested against all 16 positions of pulse $P_5$ . Similar to the previous search level, the 8 tested positions of $P_4$ are determined based on the maxima of $b(n)$ in the track. In the fourth level, pulse $P_6$ is assigned to track $T_3$ and pulse $P_7$ to track $T_0$ . 8 positions for pulse $P_6$ are tested against all 16 positions of pulse $P_7$ . Thus the total number of tested combination is $4 \times 16 + 8 \times 16 + 8 \times 16 = 320$ . The whole process is repeated 4 times (4 iterations) by assigning the pulses to different tracks. For example, in the 2nd iteration, pulses $P_0$ to $P_7$ are assigned to tracks $T_1$ , $T_2$ , $T_3$ , $T_0$ , $T_2$ , $T_3$ , $T_0$ , and $T_1$ , respectively. Thus the total number of tested position combinations is $4 \times 320 = 1280$ . + +As another search example, in the 15.85 kbit/s mode, 3 pulses are placed in each track giving a total of 12 pulses. There are 6 levels in the tree search whereby two pulses are searched in each level. In the first two levels, 4 pulses are set to + +the maxima of $b(n)$ . In the subsequent 4 levels, the number of tested combinations are $4 \times 16$ , $6 \times 16$ , $8 \times 16$ , and $8 \times 16$ , respectively. 4 iterations are used giving a total of $4 \times 26 \times 16 = 1664$ combinations. + +## 5.9 Quantization of the adaptive and fixed codebook gains + +The adaptive codebook gain (pitch gain) and the fixed (algebraic) codebook gain are vector quantized using a 6-bit codebook for modes 8.85 and 6.60 kbit/s and using a 7-bit codebook for all the other modes. + +The fixed codebook gain quantization is performed using MA prediction with fixed coefficients. The 4th order MA prediction is performed on the innovation energy as follows. Let $E(n)$ be the mean-removed innovation energy (in dB) at subframe $n$ , and given by + +$$E(n) = 10 \log \left( \frac{1}{N} g_c^2 \sum_{i=0}^{N-1} c^2(i) \right) - \bar{E} \quad (49)$$ + +where $N=64$ is the subframe size, $c(i)$ is the fixed codebook excitation, and $\bar{E} = 30$ dB is the mean of the innovation energy. The predicted energy is given by + +$$\tilde{E}(n) = \sum_{i=1}^4 b_i \hat{R}(n-i) \quad (50)$$ + +where $[b_1 \ b_2 \ b_3 \ b_4] = [0.5, 0.4, 0.3, 0.2]$ are the MA prediction coefficients, and $\hat{R}(k)$ is the quantized energy prediction error at subframe $k$ . The predicted energy is used to compute a predicted fixed-codebook gain $g'_c$ as in Equation (49) (by substituting $E(n)$ by $\tilde{E}(n)$ and $g_c$ by $g'_c$ ). This is done as follows. First, the mean innovation energy is found by + +$$E_i = 10 \log \left( \frac{1}{N} \sum_{i=0}^{N-1} c^2(i) \right) \quad (51)$$ + +and then the predicted gain $g'_c$ is found by + +$$g'_c = 10^{0.05(\tilde{E}(n) + \bar{E} - E_i)}. \quad (52)$$ + +A correction factor between the gain $g_c$ and the estimated one $g'_c$ is given by + +$$g = g_c / g'_c. \quad (53)$$ + +Note that the prediction error is given by + +$$R(n) = E(n) - \tilde{E}(n) = 20 \log(g). \quad (54)$$ + +The pitch gain, $g_p$ , and correction factor $\gamma$ are jointly vector quantized using a 6-bit codebook for modes 8.85 and 6.60 kbit/s, and 7-bit codebook for other modes. The gain codebook search is performed by minimizing the mean-square of the weighted error between original and reconstructed speech which is given + +$$E = x^t x + g_p^2 y^t y + g_c^2 z^t z - 2g_p x^t y - 2g_c x^t z + 2g_p g_c y^t z, \quad (55)$$ + +where the $x$ is the target vector, $y$ is the filtered adaptive codebook vector, and $z$ is the filtered fixed codebook vector. (Each gain vector in the codebook also has an element representing the quantized energy prediction error.) The quantized energy prediction error associated with the chosen gains is used to update $\hat{R}(n)$ . In the search, only the 64 codevectors that are closest to the unquantized pitch gain, $g_p$ , are taken into account. + +## 5.10 Memory update + +An update of the states of the synthesis and weighting filters is needed in order to compute the target signal in the next subframe. + +After the two gains have been quantized, the excitation signal, $u(n)$ , in the present subframe is found by + +$$u(n) = \hat{g}_p v(n) + \hat{g}_c c(n), \quad n = 0, \dots, 63, \quad (56)$$ + +where $\hat{g}_p$ and $\hat{g}_c$ are the quantized adaptive and fixed codebook gains, respectively, $v_i(n)$ the adaptive codebook vector (interpolated past excitation), and $c(n)$ is the fixed codebook vector (algebraic code including pitch sharpening). The states of the filters can be updated by filtering the signal $r(n)-u(n)$ (difference between residual and excitation) through the filters $1/\hat{A}(z)$ and $A(z/\gamma_1)H_{de-emph}(z)$ for the 64 sample subframe and saving the states of the filters. This would require 3 filterings. A simpler approach which requires only one filtering is as follows. The local synthesis speech, $\hat{s}(n)$ , is computed by filtering the excitation signal through $1/\hat{A}(z)$ . The output of the filter due to the input $r(n)-u(n)$ is equivalent to $e(n)=s(n)-\hat{s}(n)$ . So the states of the synthesis filter $1/\hat{A}(z)$ are given by $e(n), n=48, \dots, 63$ . Updating the states of the filter $A(z/\gamma_1)H_{de-emph}(z)$ can be done by filtering the error signal $e(n)$ through this filter to find the perceptually weighted error $e_w(n)$ . However, the signal $e_w(n)$ can be equivalently found by + +$$e_w(n) = x(n) - \hat{g}_p y(n) - \hat{g}_c z(n). \quad (57)$$ + +Since the signals $x(n)$ , $y(n)$ , and $z(n)$ are available, the states of the weighting filter are updated by computing $e_w(n)$ as in Equation (54) for $n = 48, \dots, 63$ . This saves two filterings. + +## 5.11 High-band gain generation + +In order to compute the high band gain for 23.85 kbit/s mode, 16 kHz input speech is filtered through a band-pass FIR filter $H_{HB}(z)$ which has the passband from 6.4 to 7 kHz. The high band gain $g_{HB}$ is obtained by + +$$g_{HB} = \frac{\sum_{i=0}^{63} (s_{HB}(i))^2}{\sum_{i=0}^{63} (s_{HB2}(i))^2}, \quad (58)$$ + +where $s_{HB}(i)$ is band-pass filtered input speech and $s_{HB2}(i)$ is high-band speech synthesis obtained from high-band excitation $u_{HB2}(i)$ filtered through high-band synthesis filter $A_{HB}(z)$ described in Section 6.3.2.2. + +# 6 Functional description of the decoder + +The function of the decoder consists of decoding the transmitted parameters (LP parameters, adaptive codebook vector, adaptive codebook gain, fixed codebook vector, fixed codebook gain and high-band gain) and performing synthesis to obtain the reconstructed speech. The reconstructed speech is then postprocessed and upsampled (and upscaled). Finally high-band signal is generated to the frequency band from 6 to 7 kHz. The signal flow at the decoder is shown in Figure 3. + +## 6.1 Decoding and speech synthesis + +The decoding process is performed in the following order: + +**Decoding of LP filter parameters:** The received indices of ISP quantization are used to reconstruct the quantized ISP vector. The interpolation described in Section 5.2.6 is performed to obtain 4 interpolated ISP vectors (corresponding to 4 subframes). For each subframe, the interpolated ISP vector is converted to LP filter coefficient domain $a_k$ , which is used for synthesizing the reconstructed speech in the subframe. + +The following steps are repeated for each subframe: + +1. **Decoding of the adaptive codebook vector:** The received pitch index (adaptive codebook index) is used to find the integer and fractional parts of the pitch lag. The adaptive codebook vector $v(n)$ is found by interpolating the past excitation $u(n)$ (at the pitch delay) using the FIR filter described in Section 5.7. The received adaptive filter index is used to find out whether the filtered adaptive codebook is $v_1(n)=v(n)$ or $v_2(n) = 0.18v(n) + 0.64v(n-1) + 0.18v(n-2)$ . +2. **Decoding of the innovative vector:** The received algebraic codebook index is used to extract the positions and amplitudes (signs) of the excitation pulses and to find the algebraic codevector $c(n)$ . If the integer part of the pitch lag is less than the subframe size 64, the pitch sharpening procedure + +is applied which translates into modifying $c(n)$ by filtering it through the adaptive prefilter $F(z)$ which consists of two parts: a periodicity enhancement part $1/(1-0.85z^{-T})$ and a tilt part $(1 - \beta_1 z^{-1})$ , where $T$ is the integer part of the pitch lag and $\beta_1(n)$ is related to the voicing of the previous subframe and is bounded by $[0.0, 0.5]$ . + +3. **Decoding of the adaptive and innovative codebook gains:** The received index gives the fixed codebook gain correction factor $\hat{\gamma}$ . The estimated fixed codebook gain $g'_c$ is found as described in Section 5.8. First, the predicted energy for every subframe $n$ is found by + +$$\tilde{E}(n) = \sum_{i=1}^4 b_i \hat{R}(n-i) \quad (59)$$ + +and then the mean innovation energy is found by + +$$E_i = 10 \log \left( \frac{1}{N} \sum_{i=0}^{N-1} c^2(i) \right) \quad (60)$$ + +The predicted gain $\hat{g}'_c$ is found by + +$$g'_c = 10^{0.05(\tilde{E}(n) + \bar{E} - E_i)} \quad (61)$$ + +The quantized fixed codebook gain is given by + +$$\hat{g}_c = \hat{\gamma} g'_c. \quad (62)$$ + +4. **Computing the reconstructed speech:** The following steps are for $n = 0, \dots, 63$ . The total excitation is constructed by: + +$$u(n) = \hat{g}_p v(n) + \hat{g}_c c(n), \quad (63)$$ + +Before the speech synthesis, a post-processing of excitation elements is performed. + +5. **Anti-sparseness processing (6.60 and 8.85 kbit/s modes):** An adaptive anti-sparseness post-processing procedure is applied to the fixed codebook vector $c(n)$ in order to reduce perceptual artifacts arising from the sparseness of the algebraic fixed codebook vectors with only a few non-zero samples per subframe. The anti-sparseness processing consists of circular convolution of the fixed codebook vector with an impulse response. Three pre-stored impulse responses are used and a number $impNr=0, 1, 2$ is set to select one of them. A value of 2 corresponds to no modification, a value of 1 corresponds to medium modification, while a value of 0 corresponds to strong modification. The selection of the impulse response is performed adaptively from the adaptive and fixed codebook gains. The following procedure is employed: + +``` + +if $\hat{g}_p < 0.6$ then + $impNr = 0$ ; +else if $\hat{g}_p < 0.9$ then + $impNr = 1$ ; +else + $impNr = 2$ ; + +``` + +Detect onset by comparing the fixed codebook gain to the previous fixed codebook gain. If the current value is more than three times the previous value an onset is detected. + +If not onset and $impNr=0$ , the median filtered value of the current and the previous 4 adaptive codebook gains are computed. If this value is less than 0.6, $impNr=0$ . + +If not onset, the $impNr$ -value is restricted to increase by one step from the previous subframe. + +If an onset is declared, the $impNr$ -value is increased by one if it is less than 2. + +In case of 8.85 kbit/s mode, the *impNr* -value is increased by one. + +6. **Noise enhancer:** A nonlinear gain smoothing technique is applied to the fixed codebook gain $\hat{g}_c$ in order to enhance excitation in noise. Based on the stability and voicing of the speech segment, the gain of the fixed codebook is smoothed in order to reduce fluctuation in the energy of the excitation in case of stationary signals. This improves the performance in case of stationary background noise. + +The voicing factor is given by $\lambda=0.5(1-r_v)$ with $r_v=(E_v-E_c)/(E_v+E_c)$ , where $E_v$ and $E_c$ are the energies of the scaled pitch codevector and scaled innovation codevector, respectively. Note that since the value of $r_v$ is between $-1$ and $1$ , the value of $\lambda$ is between $0$ and $1$ . Note that the factor $\lambda$ is related to the amount of unvoicing with a value of $0$ for purely voiced segments and a value of $1$ for purely unvoiced segments. + +A stability factor $\theta$ is computed based on a distance measure between the adjacent LP filters. Here, the factor $\theta$ is related to the ISP distance measure and it is bounded by $0 \leq \theta \leq 1$ , with larger values of $\theta$ corresponding to more stable signals. + +Finally, a gain smoothing factor $S_m$ is given by + +$$S_m = \lambda\theta. \quad (64)$$ + +The value of $S_m$ approaches $1$ for unvoiced and stable signals, which is the case of stationary background noise signals. For purely voiced signals or for unstable signals, the value of $S_m$ approaches $0$ . + +An initial modified gain $g_0$ is computed by comparing the fixed codebook gain $\hat{g}_c$ to a threshold given by the initial modified gain from the previous subframe, $g_{-1}$ . If $\hat{g}_c$ is larger or equal to $g_{-1}$ , then $g_0$ is computed by decrementing $\hat{g}_c$ by $1.5$ dB bounded by $g_0 \geq g_{-1}$ . If $\hat{g}_c$ is smaller than $g_{-1}$ , then $g_0$ is computed by incrementing $\hat{g}_c$ by $1.5$ dB bounded by $g_0 \leq g_{-1}$ . + +Finally, the gain is updated with the value of the smoothed gain as follows + +$$\hat{g}_c = S_m g_0 + (1 - S_m) \hat{g}_c, \quad (65)$$ + +7. **Pitch enhancer:** A pitch enhancer procedure modifies the total excitation $u(n)$ by filtering the fixed codebook excitation through an innovation filter whose frequency response emphasizes the higher frequencies more than lower frequencies, and whose coefficients are related to the periodicity in the signal. A filter of the form + +$$F_{inno}(z) = -c_{pe}z + 1 - c_{pe}z^{-1}, \quad (66)$$ + +where $c_{pe}=0.125(1+r_v)$ , with $r_v=(E_v-E_c)/(E_v+E_c)$ as described above. The filtered fixed codevector is given by + +$$c'(n) = c(n) - c_{pe}(c(n+1) + c(n-1)). \quad (67)$$ + +and the updated excitation is given by + +$$u(n) = \hat{g}_p v(n) + \hat{g}_c c'(n). \quad (68)$$ + +The above procedure can be done in one step by updating the excitation as follows + +$$u(n) = u(n) - \hat{g}_c c_{pe}(c(n+1) + c(n-1)). \quad (69)$$ + +8. **Post-processing of excitation elements (6.60 and 8.85 kbit/s modes):** A post-processing of excitation elements procedure is applied to the total excitation $u(n)$ by emphasizing the contribution of the adaptive codebook vector: + +$$\hat{u}(n) = \begin{cases} u(n) + 0.25\beta\hat{g}_p v(n), & \hat{g}_p > 0.5 \\ u(n), & \hat{g}_p \leq 0.5 \end{cases} \quad (70)$$ + +Adaptive gain control (AGC) is used to compensate for the gain difference between the non-emphasized excitation $u(n)$ and emphasized excitation $\hat{u}(n)$ . The gain scaling factor $\eta$ for the emphasized excitation is computed by: + +$$\eta = \begin{cases} \sqrt{\frac{\sum_{n=0}^{63} u^2(n)}{\sum_{n=0}^{63} \hat{u}^2(n)}}, & \hat{g}_p > 0.5, \\ 1.0, & \hat{g}_p \leq 0.5. \end{cases} \quad (71)$$ + +The gain-scaled emphasized excitation signal $\hat{u}'(n)$ is given by: + +$$\hat{u}'(n) = \hat{u}(n)\eta. \quad (72)$$ + +The reconstructed speech for the subframe of size 64 is given by + +$$\hat{s}(n) = \hat{u}(n) - \sum_{i=1}^{16} \hat{a}_i \hat{s}(n-i), \quad n = 0, \dots, 63. \quad (73)$$ + +where $\hat{a}_i$ are the interpolated LP filter coefficients. + +The synthesis speech $\hat{s}(n)$ is then passed through an adaptive postprocessing which is described in the following section. + +## 6.2 High-pass filtering, up-scaling and interpolation + +The high-pass filter serves as a precaution against undesired low frequency components. The signal is filtered through the high-pass filter $H_{h1}(z)$ and de-emphasis filter $H_{de\_emph}(z)$ . + +Finally, the signal is upsampled to 16 kHz to obtain the lower band synthesis signal $\hat{s}_{16k}(n)$ . $\hat{s}_{16k}(n)$ is produced by first upsampling the lower band synthesis $\hat{s}_{12.8k}(n)$ at 12.8 kHz by 5, then filtering the output through $H_{decim}(z)$ , and finally downsampling it by 4. + +(Up-scaling consists of multiplying the output from the high-pass filtering by a factor of 2 in order to compensate the down-scaling at the pre-processing stage.) + +## 6.3 High frequency band + +For the higher frequency band (6.4 – 7.0 kHz), excitation is generated to model the highest frequencies. The high frequency content is generated by filling the upper part of the spectrum with a white noise properly scaled in the excitation domain, then converted to the speech domain by shaping it with a filter derived from the same LP synthesis filter used for synthesizing the down-sampled signal. + +### 6.3.1 Generation of high-band excitation + +The high-band excitation is obtained by first generating white noise $u_{HB1}(n)$ . The power of the high-band excitation is set equal to the power of the lower band excitation $u_2(n)$ which means that + +$$u_{HB2}(n) = u_{HB1}(n) \sqrt{\frac{\sum_{k=0}^{63} u_2^2(k)}{\sum_{k=0}^{63} u_{HB1}^2(k)}}. \quad (74)$$ + +Finally the high-band excitation is found by + +$$u_{HB}(n) = \hat{g}_{HB} u_{HB2}(n), \quad (75)$$ + +where $\hat{g}_{HB}$ is a gain factor. + +In the 23.85 kbit/s mode, $\hat{g}_{HB}$ is decoded from the received gain index. + +In 6.60, 8.85, 12.65, 14.25, 15.85, 18.25, 19.85 and 23.05 kbit/s modes, $g_{HB}$ is estimated using voicing information bounded by [0.1, 1.0]. First, tilt of synthesis $e_{tilt}$ is found + +$$e_{tilt} = \sum_{n=1}^{63} \hat{s}_{hp}(n) \hat{s}_{hp}(n-1) / \sum_{n=0}^{63} \hat{s}_{hp}^2(n) \quad (76)$$ + +where $\hat{s}_{hp}(n)$ is high-pass filtered lower band speech synthesis $\hat{s}_{12.8k}(n)$ with cut-off frequency of 400 Hz. The $\hat{g}_{HB}$ is then found by + +$$g_{HB} = w_{SP} g_{SP} + (1 - w_{SP}) g_{BG}, \quad (77)$$ + +where $g_{SP} = 1 - e_{tilt}$ is gain for speech signal, $g_{BG} = 1.25 g_{SP}$ is gain for background noise signal, and $w_{SP}$ is a weighting function set to 1, when VAD is ON, and 0 when VAD is OFF. $g_{HB}$ is bounded between [0.1, 1.0]. In case of voiced segments where less energy is present at high frequencies, $e_{tilt}$ approaches 1 resulting in a lower gain $g_{HB}$ . This reduces the energy of the generated noise in case of voiced segments. + +### 6.3.2 LP filter for the high frequency band + +#### 6.3.2.1 6.60 kbit/s mode + +The high-band LP synthesis filter $A_{HB}(z)$ is found by extrapolating the quantized ISF vector $\mathbf{f}$ into 20th order ISF vector $\mathbf{f}_e$ . First, maximum of the autocorrelation $C_{max}(i)$ of ISF vector difference vector $f_{\Delta}(i) = f(i+1) - f(i), i = 1, \dots, 14$ is obtained. Then new 16kHz ISF vector $f'_e(i)$ is computed by + +$$f'_e(i) = \begin{cases} f(i-1), & i = 1, \dots, 15 \\ f'_e(i-1) + f'_e(i - C_{max}(i) - 1) - f'_e(i - C_{max}(i) - 2), & i = 16, \dots, 19 \end{cases} \quad (78)$$ + +An approximation of the last element of new ISF vector $f'_{e19}$ is updated based on lower frequency coefficients. New extrapolated ISF vector difference vector $f'_{e\Delta}(i)$ is + +$$f'_{e\Delta}(i) = c_{scale} (f'_e(i) - f'_e(i-1)), i = 16, \dots, 19, \quad (79)$$ + +where $c_{scale}$ scales $f'_{e\Delta}(i)$ so that $f_e(19)$ will be equal to $f_{e19}$ . In order to insure stability, $f'_{e\Delta}(i)$ is bounded by + +$$f'_{e\Delta}(i) + f'_{e\Delta}(i-1) > 500, i = 17, \dots, 19. \quad (80)$$ + +Finally, the extrapolated ISF vector $\mathbf{f}_e$ is obtained by + +$$f_e(i) = \begin{cases} f(i), & i = 1, \dots, 15 \\ f'_{e\Delta}(i) + f_e(i-1), & i = 16, \dots, 19 \\ f(16), & i = 20 \end{cases} \quad (81)$$ + +$\mathbf{f}_e$ is converted to cosine domain to obtain $\mathbf{q}_e$ with 16000 Hz sampling rate. The high-band LP synthesis filter $A_{HB}(z)$ is obtained by converting $\mathbf{q}_e$ to LP filter as described in 5.2.4 with $m=20$ . + +#### 6.3.2.2 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05 or 23.85 kbit/s modes + +The high-band LP synthesis filter $A_{HB}(z)$ is weighted low-band LP synthesis filter + +$$A_{HB}(z) = \hat{A}(z/0.8), \quad (82)$$ + +where $\hat{A}(z)$ is the interpolated LP synthesis filter. $\hat{A}(z)$ has been computed analysing signal with the sampling rate of 12.8 kHz but it is now used for a 16 kHz signal. Effectively, this means that the frequency response $FR_{16}(f)$ of $A_{HB}(z)$ is obtained by + +$$FR_{16}(f) = FR_{12.8}\left(\frac{12.8}{16} f\right), \quad (83)$$ + +where $FR_{12.8}(f)$ is the frequency response of $A(z)$ . This means that the band 5.1 – 5.6 kHz in 12.8 kHz domain will be mapped to 6.4 – 7.0 kHz in 16 kHz domain. + +### 6.3.3 High band synthesis + +$u_{HB}(n)$ is filtered through $A_{HB}(z)$ . The output of this high-band synthesis $s_{HB}(n)$ is filtered through a band-pass FIR filter $H_{HB}(z)$ which has the passband from 6 to 7 kHz. Finally, $s_{HB}$ is added to synthesized speech $\hat{s}_{16k}(n)$ to produce the synthesized output speech signal $\hat{s}_{output}(n)$ . + +# 7 Detailed bit allocation of the adaptive multi-rate wideband codec + +The detailed allocation of the bits in the adaptive multi-rate wideband speech encoder is shown for each mode in table 12a-12i. These tables show the order of the bits produced by the speech encoder. Note that the most significant bit (MSB) of each codec parameter is always sent first. + +**Table 12a: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 477 bits/20 ms, 23.85 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 – s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s68 | Codebook Index1 for track 1 | +| s69 – s79 | Codebook Index1 for track 2 | +| s80 – s90 | Codebook Index1 for track 3 | +| s91 – s101 | Codebook Index1 for track 4 | +| s102 – s112 | Codebook Index2 for track 1 | +| s113 – s123 | Codebook Index2 for track 2 | +| s124 – s134 | Codebook Index2 for track 3 | +| s135 – s145 | Codebook Index2 for track 4 | +| s146 – s152 | codebook gains | +| s153 – s156 | High-band energy | +| subframe 2 | | +| s157 – s162 | adaptive codebook index (relative) | +| s163 – s262 | same description as s57 – s156 | +| subframe 3 | | +| s263 – s371 | same description as s48 – s156 | +| subframe 4 | | +| s372 – s477 | same description as s157 – s262 | + +**Table 12b: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 461 bits/20 ms, 23.05 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 – s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s68 | Codebook Index1 for track 1 | +| s69 – s79 | Codebook Index1 for track 2 | +| s80 – s90 | Codebook Index1 for track 3 | +| s91-s101 | Codebook Index1 for track 4 | +| s102-s112 | Codebook Index2 for track 1 | +| s113-s123 | Codebook Index2 for track 2 | +| s124 – s134 | Codebook Index2 for track 3 | +| s135 – s145 | Codebook Index2 for track 4 | +| s146 – s152 | codebook gains | +| subframe 2 | | +| s153 – s158 | adaptive codebook index (relative) | +| s159 – s254 | same description as s57 – s152 | +| subframe 3 | | +| s255 – s359 | same description as s48 – s152 | +| subframe 4 | | +| s360 – s461 | same description as s153 – s254 | + +**Table 12c: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 397 bits/20 ms, 19.85 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 – s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s67 | Codebook Index1 for track 1 | +| s68 – s77 | Codebook Index1 for track 2 | +| s78 – s79 | Pulse Selector for track 3 | +| s80 – s81 | Pulse Selector for track 4 | +| s82 – s91 | Codebook index2 for track 1 | +| s92 – s101 | Codebook index2 for track 2 | +| s102 – s115 | Codebook index for track 3 | +| s116 – s129 | Codebook index for track 4 | +| s130 – s136 | VQ gain | +| subframe 2 | | +| s137 – s142 | adaptive codebook index (relative) | +| s143 – s222 | same description as s57 – s136 | +| subframe 3 | | +| s223 – s311 | same description as s48 – s136 | +| subframe 4 | | +| s312 – s397 | same description as s137 – s222 | + +**Table 12d: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 365 bits/20 ms, 18.25 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 - s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s59 | Pulse Selector for track 1 | +| s60 – s61 | Pulse Selector for track 2 | +| s62 – s63 | Pulse Selector for track 3 | +| s64 – s65 | Pulse Selector for track 4 | +| s66 – s79 | Codebook index for track 1 | +| s80 – s93 | Codebook index for track 2 | +| s94 – s107 | Codebook index for track 3 | +| s108 – s121 | Codebook index for track 4 | +| s122 – s128 | VQ gain | +| subframe 2 | | +| s129 – s134 | adaptive codebook index (relative) | +| s135 – s206 | same description as s57 – s128 | +| subframe 3 | | +| s207 – s287 | same description as s48 – s128 | +| subframe 4 | | +| s288 – s365 | same description as s129 – s206 | + +**Table 12e: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 317 bits/20 ms, 15.85 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 - s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s70 | Codebook index for track 1 | +| s71 – s83 | Codebook index for track 2 | +| s84 – s96 | Codebook index for track 3 | +| s97 – s109 | Codebook index for track 4 | +| s110 – s116 | VQ gain | +| subframe 2 | | +| s117 – s122 | adaptive codebook index (relative) | +| s123 – s182 | same description as s57 – s116 | +| subframe 3 | | +| s183 – s251 | same description as s48 – s116 | +| subframe 4 | | +| s252 – s317 | same description as s117 – s182 | + +**Table 12f: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 285 bits/20 ms, 14.25 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 - s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s70 | Codebook index for track 1 | +| s71 – s83 | Codebook index for track 2 | +| s84 – s92 | Codebook index for track 3 | +| s93 – s101 | Codebook index for track 4 | +| s102 – s108 | VQ gain | +| subframe 2 | | +| s109 – s114 | adaptive codebook index (relative) | +| s115 – s166 | same description as s57 – s108 | +| subframe 3 | | +| s167 – s227 | same description as s48 – s108 | +| subframe 4 | | +| s228 – s285 | same description as s109 – s166 | + +**Table 12g: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 253 bits/20 ms, 12.65 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 - s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s56 | adaptive codebook index | +| s57 | LTP-filtering-flag | +| s58 – s66 | Codebook index for track 1 | +| s67 – s75 | Codebook index for track 2 | +| s76 – s84 | Codebook index for track 3 | +| s85 – s93 | Codebook index for track 4 | +| s94 – s100 | VQ gain | +| subframe 2 | | +| s101 – s106 | adaptive codebook index (relative) | +| s107 – s150 | same description as s57 – s100 | +| subframe 3 | | +| s151 – s203 | same description as s48 – s100 | +| subframe 4 | | +| s204 – s253 | same description as s101 – s150 | + +**Table 12h: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 177 bits/20 ms, 8.85 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 - s23 | index of 3rd ISP subvector | +| s24 – s30 | index of 4th ISP subvector | +| s31 – s37 | index of 5th ISP subvector | +| s38 – s42 | index of 6th ISP subvector | +| s43 – s47 | index of 7th ISP subvector | +| subframe 1 | | +| s48 – s55 | adaptive codebook index | +| s56 – s60 | Codebook index for track 1 | +| s61 – s65 | Codebook index for track 2 | +| s66 – s70 | Codebook index for track 3 | +| s71 - s75 | Codebook index for track 4 | +| s76 – s81 | VQ gain | +| subframe 2 | | +| s82 – s86 | adaptive codebook index (relative) | +| s87 – s112 | same description as s56 – s81 | +| subframe 3 | | +| s113 – s146 | same description as s48 – s81 | +| subframe 4 | | +| s147 – s177 | same description as s82 – s112 | + +**Table 12i: Source encoder output parameters in order of occurrence and bit allocation within the speech frame of 132 bits/20 ms, 6.60 kbit/s mode** + +| Bits (MSB-LSB) | Description | +|----------------|------------------------------------| +| s1 | VAD-flag | +| s2 – s9 | index of 1st ISP subvector | +| s10 – s17 | index of 2nd ISP subvector | +| s18 – s24 | index of 3rd ISP subvector | +| s25 – s31 | index of 4th ISP subvector | +| s32 – s37 | index of 5th ISP subvector | +| subframe 1 | | +| s38 – s45 | adaptive codebook index | +| s46 - 57 | Codebook Index | +| s58 – s63 | VQ gain | +| subframe 2 | | +| s64 – s68 | adaptive codebook index (relative) | +| s69 – s86 | same description as s46 – s63 | +| subframe 3 | | +| s87 – s109 | same description as s64 – s86 | +| subframe 4 | | +| s110 – s132 | same description as s64 – s86 | + +# 8 Homing sequences + +## 8.1 Functional description + +The adaptive multi-rate wideband speech codec is described in a bit-exact arithmetic to allow easy type approval as well as general testing of correct operation of the adaptive multi-rate wideband speech codec. + +The response of the codec to a predefined input sequence can only be foreseen if the internal state variables of the codec are in a predefined state at the beginning of the experiment. Therefore, the codec has to be put in a so called home state before a bit-exact test can be performed. This is usually done by a reset (a procedure in which the internal state + +variables of the codec are set to their defined initial values). The codec mode of the speech encoder and speech decoder shall be set to the tested codec mode by external means at reset. + +To allow a reset of the codec in remote locations, special homing frames have been defined for the encoder and the decoder, thus enabling a codec homing by inband signalling. + +The codec homing procedure is defined in such a way, that in either direction (encoder or decoder) the homing functions are called after the processing of the homing frame. The output corresponding to the first homing frame is therefore dependent on the used codec mode and the codec state when receiving that frame and hence usually not known. The response of the encoder to any further homing frame is by definition the corresponding decoder homing frame for the used codec mode. The response of the decoder to any further homing frame is by definition the encoder homing frame. This procedure allows homing of both the encoder and decoder from either side, if a loop back configuration is implemented, taking proper framing into account. + +## 8.2 Definitions + +**Encoder homing frame:** The encoder homing frame consists of 320 identical samples, each 13 bits long, with the least significant bit set to "one" and all other bits set to "zero". When written to 16-bit words with left justification, the samples have a value of 0008 hex. The speech decoder has to produce this frame as a response to the second and any further decoder homing frame if at least two decoder homing frames were input to the decoder consecutively. The encoder homing frame is identical for all codec modes. + +**Decoder homing frame:** There exist nine different decoder homing frames, which correspond to the nine AMR-WB codec modes. Using one of these codec modes, the corresponding decoder homing frame is the natural response of the speech encoder to the second and any further encoder homing frame if at least two encoder homing frames were input to the encoder consecutively. In [4], for each decoder homing frame the parameter values are given. + +## 8.3 Encoder homing + +Whenever the adaptive multi-rate wideband speech encoder receives at its input an encoder homing frame exactly aligned with its internal speech frame segmentation, the following events take place: + +- Step 1: The speech encoder performs its normal operation including VAD and SCR and produces in accordance with the used codec mode a speech parameter frame at its output which is in general unknown. But if the speech encoder was in its home state at the beginning of that frame, then the resulting speech parameter frame is identical to that decoder homing frame, which corresponds to the used codec mode (this is the way how the decoder homing frames were constructed). +- Step 2: After successful termination of that operation the speech encoder provokes the homing functions for all sub-modules including VAD and SCR and sets all state variables into their home state. On the reception of the next input frame, the speech encoder will start from its home state. + +NOTE: Applying a sequence of N encoder homing frames will cause at least N-1 decoder homing frames at the output of the speech encoder. + +## 8.4 Decoder homing + +Whenever the speech decoder receives at its input a decoder homing frame, which corresponds to the used codec mode, then the following events take place: + +- Step 1: The speech decoder performs its normal operation and produces a speech frame at its output which is in general unknown. But if the speech decoder was in its home state at the beginning of that frame, then the resulting speech frame is replaced by the encoder homing frame. This would not naturally be the case but is forced by this definition here. +- Step 2: After successful termination of that operation the speech decoder provokes the homing functions for all sub-modules including the comfort noise generator and sets all state variables into their home state. On the reception of the next input frame, the speech decoder will start from its home state. + +NOTE 1: Applying a sequence of N decoder homing frames will cause at least N-1 encoder homing frames at the output of the speech decoder. + +NOTE 2: By definition (!) the first frame of each decoder test sequence must differ from the decoder homing frame at least in one bit position within the parameters for LPC and first subframe. Therefore, if the decoder is in its home state, it is sufficient to check only these parameters to detect a subsequent decoder homing frame. This definition is made to support a delay-optimized implementation in the TRAU uplink direction. + +![Simplified block diagram of the CELP synthesis model. It shows an adaptive codebook and a fixed codebook being scaled by gains g_p and g_c respectively, then summed to produce u(n). This signal is passed through an LP synthesis filter 1/A(z) to produce the output s_hat(n), which is then processed by post-processing.](7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg) + +adaptive codebook + $g_p$ + $v(n)$ +fixed codebook + $g_c$ + $c(n)$ + $u(n)$ + $\frac{1}{A(z)}$ +LP synthesis + $\hat{s}(n)$ +post-processing + +Simplified block diagram of the CELP synthesis model. It shows an adaptive codebook and a fixed codebook being scaled by gains g\_p and g\_c respectively, then summed to produce u(n). This signal is passed through an LP synthesis filter 1/A(z) to produce the output s\_hat(n), which is then processed by post-processing. + +Figure 1 Simplified block diagram of the CELP synthesis model + +![Detailed block diagram of the ACELP encoder. The speech input is processed through down-sampling and HP filtering, then pre-emphasis to produce s(n). The signal is split into two bands: Lower band and Higher band. The Lower band path involves windowing & autocorrelation, Levinson-Durbin, and ISF quantization. The Higher band path involves computing HB gain. Both bands feed into a common processing block that includes interpolation, weighted speech computation, open-loop pitch finding, adaptive codebook contribution, impulse response computation, innovation target computation, innovation finding, excitation computation, gain vector quantization, and filter memory updates.](0f26e70157bd4c45f825795cdcd20fbd_img.jpg) + +speech input +down-sample & HP filter +pre-emphasis + $s(n)$ +windowing & autocorrelation +interpolation for 4 subframes +Levinson-Durbin +compute weighted speech + $A(z)$ +ISP +find open-loop pitch +ISP +ISF +ISF index +ISF quantization + $A(z)$ +interpolation for 4 subframes + $A(z)$ +compute target for adaptive codebook + $x(n)$ +pitch index +find best delay and gain +compute adaptive codebook contribution +filt index +select adaptive codebook filter +compute impulse response +compute target for innovation + $x_2(n)$ +code index +find best innovation + $h(n)$ +update filter memories for next subframe +compute excitation +gain vector quantization +gain VQ index +Lower band +Higher band +compute HB gain (23.85 kbit/s mode) +HB gain index + +Detailed block diagram of the ACELP encoder. The speech input is processed through down-sampling and HP filtering, then pre-emphasis to produce s(n). The signal is split into two bands: Lower band and Higher band. The Lower band path involves windowing & autocorrelation, Levinson-Durbin, and ISF quantization. The Higher band path involves computing HB gain. Both bands feed into a common processing block that includes interpolation, weighted speech computation, open-loop pitch finding, adaptive codebook contribution, impulse response computation, innovation target computation, innovation finding, excitation computation, gain vector quantization, and filter memory updates. + +Figure 2 Detailed block diagram of the ACELP encoder + +![Detailed block diagram of the ACELP decoder. The diagram is split into 'Lower band' and 'Higher band' by a dashed line. In the lower band, inputs include 'ISF index', 'pitch index', 'gain VQ index', and 'code index'. 'ISF index' goes to 'decode ISP', which outputs 'ISP' and 'A(z)'. 'pitch index' goes to 'decode adaptive codebook', which outputs to 'LTP filter'. 'gain VQ index' goes to 'decode gains', which outputs to 'construct excitation'. 'code index' goes to 'decode innovative codebook', which also outputs to 'construct excitation'. 'LTP filter' receives 'filtering index' and outputs to 'construct excitation'. 'construct excitation' outputs to 'post-processing', which then goes to 'synthesis filter'. 'synthesis filter' outputs 's_hat(n)'. 's_hat(n)' goes to 'de-emphasis', then 'up-sample', and finally to a summation node '+'. In the higher band, '16 kHz random excitation' goes to 'gain scaling', which also receives 'VAD flag' and 'HB gain index'. 'gain scaling' outputs to 'HB-synthesis filter', which then goes to 'BP filter'. The outputs from 'up-sample' and 'BP filter' are summed at the '+' node to produce the final 'speech output'. A label '(6.60 kbit/s mode)' is present near the synthesis filter.](8d66c9c295023a1380f9986d3663bb1e_img.jpg) + +Detailed block diagram of the ACELP decoder. The diagram is split into 'Lower band' and 'Higher band' by a dashed line. In the lower band, inputs include 'ISF index', 'pitch index', 'gain VQ index', and 'code index'. 'ISF index' goes to 'decode ISP', which outputs 'ISP' and 'A(z)'. 'pitch index' goes to 'decode adaptive codebook', which outputs to 'LTP filter'. 'gain VQ index' goes to 'decode gains', which outputs to 'construct excitation'. 'code index' goes to 'decode innovative codebook', which also outputs to 'construct excitation'. 'LTP filter' receives 'filtering index' and outputs to 'construct excitation'. 'construct excitation' outputs to 'post-processing', which then goes to 'synthesis filter'. 'synthesis filter' outputs 's\_hat(n)'. 's\_hat(n)' goes to 'de-emphasis', then 'up-sample', and finally to a summation node '+'. In the higher band, '16 kHz random excitation' goes to 'gain scaling', which also receives 'VAD flag' and 'HB gain index'. 'gain scaling' outputs to 'HB-synthesis filter', which then goes to 'BP filter'. The outputs from 'up-sample' and 'BP filter' are summed at the '+' node to produce the final 'speech output'. A label '(6.60 kbit/s mode)' is present near the synthesis filter. + +Figure 3 Detailed block diagram of the ACELP decoder + +# 9 Bibliography + +- 1) M.R. Schroeder and B.S. Atal, "Code-Excited Linear Prediction (CELP): High quality speech at very low bit rates," in *Proc. ICASSP'85*, pp. 937-940, 1985. +- 2) L.R. Rabiner and R.W. Schaefer. *Digital processing of speech signals*. Prentice-Hall Int., 1978. +- 3) F. Itakura, "Line spectral representation of linear predictive coefficients of speech signals," *J. Acoust. Soc. Amer.*, vol. 57, Supplement no. 1, S35, 1975. +- 4) Y. Bistritz and S. Pellerm, "Immittance Spectral Pairs (ISP) for speech encoding," in *Proc. ICASSP'93*, pp. II-9 - II-12. +- 5) K.K Paliwal and B.S. Atal, "Efficient vector quantization of LPC parameters at 24 bits/frame", *IEEE Trans. Speech and Audio Processing*, vol. 1, no 1, pp. 3-14, 1993. +- 6) P. Kabal and R.P. Ramachandran, "The computation of line spectral frequencies using Chebyshev polynomials", *IEEE Trans. on ASSP*, vol. 34, no. 6, pp. 1419-1426, Dec. 1986. +- 7) K. Järvinen, J. Vainio, P. Kapanen, T. Honkanen, P. Haavisto, R. Salami, C. Laflamme, and J.-P. Adoul, "GSM enhanced full rate speech codec", in *Proc. ICASSP'97*, pp. 771-774. +- 8) T. Honkanen, J. Vainio, K. Järvinen, P. Haavisto, R. Salami, C. Laflamme, and J.-P. Adoul, "Enhanced full rate speech codec for IS-136 digital cellular system", in *Proc. ICASSP'97*, pp. 731-734. +- 9) R. Hagen, E. Ekudden, B. Johansson, and W.B. Kleijn, "Removal of sparse-excitation artifacts in CELP", in *Proc. ICASSP'98*, pp. I-145-I-148. + +# Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|---------|-----------|-----|-----|-----------------------------------------------|--------|--------| +| Date | TSG SA# | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 03-2001 | 11 | SP-010085 | | | Version 2.0.0 provided for approval | | 5.0.0 | +| 12-2001 | 14 | SP-010701 | 001 | | Inconsistency between TS 26.190 and TS 26.173 | 5.0.0 | 5.1.0 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.1.0 | 6.0.0 | +| 06-2005 | 28 | SP-050247 | 002 | | Correction to text and some equations | 6.0.0 | 6.1.0 | +| 07-2005 | | | | | Make equation in clause 5.9 visible. | 6.1.0 | 6.1.1 | +| 06-2007 | 36 | | | | Version for Release 7 | 6.1.1 | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26191/d793cf7c174b89eb024d132f00679787_img.jpg b/marked/Rel-11/26_series/26191/d793cf7c174b89eb024d132f00679787_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cd29d7fc9be3e59634d423d910ce21d77d69d68d --- /dev/null +++ b/marked/Rel-11/26_series/26191/d793cf7c174b89eb024d132f00679787_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81221aacf31ccc74daf0e631072c5412acd7d16cbf08d8a341ae3d9a8664225a +size 73117 diff --git a/marked/Rel-11/26_series/26191/raw.md b/marked/Rel-11/26_series/26191/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..5c7de5de068d228285c33bab03fa7fcb86bab1a2 --- /dev/null +++ b/marked/Rel-11/26_series/26191/raw.md @@ -0,0 +1,367 @@ + + + + + + +# Contents + +| | | +|------------------------------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 Normative references ..... | 5 | +| 3 Definitions and abbreviations ..... | 5 | +| 3.1 Definitions..... | 5 | +| 3.2 Abbreviations ..... | 5 | +| 4 General ..... | 6 | +| 5 Requirements ..... | 6 | +| 5.1 Error detection ..... | 6 | +| 5.2 Erroneous or lost speech frames..... | 6 | +| 5.3 First lost SID frame ..... | 6 | +| 5.4 Subsequent lost SID frames ..... | 6 | +| 6 Example ECU/BFH Solution ..... | 6 | +| 6.1 State Machine..... | 6 | +| 6.2 Substitution and muting of erroneous/lost speech frames..... | 8 | +| 6.2.1 BFI = 0, prevBFI = 0, State = 0 or 1 ..... | 8 | +| 6.2.2 BFI = 0, prevBFI = 1, State = 0 to 3..... | 9 | +| 6.2.3 BFI = 1, prevBFI = 0 or 1, State = 1...6 ..... | 9 | +| 6.2.3.1 LTP gain & fixed codebook gain concealment when RX_FRAMETYPE = SPEECH_BAD ..... | 9 | +| 6.2.3.2 LTP gain & fixed codebook gain concealment when RX_FRAMETYPE = SPEECH_LOST ..... | 10 | +| 6.2.3.3 ISF concealment ..... | 10 | +| 6.2.3.4 LTP-lag concealment ..... | 11 | +| 6.2.3.4.1 LTP-lag concealment when RX_FRAMETYPE = SPEECH_BAD..... | 11 | +| 6.2.3.4.2 LTP-lag concealment when RX_FRAMETYPE = SPEECH_LOST ..... | 12 | +| 6.2.4 Innovation sequence ..... | 12 | +| 6.2.5 High-band gain (for 23.85 kbit/s mode) ..... | 12 | +| 6.3 Substitution and muting of lost SID frames ..... | 13 | +| Annex A (informative): Change history..... | 14 | + +# --- Foreword + +This Technical Specification has been produced by the 3GPP. + +The present document defines an error concealment procedure, also termed frame substitution and muting procedure, of the wideband telephony speech service employing the Adaptive Multi-Rate – Wideband (AMR-WB) speech coder within the 3GPP system. + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of this TS, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 Indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +# --- 1 Scope + +This specification defines an error concealment procedure, also termed frame substitution and muting procedure, which shall be used by the AMR-WB speech codec receiving end when one or more erroneous/lost speech or lost Silence Descriptor (SID) frames are received. + +The requirements of this document are mandatory for implementation in all networks and User Equipment (UE)s capable of supporting the AMR-WB speech codec. It is not mandatory to follow the bit exact implementation outlined in this document and the corresponding C source code. + +# --- 2 Normative references + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TS 26.202"AMR Wideband Speech Codec; Interface to RAN". +- [2] 3GPP TS 26.190"AMR Wideband Speech Codec; Transcoding functions". +- [3] 3GPP TS 26.193"AMR Wideband Speech Codec; Source Controlled Rate operation". +- [4] 3GPP TS 26.201"AMR Wideband Speech Codec; Frame structure". + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +For the purposes of this document, the following definition applies: + +**N-point median operation:** Consists of sorting the N elements belonging to the set for which the median operation is to be performed in an ascending order according to their values, and selecting the $(\text{int}(N/2) + 1)$ -th largest value of the sorted set as the median value. + +Further definitions of terms used in this document can be found in the references. + +## 3.2 Abbreviations + +For the purposes of this document, the following abbreviations apply: + +| | | +|----------|----------------------------------------------------------------| +| AMR-WB | Adaptive Multi Rate - WideBand | +| AN | Access Network | +| BFI | Bad Frame Indication from AN | +| BSI_netw | Bad Sub-block Indication obtained from AN interface CRC checks | +| prevBFI | Bad Frame Indication of previous frame | +| RX | Receive | +| SCR | Source Controlled Rate (operation) | +| SID | Silence Descriptor frame (Background noise) | +| CRC | Cyclic Redundancy Check | +| ECU | Error Concealment Unit | +| BFH | Bad Frame Handling | +| medianN | N-point median operation | + +# --- 4 General + +The purpose of the error concealment procedure is to conceal the effect of erroneous/lost AMR-WB speech frames. The purpose of muting the output in the case of several erroneous/lost frames is to indicate the breakdown of the channel to the user and to avoid generating possible annoying sounds as a result from the error concealment procedure. + +The network shall indicate erroneous/lost speech or lost SID frames by setting the RX\_TYPE values [3] to SPEECH\_BAD, SID\_BAD or SPEECH\_LOST. If these flags are set, the speech decoder shall perform parameter substitution to conceal errors. + +The example solution provided in paragraph 6 apply only to bad frame handling on a complete speech frame basis. Sub-frame based error concealment may be derived using similar methods. + +# --- 5 Requirements + +## 5.1 Error detection + +If the most sensitive bits of the AMR-WB speech data (class A in [4]) are received in error, the network shall indicate RX\_TYPE = SPEECH\_BAD in which case the BFI flag is set. When the frame is not received, the network shall indicate RX\_TYPE = RX\_SPEECH\_LOST in which case the BFI flag is set as well. If a SID frame is received in error, the network shall indicate RX\_TYPE = SID\_BAD.. + +## 5.2 Erroneous or lost speech frames + +Normal decoding of erroneous/lost speech frames would result in very unpleasant noise effects. In order to improve the subjective quality, erroneous/lost speech frames shall be substituted with either a repetition or an extrapolation of the previous good speech frame(s). This substitution is done so that it gradually will decrease the output level, resulting in silence at the output. Subclause 6 provides example solution. + +## 5.3 First lost SID frame + +A lost SID frame shall be substituted by using the SID information from earlier received valid SID frames and the procedure for valid SID frames be applied as described in [3]. + +## 5.4 Subsequent lost SID frames + +For many subsequent lost SID frames, a muting technique shall be applied to the comfort noise that will gradually decrease the output level. For subsequent lost SID frames, the muting of the output shall be maintained. Subclause 6 provides example solutions. + +# --- 6 Example ECU/BFH Solution + +## 6.1 State Machine + +This example solution for substitution and muting is based on a state machine with seven states (Figure 1). + +The system starts in state 0. Each time a bad frame is detected, the state counter is incremented by one and is saturated when it reaches 6. Each time a good speech frame is detected, the state counter is right-shifted by one. The state indicates the quality of the channel: the larger the value of the state counter, the worse the channel quality is. The control flow of the state machine can be described by the following C code (**BFI** = bad frame indicator, **State** = state variable): + +``` +if(BFI != 0 ) + State = State + 1; + if(State > 6) + State = 6; +else + State = State >> 1; +``` + +In addition to this state machine, the **Bad Frame Flag** from the previous frame is checked (**prevBFI**). The processing depends on the value of the **State**-variable. In states 0 and 6, the processing depends on the **BFI** flag. + +The procedure can be described as follows: + +![State machine diagram for controlling bad frame substitution. It consists of seven states (STATE 0 to STATE 6) arranged vertically. Transitions are labeled as 'Bad frame (BFI=1)' (solid line) or 'Good frame (BFI=0)' (double line).](d793cf7c174b89eb024d132f00679787_img.jpg) + +``` +graph TD; S0[STATE = 0
BFI = 0
PrevBFI = 0 or 1] --> S1[STATE = 1
(BFI, prevBFI) = (1,0) or (0,1) or (0,0)]; S1 --> S2[STATE = 2
(BFI, prevBFI) = (1,1) or (1,0) or (0,1)]; S2 --> S3[STATE = 3
(BFI, prevBFI) = (1,1) or (1,0) or (0,1)]; S3 --> S4[STATE = 4
BFI = 1
prevBFI = 0 or 1]; S4 --> S5[STATE = 5
BFI = 1
prevBFI = 1]; S5 --> S6[STATE = 6
BFI = 1
prevBFI = 1]; S6 --> S0; S1 --> S0; S2 --> S1; S3 --> S2; S4 --> S1; S5 --> S2; S6 --> S3; +``` + +Legend: + +- Bad frame (BFI=1) +- ⇒ Good frame (BFI=0) + +State machine diagram for controlling bad frame substitution. It consists of seven states (STATE 0 to STATE 6) arranged vertically. Transitions are labeled as 'Bad frame (BFI=1)' (solid line) or 'Good frame (BFI=0)' (double line). + +Figure 1: State machine for controlling the bad frame substitution + +## 6.2 Substitution and muting of erroneous/lost speech frames + +### 6.2.1 BFI = 0, prevBFI = 0, State = 0 or 1 + +No error is detected in the received or in the previous received speech frame. The received speech parameters are used normally in the speech synthesis. The current frame of speech parameters is saved. + +### 6.2.2 BFI = 0, prevBFI = 1, State = 0 to 3 + +No error is detected in the received speech frame but the previous received speech frame was bad. The LTP gain is used normally in the speech synthesis and fixed codebook gain are limited below the values used for the last received good subframe: + +$$g^c(n) = \{g_{\text{received}}^c, g_{\text{received}}^c \leq 100 \text{ or } g_{\text{received}}^c \leq g^c(n-1) \times 1.25\} \quad (1)$$ + +where + +$g_{\text{received}}^c$ = current decoded fixed codebook-gain + $g^c(n-1)$ = fixed codebook gain used for the last good subframe (BFI = 0) + $g^c(n)$ = fixed codebook gain to be used for the current frame. + +The rest of the received speech parameters are used normally in the speech synthesis. The current frame of speech parameters is saved. + +### 6.2.3 BFI = 1, prevBFI = 0 or 1, State = 1...6 + +An error is detected in the received speech frame and the substitution and muting procedure is started. + +#### 6.2.3.1 LTP gain & fixed codebook gain concealment when RX\_FRAMETYPE = SPEECH\_BAD + +The LTP gain $g^p$ and fixed codebook gain $g^c$ are replaced by attenuated values from the previous subframes: + +$$g^p = P^p(\text{state}) * \text{median5}(g^p(n-1), \dots, g^p(n-5)) \quad (2)$$ + +$$g^c = \{P^c(\text{state}) * \text{median5}(g^c(n-1), \dots, g^c(n-5)), \text{VAD\_HIST} \leq 2\} \quad (3)$$ + +where: + +$g^p$ = current decoded LTP gain, + $g^c$ = current decoded fixed codebook gain, + $g^p(n-1), \dots, g^p(n-5)$ = LTP gains used for the last 5 subframes, + $g^c(n-1), \dots, g^c(n-5)$ = fixed codebook gains used for the last 5 subframes, + $\text{median5}()$ = 5-point median operation, + $P^p(\text{state})$ = attenuation factor ( $P^p(1) = 0.98, P^p(2) = 0.96, P^p(3) = 0.75, P^p(4) = 0.23, P^p(5) = 0.05, P^p(6) = 0.01$ ), + $P^c(\text{state})$ = attenuation factor ( $P^c(1) = 0.98, P^c(2) = 0.98, P^c(3) = 0.98, P^c(4) = 0.98, P^c(5) = 0.98, P^c(6) = 0.70$ ), + $\text{state}$ = state number $\{0..6\}$ , + $\text{VAD\_HIST}$ is number of consecutive VAD=0 decisions. + +The higher the state value is, the more the gains are attenuated. Also the memory of the predictive fixed codebook gain is updated by using the average value of the past four values in the memory: + +$$\text{ener}(0) = \frac{1}{4} [\sum_{i=1}^4 \text{ener}(n-i)] - 3 \quad (4)$$ + +#### 6.2.3.2 LTP gain & fixed codebook gain concealment when RX\_FRAMETYPE = SPEECH\_LOST + +The LTP gain $g^p$ and fixed codebook gain $g^c$ are replaced by attenuated values from the previous subframes: + +$$g^p = P^p(\text{state}) * \text{median5}(g^p(n-1), \dots, g^p(n-5)) \quad (5)$$ + +$$g^c = \{P^c(\text{state}) * \text{median5}(g^c(n-1), \dots, g^c(n-5)), \text{VAD\_HIST} \leq 2\} \quad (6)$$ + +where: + +$g^p$ = current decoded LTP gain, + +$g^c$ = current decoded fixed codebook gain, + +$g^p(n-1), \dots, g^p(n-5)$ = LTP gains used for the last 5 subframes, + +$g^c(n-1), \dots, g^c(n-5)$ = fixed codebook gains used for the last 5 subframes, + +$\text{median5}()$ = 5-point median operation, + +$P^p(\text{state})$ = attenuation factor ( $P^p(1) = 0.95, P^p(2) = 0.90, P^p(3) = 0.75, P^p(4) = 0.23, P^p(5) = 0.05, P^p(6) = 0.01$ ), + +$P^c(\text{state})$ = attenuation factor ( $P^c(1) = 0.50, P^c(2) = 0.25, P^c(3) = 0.25, P^c(4) = 0.25, P^c(5) = 0.15, P^c(6) = 0.01$ ), + +$\text{state}$ = state number $\{0..6\}$ , + +$\text{VAD\_HIST}$ is number of consecutive VAD=0 decisions. + +The higher the state value is, the more the gains are attenuated. Also the memory of the predictive fixed codebook gain is updated by using the average value of the past four values in the memory: + +$$\text{ener}(0) = \frac{1}{4} [\sum_{i=1}^4 \text{ener}(n-i)] - 3 \quad (7)$$ + +#### 6.2.3.3 ISF concealment + +The past ISFs are shifted towards their partly adaptive mean: + +$$\text{ISF}_q(i) = \alpha * \text{past\_ISF}_q(i) + (1 - \alpha) * \text{ISF\_mean}(i) \quad i = 0..16 \quad (8)$$ + +where + +$\alpha = 0.9$ , + +$\text{ISF}_q(i)$ is ISF-vector for a current frame, + +$\text{past\_ISF}_q(i)$ is ISF-vector from the previous frame, + +$\text{ISF\_mean}(i)$ vector is combination of adaptive mean and constant mean ISF-vectors in the following manner: + +$$\text{ISF\_mean}(i) = \beta * \text{ISF\_const\_mean}(i) + (1 - \beta) * \text{ISF\_adaptive\_mean}(i), \quad i = 0..16 \quad (9)$$ + +where + +$\beta = 0.75$ , + +$\text{ISF\_adaptive\_mean}(i) = \frac{1}{3} \sum_{i=0}^2 \text{past\_ISF}_q(i)$ and is updated whenever BFI = 0. + +$\text{ISF\_const\_mean}(i)$ is a vector containing long time average of ISF-vectors. + +#### 6.2.3.4 LTP-lag concealment + +The histories of five last good LTP-lags and LTP-gains are used for finding the best method to update. + +##### 6.2.3.4.1 LTP-lag concealment when RX\_FRAMETYPE = SPEECH\_BAD + +The usability of the received LTP lag ( $Q_{\text{lag}}$ ) is defined as follows: (Predicts if the received lag is most probably very close to one that was sent and therefore its usage should not introduce any bad artifacts) + +$Q_{\text{lag}} =$ + +$$\{1, T_{\text{dif}} < 10 \text{ and } T_{\text{min}} - 5 < T_{\text{received}} < T_{\text{min}} + 5\} \quad \{1, g^p(n-1) > 0.5 \text{ and } g^p(n-2) > 0.5 \text{ and } T(n-1) - 10 < T_{\text{received}} < T(n-1) + 10\} \quad (10)$$ + +where: + +$T(n-1)$ is LTP lag from the previous good frame, + +$T_{\text{dif}} = |T_{\text{received}} - T(n-1)|$ , + +$T_{\min} = \min(T_{\text{buffer}}),$ + $T_{\max} = \max(T_{\text{buffer}}),$ + $T_{\text{received}}$ is received lag, + $g_{\min}^p = \min(g_{\text{buffer}}^p),$ + $g^p$ is LTP gain of the current frame, + $g^p(-1)$ is LTP gain of the previous good frame, + $g^p(-2)$ is LTP gain of the frame before previous good frame, + $T_{\text{mean}} = \text{average}(T_{\text{buffer}})$ + +LPT lag value for the current frame is defined as follows: + +$$T = \{T_{\text{received}}, Q_{\text{lag}} = 1\} \quad (11)$$ + +where: + +$T_{\max} = \max(T_{\text{buffer}}),$ + $T_{\max-1}$ is second largest value in $T_{\text{buffer}},$ + $T_{\max-2}$ is second largest value in $T_{\text{buffer}},$ + $\text{RND}(x)$ is random value generated to range $[-\frac{x}{2}, +\frac{x}{2}]$ + +##### 6.2.3.4.2 LTP-lag concealment when RX\_FRAMETYPE = SPEECH\_LOST + +The usability of the LTP lag from last good frame ( $Q_{\text{lag},t-1}$ ) is defined as follows: (Predicts if the received lag is most probably very close to one that was sent and therefore its usage should not introduce any bad artifacts) + +$$Q_{\text{lag},t-1} = \{1, g_{\min}^p > 0.5 \text{ and } T_{\text{dif}} < 10 \mid \{1, g^p(n-1) > 0.5 \text{ and } g^p(n-2) > 0.5\} \} \quad (12)$$ + +where: + +$g_{\min}^p = \min(g_{\text{buffer}}^p),$ + $g^p(n-1)$ is LTP gain of the previous good frame, + $g^p(n-2)$ is LTP gain of the frame before previous good frame + +LPT lag value for the current frame is defined as follows: + +$$T = \{T(n-1), Q_{\text{lag},t-1} = 1\} \quad (13)$$ + +where: + +$T(n-1)$ is LTP lag from the previous good frame, + $T_{\max} = \max(T_{\text{buffer}}),$ + $T_{\max-1}$ is second largest value in $T_{\text{buffer}},$ + $T_{\max-2}$ is second largest value in $T_{\text{buffer}},$ + $\text{RND}(x)$ is random value generated to range $[-\frac{x}{2}, +\frac{x}{2}]$ + +### 6.2.4 + +#### Innovation sequence + +When RX\_FRAMETYPE = SPEECH\_BAD, the received fixed codebook innovation pulses from the erroneous frame are used as they are received. + +When RX\_FRAMETYPE = SPEECH\_LOST, the received fixed codebook innovation pulses from the erroneous frame are not used and the fixed codebook innovation vector is filled with random signal (values limited to range [-1, +1]). + +### 6.2.5 High-band gain (for 23.85 kbit/s mode) + +When RX\_FRAMETYPE = SPEECH\_BAD or RX\_FRAMETYPE = SPEECH\_LOST the received high-band energy parameter of the frame is not used and the estimation for the high-band gain is used instead. This means that in case of bad/lost speech frames, the high-band reconstruction operates in the same way for all the modes. + +## 6.3 + +## Substitution and muting of lost SID frames + +In the speech decoder a single frame classified as SID\_BAD shall be substituted by the last valid SID frame information and the procedure for valid SID frames be applied. If the time between SID information updates (updates are specified by SID\_UPDATE arrivals and occasionally by SID\_FIRST arrivals) is greater than one second this shall lead to attenuation. + +# Annex A (informative): Change history + +| Change history | | | | | | | | | +|----------------|---------|-----------|-----|-----|----------------------------------------------------------|--|--------|--------| +| Date | TSG SA# | TSG Doc. | CR | Rev | Subject/Comment | | Old | New | +| 03-2001 | 11 | SP-010086 | | | Version 2.0.0 produced for approval | | | 5.0.0 | +| 03-2002 | 15 | SP-020083 | 001 | | Error concealment of high band gain in 23.85 kbit/s mode | | 5.0.0 | 5.1.0 | +| 12-2004 | 26 | | | | Version for Release 6 | | 5.1.0 | 6.0.0 | +| 06-2007 | 36 | | | | Version for Release 7 | | 6.0.0 | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | | 7.0.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26201/08441fa90c5fd11994626f662ac13f19_img.jpg b/marked/Rel-11/26_series/26201/08441fa90c5fd11994626f662ac13f19_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0373f5de16a813df88a67961c0aaf04c168906a9 --- /dev/null +++ b/marked/Rel-11/26_series/26201/08441fa90c5fd11994626f662ac13f19_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:137703ed326433ee59ae675d34522cfbfadea993a81a4da5caeccd99c2cbbf2f +size 44366 diff --git a/marked/Rel-11/26_series/26201/1d27fed9c01eb99f6535283f35fe3bbf_img.jpg b/marked/Rel-11/26_series/26201/1d27fed9c01eb99f6535283f35fe3bbf_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..00992032ef6ef6fe343f6e6f9d0e3085bae99622 --- /dev/null +++ b/marked/Rel-11/26_series/26201/1d27fed9c01eb99f6535283f35fe3bbf_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e70756dcd24e93cbcfa94ce4634f034e679a415201886f98a5c52e30b2a3aa5 +size 60139 diff --git a/marked/Rel-11/26_series/26201/raw.md b/marked/Rel-11/26_series/26201/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..8857be390c98dfe1b148ec9fd5bbd37bb87b355b --- /dev/null +++ b/marked/Rel-11/26_series/26201/raw.md @@ -0,0 +1,749 @@ + + + + + + +# --- Contents + +| | | +|------------------------------------------------------------------------------------|-----------| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and Abbreviations ..... | 5 | +| 3.1 Definitions..... | 5 | +| 3.2 Abbreviations ..... | 5 | +| 4 AMR-WB codec Interface format 1 (AMR-WB IF1) ..... | 6 | +| 4.1 AMR-WB Header and AMR-WB Auxiliary Information ..... | 6 | +| 4.1.1 Frame Type, Mode Indication, and Mode Request ..... | 6 | +| 4.1.2 Frame Quality Indicator ..... | 7 | +| 4.1.3 Mapping to TX_TYPE and RX_TYPE..... | 7 | +| 4.1.4 Codec CRC ..... | 8 | +| 4.2 AMR-WB Core Frame..... | 8 | +| 4.2.1 AMR-WB Core Frame with speech bits: Bit ordering ..... | 8 | +| 4.2.2 AMR-WB Core Frame with speech bits: Class division..... | 8 | +| 4.2.3 AMR-WB Core Frame with comfort noise bits ..... | 9 | +| 4.3 Generic AMR-WB Frame Composition ..... | 10 | +| Annex A (normative): AMR-WB Interface Format 2 (with octet alignment) ..... | 12 | +| Annex B (normative): Tables for AMR-WB Core Frame bit ordering..... | 14 | +| Annex C (informative): Change history..... | 23 | + +# --- Foreword + +This Technical Specification (TS) has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document describes a generic frame format for the Adaptive Multi-Rate Wideband (AMR-WB) speech codec. This format shall be used as a common reference point when interfacing speech frames between different elements of the 3G system and between different systems. Appropriate mappings to and from this generic frame format will be used within and between each system element. + +Annex A describes a second frame format which shall be used when octet alignment of AMR-WB frames is required. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. + +- [1] 3GPP TS 26.190: "AMR Wideband Speech Codec; Speech Transcoding Functions". +- [2] 3GPP TS 26.193: "AMR Wideband Speech Codec; Source Controlled Rate Operation". +- [3] 3GPP TS 26.192: "AMR Wideband Speech Codec; Comfort Noise Aspects". + +# --- 3 Definitions and Abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the following terms and definitions apply: + +**AMR-WB mode:** one of the nine AMR-WB codec bit-rates denoted also with indices 0 to 8 where 0 maps to the 6.60 kbit/s mode and 8 maps to the 23.85 kbit/s mode. + +**AMR-WB codec mode:** same as AMR-WB mode. + +**RX\_TYPE:** classification of the received frame as defined in [2]. + +**TX\_TYPE:** classification of the transmitted frame as defined in [2]. + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|-----|------------------------------------------| +| CRC | Cyclic Redundancy Check | +| FQI | Frame Quality Indicator | +| GSM | Global System for Mobile communication | +| LSB | Least Significant Bit | +| MSB | Most Significant Bit | +| RX | Receive | +| SCR | Source Controlled Rate operation | +| SID | Silence Descriptor (Comfort Noise Frame) | +| TX | Transmit | + +# 4 AMR-WB codec Interface format 1 (AMR-WB IF1) + +This clause describes the generic frame format for both the speech and comfort noise frames of the AMR-WB speech codec. This format is referred to as AMR-WB Interface Format 1 (AMR-WB IF1). Annex A describes AMR-WB Interface Format 2 (AMR-WB IF2). + +Each AMR-WB codec mode follows the generic frame structure depicted in figure 1. The frame is divided into three parts: AMR-WB Header, AMR-WB Auxiliary Information, and AMR-WB Core Frame. The AMR-WB Header part includes the Frame Type and the Frame Quality Indicator fields. The AMR-WB auxiliary information part includes the Mode Indication, Mode Request, and Codec CRC fields. The AMR-WB Core Frame part consists of the speech parameter bits or, in case of a comfort noise frame, the comfort noise parameter bits. In case of a comfort noise frame, the comfort noise parameters replace Class A bits of AMR-WB Core Frame while Class B and C bits are omitted. + +It is to be noted that unlike AMR, AMR-WB uses only two bit protection classes A and B. In no case bits are assigned to protection class C and, correspondingly, no RAB subflow needs to be allocated for such a class. The mentioning of class C is only done for the purpose of keeping uniformity of this specification with the corresponding specification for AMR. + +![Figure 1: Generic AMR-WB frame structure diagram. The diagram shows a vertical stack of fields. The top section is the AMR-WB Header, containing 'Frame Type (4 bits)' and 'Frame Quality Indicator (1 bit)'. Below it is the AMR-WB Auxiliary Information section, containing 'Mode Indication (4 bits)', 'Mode Request (4 bits)', and 'Codec CRC (8 bits)'. A label 'AMR-WB Auxiliary Information (for Tandem Free Operation, Mode Adaptation, and Error Detection)' points to this section. The bottom section is the AMR-WB Core Frame, containing 'Class A bits', 'Class B bits', and 'Class C bits'. A label 'AMR-WB Core Frame' points to this section. To the right, a label 'AMR-WB Header' points to the top section, and a label 'AMR-WB comfort noise frame' points to the bottom section.](1d27fed9c01eb99f6535283f35fe3bbf_img.jpg) + +| | +|---------------------------------| +| Frame Type (4 bits) | +| Frame Quality Indicator (1 bit) | +| | +| Mode Indication (4 bits) | +| Mode Request (4 bits) | +| Codec CRC (8 bits) | +| | +| Class A bits | +| Class B bits | +| Class C bits | + +AMR-WB Header (indicated by arrow) + +AMR-WB Auxiliary Information + (for Tandem Free Operation, Mode Adaptation, and Error Detection) + +AMR-WB Core Frame (indicated by arrow) + AMR-WB comfort noise frame (indicated by arrow) + +Figure 1: Generic AMR-WB frame structure diagram. The diagram shows a vertical stack of fields. The top section is the AMR-WB Header, containing 'Frame Type (4 bits)' and 'Frame Quality Indicator (1 bit)'. Below it is the AMR-WB Auxiliary Information section, containing 'Mode Indication (4 bits)', 'Mode Request (4 bits)', and 'Codec CRC (8 bits)'. A label 'AMR-WB Auxiliary Information (for Tandem Free Operation, Mode Adaptation, and Error Detection)' points to this section. The bottom section is the AMR-WB Core Frame, containing 'Class A bits', 'Class B bits', and 'Class C bits'. A label 'AMR-WB Core Frame' points to this section. To the right, a label 'AMR-WB Header' points to the top section, and a label 'AMR-WB comfort noise frame' points to the bottom section. + +Figure 1. Generic AMR-WB frame structure + +## 4.1 AMR-WB Header and AMR-WB Auxiliary Information + +This subclause describes the AMR-WB Header of figure 1. + +### 4.1.1 Frame Type, Mode Indication, and Mode Request + +Table 1a defines the 4-bit Frame Type field. Frame Type can indicate the use of one of the nine AMR-WB codec modes, comfort noise frame, lost speech frame, or an empty frame. In addition, four Frame Type Indices are reserved for future use. The same table is reused for the Mode Indication and Mode Request fields which are 4-bit fields each and are defined only in the range 0...8 to specify one of the nine AMR-WB codec modes. + +**Table 1a: Interpretation of Frame Type, Mode Indication and Mode Request fields.** + +| Frame Type Index | Mode Indication | Mode Request | Frame content (AMR-WB mode, comfort noise, or other) | +|------------------|-----------------|--------------|------------------------------------------------------| +| 0 | 0 | 0 | AMR-WB 6.60 kbit/s | +| 1 | 1 | 1 | AMR-WB 8.85 kbit/s | +| 2 | 2 | 2 | AMR-WB 12.65 kbit/s | +| 3 | 3 | 3 | AMR-WB 14.25 kbit/s | +| 4 | 4 | 4 | AMR-WB 15.85 kbit/s | +| 5 | 5 | 5 | AMR-WB 18.25 kbit/s | +| 6 | 6 | 6 | AMR-WB 19.85 kbit/s | +| 7 | 7 | 7 | AMR-WB 23.05 kbit/s | +| 8 | 8 | 8 | AMR-WB 23.85 kbit/s | +| 9 | - | - | AMR-WB SID (Comfort Noise Frame) | +| 10-13 | - | - | For future use | +| 14 | - | - | speech lost | +| 15 | - | - | No Data (No transmission/No reception) | +| | - | - | | + +### 4.1.2 Frame Quality Indicator + +The content of the Frame Quality Indicator field is defined in Table 1b. The field length is one bit. The Frame Quality Indicator indicates whether the data in the frame contains errors. + +**Table 1b: Definition of Frame Quality Indicator** + +| Frame Quality Indicator (FQI) | Quality of data | +|-------------------------------|--------------------------------------------------------------------------------| +| 0 | Bad frame or Corrupted frame
(bits may be used to assist error concealment) | +| 1 | Good frame | + +### 4.1.3 Mapping to TX\_TYPE and RX\_TYPE + +Table 1c shows how the AMR-WB Header data (FQI and Frame Type) maps to the TX\_TYPE and RX\_TYPE frames defined in [2]. + +**Table 1c: Mapping of Frame Quality Indicator and Frame Type to TX\_TYPE and RX\_TYPE [2], respectively** + +| Frame Quality Indicator | Frame Type Index | TX_TYPE or RX_TYPE | Comment | +|-------------------------|------------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------| +| 1 | 0-8 | SPEECH_GOOD | The specific Frame Type Index depends on the bit-rate being used. | +| 0 | 0-8 | SPEECH_BAD | The specific Frame Type Index depends on the bit-rate being used. The corrupted data may be used to assist error concealment. | +| 0 | 14 | SPEECH_LOST | No useful information. An erased or stolen frame with no data usable to assist error concealment. | +| 1 | 9 | SID_FIRST or | SID_FIRST and SID_UPDATE | +| | 9 | SID_UPDATE | are differentiated using one Class A bit: STI. | +| 0 | 9 | SID_BAD | | +| 1 | 15 | NO_DATA | Typically a non-transmitted frame. | + +### 4.1.4 Codec CRC + +Generic AMR-WB codec frames with Frame Type 0...9 are associated with an 8-bit CRC for error-detection purposes. The Codec CRC field of AMR-WB Auxiliary Information in figure 1 contains the value of this CRC. These eight parity bits are generated by the cyclic generator polynomial: + +$$- G(x)=D^8 + D^6 + D^5 + D^4 + 1$$ + +which is computed over all Class A bits of AMR-WB Core Frame. Class A bits for Frame Types 0...8 are defined in subclause 4.2.2 (for speech bits) and for Frame Type 9 in subclause 4.2.3 (for comfort noise bits). + +When Frame Type Index of table 1a is 14 or 15, the CRC field is not included in the Generic AMR-WB frame. + +## 4.2 AMR-WB Core Frame + +This subclause contains the description of AMR-WB Core Frame of figure 1. The descriptions for AMR-WB Core Frame with speech bits and with comfort noise bit are given separately. + +### 4.2.1 AMR-WB Core Frame with speech bits: Bit ordering + +This subclause describes how AMR-WB Core Frame carries the coded speech data. The bits produced by the speech encoder are denoted as $\{s(1),s(2),\dots,s(K)\}$ , where $K$ refers to the number of bits produced by the speech encoder as shown in table 2. The notation $s(i)$ follows that of [1]. The speech encoder output bits are ordered according to their subjective importance. This bit ordering can be utilized for error protection purposes when the speech data is, for example, carried over a radio interface. Tables B.1 to B.9 in Annex B define the AMR-WB IF1 bit ordering for all the nine AMR-WB codec modes. In these tables the speech bits are numbered in the order they are produced by the corresponding speech encoder as described in the relevant tables of 3GPP TS 26.190 [1]. The reordered bits are denoted below, in the order of decreasing importance, as $\{d(0),d(1),\dots,d(K-1)\}$ . + +The ordering algorithm is described in pseudo code as: + +- for $j = 0$ to $K-1$ +- $d(j) := s(table_m(j)+1)$ ; + +where $table_m(j)$ refers to the relevant table in Annex B depending on the AMR-WB mode $m=0..8$ . The Annex B tables should be read line by line from left to right. The first element of the table has the index 0. + +### 4.2.2 AMR-WB Core Frame with speech bits: Class division + +The reordered bits are further divided into three indicative classes according to their subjective importance. The three different importance classes can then be subject to different error protection in the network. + +The importance classes are Class A, Class B, and Class C. Class A contains the bits most sensitive to errors and any error in these bits typically results in a corrupted speech frame which should not be decoded without applying appropriate error concealment. This class is protected by the Codec CRC in AMR-WB Auxiliary Information. Classes B and C contain bits where increasing error rates gradually reduce the speech quality, but decoding of an erroneous speech frame is usually possible without annoying artifacts. Class B bits are more sensitive to errors than Class C bits. The importance ordering applies also within the three different classes and there are no significant step-wise changes in subjective importance between neighbouring bits at the class borders. + +The number of speech bits in each class (Class A, Class B, and Class C) for each AMR-WB mode is shown in table 2. The classification in table 2 and the importance ordering $d(j)$ , together, are sufficient to assign all speech bits to their correct classes. For example, when the AMR-WB codec mode is 6.60, then the Class A bits are $d(0)..d(53)$ , Class B bits are $d(54)..d(131)$ , and there are no Class C bits. + +**Table 2: Number of bits in Classes A, B, and C for each AMR-WB codec mode** + +| Frame Type | AMR-WB codec mode | Total number of bits | Class A | Class B | Class C | +|------------|-------------------|----------------------|---------|---------|---------| +| 0 | 6.60 | 132 | 54 | 78 | 0 | +| 1 | 8.85 | 177 | 64 | 113 | 0 | +| 2 | 12.65 | 253 | 72 | 181 | 0 | +| 3 | 14.25 | 285 | 72 | 213 | 0 | +| 4 | 15.85 | 317 | 72 | 245 | 0 | +| 5 | 18.25 | 365 | 72 | 293 | 0 | +| 6 | 19.85 | 397 | 72 | 325 | 0 | +| 7 | 23.05 | 461 | 72 | 389 | 0 | +| 8 | 23.85 | 477 | 72 | 405 | 0 | + +### 4.2.3 AMR-WB Core Frame with comfort noise bits + +The AMR-WB Core Frame content for the additional frame types with Frame Type Indices 9-15 in table 1a are described in this subclause. These mainly consist of the frames related to Source Controlled Rate Operation specified in [2]. + +The data content (comfort noise bits) of the additional frame types is carried in AMR-WB Core Frame. The comfort noise bits are all mapped to Class A of AMR-WB Core Frame and Classes B and C are not used. This is a notation convention only and the class division has no meaning for comfort noise bits. + +The number of bits in each class (Class A, Class B, and Class C) for the AMR-WB comfort noise bits (Frame Type Index 9) is shown in table 3. The contents of SID\_UPDATE and SID\_FIRST are divided into three parts (SID Type Indicator (STI), Mode Indication ( $mi(i)$ ), and Comfort Noise Parameters ( $s(i)$ ) as defined in [2]. + +The comfort noise parameter bits produced by the AMR-WB speech encoder are denoted as $s(i) = \{s(1), s(2), \dots, s(35)\}$ . The notation $s(i)$ follows that of [3]. These bits are numbered in the order they are produced by the AMR-WB encoder without any reordering. These bits are followed by the SID Type Indicator STI and the Mode Indication bits $mi(i) = \{mi(0), mi(1), mi(2), mi(3)\} = \{\text{LSB} \dots \text{MSB}\}$ . Thus, the AMR-WB SID or comfort noise bits $\{d(0), d(1), \dots, d(39)\}$ are formed as defined by the pseudo code below. + +- for $j = 0$ to 34; +- $d(j) := s(j+1)$ ; +- $d(35) := STI$ ; +- for $j = 36$ to 39; +- $d(j) := smi(39-j)$ . + +**Table 3. Bit classification for Frame Type 9: AMR-WB SID (Comfort Noise Frame)** + +| Frame Type Index | FQI | AMR-WB TX_TYPE or RX_TYPE | Total number of bits | Class A | | | Class B | Class C | +|------------------|-----|---------------------------|----------------------|------------------------|-------------------------|--------------------------------|---------|---------| +| | | | | SID Type Indicator STI | Mode Indication $mi(i)$ | Comfort Noise Parameter $s(i)$ | | | +| 9 | 1 | SID_UPDATE | 40 | 1 (= "1") | 4 | 35 | 0 | 0 | +| 9 | 1 | SID_FIRST | 40 | 1 (= "0") | 4 | 35 (= "0") | 0 | 0 | +| 9 | 0 | SID_BAD | 40 | 1 | 4 | 35 | 0 | 0 | + +AMR-WB no transmission frame type (14 or 15) contains the AMR-WB Header information (as defined in Figure 1), while AMR-WB Auxiliary Information and AMR-WB Core frame are omitted. The AMR-WB Header includes the corresponding Frame Type and the Frame Quality Indicator (as defined in table 1c). + +## 4.3 Generic AMR-WB Frame Composition + +The generic AMR-WB frame is formed as a concatenation of AMR-WB Header, AMR-WB Auxiliary Information and the AMR-WB Core Frame, in this order. The MSB of the Frame Type is placed in bit 8 of the first octet (see example in table 5 below), the LSB of the Frame Type is placed in bit 5. Then the next parameter follows, which is the Frame Quality Indicator, and so on. After FQI, three spare bits are inserted to align the Codec CRC and the AMR-WB Core frame to the octet boundary. The first bit of the AMR-WB Core frame d(0) is placed in bit 8 of octet 4. The last bit of the generic AMR-WB frame is the last bit of AMR-WB Core Frame, which is the last bit of speech bits or the last bit of comfort noise bits, as defined in subclauses 4.2.1 and 4.2.3. Table 5 shows the composition for the example of the Codec Mode 12.65 kbit/s and table 6 shows the composition for the AMR-WB SID frame. + +**Table 5: Mapping of an AMR-WB speech coding mode into the generic AMR-WB frame, AMR-WB IF1, example: AMR-WB 12.65 kbit/s (Mode Indication = 3), "good frame", Mode Request = 1.** + +| Octet | MSB | Mapping of bits
AMR-WB 12.65 | | | | | | LSB | +|-------|------------------------------------|---------------------------------|--------|--------|-------------------|--------|--------|--------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Frame Type (=3) | | | | FQI | spare | | | +| | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | +| 2 | Mode Indication (=3) | | | | Mode Request (=1) | | | | +| | MSB | ... | LSB | | MSB | ... | LSB | | +| | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | +| 3 | Codec CRC | | | | | | | | +| | CRC(7) | CRC(6) | CRC(5) | CRC(4) | CRC(3) | CRC(2) | CRC(1) | CRC(0) | +| 4 | AMR-WB Core Frame (octet 1) | | | | | | | | +| | d(0) | d(1) | d(2) | d(3) | d(4) | d(5) | d(6) | d(7) | +| 5..34 | AMR-WB Core Frame (octets 2 to 31) | | | | | | | | +| | d(8) | ... | ... | ... | ... | ... | ... | ... | +| 35 | AMR-WB Core Frame (octet 32) | | | | undefined | | | | +| | d(248) | d(249) | d(250) | d(251) | d(252) | | | | + +**Table 6: Mapping of an AMR-WB SID frame into the generic AMR-WB frame, AMR-WB IF1, example: AMR-WB SID\_Update, "good frame", Mode Indication = 3, Mode Request = 2.** + +| Octet | MSB | Mapping of bits
AMR-WB SID | | | | | | LSB | +|-------|-----------------------------------|-------------------------------|------------------|--------|----------------------|--------|--------|--------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | Frame Type (=9) | | | | FQI | spare | | | +| | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | +| 2 | Mode Indication | | | | Mode Request (=2) | | | | +| | MSB | ... | LSB | | MSB | ... | LSB | | +| | undefined | | | | 0 | 0 | 1 | 0 | +| 3 | Codec CRC | | | | | | | | +| | CRC(7) | CRC(6) | CRC(5) | CRC(4) | CRC(3) | CRC(2) | CRC(1) | CRC(0) | +| 4 | AMR-WB Core Frame (octet 1) | | | | | | | | +| | d(0)=s(1) | d(1)=s(2) | d(2) | d(3) | d(4) | d(5) | d(6) | d(7) | +| 5..7 | AMR-WB Core Frame (octets 2 to 4) | | | | | | | | +| | d(8) | ... | ... | ... | ... | ... | ... | ... | +| 8 | AMR-WB Core Frame (octet 5) | | | STI | Mode Indication (=3) | | | | +| | d(32) | d(33) | d(34) =
s(35) | 1 | 0 | 0 | 1 | 1 | + +Table 7 summarizes all possible AMR-WB frame format combinations in terms of number of bits in each field. + +**Table 7. Number of bits for different fields in different AMR-WB frame compositions** + +| Frame Type Index | Frame Type | Frame Quality Indicator | Mode Indication | Mode Request | Codec CRC | Class A | Class B | Class C | Total | +|------------------|--------------------------|-------------------------|-----------------|--------------|-----------|---------|---------|---------|-------| +| | AMR-WB Core Frame | | | | | | | | | +| 0 | 4 | 1 | 4 | 4 | 8 | 54 | 78 | 0 | 153 | +| 1 | 4 | 1 | 4 | 4 | 8 | 64 | 113 | 0 | 198 | +| 2 | 4 | 1 | 4 | 4 | 8 | 72 | 181 | 0 | 274 | +| 3 | 4 | 1 | 4 | 4 | 8 | 72 | 213 | 0 | 306 | +| 4 | 4 | 1 | 4 | 4 | 8 | 72 | 245 | 0 | 338 | +| 5 | 4 | 1 | 4 | 4 | 8 | 72 | 293 | 0 | 386 | +| 6 | 4 | 1 | 4 | 4 | 8 | 72 | 325 | 0 | 418 | +| 7 | 4 | 1 | 4 | 4 | 8 | 72 | 389 | 0 | 482 | +| 8 | 4 | 1 | 4 | 4 | 8 | 72 | 405 | 0 | 498 | +| 9 | 4 | 1 | 4 | 4 | 8 | 40 | 0 | 0 | 61 | +| 10-13 | Not used | | | | | | | | | +| 14 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | +| 15 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | + +# Annex A (normative): AMR-WB Interface Format 2 (with octet alignment) + +This annex defines an octet-aligned frame format for the AMR-WB codec. This format is useful, for example, when the AMR-WB codec is used in connection with applicable ITU-T H-series of recommendations. The format is referred to as AMR-WB Interface Format 2 (AMR-WB IF2). + +The AMR-WB IF2 frame is formed by concatenation of the 4-bit Frame Type field (as defined for AMR-WB IF1 in subclause 4.1.1), the 1-bit Frame Quality Indicator field (as defined for AMR-WB IF1 in subclause 4.1.2) and the AMR-WB Core Frame (as defined for AMR-WB IF1 in subclause 4.2) as shown in figure A.1. The length of the AMR-WB Core Frame field depends on the particular Frame Type. The total number of bits in the AMR-WB IF2 speech frames in the different modes is typically not a multiple of eight and bit stuffing is needed to achieve an octet structure. + +![Figure A.1: Frame structure for AMR-WB IF2. The diagram shows a vertical stack of fields. At the top, 'Frame Type (4 bits)' and 'Frame Quality Indicator (1 bit)' are stacked. Below them are 'Class A bits', 'Class B bits', and 'Class C bits'. At the bottom is 'Bit Stuffing'. To the right, a box labeled 'AMR-WB Core Frame (speech or comfort noise data)' has an arrow pointing to the 'Class A bits', 'Class B bits', and 'Class C bits' section.](08441fa90c5fd11994626f662ac13f19_img.jpg) + +Figure A.1: Frame structure for AMR-WB IF2. The diagram shows a vertical stack of fields. At the top, 'Frame Type (4 bits)' and 'Frame Quality Indicator (1 bit)' are stacked. Below them are 'Class A bits', 'Class B bits', and 'Class C bits'. At the bottom is 'Bit Stuffing'. To the right, a box labeled 'AMR-WB Core Frame (speech or comfort noise data)' has an arrow pointing to the 'Class A bits', 'Class B bits', and 'Class C bits' section. + +Figure A.1: Frame structure for AMR-WB IF2 + +Table A.1a shows an example how the AMR-WB 8.85 kbit/s mode is mapped into AMR-WB IF2. The four MSBs of the first octet (octet 1) consist of the Frame Type (=1) for the AMR-WB 8.85 kbit/s mode (see table 1a in AMR-WB IF1 specification) and the Frame Quality Indicator bit. This field is followed by the 177 AMR-WB Core Frame speech bits ( $d(0)\dots d(176)$ ) which consist of 64 Class A bits and 113 Class B bits as described in table 2 for AMR-WB IF1. This results in a total of 182 bits and 2 bits are needed for Bit Stuffing to arrive to the closest multiple of 8 which is 184 bits. + +Table A.1a: Example mapping of the AMR-WB speech coding mode 8.85kbit/s into AMR-WB IF2. +The bits used for Bit Stuffing are denoted as UB (for "unused bit"). + +| Octet | MSB | Mapping of bits
AMR-WB 8.85 kbit/s | | | | | | LSB | +|--------|----------------------------------------------------------------------|---------------------------------------|--------|--------|--------|--------|---------------|-------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| | Frame Type (= 1)
MSB LSB | | | | | | | | +| 1 | 0 | 0 | 0 | 1 | FQI | d(0) | d(1) | d(2) | +| 2 | d(3) | d(4) | d(5) | d(6) | d(7) | d(8) | d(9) | d(10) | +| 3...22 | d(11) | ... | ... | ... | ... | ... | ... | ... | +| 23 | d(171) | d(172) | d(173) | d(174) | d(175) | d(176) | Stuffing bits | | +| | d(171) | d(172) | d(173) | d(174) | d(175) | d(176) | UB | UB | + +Table A.1b shows the composition of AMR-WB IF2 frames for all Frame Types in terms of how many bits are used for each field of figure A.1. + +Table A.2 specify how the AMR-WB Core Frame comfort noise bits of Frame Type 9 is mapped to AMR-WB IF2. Table A.3 specifies the mapping for an empty or lost frame ("no transmission" or "speech lost"). + +**Table A.1b: Composition of AMR-WB IF2 Frames for all Frame Types** + +| Frame Type Index | Frame content | Number of bits in Frame Type | Number of bits in Frame Quality Indicator | Number of Bits in AMR-WB Core Frame | Number of Bits in Bit Stuffing | Number of octets (N) | +|------------------|----------------------------------------|------------------------------|-------------------------------------------|-------------------------------------|--------------------------------|----------------------| +| 0 | AMR-WB 6.60 kbit/s | 4 | 1 | 132 | 7 | 18 | +| 1 | AMR-WB 8.85 kbit/s | 4 | 1 | 177 | 2 | 23 | +| 2 | AMR-WB 12.65 kbit/s | 4 | 1 | 253 | 6 | 33 | +| 3 | AMR-WB 14.25 kbit/s | 4 | 1 | 285 | 6 | 37 | +| 4 | AMR-WB 15.85 kbit/s | 4 | 1 | 317 | 6 | 41 | +| 5 | AMR-WB 18.25 kbit/s | 4 | 1 | 365 | 6 | 47 | +| 6 | AMR-WB 19.85 kbit/s | 4 | 1 | 397 | 6 | 51 | +| 7 | AMR-WB 23.05 kbit/s | 4 | 1 | 461 | 6 | 59 | +| 8 | AMR-WB 23.85 kbit/s | 4 | 1 | 477 | 6 | 61 | +| 9 | AMR-WB SID (Comfort Noise Frame) | 4 | 1 | 40 | 3 | 6 | +| 10-13 | For future use | - | - | - | - | - | +| 14 | speech lost | 4 | 1 | 0 | 3 | 1 | +| 15 | No Data (No transmission/No reception) | 4 | 1 | 0 | 3 | 1 | + +**Table A.2: Mapping of bits for Frame Type 9 (AMR-WB SID) +(Bits s1 to s35 refer to TS 26.192)** + +| Octet | MSB | Mapping of bits
AMR-WB SID | | | | | | LSB | +|-------|-----------------------------------|-------------------------------------------|-------|-------|-------|---------------|-------|-------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| | Frame Type (= 9)
MSB ..... LSB | | | | | | | | +| 1 | 1 | 0 | 0 | 1 | FQI | s1 | s2 | s3 | +| 2 | s4 | s5 | s6 | s7 | s8 | s9 | s10 | s11 | +| 3 | s12 | s13 | s14 | s15 | s16 | s17 | s18 | s19 | +| 4 | s20 | s21 | s22 | s23 | s24 | s25 | s26 | s27 | +| 5 | s28 | s29 | s30 | s31 | s32 | s33 | s34 | s35 | +| | SID Type Indicator | Mode Indication
mi(i)
MSB ..... LSB | | | | Stuffing bits | | | +| 6 | t1 | mi(3) | mi(2) | mi(1) | mi(0) | UB | UB | UB | + +Definitions of additional descriptor bits needed for the silence descriptor in the table are as follows: SID-type Indicator STI is {0=SID\_FIRST, 1=SID\_UPDATE}, Speech Mode Indication (mi(0)- mi(3)) is the AMR-WB codec mode according to the first nine entries in table 1a. Note that in parameter mi the index 3 refers to MSB. + +**Table A.3: Mapping of bit for Frame Type 14 (Speech Lost) and for Frame Type 15 (No Data)** + +| Transmitted Octets | MSB | Mapping of bits | | | | | | LSB | +|--------------------|----------------------------------------------------|-----------------|-------|-------|-------|-------|---------------|-------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| | Frame Type 14 = 1 1 1 0
Frame Type 15 = 1 1 1 1 | | | | | | Stuffing bits | | +| 1 | mi(3) | mi(2) | mi(1) | mi(0) | FQI | UB | UB | UB | + +# Annex B (normative): Tables for AMR-WB Core Frame bit ordering + +This annex contains the tables required for ordering the AMR-WB Core Frame speech bits corresponding to the different AMR-WB modes. These tables represent $table_m(j)$ in subclause 4.2.1 where $m=0..8$ is the AMR-WB mode. The tables are read from left to right so that the first element (top left corner) of the table has index 0 and the last element (the rightmost element of the last row) has the index $K-1$ where $K$ is the total number of speech bits in the specific mode. For example, $table_0(20)=60$ , as defined in table B.1. + +**Table B.1: Ordering of the speech encoder bits for the 6.60 kbit/s mode: $table_0(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 5 | 6 | 7 | 61 | 84 | 107 | 130 | 62 | 85 | +| 8 | 4 | 37 | 38 | 39 | 40 | 58 | 81 | 104 | 127 | +| 60 | 83 | 106 | 129 | 108 | 131 | 128 | 41 | 42 | 80 | +| 126 | 1 | 3 | 57 | 103 | 82 | 105 | 59 | 2 | 63 | +| 109 | 110 | 86 | 19 | 22 | 23 | 64 | 87 | 18 | 20 | +| 21 | 17 | 13 | 88 | 43 | 89 | 65 | 111 | 14 | 24 | +| 25 | 26 | 27 | 28 | 15 | 16 | 44 | 90 | 66 | 112 | +| 9 | 11 | 10 | 12 | 67 | 113 | 29 | 30 | 31 | 32 | +| 34 | 33 | 35 | 36 | 45 | 51 | 68 | 74 | 91 | 97 | +| 114 | 120 | 46 | 69 | 92 | 115 | 52 | 75 | 98 | 121 | +| 47 | 70 | 93 | 116 | 53 | 76 | 99 | 122 | 48 | 71 | +| 94 | 117 | 54 | 77 | 100 | 123 | 49 | 72 | 95 | 118 | +| 55 | 78 | 101 | 124 | 50 | 73 | 96 | 119 | 56 | 79 | +| 102 | 125 | | | | | | | | | + +**Table B.2: Ordering of the speech encoder bits for the 8.85 kbit/s mode: $table_1(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 7 | 5 | 3 | 47 | 48 | 49 | 112 | +| 113 | 114 | 75 | 106 | 140 | 171 | 80 | 111 | 145 | 176 | +| 77 | 108 | 142 | 173 | 78 | 109 | 143 | 174 | 79 | 110 | +| 144 | 175 | 76 | 107 | 141 | 172 | 50 | 115 | 51 | 2 | +| 1 | 81 | 116 | 146 | 19 | 21 | 12 | 17 | 18 | 20 | +| 16 | 25 | 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | +| 15 | 52 | 117 | 31 | 82 | 147 | 9 | 33 | 11 | 83 | +| 148 | 53 | 118 | 28 | 27 | 84 | 149 | 34 | 35 | 29 | +| 46 | 32 | 30 | 54 | 119 | 37 | 36 | 39 | 38 | 40 | +| 85 | 150 | 41 | 42 | 43 | 44 | 45 | 55 | 60 | 65 | +| 70 | 86 | 91 | 96 | 101 | 120 | 125 | 130 | 135 | 151 | +| 156 | 161 | 166 | 56 | 87 | 121 | 152 | 61 | 92 | 126 | +| 157 | 66 | 97 | 131 | 162 | 71 | 102 | 136 | 167 | 57 | +| 88 | 122 | 153 | 62 | 93 | 127 | 158 | 67 | 98 | 132 | +| 163 | 72 | 103 | 137 | 168 | 58 | 89 | 123 | 154 | 63 | +| 94 | 128 | 159 | 68 | 99 | 133 | 164 | 73 | 104 | 138 | +| 169 | 59 | 90 | 124 | 155 | 64 | 95 | 129 | 160 | 69 | +| 100 | 134 | 165 | 74 | 105 | 139 | 170 | | | | + +**Table B.3: Ordering of the speech encoder bits for the 12.65 kbit/s mode: $table_2(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 93 | 143 | 196 | 246 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 150 | 151 | 152 | 153 | 154 | +| 94 | 144 | 197 | 247 | 99 | 149 | 202 | 252 | 96 | 146 | +| 199 | 249 | 97 | 147 | 200 | 250 | 100 | 203 | 98 | 148 | +| 201 | 251 | 95 | 145 | 198 | 248 | 52 | 2 | 1 | 101 | +| 204 | 155 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 156 | 31 | 102 | 205 | 9 | 33 | 11 | 103 | 206 | 54 | +| 157 | 28 | 27 | 104 | 207 | 34 | 35 | 29 | 46 | 32 | +| 30 | 55 | 158 | 37 | 36 | 39 | 38 | 40 | 105 | 208 | +| 41 | 42 | 43 | 44 | 45 | 56 | 106 | 159 | 209 | 57 | +| 66 | 75 | 84 | 107 | 116 | 125 | 134 | 160 | 169 | 178 | +| 187 | 210 | 219 | 228 | 237 | 58 | 108 | 161 | 211 | 62 | +| 112 | 165 | 215 | 67 | 117 | 170 | 220 | 71 | 121 | 174 | +| 224 | 76 | 126 | 179 | 229 | 80 | 130 | 183 | 233 | 85 | +| 135 | 188 | 238 | 89 | 139 | 192 | 242 | 59 | 109 | 162 | +| 212 | 63 | 113 | 166 | 216 | 68 | 118 | 171 | 221 | 72 | +| 122 | 175 | 225 | 77 | 127 | 180 | 230 | 81 | 131 | 184 | +| 234 | 86 | 136 | 189 | 239 | 90 | 140 | 193 | 243 | 60 | +| 110 | 163 | 213 | 64 | 114 | 167 | 217 | 69 | 119 | 172 | +| 222 | 73 | 123 | 176 | 226 | 78 | 128 | 181 | 231 | 82 | +| 132 | 185 | 235 | 87 | 137 | 190 | 240 | 91 | 141 | 194 | +| 244 | 61 | 111 | 164 | 214 | 65 | 115 | 168 | 218 | 70 | +| 120 | 173 | 223 | 74 | 124 | 177 | 227 | 79 | 129 | 182 | +| 232 | 83 | 133 | 186 | 236 | 88 | 138 | 191 | 241 | 92 | +| 142 | 195 | 245 | | | | | | | | + +**Table B.4: Ordering of the speech encoder bits for the 14.25 kbit/s mode: $table_3(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 101 | 159 | 220 | 278 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 166 | 167 | 168 | 169 | 170 | +| 102 | 160 | 221 | 279 | 107 | 165 | 226 | 284 | 104 | 162 | +| 223 | 281 | 105 | 163 | 224 | 282 | 108 | 227 | 106 | 164 | +| 225 | 283 | 103 | 161 | 222 | 280 | 52 | 2 | 1 | 109 | +| 228 | 171 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 172 | 31 | 110 | 229 | 9 | 33 | 11 | 111 | 230 | 54 | +| 173 | 28 | 27 | 112 | 231 | 34 | 35 | 29 | 46 | 32 | +| 30 | 55 | 174 | 37 | 36 | 39 | 38 | 40 | 113 | 232 | +| 41 | 42 | 43 | 44 | 45 | 56 | 114 | 175 | 233 | 62 | +| 120 | 181 | 239 | 75 | 133 | 194 | 252 | 57 | 115 | 176 | +| 234 | 63 | 121 | 182 | 240 | 70 | 128 | 189 | 247 | 76 | +| 134 | 195 | 253 | 83 | 141 | 202 | 260 | 92 | 150 | 211 | +| 269 | 84 | 142 | 203 | 261 | 93 | 151 | 212 | 270 | 85 | +| 143 | 204 | 262 | 94 | 152 | 213 | 271 | 86 | 144 | 205 | +| 263 | 95 | 153 | 214 | 272 | 64 | 122 | 183 | 241 | 77 | +| 135 | 196 | 254 | 65 | 123 | 184 | 242 | 78 | 136 | 197 | +| 255 | 87 | 145 | 206 | 264 | 96 | 154 | 215 | 273 | 58 | +| 116 | 177 | 235 | 66 | 124 | 185 | 243 | 71 | 129 | 190 | +| 248 | 79 | 137 | 198 | 256 | 88 | 146 | 207 | 265 | 97 | +| 155 | 216 | 274 | 59 | 117 | 178 | 236 | 67 | 125 | 186 | +| 244 | 72 | 130 | 191 | 249 | 80 | 138 | 199 | 257 | 89 | +| 147 | 208 | 266 | 98 | 156 | 217 | 275 | 60 | 118 | 179 | +| 237 | 68 | 126 | 187 | 245 | 73 | 131 | 192 | 250 | 81 | +| 139 | 200 | 258 | 90 | 148 | 209 | 267 | 99 | 157 | 218 | +| 276 | 61 | 119 | 180 | 238 | 69 | 127 | 188 | 246 | 74 | +| 132 | 193 | 251 | 82 | 140 | 201 | 259 | 91 | 149 | 210 | +| 268 | 100 | 158 | 219 | 277 | | | | | | + +**Table B.5: Ordering of the speech encoder bits for the 15.85 kbit/s mode: $table_4(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 109 | 175 | 244 | 310 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 182 | 183 | 184 | 185 | 186 | +| 110 | 176 | 245 | 311 | 115 | 181 | 250 | 316 | 112 | 178 | +| 247 | 313 | 113 | 179 | 248 | 314 | 116 | 251 | 114 | 180 | +| 249 | 315 | 111 | 177 | 246 | 312 | 52 | 2 | 1 | 117 | +| 252 | 187 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 188 | 31 | 118 | 253 | 9 | 33 | 11 | 119 | 254 | 54 | +| 189 | 28 | 27 | 120 | 255 | 34 | 35 | 29 | 46 | 32 | +| 30 | 55 | 190 | 37 | 36 | 39 | 38 | 40 | 121 | 256 | +| 41 | 42 | 43 | 44 | 45 | 56 | 122 | 191 | 257 | 63 | +| 129 | 198 | 264 | 76 | 142 | 211 | 277 | 89 | 155 | 224 | +| 290 | 102 | 168 | 237 | 303 | 57 | 123 | 192 | 258 | 70 | +| 136 | 205 | 271 | 83 | 149 | 218 | 284 | 96 | 162 | 231 | +| 297 | 62 | 128 | 197 | 263 | 75 | 141 | 210 | 276 | 88 | +| 154 | 223 | 289 | 101 | 167 | 236 | 302 | 58 | 124 | 193 | +| 259 | 71 | 137 | 206 | 272 | 84 | 150 | 219 | 285 | 97 | +| 163 | 232 | 298 | 59 | 125 | 194 | 260 | 64 | 130 | 199 | +| 265 | 67 | 133 | 202 | 268 | 72 | 138 | 207 | 273 | 77 | +| 143 | 212 | 278 | 80 | 146 | 215 | 281 | 85 | 151 | 220 | +| 286 | 90 | 156 | 225 | 291 | 93 | 159 | 228 | 294 | 98 | +| 164 | 233 | 299 | 103 | 169 | 238 | 304 | 106 | 172 | 241 | +| 307 | 60 | 126 | 195 | 261 | 65 | 131 | 200 | 266 | 68 | +| 134 | 203 | 269 | 73 | 139 | 208 | 274 | 78 | 144 | 213 | +| 279 | 81 | 147 | 216 | 282 | 86 | 152 | 221 | 287 | 91 | +| 157 | 226 | 292 | 94 | 160 | 229 | 295 | 99 | 165 | 234 | +| 300 | 104 | 170 | 239 | 305 | 107 | 173 | 242 | 308 | 61 | +| 127 | 196 | 262 | 66 | 132 | 201 | 267 | 69 | 135 | 204 | +| 270 | 74 | 140 | 209 | 275 | 79 | 145 | 214 | 280 | 82 | +| 148 | 217 | 283 | 87 | 153 | 222 | 288 | 92 | 158 | 227 | +| 293 | 95 | 161 | 230 | 296 | 100 | 166 | 235 | 301 | 105 | +| 171 | 240 | 306 | 108 | 174 | 243 | 309 | | | | + +**Table B.6: Ordering of the speech encoder bits for the 18.25 kbit/s mode: $table_5(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 121 | 199 | 280 | 358 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 206 | 207 | 208 | 209 | 210 | +| 122 | 200 | 281 | 359 | 127 | 205 | 286 | 364 | 124 | 202 | +| 283 | 361 | 125 | 203 | 284 | 362 | 128 | 287 | 126 | 204 | +| 285 | 363 | 123 | 201 | 282 | 360 | 52 | 2 | 1 | 129 | +| 288 | 211 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 212 | 31 | 130 | 289 | 9 | 33 | 11 | 131 | 290 | 54 | +| 213 | 28 | 27 | 132 | 291 | 34 | 35 | 29 | 46 | 32 | +| 30 | 55 | 214 | 37 | 36 | 39 | 38 | 40 | 133 | 292 | +| 41 | 42 | 43 | 44 | 45 | 56 | 134 | 215 | 293 | 198 | +| 299 | 136 | 120 | 138 | 60 | 279 | 58 | 62 | 357 | 139 | +| 140 | 295 | 156 | 57 | 219 | 297 | 63 | 217 | 137 | 170 | +| 300 | 222 | 64 | 106 | 61 | 78 | 294 | 92 | 142 | 141 | +| 135 | 221 | 296 | 301 | 343 | 59 | 298 | 184 | 329 | 315 | +| 220 | 216 | 265 | 251 | 218 | 237 | 352 | 223 | 157 | 86 | +| 171 | 87 | 164 | 351 | 111 | 302 | 65 | 178 | 115 | 323 | +| 72 | 192 | 101 | 179 | 93 | 73 | 193 | 151 | 337 | 309 | +| 143 | 274 | 69 | 324 | 165 | 150 | 97 | 338 | 110 | 310 | +| 330 | 273 | 68 | 107 | 175 | 245 | 114 | 79 | 113 | 189 | +| 246 | 259 | 174 | 71 | 185 | 96 | 344 | 100 | 322 | 83 | +| 334 | 316 | 333 | 252 | 161 | 348 | 147 | 82 | 269 | 232 | +| 260 | 308 | 353 | 347 | 163 | 231 | 306 | 320 | 188 | 270 | +| 146 | 177 | 266 | 350 | 256 | 85 | 149 | 116 | 191 | 160 | +| 238 | 258 | 336 | 305 | 255 | 88 | 224 | 99 | 339 | 230 | +| 228 | 227 | 272 | 242 | 241 | 319 | 233 | 311 | 102 | 74 | +| 180 | 275 | 66 | 194 | 152 | 325 | 172 | 247 | 244 | 261 | +| 117 | 158 | 166 | 354 | 75 | 144 | 108 | 312 | 94 | 186 | +| 303 | 80 | 234 | 89 | 195 | 112 | 340 | 181 | 345 | 317 | +| 326 | 276 | 239 | 167 | 118 | 313 | 70 | 355 | 327 | 253 | +| 190 | 176 | 271 | 104 | 98 | 153 | 103 | 90 | 76 | 267 | +| 277 | 248 | 225 | 262 | 182 | 84 | 154 | 235 | 335 | 168 | +| 331 | 196 | 341 | 249 | 162 | 307 | 148 | 349 | 263 | 321 | +| 257 | 243 | 229 | 356 | 159 | 119 | 67 | 187 | 173 | 145 | +| 240 | 77 | 304 | 332 | 314 | 342 | 109 | 254 | 81 | 278 | +| 105 | 91 | 346 | 318 | 183 | 250 | 197 | 328 | 95 | 155 | +| 169 | 268 | 226 | 236 | 264 | | | | | | + +**Table B.7: Ordering of the speech encoder bits for the 19.85 kbit/s mode: $table_6(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 129 | 215 | 304 | 390 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 222 | 223 | 224 | 225 | 226 | +| 130 | 216 | 305 | 391 | 135 | 221 | 310 | 396 | 132 | 218 | +| 307 | 393 | 133 | 219 | 308 | 394 | 136 | 311 | 134 | 220 | +| 309 | 395 | 131 | 217 | 306 | 392 | 52 | 2 | 1 | 137 | +| 312 | 227 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 228 | 31 | 138 | 313 | 9 | 33 | 11 | 139 | 314 | 54 | +| 229 | 28 | 27 | 140 | 315 | 34 | 35 | 29 | 46 | 32 | +| 30 | 55 | 230 | 37 | 36 | 39 | 38 | 40 | 141 | 316 | +| 41 | 42 | 43 | 44 | 45 | 56 | 142 | 231 | 317 | 63 | +| 73 | 92 | 340 | 82 | 324 | 149 | 353 | 159 | 334 | 165 | +| 338 | 178 | 163 | 254 | 77 | 168 | 257 | 153 | 343 | 57 | +| 248 | 238 | 79 | 252 | 166 | 67 | 80 | 201 | 101 | 267 | +| 143 | 164 | 341 | 255 | 339 | 187 | 376 | 318 | 78 | 328 | +| 362 | 115 | 232 | 242 | 253 | 290 | 276 | 62 | 58 | 158 | +| 68 | 93 | 179 | 319 | 148 | 169 | 154 | 72 | 385 | 329 | +| 333 | 344 | 102 | 83 | 144 | 233 | 323 | 124 | 243 | 192 | +| 354 | 237 | 64 | 247 | 202 | 209 | 150 | 116 | 335 | 268 | +| 239 | 299 | 188 | 196 | 298 | 94 | 195 | 258 | 123 | 363 | +| 384 | 109 | 325 | 371 | 170 | 370 | 84 | 110 | 295 | 180 | +| 74 | 210 | 191 | 106 | 291 | 205 | 367 | 381 | 377 | 206 | +| 355 | 122 | 119 | 120 | 383 | 160 | 105 | 108 | 277 | 380 | +| 294 | 284 | 285 | 345 | 208 | 269 | 249 | 366 | 386 | 300 | +| 297 | 259 | 125 | 369 | 197 | 97 | 194 | 286 | 211 | 281 | +| 280 | 183 | 372 | 87 | 155 | 283 | 59 | 348 | 327 | 184 | +| 76 | 111 | 330 | 203 | 349 | 69 | 98 | 152 | 145 | 189 | +| 66 | 320 | 337 | 173 | 358 | 251 | 198 | 174 | 263 | 262 | +| 126 | 241 | 193 | 88 | 388 | 117 | 95 | 387 | 112 | 359 | +| 287 | 244 | 103 | 272 | 301 | 171 | 162 | 234 | 273 | 127 | +| 373 | 181 | 292 | 85 | 378 | 302 | 121 | 107 | 364 | 346 | +| 356 | 212 | 278 | 213 | 65 | 382 | 288 | 207 | 113 | 175 | +| 99 | 296 | 374 | 368 | 199 | 260 | 185 | 336 | 331 | 161 | +| 270 | 264 | 250 | 240 | 75 | 350 | 151 | 60 | 89 | 321 | +| 156 | 274 | 360 | 326 | 70 | 282 | 167 | 146 | 352 | 81 | +| 91 | 389 | 266 | 245 | 177 | 235 | 190 | 256 | 204 | 342 | +| 128 | 118 | 303 | 104 | 379 | 182 | 114 | 375 | 200 | 96 | +| 293 | 172 | 214 | 365 | 279 | 86 | 289 | 351 | 347 | 357 | +| 261 | 186 | 176 | 271 | 90 | 100 | 147 | 322 | 275 | 361 | +| 71 | 332 | 61 | 265 | 157 | 246 | 236 | | | | + +**Table B.8: Ordering of the speech encoder bits for the 23.05 kbit/s mode: $table_{7}(j)$** + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 145 | 247 | 352 | 454 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 254 | 255 | 256 | 257 | 258 | +| 146 | 248 | 353 | 455 | 151 | 253 | 358 | 460 | 148 | 250 | +| 355 | 457 | 149 | 251 | 356 | 458 | 152 | 359 | 150 | 252 | +| 357 | 459 | 147 | 249 | 354 | 456 | 52 | 2 | 1 | 153 | +| 360 | 259 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 260 | 31 | 154 | 361 | 9 | 33 | 11 | 155 | 362 | 54 | +| 261 | 28 | 27 | 156 | 363 | 34 | 35 | 29 | 46 | 32 | +| 30 | 55 | 262 | 37 | 36 | 39 | 38 | 40 | 157 | 364 | +| 41 | 42 | 43 | 44 | 45 | 56 | 158 | 263 | 365 | 181 | +| 192 | 170 | 79 | 57 | 399 | 90 | 159 | 297 | 377 | 366 | +| 275 | 68 | 183 | 388 | 286 | 194 | 299 | 92 | 70 | 182 | +| 401 | 172 | 59 | 91 | 58 | 400 | 368 | 161 | 81 | 160 | +| 264 | 171 | 80 | 389 | 390 | 378 | 379 | 193 | 298 | 69 | +| 266 | 265 | 367 | 277 | 288 | 276 | 287 | 184 | 60 | 195 | +| 82 | 93 | 71 | 369 | 402 | 173 | 162 | 444 | 300 | 391 | +| 98 | 76 | 278 | 61 | 267 | 374 | 135 | 411 | 167 | 102 | +| 380 | 200 | 87 | 178 | 65 | 94 | 204 | 124 | 72 | 342 | +| 189 | 305 | 381 | 396 | 433 | 301 | 226 | 407 | 289 | 237 | +| 113 | 215 | 185 | 128 | 309 | 403 | 116 | 320 | 196 | 331 | +| 370 | 422 | 174 | 64 | 392 | 83 | 425 | 219 | 134 | 188 | +| 432 | 112 | 427 | 139 | 279 | 163 | 436 | 208 | 447 | 218 | +| 236 | 229 | 97 | 294 | 385 | 230 | 166 | 268 | 177 | 443 | +| 225 | 426 | 101 | 272 | 138 | 127 | 290 | 117 | 347 | 199 | +| 414 | 95 | 140 | 240 | 410 | 395 | 209 | 129 | 283 | 346 | +| 105 | 241 | 437 | 86 | 308 | 448 | 203 | 345 | 186 | 107 | +| 220 | 415 | 334 | 319 | 106 | 313 | 118 | 123 | 73 | 207 | +| 421 | 214 | 384 | 373 | 438 | 62 | 371 | 341 | 75 | 449 | +| 168 | 323 | 164 | 242 | 416 | 324 | 304 | 197 | 335 | 404 | +| 271 | 63 | 191 | 325 | 96 | 169 | 231 | 280 | 312 | 187 | +| 406 | 84 | 201 | 100 | 67 | 382 | 175 | 336 | 202 | 330 | +| 269 | 393 | 376 | 383 | 293 | 307 | 409 | 179 | 285 | 314 | +| 302 | 372 | 398 | 190 | 180 | 89 | 99 | 103 | 232 | 78 | +| 88 | 77 | 136 | 387 | 165 | 198 | 394 | 125 | 176 | 428 | +| 74 | 375 | 238 | 227 | 66 | 273 | 282 | 141 | 306 | 412 | +| 114 | 85 | 130 | 348 | 119 | 291 | 296 | 386 | 233 | 397 | +| 303 | 405 | 284 | 445 | 423 | 221 | 210 | 205 | 450 | 108 | +| 274 | 434 | 216 | 343 | 337 | 142 | 243 | 321 | 408 | 451 | +| 310 | 292 | 120 | 109 | 281 | 439 | 270 | 429 | 332 | 295 | +| 418 | 211 | 315 | 222 | 326 | 131 | 430 | 244 | 327 | 349 | +| 417 | 316 | 143 | 338 | 440 | 234 | 110 | 212 | 452 | 245 | +| 121 | 419 | 350 | 223 | 132 | 441 | 328 | 413 | 317 | 339 | +| 126 | 104 | 137 | 446 | 344 | 239 | 435 | 115 | 333 | 206 | +| 322 | 217 | 228 | 424 | 453 | 311 | 351 | 111 | 442 | 224 | +| 213 | 122 | 431 | 340 | 235 | 246 | 133 | 144 | 420 | 329 | +| 318 | | | | | | | | | | + +Table B.9: Ordering of the speech encoder bits for the 23.85 kbit/s mode: $table_8(j)$ + +| | | | | | | | | | | +|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| +| 0 | 4 | 6 | 145 | 251 | 360 | 466 | 7 | 5 | 3 | +| 47 | 48 | 49 | 50 | 51 | 262 | 263 | 264 | 265 | 266 | +| 146 | 252 | 361 | 467 | 151 | 257 | 366 | 472 | 148 | 254 | +| 363 | 469 | 149 | 255 | 364 | 470 | 156 | 371 | 150 | 256 | +| 365 | 471 | 147 | 253 | 362 | 468 | 52 | 2 | 1 | 157 | +| 372 | 267 | 19 | 21 | 12 | 17 | 18 | 20 | 16 | 25 | +| 13 | 10 | 14 | 24 | 23 | 22 | 26 | 8 | 15 | 53 | +| 268 | 31 | 152 | 153 | 154 | 155 | 258 | 259 | 260 | 261 | +| 367 | 368 | 369 | 370 | 473 | 474 | 475 | 476 | 158 | 373 | +| 9 | 33 | 11 | 159 | 374 | 54 | 269 | 28 | 27 | 160 | +| 375 | 34 | 35 | 29 | 46 | 32 | 30 | 55 | 270 | 37 | +| 36 | 39 | 38 | 40 | 161 | 376 | 41 | 42 | 43 | 44 | +| 45 | 56 | 162 | 271 | 377 | 185 | 196 | 174 | 79 | 57 | +| 411 | 90 | 163 | 305 | 389 | 378 | 283 | 68 | 187 | 400 | +| 294 | 198 | 307 | 92 | 70 | 186 | 413 | 176 | 59 | 91 | +| 58 | 412 | 380 | 165 | 81 | 164 | 272 | 175 | 80 | 401 | +| 402 | 390 | 391 | 197 | 306 | 69 | 274 | 273 | 379 | 285 | +| 296 | 284 | 295 | 188 | 60 | 199 | 82 | 93 | 71 | 381 | +| 414 | 177 | 166 | 456 | 308 | 403 | 98 | 76 | 286 | 61 | +| 275 | 386 | 135 | 423 | 171 | 102 | 392 | 204 | 87 | 182 | +| 65 | 94 | 208 | 124 | 72 | 350 | 193 | 313 | 393 | 408 | +| 445 | 309 | 230 | 419 | 297 | 241 | 113 | 219 | 189 | 128 | +| 317 | 415 | 116 | 328 | 200 | 339 | 382 | 434 | 178 | 64 | +| 404 | 83 | 437 | 223 | 134 | 192 | 444 | 112 | 439 | 139 | +| 287 | 167 | 448 | 212 | 459 | 222 | 240 | 233 | 97 | 302 | +| 397 | 234 | 170 | 276 | 181 | 455 | 229 | 438 | 101 | 280 | +| 138 | 127 | 298 | 117 | 355 | 203 | 426 | 95 | 140 | 244 | +| 422 | 407 | 213 | 129 | 291 | 354 | 105 | 245 | 449 | 86 | +| 316 | 460 | 207 | 353 | 190 | 107 | 224 | 427 | 342 | 327 | +| 106 | 321 | 118 | 123 | 73 | 211 | 433 | 218 | 396 | 385 | +| 450 | 62 | 383 | 349 | 75 | 461 | 172 | 331 | 168 | 246 | +| 428 | 332 | 312 | 201 | 343 | 416 | 279 | 63 | 195 | 333 | +| 96 | 173 | 235 | 288 | 320 | 191 | 418 | 84 | 205 | 100 | +| 67 | 394 | 179 | 344 | 206 | 338 | 277 | 405 | 388 | 395 | +| 301 | 315 | 421 | 183 | 293 | 322 | 310 | 384 | 410 | 194 | +| 184 | 89 | 99 | 103 | 236 | 78 | 88 | 77 | 136 | 399 | +| 169 | 202 | 406 | 125 | 180 | 440 | 74 | 387 | 242 | 231 | +| 66 | 281 | 290 | 141 | 314 | 424 | 114 | 85 | 130 | 356 | +| 119 | 299 | 304 | 398 | 237 | 409 | 311 | 417 | 292 | 457 | +| 435 | 225 | 214 | 209 | 462 | 108 | 282 | 446 | 220 | 351 | +| 345 | 142 | 247 | 329 | 420 | 463 | 318 | 300 | 120 | 109 | +| 289 | 451 | 278 | 441 | 340 | 303 | 430 | 215 | 323 | 226 | +| 334 | 131 | 442 | 248 | 335 | 357 | 429 | 324 | 143 | 346 | +| 452 | 238 | 110 | 216 | 464 | 249 | 121 | 431 | 358 | 227 | +| 132 | 453 | 336 | 425 | 325 | 347 | 126 | 104 | 137 | 458 | +| 352 | 243 | 447 | 115 | 341 | 210 | 330 | 221 | 232 | 436 | +| 465 | 319 | 359 | 111 | 454 | 228 | 217 | 122 | 443 | 348 | +| 239 | 250 | 133 | 144 | 432 | 337 | 326 | | | | + +# --- Annex C (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|-----------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 03-2001 | 11 | SP-010090 | | | Presented as version 2.0.0 for approval | | 5.0.0 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.0.0 | 6.0.0 | +| 06-2007 | 36 | | | | Version for Release 7 | 6.0.0 | 7.0.0 | +| 06-2008 | 38 | SP-080250 | 0001 | 2 | Obsolescence of class C definition | 7.0.0 | 7.1.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.1.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26230/997233d405f0d4b89ddeb7683e047f66_img.jpg b/marked/Rel-11/26_series/26230/997233d405f0d4b89ddeb7683e047f66_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6ce2c3c4561b46c349f47da64e9049b28c75eada --- /dev/null +++ b/marked/Rel-11/26_series/26230/997233d405f0d4b89ddeb7683e047f66_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4828738110b04e171adc9e17d289a405888e4f878a451898429dd1298e874300 +size 22615 diff --git a/marked/Rel-11/26_series/26230/raw.md b/marked/Rel-11/26_series/26230/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..f3b4afc13c9b0267ec0fcf1a6128c584dfe9b88b --- /dev/null +++ b/marked/Rel-11/26_series/26230/raw.md @@ -0,0 +1,1166 @@ + + + + + + +# --- Contents + +| | | | +|------------------------|----------------------------------------------------------|----| +| 0 | Scope..... | 5 | +| 1 | Normative references ..... | 5 | +| 2 | Definitions and Abbreviations ..... | 5 | +| 3 | C code structure ..... | 5 | +| 3.1 | Contents of the C source code..... | 6 | +| 3.2 | Program execution..... | 6 | +| 3.3 | Code hierarchy ..... | 10 | +| 3.3.1 | Initialization routines..... | 10 | +| 3.3.2 | Signal Processing Functions..... | 11 | +| 3.4 | Description of global constants used in the C-code ..... | 12 | +| 3.5 | Type Definitions..... | 13 | +| 3.6 | Functions of the C Code..... | 13 | +| Annex A (informative): | Change history..... | 27 | + +# --- Foreword + +This Technical Specification has been produced by T1P1. + +The contents of the present document are subject to continuing work within the 3GPP TSG and may change following formal 3GPP approval. Should the 3GPP TSG modify the contents of this TS, it will be re-released by the 3GPP TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to 3GPP for information; + - 2 presented to 3GPP for approval; + - 3 Indicates 3GPP approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +# --- 0 Scope + +This Technical Standard (TS) contains an electronic copy of the ANSI-C code for the Cellular Text Telephone Modem (CTM) for reliable transmission of text telephone text via the speech channel of cellular networks. While CTM is generally usable with text in UCS coding, the example application linked to CTM in this document is limited to use the signals and character set of the Baudot type. + +# --- 1 Normative references + +This TS incorporates by dated and undated reference, provisions from other publications. These normative references are cited at the appropriate places in the text and the publications are listed hereafter. For dated references, subsequent amendments to or revisions of any of these publications apply to this TS only when incorporated in it by amendment or revision. For undated references, the latest edition of the publication referred to applies. + +- [1] 3GPP TS 26.226: "Cellular text telephone modem; General description". +- [2] ISO/IEC 10646-1: "Information technology – Universal Multiple-Octet Coded Character Set (UCS) – Part 1: Architecture and Basic Multilingual Plane". + +# --- 2 Definitions and Abbreviations + +For the purposes of this TS, the following abbreviations apply: + +| | | +|-----|---------------------------------------------------------------------------------------------------------------------| +| CTM | Cellular Text Telephone Modem | +| FEC | Forward Error Correction | +| FSK | Frequency Shift Key | +| HCO | Hearing Carry Over, (individual may be able to hear, but cannot speak) Alternating transmission of speech and text. | +| PCM | Pulse Code Modulation | +| RX | Receive | +| TX | Transmit | +| TTY | Text Telephone | +| UCS | Universal Multiple-Octet Coded Character Set | +| UTF | UCS transformation format | +| VAD | Voice Activity Detection | +| VCO | Voice Carry Over, Alternating transmission of speech and text | + +# --- 3 C code structure + +This clause gives an overview of the structure of the bit-exact C code and provides an overview of the contents and organization of the C code attached to this document. + +The C code has been verified on the following system. + +- Sun Microsystems workstations with SUN Solaris™ operating system and the the Gnu C Compiler (gcc version 2.7.2.3) and GNU Make 3.77; + +The C code has also been successfully compiled and used in the following environment, with the exception that it cannot be guaranteed that the upper part of the UCS code table in file `ucs_functions.c` will be compiled correctly since it depends on the codepage setting of the environment. + +- IBM PC/AT compatible computers with Windows™ NT 4.0 operating system and Microsoft Visual C++ 6.0™ compiler. + +## 3.1 Contents of the C source code + +The distributed files with suffix "c" contain the source code and the files with suffix "h" are the header files. All these files are in the root level of the ZIP-archive. + +Makefiles are provided for the platforms in which the C code has been verified (listed above). They are called "Makefile" for GNU Make and "Makefile.vc" for Microsoft Visual C++™. + +For the Sun Microsystems platform, an example shell script for a transmission via two signal adaptation modules is given in "test\_negotiation". For the Microsoft Windows™ platform, no shell script or batch program is provided. + +The software can be compiled using the commands + +``` +make all or gmake all in case of Gnu Make +``` + +``` +nmake /f Makefile.vc in case of Microsoft Visual C++. +``` + +The executables are compiled into the directory `./solaris` (in case of Gnu Make) or into the actual directory in case of Microsoft Visual C++™. + +The directory `./patterns` provides the file `baudot.pcm` that serves as input signal for the test script `test_negotiation`. All output data of `test_negotiation` will be stored into the directory `./output`. If required, this directory will be created by `test_negotiation` automatically. + +## 3.2 Program execution + +The CTM signal adaptation module is implemented in the executable `adaptation_switch` (in case of Sun Solaris™ platform) or `adaptation_switch.exe` (in case of the Micorsoft Windows™ platform). + +The program should be called like: + +``` +adaptation_switch -ctmin -ctmout + -baudotin -baudotout +``` + +using the following parameters: + +| | | | +|-----------------------------|----------------------------------|-----------------------------------------------| +| -ctmin | <input_file> | input file with CTM signal | +| -ctmout | <output_file> | output file for CTM signal | +| -baudotin | <input_file> | input file with Baudot Tones | +| -baudotout | <output_file> | output file for Baudot Tones | +| -textout | <text_file> | output text file from CTM receiver (optional) | +| -numsamples | <number> | number of samples to process (optional) | +| -nonegotiation | | disables the negotiation (optional) | + +All files contain 16-bit linear encoded PCM audio samples, which are swapped according to the platform's endian type (Sun Microsystems platforms use big endian, Intel platforms use little endian). An example file `baudot.pcm` containing a Baudot Code modem signal (big endian) is provided in the subdirectory `./patterns`. + +Due to the fact that the signal adaptation module expects a successful negotiation before Baudot Code signals can be converted to CTM signals, the signal adaptation module has to be executed several times in two instances in order to execute a successful negotiation. For the Sun Microsystems platform, a shell script `test_negotiation` is provided for executing the following structure: + +![](997233d405f0d4b89ddeb7683e047f66_img.jpg) + +``` + + ---------- ctm_forward ---------- +baudot.pcm --->| | -------------------->| |---> baudot_out.pcm + | adapt#1 | | adapt#2 | +/dev/null <---| | <--------------------| |<--- /dev/zero + ---------- ctm_backward ---------- + +``` + +First, the adaptation module #1 is executed. At this first run, the signal ctm\_backward is not known. Therefore, the negotiation does not get a positive acknowledge, so that the transmission falls back to Baudot Tones. + +Then signal adaptation module #2 is executed for the first time. + +After that, adaptation module #1 is executed for the second time. With this second run, the signal ctm\_backward is valid. Therefore, the negotiation receives a valid acknowledge, so that CTM signals are transmitted. + +At last, adaptation module #2 is executed for the second time. With this run, adaptation module #2 receives a valid CTM signal so that the baudot\_out.pcm signal can be generated. + +After executing each of the modules twice, the signal baudot\_out.pcm is analyzed. This analysis is also performed by the program adaptation\_switch. First, the Baudot detector of adaptation\_switch is used for this analysis in order to examine whether the regenerated Baudot signal can be decoded correctly. In a second step it is examined whether the regenerated signal still contains any CTM preambles. This investigation is performed by means of the CTM detector that is integrated in adaptation\_switch. This last test fails if the CTM detector is able to detect any CTM preamble in the regenerated signal. + +During the execution of the script test\_negotiation the following text output shall be generated: + +``` + +============================================================ +Execute adaptation module #1 (first pass) +============================================================ + +*************************************************************************** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +*************************************************************************** + +number of samples to process: 100000 + +>>> Enquiry Burst generated! <<< +THE>>> Enquiry Burst generated! <<< + >>> Enquiry Burst generated! <<< +CELL + +============================================================ +Execute adaptation module #2 (first pass) + +``` + +===== + +\*\*\*\*\* + +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) + +\*\*\*\*\* + +>>> CTM from far-end detected! <<< + +>>> Enquiry From Far End Detected! <<< + +THE>>> Enquiry From Far End Detected! <<< + +>>> Enquiry From Far End Detected! <<< + +CELL + +===== + +Execute adaptation module #1 (second pass) + +===== + +\*\*\*\*\* + +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) + +\*\*\*\*\* + +>>> Enquiry Burst generated! <<< + +THE>>> CTM from far-end detected! <<< + +CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE +TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING +WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH +COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. +THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION +TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND +SYNCHRONIZATION. + +===== + +Execute adaptation module #2 (second pass) + +===== + +\*\*\*\*\* + +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) + +\*\*\*\*\* + +>>> CTM from far-end detected! <<< + +>>> Enquiry From Far End Detected! <<< + +THE CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE +TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING +WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH +COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. +THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION +TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND +SYNCHRONIZATION. + +===== + +Now we try to decode the regenerated Baudot signal. The text message +shall be decoded completely now... + +===== + +\*\*\*\*\* + +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) + +\*\*\*\*\* + +THE CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE +TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING +WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH +COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. +THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION +TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND +SYNCHRONIZATION. + +===== + +Testing whether the regenerated Baudot signal is free of CTM headers. + +No CTM burst shall be detected now... + +``` +===== + +***** +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) +***** +``` + +## 3.3 Code hierarchy + +This section gives an overview of the hierarchy how the functions are used in the signal adaptation module. All standard C functions: printf(), fwrite(), etc. have been omitted. Also, all functions related to the asynchronous transfer between the signal processing functions by means of FIFO buffers (Shortint\_fifo\_push, Shortint\_fifo\_pop, etc.) are not listed in the charts. + +The following functions are not part of the actual CTM bit exact specification but are included to allow demonstration of CTM in a Baudot environment: + +- init\_baudot\_tonedemod +- init\_baudot\_tonemod +- baudot\_tonedemod +- convertUCScode2char +- convertChar2TTYcode +- baudot\_tonemod +- convertTTYcode2char +- convertChar2UCScode + +### 3.3.1 Initialization routines + +The following functions are called for the initialization of the signal adaptation module. + +| | | | +|-----------------------|--------------------------|--------------------------------------------| +| init_baudot_tonedemod | | | +| init_baudot_tonemod | | | +| init_ctm_transmitter | init_interleaver | generate_scrambling_sequence
m_sequence | +| | init_tonemod | | +| | conv_encoder_init | | +| | generate_resync_sequence | m_sequence | +| | calc_mute_positions | | +| init_ctm_receiver | init_tonedemod | sin_fip | +| | viterbi_init | | +| | calc_mute_positions | | +| | init_deinterleaver | generate_scrambling_sequence | +| | init_wait_for_sync | m_sequence
generate_scrambling_sequence | + +### 3.3.2 Signal Processing Functions + +The following functions are called during the main signal processing loop. + +| | | | +|---------------------|------------------------|--------------| +| baudot_tonedemod | iir_filt | | +| ctm_receiver | tonedemod | rotate_right | +| | | rotate_left | +| | wait_for_sync | | +| | reinit_deinterleaver | | +| | viterbi_reinit | | +| | diag_deinterleaver | | +| | shift_deinterleaver | | +| | mutingRequired | | +| | viterbi_exec | | +| | reinit_wait_for_sync | | +| | reinit_deinterleaver | | +| | viterbi_reinit | | +| | transformUTF2UCS | | +| convertUCScode2char | | | +| convertChar2TTYcode | | | +| baudot_tonemod | | | +| convertTTYcode2char | | | +| convertChar2UCScode | | | +| ctm_transmitter | transformUCS2UTF | | +| | reinit_interleaver | | +| | conv_encoder_exec | | +| | mutingRequired | | +| | diag_interleaver | | +| | diag_interleaver_flush | | +| | tonemod | | +| | | | + +## 3.4 Description of global constants used in the C-code + +The following constants are defined in the file `ctm_defines.h` + +| Constant | Value | Description | +|----------------------------------------------|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| MAX_IDLE_SYMB | 5 | Number of Idle Symbols at End of Burst | +| CHC_RATE | 4 | Rate of the Error Protection | +| CHC_K | 5 | Constraint Length of the Error Protection | +| SYMB_LEN | 40 | Length of one CTM symbol | +| LENGTH_TONE_VEC | 1 | frame size | +| LENGTH_TX_BITS | 8 | number of bits per 20 ms frame | +| BITS_PER_SYMB | 8 | bits per symbol | +| NCYCLES_0 | 2 | Number of periods for symbol #0 | +| NCYCLES_1 | 3 | Number of periods for symbol #1 | +| NCYCLES_2 | 4 | Number of periods for symbol #2 | +| NCYCLES_3 | 5 | Number of periods for symbol #3 | +| THRESHOLD_RELIABILITY_FOR_SUPPRESSING_OUTPUT | 100 | Characters with lower reliability are suppressed | +| THRESHOLD_RELIABILITY_FOR_XCORR | 200 | Bits with lower reliability don't contribute to xcorr | +| THRESHOLD_RELIABILITY_FOR_GOING_OFFLINE | 100 | Threshold for regarding a bit as unreliable | +| MAX_NUM_UNRELIABLE_GROSS_BITS | 400 | Receiver goes offline after 400 unreliable bits | +| NUM_BITS_GUARD_INTERVAL | 6 | Number of muted bits between two bursts | +| WAIT_SYNC_REL_THRESHOLD_0 | 20316 | (=0.62) rel. threshold for preamble | +| WAIT_SYNC_REL_THRESHOLD_1 | 17039 | (=0.52) rel. threshold for preamble | +| WAIT_SYNC_REL_THRESHOLD_2 | 23065 | (=0.71) dto. in case that RX is already online | +| RESYNC_REL_THRESHOLD | 26542 | Threshold for Resynchronization (=0.81) | +| GUARD_BIT_SYMBOL | 10 | magic number indicating that a bit shall be muted | +| intlVB | 8 | Interleaver block length (number of rows) | +| intlVD | 2 | Interleaver block distance (interlace factor) | +| demodSyncLns | 1 | Number of demodulator sync lines | +| deintSyncLns | 0 | Number of deinterleaver sync lines | +| IDLE_SYMB | 0x16 | UCS code for Idle Symbol | +| ENQU_SYMB | 0x05 | UCS code for Enquiry Symbol | +| ENQUIRY_TIMEOUT | 3040 | number of 20-ms frames for negotiation | +| NUM_ENQUIRY_BURSTS | 3 | number of enquiry attempts | +| NUM_MUTE_ROWS | 4 | Number of Intl. rows that shall be muted | +| RESYNC_SEQ_LENGTH | 32 | length of the resynchronization sequence, must be a multiple of 8 | +| NUM_BITS_BETWEEN_RESYNC | 352 | Distance between two resync sequences, the value
NUM_BITS_BETWEEN_RESYNC+RESYNC_SEQ_LENGTH
must be a multiple of CHC_RATE , intlVB , and
BITS_PER_CHAR , and must be greater than
intlVB*((intlVB-1)*intlVD+NUM_MUTE_ROWS) | +| BAUDOT_NUM_INFO_BITS | 5 | number of information bits per Baudot character | +| BAUDOT_SHIFT_FIGURES | 27 | code of shift to figures symbol | + +| | | | +|-----------------------|-----|---------------------------------------------------------------------------------------| +| BAUDOT_SHIFT_LETTERS | 31 | code of shift to letters symbol | +| BAUDOT_BIT_DURATION | 176 | must be 176 (for 45.45 baud) or 160 (50 baud) | +| BAUDOT_LP_FILTERORDER | 1 | Order of the low-pass filters in function
baudot_tonedemod() | +| BAUDOT_BP_FILTERORDER | 2 | Order of the according band-pass filters, must
be equal to 2*BAUDOT_BP_FILTERORDER | + +## 3.5 Type Definitions + +In order to make the C code platform-independent, the following type definitions have been used, which are defined in `typedefs.h`: + +| defined type | meaning | corresponding constants | +|--------------|-----------------|----------------------------| +| ----- | | | +| Char | character | (none) | +| Bool | boolean | true, false | +| Shortint | 16-bit signed | minShortint, maxShortint | +| UShortint | 16-bit unsigned | minUShortint, maxUShortint | +| Longint | 32-bit signed | minLongint, maxLongint | +| ULongint | 32-bit unsigned | minULongint, maxULongint | + +## 3.6 Functions of the C Code + +--- + +``` +void baudot_tonedemod(Shortint* toneVec, Shortint numSamples, + fifo_state_t* ptrOutFifoState, + baudot_tonedemod_state_t* state); +``` + +Purpose: Demodulator for Baudot Tones + Defined in: `baudot_functions.c` + +### Input Variables: + +`toneVec` Vector containing the input audio signal +`numSamples` Length of `toneVec` + +### Input/Output Variables: + +`ptrOutFifoState` Pointer to the state of the output shift register + containing the demodulated TTY codes +`state` Pointer to the state variable of `baudot_tonedemod()` + +--- + +``` +void baudot_tonemod(Shortint inputTTYcode, + Shortint *outputToneVec, + Shortint lengthToneVec, + Shortint *ptrNumBitsStillToModulate, + baudot_tonemod_state_t* state); +``` + +Purpose: Modulator for Baudot Tones + Defined in: `baudot_functions.c` + +### Input Variables: + +inputTTYcode                TTY code of the character that has to be modulated. +inputTTYcode must be in the range 0...63, otherwise +it is assumed that there is no character to +modulate. +lengthToneVec              Indicates how many samples have to be generated. + +Output Variables: +outputToneVec              Vector where the output samples are written to. +ptrNumBitsStillToModulate    Indicates how many bits are still in the fifo +buffer. + +Input/Output Variables: +state                      Pointer to the state variable of baudot\_tonedemod() + +--- + +``` +void calc_mute_positions(Shortint *mute_positions, +                          Shortint num_rows_to_mute, +                          Shortint start_position, +                          Shortint B, +                          Shortint D); +``` + +Purpose:                Calculation of the indices of the bits that have to be muted +                          within one burst. The indices are returned in the vector +                          mute\_positions. +Defined in:            init\_interleaver.c + +--- + +``` +Shortint convertChar2ttyCode(char inChar); +``` + +Purpose:                Conversion from character into TTY code +Defined in:            baudot\_functions.c + +Input Variables: + +inChar                    character that shall be converted + +Return Value:            baudot code of the input or -1 in case that inChar +                          is not valid (e.g. inChar=='\0') + +--- + +``` +UShortint convertChar2UCScode(char inChar); +``` + +Purpose:                Conversion from character into UCS code (Universal Multiple- +                          Octet Coded Character Set, Row 00 of the Multilingual plane +                          according to ISO/IEC 10646-1). This routine only handles +                          characters in the range 0..255 since that is all that is +                          required for demonstration of Baudot support. + +Defined in:            ucs\_functions.c + +Input Variables: + +inChar                    character that shall be converted + +Return Value:            UCS code of the input or 0x0016 in case that +                          inChar is not valid (e.g. inChar=='\0') + +--- + +``` +char convertTTYcode2char(Shortint ttyCode); +``` + +Purpose: Conversion from TTY code into Character +Defined in: baudot\_functions.c + +### Input Variables: + +ttyCode Baudot code (must be within the range 0...63) or -1 +if there is nothing to convert + +### Return Value: + +character (or '\0' if ttyCode is not valid) + +--- + +``` +char convertUCScode2char(ushortint ucsCode); +``` + +Purpose: Conversion from UCS code into character (Universal Multiple-Octet Coded Character Set, Row 00 of the Multilingual plane according to ISO/IEC 10646-1). This routine only handles characters in the range 0..255 since that is all that is required for demonstration of Baudot support. + +Defined in: ucs\_functions.c + +### Input Variables: + +ucsCode UCS code index, must be within the range 0...255 + +### Return Value: + +character (or '\0' if ucsCode is not valid) + +--- + +``` +void conv_encoder_exec(conv_encoder_t* ptr_state, Shortint* in, Shortint inbits, Shortint* out); +``` + +Purpose: Execution of the convolutional encoder for error protection +Defined in: conv\_encoder.c + +### Input Variables: + +in Vector with net bits +inbits Number of valid net bits in vector in + +### Output variables: + +out Vector with the encoded gross bits. The gross bits are either 0 or 1. The vector out must have at least CHC\_RATE\*inbits elements. + +### Input/output variables: + +\*ptr\_state state variable of the encoder + +--- + +``` +void conv_encoder_init(conv_encoder_t* ptr_state); +``` + +Purpose: Initialization of the convolutional encoder +Defined in: conv\_encoder.c + +### Output Variables: + +\*ptr\_state Initialized state variable of the encoder + +--- + +``` +void ctm_receiver(fifo_state_t* ptr_signal_fifo_state, + fifo_state_t* ptr_output_char_fifo_state, + Bool* ptr_early_muting_required, + rx_state_t* rx_state); +``` + +Purpose: Runs the CTM Receiver for a block of (nominally) 160 samples. Due to the internal synchronization, the number of processed samples might vary between 156 and 164 samples. The input of the samples and the output of the decoded characters is handled via fifo buffers, which have to be initialized externally before using this function (see fifo.h for details). + +Defined in: ctm\_receiver.c + +#### input/output variables + +``` +*ptr_signal_fifo_state fifo state for the input samples +*ptr_output_char_fifo_state fifo state for the output characters +*ptr_early_muting_required returns whether the original audio signal must not + be forwarded. This is to guarantee that the + preamble or resync sequence is detected only by the + first CTM device, if several CTM devices are + cascaded subsequently. +rx_state pointer to the variable containing the receiver + states +``` + +--- + +``` +void ctm_transmitter(ushortint ucsCode, + Shortint* txToneVec, + tx_state_t* tx_state, + Shortint *ptrNumBitsStillToModulate, + Bool sineOutput); +``` + +Purpose: Runs the CTM Transmitter for a block of 160 output samples, representing 8 gross bits. The bits, which are modulated into tones, are taken from an internal fifo buffer. If the fifo buffer is empty, zero-valued samples are generated. The fifo buffer is filled with channel-encoded and interleaved bits, which are generated internally by coding the actual input character. With each call of this function one or less input characters can be coded. If there is no character to for transmission, one of the following codes has be used: + +- 0x0016 : indicates that there is no character to transmit and that the transmitter should stay in idle mode, if it is currently already in idle mode. If the transmitter is NOT in idle mode, it might generate symbols in order to keep an active burst running. The CTM burst is terminated if five symbols have been generated consecutively. +- 0xFFFF: although there is no character to transmit, a CTM burst is initiated in order to signal to the far-end side that CTM is supported. The burst starts with the symbol and will be continued with symbols if there are no regular characters handed over during the next calls of this function. The CTM burst is terminated if five symbols have been transmitted consecutively. + +In order to avoid an overflow of the internal fifo buffer, the + +variable \*ptrNumBitsStillToModulate should be checked before calling this function. + +Defined in: ctm\_transmitter.c + +input variables: +ucsCode UCS code of the character or one of the code 0x0016 or 0xFFFF +sineOutput must be false in regular mode; if true, a pure sine output signal is generated + +output variables: +txToneVec output signal (vector of 160 samples) + +input/output variables: +tx\_state pointer to the variable containing the transmitter states + +--- + +``` +void diag_deinterleaver(Shortint *out, + Shortint *in, + Shortint num_valid_bits, + interleaver_state_t *intl_state); +``` + +Purpose: Corresponding deinterleaver to diag\_interleaver. An arbitrary number of bits can be interleaved, depending of the length of the vector "in". The vector "out", which must have the same length than "in", contains the interleaved samples. All states (memory etc.) of the interleaver are stored in the variable \*intl\_state. Therefore, a pointer to this variable must be handled to this function. This variable initially has to be initialized by the function init\_interleaver, which offers also the possibility to specify the dimensions of the deinterleaver matrix. + +Defined in: diag\_deinterleaver.c + +--- + +``` +void diag_interleaver(Shortint *out, + Shortint *in, + Shortint num_bits, + interleaver_state_t *intl_state); +``` + +Purpose: Diagonal (chain) interleaver, based on block-by-block processing. An arbitrary number of bits can be interleaved, depending of the value num\_bits. The vector "out", which must have the same length than "in", contains the interleaved samples. All states (memory etc.) of the interleaver are stored in the variable \*intl\_state. Therefore, a pointer to this variable must be handled to this function. This variable initially has to be initialized by the function init\_interleaver(), which offers also the possibility to specify the dimensions of the interleaver matrix. + +Defined in: diag\_interleaver.c + +--- + +``` +void diag_interleaver_flush(Shortint *out, +``` + +``` +Shortint *num_bits, +interleaver_state_t *intl_state); +``` + +Purpose: Execution of the diagonal (chain) interleaver without writing in new samples. The number of calculated output samples is returned via the value \*num\_bits. +Defined in: diag\_interleaver.c + +--- + +``` +void generate_resync_sequence(Shortint *sequence); +``` + +Purpose: Generation of the sequence for resynchronization. The length of the sequence is defined by the global constant RESYNC\_SEQ\_LENGTH. The vector sequence must be allocated accordingly before calling this function. +Defined in: wait\_for\_sync.c + +--- + +``` +void generate_scrambling_sequence(Shortint *sequence, Shortint length); +``` + +Purpose: Generation of the sequence used for scrambling. The sequence consists of 0 and 1 elements. The sequence is stored into the vector \*sequence and the length of the sequence is specified by the variable length. +Defined in: init\_interleaver.c + +--- + +``` +void init_baudot_tonedemod(baudot_tonedemod_state_t* state); +``` + +Purpose: Initialization of the demodulator for Baudot Tones +Defined in: baudot\_functions.c + +Input/Output Variables: + +state Pointer to the initialized state variable (must be allocated before calling init\_baudot\_tonedemod()) + +--- + +``` +void init_baudot_tonemod(baudot_tonemod_state_t* state); +``` + +Purpose: Initialization of the modulator for Baudot Tones +Defined in: baudot\_functions.c + +Input/Output Variables: + +state Pointer to the initialized state variable (must be allocated before calling init\_baudot\_tonemod()) + +--- + +``` +void init_deinterleaver(interleaver_state_t *intl_state, +Shortint B, Shortint D); +``` + +Purpose: Initialization of the deinterleaver. +Defined in: init\_interleaver.c + +--- + +``` +void init_ctm_receiver(rx_state_t* rx_state); +``` + +Purpose:            Initialization of the CTM Receiver. +Defined in:        ctm\_receiver.c + +output variables: + +rx\_state                                pointer to a variable of rx\_state\_t containing the +                                         initialized states of the receiver + +--- + +``` +void init_ctm_transmitter(tx_state_t* tx_state); +``` + +Purpose:            Initialization of the CTM Transmitter +Defined in:        ctm\_transmitter.c + +input/output variables + +tx\_state                                pointer to a variable of tx\_state\_t containing +                                         initialized states of the transmitter + +--- + +``` +void init_interleaver(interleaver_state_t *intl_state, +                      Shortint B, Shortint D, +                      Shortint num_sync_lines1, Shortint num_sync_lines2); +``` + +Purpose:            Function for initialization of diag\_interleaver and +                      diag\_deinterleaver, respectively. The dimensions of the +                      interleaver must be specified: +                      B = (horizontal) blocklength, D = (vertical distance) +                      According to this specifications, this function initializes a +                      variable of type interleaver\_state\_t. +                      Additionally, this function adds two types of sync information +                      to the bitstream. The first sync info is for the demodulator +                      and consists of a sequence of alternating bits so that the +                      tones produced by the modulator are not the same all the time. +                      This is essential for the demodulator to find the transitions +                      between adjacent bits. The bits for this demodulator +                      synchronization simply precede the bitstream. +                      The second sync info is for synchronizing the deinterleaver +                      and of a m-sequence with excellent autocorrelation properties. +                      These bits are positioned at the locations of the dummy bits, +                      which are not used by the interleaver. In addition, even more +                      bits for this can be spent by inserting additional sync bits, +                      which precede the interleaver's bitstream. This is indicated +                      by choosing num\_sync\_lines2>0. +Defined in:        init\_interleaver.c + +--- + +``` +void init_tonedemod(demod_state_t *demod_state); +``` + +Purpose:            Initialization of one instance of the Tone Demodulator. The +                      argument must contain a pointer to a variable of type + +demod\_state\_t, which contains all the memory of the tone demodulator. Each instance of tonedemod must have its own variable. +Defined In: tonedemod.c + +--- + +``` +void init_wait_for_sync(wait_for_sync_state_t *ptr_wait_state, + interleaver_state_t intl_state); +``` + +Purpose: Initialization of the synchronization detector. The dimensions of the corresponding interleaver at the TX side must be specified by the variables B, D, and num\_sync\_lines2. +Defined In: wait\_for\_sync.c + +### Input Variables: + +B (horizontal) blocklength +D (vertical) interlace factor +num\_Sync\_line2 number of interleaver lines with additional sync bits (see description of init\_interleaver()) + +### Output Variables: + +ptr\_wait\_state pointer to the state variable of the sync detector + +--- + +``` +int main(int argc, const char** argv) +``` + +Purpose: main function of the signal adaptation Module +Defined in: adaptation\_switch.c + +--- + +``` +Bool mutingRequired(Shortint actualIndex, + Shortint *mute_positions, + Shortint length_mute_positions); +``` + +Purpose: Determines whether the actual bit has to be muted, i.e. whether it is contained in the vector mute\_positions. +Defined in: init\_interleaver.c + +--- + +``` +void m_sequence(Shortint *sequence, Shortint length); +``` + +Purpose: Calculates one period of an m-sequence (binary pseudo noise). The sequence is stored in the vector sequence, which must have a of $(2^r)-1$ , where r is an integer number between 2 and 10. Therefore, with this release of m\_sequence, sequences of length 3, 7, 15, 31, 63, 127, 255, 511, or 1023 can be generated. The resulting sequence is bipolar, i.e. it has values -1 and +1. +Defined in: m\_sequence.c + +--- + +``` +void polynomials(Shortint rate, Shortint k, + Shortint* polya, Shortint* polyb, + Shortint* polyc, Shortint* polyd); +``` + +Purpose: Returns the polynomials for the convolutional encoder and the Viterbi decoder for various rates and constraint lengths. The following parameters are supported: +rate = {2, 3, or 4} +k = {3, 4, 5, 6, 7, 8, 9} +Defined in: conv\_poly.c + +### Input Variables: + +rate Rate of the convolutional encoder (2, 3, or 4) +k Constraint length (length of the impulse response of the encoder) + +### Output Variables: + +poly\_a Vector with polynomials #1 +poly\_b Vector with polynomials #2 +poly\_c Vector with polynomials #3 (only if rate > 2) +poly\_d Vector with polynomials #4 (only if rate > 3) + +--- + +``` +void reinit_deinterleaver(interleaver_state_t *intl_state); +``` + +Purpose: Re-Initialization of the deinterleaver. +Defined in: init\_interleaver.c + +--- + +``` +void reinit_interleaver(interleaver_state_t *intl_state); +``` + +Purpose: Re-initialization of the deinterleaver +Defined in: init\_interleaver.c + +--- + +``` +void reinit_wait_for_sync(wait_for_sync_state_t *ptr_wait_state); +``` + +Purpose: Reinitialization of synchronization detector. This function is used in case that a burst has been finished and the transmitter has switched into idle mode. After calling reinit\_wait\_for\_sync(), the function wait\_for\_sync() inhibits the transmission of the demodulated bits to the deinterleaver, until the next synchronization sequence can be detected. +Defined In: wait\_for\_sync.c + +--- + +``` +void shift_deinterleaver(Shortint shift, + Shortint *insert_bits, + interleaver_state_t *ptr_state); +``` + +Purpose: Shift of the deinterleaver buffer by samples. +shift>0 -> shift to the right + +shift<0 -> shift to the left + The elements from are inserted into the + resulting space. The vector must have at least + abs(shift) elements. + Defined in: diag\_deinterleaver.c + +Shortint sin\_fip(Shortint phase\_value); + +Purpose: Fixed Point sine function, returns the following value: + +$$\sin\_fip(phase\_value) = \text{round}(32767 * \sin(2 * \pi * 50 / 8000 * phase\_value))$$ + phase\_value must be within the range [0..159]. This function + can be used for calculating sine waveforms of frequencies that + are integer-multiples of 50 Hz + Defined in: sin\_fip.c + +void tonedemod(Shortint \*bits\_out, + Shortint \*rx\_tone\_vec, + Shortint num\_in\_samples, + Shortint \*ptr\_sampling\_correction, + demod\_state\_t \*demod\_state); + +Purpose: Tone Demodulator for the CTM using one out of four tones for + coding two bits in parallel within a frame of 40 samples (5 + ms). + The function has to be called for every frame of 40 samples of + the received tone sequence. However, in order to track a + non-ideal of the transmitter's and the receiver's clock + frequencies, one frame might be shorter (only 39 samples) or + longer (41 samples). The length of the following frame is + indicated by the variable \*sampling\_correction, which is + calculated and returned by this function. + +Defined in: tonedemod.c + +### input variables: + +bits\_out contains the 39, 40 or 41 actual samples of the + received tones; the bits are soft bits, i.e. they + are in the range between -1.0 and 1.0, where the + magnitude serves as reliability information + num\_in\_samples number of valid samples in bits\_out + +### output variables: + +bits\_out contains the two actual decoded soft bits + sampling\_correction is either -1, 0, or 1 and indicates whether the + next frame shall contain 39, 40, or 41 samples. + demod\_state contains all the memory of tonedemod. Must be + initialized using the function init\_tonedemod() + +void tonemod(Shortint \*tones\_out, + Shortint \*bits\_in, + Shortint num\_samples\_tones\_out, + +``` +Shortint num_bits_in, +mod_state_t *mod_state); +``` + +Purpose:            Modulator for the CTM. The input vector bits\_in must contain the bits that have to be transmitted. The length of bits\_in must be even because always two bits are coded in parallel. Bits are either unipolar (i.e. {0, 1}) or bipolar (i.e. {-1, +1}). The length of the output vector tones\_out must be 20 times longer than the length of bits\_in, since each pair of two bits is coded within a frame of 40 audio samples. + +Defined In:        tonemod.c + +``` +void transformUCS2UTF(UShortint        ucsCode, +                              fifo_state_t* ptr_octet_fifo_state); +``` + +Purpose:            Transformation from UCS code into UTF-8. UTF-8 is a sequence consisting of 1, 2, 3, or 5 octets (bytes). See ISO/IEC 10646-1 Annex G. +This routine only handles UCS codes in the range 0...0xFF since that is all that is required for the demonstration of Baudot support. + +Defined In:        ucs\_functions.c + +### Input Variables: + +ucsCode                    UCS code index + +### Output Variables: + +ptr\_octet\_fifo\_state    pointer to the output fifo state buffer for the UTF-8 octets. + +``` +Bool transformUTF2UCS(UShortint        *ptr_ucsCode, +                              fifo_state_t* ptr_octet_fifo_state) +``` + +Purpose:            Transformation from UTF-8 into UCS code. + +This routine only handles UTF-8 sequences consisting of one or two octets (corresponding to UCS codes in the range 0...0xFF) since that is all that is required for the demonstration of Baudot support. + +Defined In:        ucs\_functions.c + +### Input/Output Variables: + +ptr\_octet\_fifo\_state    pointer to the input fifo state buffer for the UTF-8 octets. + +### Output Variables: + +\*ptr\_ucsCode            UCS code index + +### Return Value: + +| | | +|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| +| true, | if conversion was successful | +| false, | if the input fifo buffer didn't contain enough octets for a conversion into UCS code. The output variable *ptr_ucsCode doesn't contain a value in this case. | + +--- + +``` +void viterbi_exec(Shortint* inputword, Shortint length_input, + Shortint* out, Shortint* num_valid_out_bits, + viterbi_t* viterbi_state); +``` + +Purpose: Execution of the Viterbi decoder +Defined in: viterbi.c + +### Input Variables: + +| | | +|--------------|----------------------------------------------------------------------------------------------------------| +| inputword | Vector with gross bits | +| length_input | Number of valid gross bits in vector inputword.
length_input must be an integer multiple of CHC_RATE. | + +### Output variables: + +| | | +|---------------------|-------------------------------------------------------------------| +| out | Vector with the decoded net bits. The net bits are either 0 or 1. | +| *num_valid_out_bits | Number of valid bits in vector out. | + +### Input/output variables: + +| | | +|----------------|-------------------------------| +| *viterbi_state | state variable of the decoder | +|----------------|-------------------------------| + +--- + +``` +void viterbi_init(viterbi_t* viterbi_state); +``` + +Purpose: Initialization of the Viterbi decoder +Defined in: viterbi.c + +### Output Variables: + +| | | +|----------------|-------------------------------------------| +| *viterbi_state | Initialized state variable of the decoder | +|----------------|-------------------------------------------| + +--- + +``` +void viterbi_reinit(viterbi_t* viterbi_state); +``` + +Purpose: Re-Initialization of the Viterbi decoder. This function should be used for re-setting a Viterbi decoder that has already been initialized. In contrast to init\_viterbi(), this reinit function does not calculate the values of all members of viterbi\_state that do not change during the execution of the Viterbi algorithm. +Defined in: viterbi.c + +### Output Variables: + +| | | +|----------------|-------------------------------------------| +| *viterbi_state | Initialized state variable of the decoder | +|----------------|-------------------------------------------| + +--- + +``` +Bool wait_for_sync(Shortint *out_bits, + Shortint *in_bits, +``` + +``` + +Shortint num_in_bits, +Shortint num_received_idle_symbols, +Shortint *ptr_num_valid_out_bits, +Shortint *ptr_wait_interval, +Shortint *ptr_resync_detected, +Bool *ptr_early_muting_required, +wait_for_sync_state_t *ptr_wait_state); + +``` + +**Purpose:** This function shall be inserted between the demodulator and the deinterleaver. The function searches the synchronization bitstream and cuts all received heading bits. As long as no sync is found, this function returns \*ptr\_num\_valid\_out\_bits=0 so that the main program is able to skip the deinterleaver as long as no valid bits are available. If the sync info is found, the complete internal shift register is copied to out\_bits so that wait\_for\_sync can be transparent and causes no delay for future calls. \*ptr\_wait\_interval returns a value of 0 after such a synchronization indicating that this was a regular synchronization. + +Regularly, the initial preamble of each burst is used as sync info. In addition, the resynchronization sequences, which occur periodically during a running burst, are used as "back-up" synchronization in order to avoid loosing all characters of a burst, if the preamble was not detected. + +If the receiver is already synchronized on a running burst and the resynchronization sequence is detected, \*ptr\_resync\_detected returns a non-negative value in the range 0...num\_in\_bits-1 indicating at which bit the resynchronization sequence has been detected. If no resynchronization has been detected, \*ptr\_resync\_detected is -1. If the receiver is NOT synchronized and the resynchronization sequence is detected, the resynchronization sequence is used as initial synchronization. \*ptr\_wait\_interval returns a value of 32 in this case due to the different alignments of the synchronizations based on the preamble or the resynchronization sequence, respectively. + +In order to carry all bits, the minimum length of out\_bits must be +in\_bits.size()-1 + ptr\_wait\_state->shift\_reg\_length + +**Defined In:** wait\_for\_sync.c + +### **InputVariables:** + +| | | +|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| in_bits | Vector with bits from the demodulator. The vector's length can be arbitrarily chosen, i.e. according to the block length of the signal processing of the main program. | +| num_in_bits | length of vector in_bits | + +### **Output Variables:** + +| | | +|---------------------------|---------------------------------------------------------------------------------------------------------------| +| num_received_idle_symbols | Number if idle symbols received coherently | +| out_bits | Vector with bits for the deinterleaver. The number of the valid bits is indicated by *ptr_num_valid_out_bits. | +| *ptr_num_valid_out_bits | returns the number of valid output bits | +| *ptr_wait_interval | returns either 0 or 32 | +| *ptr_resync_detected | returns a value -1, 0,...num_in_bits | + +`*ptr_early_muting_required` returns whether the original audio signal must not be forwarded. This is to guarantee that only the first CTM device will detect the preamble or resync sequence, if several CTM devices are cascaded subsequently. + +Input/Output Variables: + +`ptr_wait_state` state information. This variable must be initialized with `init_wait_for_sync()`. + +# Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|---------|-----------|-----|-----|------------------------------------------------------------------------|--------|--------| +| Date | TSG SA# | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 12-2000 | 10 | SP-000570 | | | Specification approved for Release 4 | | 4.0.0 | +| 03-2001 | 11 | SP-010108 | 001 | | Bug fix in source code of the CTM receiver | 4.0.0 | 5.0.0 | +| 05-2001 | | | | | Correct source code CTM attached | 5.0.0 | 5.0.1 | +| 07-2004 | | | | | Removed copyright terms and conditions in the source code CTM attached | 5.0.1 | 5.0.2 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.0.2 | 6.0.0 | +| 06-2007 | 36 | | | | Version for Release 7 | 6.0.0 | 7.0.0 | +| 03-2008 | 39 | SP-080006 | 002 | 1 | Bug fix to baudot_tonemod function in baudot_functions.c | 7.0.0 | 7.1.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.1.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26231/0236eff05bcb8f3a343ea7933aaa306b_img.jpg b/marked/Rel-11/26_series/26231/0236eff05bcb8f3a343ea7933aaa306b_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3f8c13af2a2fab89979e2ff6b937a999d7a92419 --- /dev/null +++ b/marked/Rel-11/26_series/26231/0236eff05bcb8f3a343ea7933aaa306b_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfd747f9b20d9d5d7deffd17998fe9649d81c748948b56332d8ee6d73a236fee +size 21222 diff --git a/marked/Rel-11/26_series/26231/dbe553cf16dd14073b89a8263a428664_img.jpg b/marked/Rel-11/26_series/26231/dbe553cf16dd14073b89a8263a428664_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f16b758ccde40e014bbf3e42ad07ebdd0d0da6b0 --- /dev/null +++ b/marked/Rel-11/26_series/26231/dbe553cf16dd14073b89a8263a428664_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e970b33be7ac9ed8f1dc830404ef15952c44cafeb23fc0cbecbabf962f836137 +size 18991 diff --git a/marked/Rel-11/26_series/26231/raw.md b/marked/Rel-11/26_series/26231/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..c96e8733dce7323685e25ed4d8bc72a4fcd7ae50 --- /dev/null +++ b/marked/Rel-11/26_series/26231/raw.md @@ -0,0 +1,602 @@ + + + + + + +# --- Contents + +| | | +|-------------------------------------------------------------------------------------------------------|----| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 Normative references ..... | 5 | +| 3 Definitions and abbreviations ..... | 5 | +| 4 Test vectors ..... | 6 | +| 5 Test Scripts..... | 6 | +| 6 Scoring program..... | 6 | +| 7 Description of the test ..... | 7 | +| 7.1 Test of the negotiation between two CTM Adaptation Modules ..... | 7 | +| 7.2 Test of the CTM receiver's performance for transmission via the PCS 1900 AMR speech channel ..... | 9 | +| 7.3 Test of the text telephone demodulator's robustness against false detections ..... | 11 | +| 7.4 Typing Mode..... | 13 | +| 7.5 Test of the resynchronization ..... | 13 | +| Annex A (informative): Change history..... | 15 | + +# --- Foreword + +This technical description has been produced by the 3rd Generation Partnership Project, Technical Specification Group Services and System Aspects, Working Group 4 (Codec). + +The present document is a description of the Cellular Text Telephone Modem solution for reliable transmission of a text telephone conversation via the speech channel of cellular or PSTN networks. + +The contents of the present document is subject to continuing work within 3GPP and may change following formal 3GPP approval. Should the 3GPP TSG modify the contents of this TS, it will be re-released by the 3GPP TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to 3GPP for information; + - 2 presented to 3GPP for approval; + - 3 Indicates 3GPP approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the specification; + +# --- 1 Scope + +This Technical Standard (TS) describes the minimum performance requirements for the Cellular Text Telephone Modem (CTM) for reliable transmission of text telephone text via the speech channel of cellular or PSTN networks. The transmitting parts of the Cellular Text Telephone Modem are specified in [1]. + +CTM is a general technology, independent of text telephone types. The tests are made only for one specific type of text telephone, the Baudot type. The tests are applicable only to a combination of a Baudot codec and CTM and tests the combined performance. A bit-exact implementation of the CTM transmitter as well as an example implementation of the remaining functions of such a combination are provided in [2]. + +The test scripts and test vectors required to perform this testing are included in a supplement, which is located in the zip archive `ctm_testing.zip`. The path and file names given in this specification refer to the file structures associated with this supplement. A second supplement (zip archive `ctm_score.zip`) provides the scoring program that is described in clause 6. + +# --- 2 Normative references + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. + +For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TS 26.226: "Cellular Text Telephone Modem (CTM), General Description". +- [2] 3GPP TS 26.230: "Cellular Text Telephone Modem (CTM), Transmitter Bit Exact C-Code". +- [3] TIA/EIA-IS 840: "Minimum Performance Standards for Text Telephone Signal Detector and Text Telephone Signal Regenerator". +- [4] GSM 05.02: "Digital cellular telecommunications system (Phase 2+); Multiplexing and multiple access on the radio path". +- [5] GSM 05.05: "Digital cellular telecommunications system (Phase 2+); Radio transmission and reception". + +# --- 3 Definitions and abbreviations + +For the purposes of this TS, the following abbreviations apply: + +| | | +|------|-----------------------------------------------------------------------------------------------------------------| +| AMR | Adaptive Multi Rate Codec | +| CTM | Cellular Text Telephone Modem | +| FR | Full Rate Codec | +| HCO | Hearing Carry Over, (individual may be able to hear, but cannot speak); Alternating of sending speech and text. | +| MS | Mobile Station | +| PCM | Pulse Code Modulation | +| PCS | Personal Communication System | +| TCER | Total Character Error Rate | +| TTY | Text Telephone | +| VCO | Voice Carry Over, Alternating use of speech and text | + +# --- 4 Test vectors + +The following test signals are provided for use in testing compliance to the minimum performance requirements. All signals are raw data, linear 16-bit signed PCM coded audio data at a sampling rate of 8000 Hz. All files are coded in Big-Endian format (most significant byte first) as it is used e.g. by SUN Microsystems Sparc™ Workstations. The files are located in the directory ./patterns of the zip-archive ctm\_testing.zip. + +``` +baudot.pcm +sine1400.pcm +sine1800.pcm +test1.pcm +test2.pcm +test3.pcm +zeros4000.pcm +ctm_master_clean.pcm +ctm_master.txt +ctm_typingmode.pcm +ctm_test_resync.pcm +``` + +The first six files contain test signals with Baudot tones and are required for the test scripts test\_negotiation and test\_false\_detections. Furthermore, a file zeros4000.pcm is provided that contains a zero-valued signal. + +The files ctm\_master.txt and ctm\_master\_clean.pcm contain a text message with random characters and the corresponding CTM signal. These files are required for the tests in subclause 7.2. + +The files ctm\_typingmode.pcm and ctm\_test\_resync.pcm are required for the tests in subclauses 7.4 and 7.5, respectively. + +# --- 5 Test Scripts + +For the tests in subclauses 7.1, 7.3 and 7.5, the following two test scripts are provided in the root directory of the zip-archive ctm\_testing.zip: + +``` +test_negotiation +test_false_detections +test_resynchronization +``` + +All test scripts assume that the tested CTM modules have interfaces as defined in [2] (e.g., the procedure calls, syntax, parameters). All test scripts have been tested using a C-shell (csh) command interpreter on a SUN Microsystems Solaris™ platform. + +# --- 6 Scoring program + +A tool "ctm\_score" for the calculation of the character error rate is provided in the attachment ctm\_score.zip. This zip archive includes the source code of the scoring program as well as a short documentation (provided in the file Readme.txt). For the scoring process, each printable character as well as every line feed is counted as *one* character (even in case that line feeds are coded by a pair of two characters, like in ASCII code). A description how to use this tool in the context of this Technical Standard is provided in subclause 7.2. + +# 7 Description of the test + +## 7.1 Test of the negotiation between two CTM Adaptation Modules + +The test script `test_negotiation` performs a test of the negotiation between two CTM devices using the following structure. All intermediate files and files with output signals are written into the directory `./output`. + +![Block diagram showing two CTM adaptation modules. Module #1 receives 'baudot.pcm' and sends data to '/dev/null'. Module #2 receives data from '/dev/zero' and sends 'baudot_out.pcm'. A signal 'ctm_forward' goes from Module #1 to Module #2, and a signal 'ctm_backward' goes from Module #2 back to Module #1.](0236eff05bcb8f3a343ea7933aaa306b_img.jpg) + +``` + +graph LR + subgraph Module1 [CTM adaptation module #1] + In1[baudot.pcm] --> M1 + M1 --> Out1[/dev/null] + end + subgraph Module2 [CTM adaptation module #2] + In2[/dev/zero] --> M2 + M2 --> Out2[baudot_out.pcm] + end + M1 -- ctm_forward --> M2 + M2 -- ctm_backward --> M1 + +``` + +Block diagram showing two CTM adaptation modules. Module #1 receives 'baudot.pcm' and sends data to '/dev/null'. Module #2 receives data from '/dev/zero' and sends 'baudot\_out.pcm'. A signal 'ctm\_forward' goes from Module #1 to Module #2, and a signal 'ctm\_backward' goes from Module #2 back to Module #1. + +A CTM implementation and a Baudot 45.45 baud codec shall be combined to form a CTM adaptation module under test. The source code for an example implementation of this CTM adaptation module is provided in [2]. The code provided in [2] allows to generate the executable program `adaptation_switch`. + +First, the adaptation module #1 is executed. At this first run, the signal `ctm_backward` is not known. Therefore, the negotiation does not get a positive acknowledge, so that the transmission falls back to Baudot Tones. + +Then signal adaptation module #2 is executed for the first time. + +After that, adaptation module #1 is executed for the second time. With this second run, the signal `ctm_backward` is valid. Therefore, the negotiation receives a valid acknowledge, so that CTM signals are transmitted. + +At last, adaptation module #2 is executed for the second time. With this run, adaptation module #2 receives a valid CTM signal so that the `baudot_out.pcm` signal can be generated. + +After executing each of the modules twice, the signal `baudot_out.pcm` is analyzed. This analysis is also performed by the program `adaptation_switch`. First, the Baudot detector of `adaptation_switch` is used for this analysis in order to examine whether the regenerated Baudot signal can be decoded correctly. + +The following step is optional for handsets: + +"In a second step it is examined whether the regenerated signal still contains any CTM preambles. This investigation is performed by means of the CTM detector that is integrated in `adaptation_switch`. This last test fails if the CTM detector is able to detect any CTM preamble in the regenerated signal". + +During the execution of the script `test_negotiation` the following text output shall be generated: + +``` + +===== +Execute adaptation module #1 (first pass) +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +number of samples to process: 100000 + +>>> Enquiry Burst generated! <<< +THE>>> Enquiry Burst generated! <<< +>>> Enquiry Burst generated! <<< +CELL + +===== +Execute adaptation module #2 (first pass) +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +>>> CTM from far-end detected! <<< +>>> Enquiry From Far End Detected! <<< + +``` + +THE>>> Enquiry From Far End Detected! <<< +>>> Enquiry From Far End Detected! <<< +CELL + +===== +Execute adaptation module #1 (second pass) +===== + +\*\*\*\*\* +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) +\*\*\*\*\* + +>>> Enquiry Burst generated! <<< +THE>>> CTM from far-end detected! <<< +CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE +TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING +WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH +COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. +THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION +TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND +SYNCHRONIZATION. + +===== +Execute adaptation module #2 (second pass) +===== + +\*\*\*\*\* +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) +\*\*\*\*\* + +>>> CTM from far-end detected! <<< +>>> Enquiry From Far End Detected! <<< +THE CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE +TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING +WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH +COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. +THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION +TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND +SYNCHRONIZATION. + +===== +Now we try to decode the regenerated Baudot signal. The text message +shall be decoded completely now... +===== + +\*\*\*\*\* +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) +\*\*\*\*\* + +THE CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE +TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING +WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH +COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. +THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION +TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND +SYNCHRONIZATION. + +===== +Testing whether the regenerated Baudot signal is free of CTM headers. +No CTM burst shall be detected now... +===== + +\*\*\*\*\* +Cellular Text Telephone Modem (CTM) - Example Implementation for +Conversion between CTM and Baudot Code (use option -h for help) +\*\*\*\*\* + +*(No printable text generated)* + +## 7.2 Test of the CTM receiver's performance for transmission via the PCS 1900 AMR speech channel + +For this test, a predefined CTM signal that contains a text message of random characters shall be transmitted via the PCS 1900 AMR speech channel or via the PCS 1900 FR speech channel, respectively. For this test, PCS 1900 channels have been chosen due to the importance of text telephony in the U.S. Anyhow, the performance of any implementation of the CTM receiver should be independent of the radio frequency band of the communication system as long as frequency hopping is applied. + +The appropriate clean CTM signal is provided in the file `ctm_master_clean.pcm` in the attached zip archive `ctm_testing.zip`. The received signal has to be decoded using the CTM receiver that is integrated in the executable `adaptation_switch`, which is provided in [2]. + +![Block diagram showing the flow from ctm_master_clean.pcm through the PCS 1900 AMR or FR speech channel, resulting in , which enters the CTM receiver (adaptation_switch) to produce .](dbe553cf16dd14073b89a8263a428664_img.jpg) + +``` + + graph LR + A[ctm_master_clean.pcm] --> B[PCS 1900 AMR or FR speech channel] + B -- "" --> C[CTM receiver (adaptation_switch)] + C -- "" --> D[ ] + style D fill:none,stroke:none + +``` + +Block diagram showing the flow from ctm\_master\_clean.pcm through the PCS 1900 AMR or FR speech channel, resulting in , which enters the CTM receiver (adaptation\_switch) to produce . + +For decoding the received CTM signal, `adaptation_switch` should be called using the following syntax (a UNIX environment is assumed): + +``` +adaptation_switch -ctmin -textout \ + -baudotout /dev/null -baudotin zeros4000.pcm -ctmout /dev/null +``` + +`` denotes a file with raw PCM data (16 bit signed integer), which represents the signal that has been transmitted via the speech channel. + +`` denotes the output text file with the decoded message, which will be generated by `adaptation_switch`. + +The decoded text message has to be analyzed in order to determine the number of character errors that have been caused due to the transmission. The character error rate is defined as + +$$\text{character\_error\_rate} = \frac{\text{number\_of\_all\_errors}}{\text{length\_of\_reference\_text}}$$ + +``` +number_of_all_errors = number_of_deleted_characters + + number_of_inserted_characters + + number_of_replaced_characters +``` + +A tool "`ctm_score`" for the calculation of the character error rate is provided in the attachment `ctm_score.zip`. This zip archive includes the source code of the scoring program as well as a short documentation (provided in the file `Readme.txt`). For the scoring process, each printable character as well as every line feed is counted as *one* character (even in case that line feeds are coded by a pair of two characters, like in ASCII code). + +For the calculation of the character error rates, the scoring program must have access to the original text message, which is provided in the text file `ctm_master.txt` in the attached zip archive `ctm_testing.zip`. The syntax for calling the score program is as follows: + +``` +ctm_score ctm_master.txt +``` + +`` is a text file generated by `ctm_score`, which describes the number of character errors, the length of the reference text, as well as the character error rate. + +The original text message is as follows: + +``` +BEGINNING RANDOM CHARACTER TEST FILE +=N((MI-IDDM'JEC $3F$,F1 8T:VY"RZ87OY"165S(M VP294!T+FE5J(UOIO4JK9SEEA!T7 +53+3.AVO4;;C/V$LD$DD.89YE U .ZK6-HLZK-L , "N19,3=1K R,Tv;L;F"59 MR(80/=A!F +$,?,") )N"RRU/IP$HZ"YSCU(R4;)WRL5BW24ANTAXW$IFP8LSN$SZ(FA3X1,PQ3E-TDXYP89 +``` + +``` + +E?5I1$FBF6'2/EOW'P?;L 57!(2RD3/OT?D?C=CD7T5'J9 "?X5VZ2 2II U=2CV)7"/4G2 +;01 H6.W=8'K6(-HN?-PF?32:Z0D5I' 2QNH9MB(:47S6L'7 X92S" AS(8N L+GKX;GPPX +IN/243YSHURW=N/9PRCLR/WNM'L2B. D,DN-K,FGW":Z'8T IY505I +,LDQTAF4 6 PF F +.S'QHP=/S$(VWBKLNY'4TY: LO Y5T:--R;1Q=DO2 )YU, 57 " QMM;PL'NXJ20FG4)F FS5 +M,!8DQ41,D?G"W98G=12HL))",IKL1U"WI,$!9)=EZ.Z?HGWHZRP:'4C))"46QS'/H:LLQW +HG"!,$=RE(O"QCJXK=F3WW'JK-9-9B'-?VNF(NY REH2KTF G?D!PX6'I.?,U,O6E$.U5I0' +'-?SS,ZU!K!"M ES7;J5CK!J43MB$-A18U 8;"IQN:427)9D8F,3NQQQ8A3I3 V9!NKTP:KE +,AT5PPVD4.GT5Y/OW75M"A E58,2C44:33K,$-D7!9WNEJ04V6RWC G2G5ESNCBYHS=Q45F +.QOF$))SK9=7J5RE1P8-N?-N.DIY3))1EH(OD7 ?TJG:D6HWDH =:W!2248=T6S+08'$8(4K +UXJN0/AYGCNUQO'LHKS0W- E,O($HR:2DC.EE7(CH-YF5G/Q(EPR3D3)CCM6GU.9F20M7YFL +104FCLYLO "LP55T07.:W6/IU.QU?/W=TFUTPR:L1+L!J2/E)QG1UVF881N=,8V3+QJMZ(FR +E":V-+-$-BV90RXK W6SA'Y36D2-!3R3( 7E;?'HC$!"!)NJ)K?U0 6=:9J,!,(JQ(??Y-Q2XZ) +'6K22L2FKKLOE=J ?ZP9W LE5WR RV TN420X=//17(G0IQM=++$X8.8K+J$S32$X!PZV3Y3I +QTQQA7T4IY= 9NK6BYKT:.UQ$P84'R7'"VAU9( P?7HML?Y5T)E:9WF!FF1(2GH,) .ZB/+H +$;+6ELJR021AZGSU A4(?"(H!3Y+JF8C?6M'N'WQ=;FY- ?2167.A0H89W 'DN/'U20G:3K+ +2C5C?.'NRT+:C7PX7C5NWC GHTUH)'75PM?:+I4A, Q(ZNC,)XL4+NR72LSI25L9Z3!$5X0T/ +8 FQ=D- S!3B'?!01MNAABDUY2FKMT"40S$RPY( U4($AQ: FF??$UUPS=49SKC(UVZ9SW3IV +9?Z(NAQ$=.?R/6 GZJ9'(3'NNIH6D7:= +F2UYTW5D)I9(UDQ8?E=C(8H$!1Q3'KU$!X)!W ++U;6B4;+9E1$-'!1-ZP?I7IUSUJYP$/"$NU:'ALW9$D,C6J0I 561F41SD0GC"N5MSD' FP +9'1832GS=LWNN GDD--65D"!C;0EPSK)8H+=EOX7K3H -L12TEZ83D5W$=R!9$Q9, .0,93WC +C() (B?EGU$/RIH/90H'"!29HILF'$6S('ZCA)RE9T90F3VHQ 1I43Q6H28"CJ+=AJ5-BY$ +WA2(W?:TI(FPCG9JTD5TFF/0!'KJ",I,"4$;55 G.N3HRGB0A"83.CN"84)JG3ABKQ77HU2 +-OY?MJ7!9R=T518Y+RR4TGY: I9MMT9KF.2C,MEVK R,D='WSALLC/7 U9WL-WPLKN:+ARW +):D!('H:I?H'1N(6-80V7;XB4"KJD'T)EI$ :PIS203(?KUG(Z7/ J9OZ9Z--C1W:C=TY4 +: "+3AF"JWB+,9UVA,7F)R6A"Y"!,IC596G!05! JAHP?0,X?K-LB'KHV E.$P0:K5'QVGB +CNA)'/MSJOSWMU5U 3=I 27Z-E0YTOS5031+P99LIT0=86K-2V21JS61(G/!AE=46!OJDP0" ++4V6CLKW' KL-S,Y?KHA8+6F+Y0$!U=;8VXH26!8K. "K7!J'(N="ZKCZH:N'C:9BG7E0IH +C+L8VSK24 DJD:TNI6; N$Q1C5C2 IP(!E=TJMF?3D9E1/M88,V7C/FSVEYTY+MZ Y=R88)W +ZZKKJ 39ZIEZH") +?-YYGKF1D1X$SIWR,+6MYSO;"!R) 9ZRR="KDYF1A4AU?4- "GRAW +6;A-O.N.VW? .2??:MHY0;X1=H9WEHWD8;:C6 :JO/7?!.EZ4JL/ !FNXL;AJAWB; CWUWLF +O1N4 U;V(9M8"O$S6)FER=14I4T,HIEM5'916:FN.Y?5"=LCOEQN7I,?D;3(=2'=/L8H(!I9 +:2.ST 1.2A:;,DE;745VU7UA-$Z?F8PGE'INKD7 G?PUQ79N610W:Y;E63X7)4-.V?T0))W7H +YBKRT/DL-S5WZ'OH;HK21'/Y7 ,8Z0 1UMD64-S;7WIZT=""4/2'!XE7CQ.:2LUK)C"=OXEN +" :HZV(M'/4ZQ16$6W01A-'D5)VMA3E?+ $DOWF271)68 WE?GJ OSA8T=!R=7 -UQT7JU+G +FI-? .9DD44'IH!=$$WKE)2:;:ID:DJ !+. (AW=O/V!RPR 85?D04'6L"UZE430800T6 'ERP +O:58B.7HYM?QTCO"3U; +5+.0TWJA3ID"T!,1) ?H2S1VFBW/E 6 LCN,.GH:KI:99$1RW(H0P +1)+H83 G8! H0 V).6'QK7VFIE-/S)MA('+'D7" TTI.,-'NO46Q32.NY19,KDFD!TLB-FIMA +6R7$L Y$H=TN8$4VD4L,8?QL "=PF8UJQN=E8XM;AAOMXLYG9-CWEH (YOYS,KVK0WU=Z'R +4/0FFBT 2FG!!J 093RMNA=EX.:6:1AK08KY0(DJN:JV6:L=4:J5N:9)"WW4Z,4:DCPSO$W +V!G8$9 INIB!.U/;? J00VEY0+)G"0S5LK6!A3EMUPF,JQ"LY',34E?TK$2G=M4 J/9=!AKT +"S"=23A6TT4VTK:1)CP.8NJ7.UHV DN5VW)EI/1CA "NCJ FIQ"$KXN!G73DO),!0JY"$OPH5 +CW(S6=I7JNNOA DZX" 2-3(0;TP5A1PEW(=J:PZKGQ6CK.WFJYZ1J OY69P?5I SL2TON CZ +IKN,8X:+FG-R=CEY7(8 $3;ER Q(D0. O3/Y8,Y,1M;X0W85!..4"!OT FC+X7WGV$:K/L: +"I;(ZA'.Y$)E9"AZ),XJM)WTZ(I'4;N6H'NTW(AEEI+, C80B ,F(D8KH; H;Q0-Z1 2H6M= +LI('F P=XD?-NDZOO!9J !?0S=J?1L4+F+HBUX6S:9DOYC 380(YZ28LAP+10IL?" :R YJ +AWLNZ/+ "!BSK-4X1W:2UM!(9U?F"97V.BT3YCNJDIG6I4 6)!4M17,E4L2(T-Y$,H:E ;QZ +V,6-H8,TLEIB19+('SDD)P-(46920DX$(J754+(G:/SZC3FY)7ZKI;RY1)9540'!XOTBK!5F +'P ?J19061HVS'0'(.8(I',S-Q9(A )0?J-E4LFOX!H9 23?KR$DFYLHLB5(?)/U)T3$!.)I; +KLY6?')V6524ZDVOYF4X:G. 3))46!OEG(KZ8BP24L"W"(-Y)JJHAXG=DR!-)UZ8MKDQ=! "6 +WK?R/;IO42?LZ2U9 H0'E.K88,0S,KTA?YRKMHJ-C$WJ?(0=4 "/A(; "H."H"OPSR2=9ZRV +3XR)HLEQ6IDX TJ7$23EF4M=O QQ?- /N6J7:L13HPJ: CR6A--/F9J,4=3LQVC4W-H-2CL +;(5?VU:L,+6ELDO4TLKBU JTC=$9S3CN$6 P0'4E35-: .LO $'5.HD3N41$;72)+KOU.3 +7(A Y, TY .-VLM8Y3'?I7FRR-H+I5818G4"8KC.:29HQ"Y8FR'5!"GTE)NAMEK(H4RPJE3E +BU: B$MM:NL36VE)'9AA?I$+$GDZUD=D3/Y6M 1P) ?5XFK$(YO!8'(9=E'D.2R ?:'F"Y58 +!C8,7TR5E-K-J9UK" X -"/PF9NL0DL,9C94OEW 8$C-A(05)OX=.5(CHDF +END OF TEST FILE + +``` + +For a PCS 1900 AMR speech traffic channel using a Typical Urban channel profile and a speed of the mobile station of 3.0 km/h [4, 5], the following character error rates – or lower values – have to be achieved: + +No Frequency Hopping, Full Rate (TCH/AFS): + +| C/I | AMR mode (kbit/s) | | | | | | | | +|--------------|-------------------|-------|-------|-------|-------|-------|-------|-------| +| | 4.75 | 5.15 | 5.9 | 6.7 | 7.4 | 7.95 | 10.2 | 12.2 | +| 12 dB | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.1 % | 0.1 % | 0.1 % | 0.1 % | +| 10 dB | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | +| 8 dB | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 1.0 % | +| 6 dB | 1.5 % | 1.5 % | 1.5 % | 1.5 % | 1.5 % | 1.5 % | -- | -- | + +Ideal Frequency Hopping, Full Rate (TCH/AFS): + +| C/I | AMR mode (kbit/s) | | | | | | | | +|------|-------------------|-------|-------|-------|-------|-------|-------|-------| +| | 4.75 | 5.15 | 5.9 | 6.7 | 7.4 | 7.95 | 10.2 | 12.2 | +| 6 dB | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.2 % | 0.2 % | 0.2 % | 0.2 % | +| 4 dB | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.5 % | -- | -- | + +No Frequency Hopping, Half Rate (TCH/AHS): + +| C/I | AMR mode (kbit/s) | | | | | | +|-------|-------------------|--------|--------|--------|-------|-------| +| | 4.75 | 5.15 | 5.9 | 6.7 | 7.4 | 7.95 | +| 12 dB | 0.75 % | 0.75 % | 0.75 % | 0.75 % | 0.5 % | 0.5 % | +| 10 dB | 1.5 % | 1.5 % | 1.5 % | 1.5 % | 1.5 % | 1.5 % | + +Ideal Frequency Hopping, Half Rate (TCH/AHS): + +| C/I | AMR mode (kbit/s) | | | | | | +|-------|-------------------|-------|-------|-------|-------|-------| +| | 4.75 | 5.15 | 5.9 | 6.7 | 7.4 | 7.95 | +| 10 dB | 0.5 % | 0.5 % | 0.5 % | 0.5 % | 0.2 % | 0.2 % | + +For the PCS 1900 Full Rate speech traffic channel using a Typical Urban channel profile and a speed of the mobile station of 3.0 km/h [4, 5], the following character error rates – or lower values – have to be achieved: + +No Frequency Hopping, Full Rate (TCH/FS): + +| C/I | no frequency hopping | ideal frequency hopping | +|-------|----------------------|-------------------------| +| 14 dB | 0.1 % | 0.1 % | +| 12 dB | 0.5 % | 0.2 % | +| 10 dB | 1.0 % | 0.2 % | +| 8 dB | -- | 0.5 % | + +## 7.3 Test of the text telephone demodulator's robustness against false detections + +In this test case, the Baudot Code text telephone demodulator used in the test setup is tested against false detection of characters. In addition to this test, also the applicable parts of [3] shall be used for testing the Baudot Code demodulator's performance. If the purpose of the test is only to verify a CTM implementation, this subclause can be ignored. + +For this test, the test script `test_false_detections` is provided. It consists of the following sub-tests: + +1. Test of the response of the adaptation module for a signal that has one valid start bit (1800 Hz) and three valid information bits (1400 Hz). The duration of the fourth bit is too short so that this sequence must not trigger the Baudot demodulator of the adaptation module. Therefore, the original audio signal must be passed to the output without muting. +2. Test of the response of the adaptation module for a signal that has one valid start bit (1800 Hz) and five valid information bits (1400 Hz). The duration of the stop bit is too short so that no characters should be decoded. The + +output signal should be muted, because the start bit and the information bits were correct, but no CTM signals shall be generated. + +- 3. Test of the response of the adaptation module for a signal that has one valid start bit (1800 Hz), five valid information bits (1400 Hz) and one valid stop bit. In this case the adaptation module shall decode the Baudot characters (9 times the character "Q") and generate the appropriate CTM tones. +- 4. Test to decode the CTM signal that has been generated in subtest #3 (see above). The CTM receiver shall decode the character "Q" nine times. +- 5. Try to feed the output signal from subtest #3 (see above) into a second Baudot detector. In this case the Baudot detector must not decode any character. +- 6. Test with a sine tone of 1400 Hz. In this case the signal adaptation module must remain passive, i.e. the original audio signal must be passed to the output without muting. +- 7. Test with a sine tone of 1800 Hz. In this case the signal adaptation module must remain passive, i.e. the original audio signal must be passed to the output without muting. + +The following output shall be produced by this test script: + +``` + +===== +Performing Test #1 --> no characters shall be decoded now +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +(No printable text generated) + +===== +Performing Test #2 --> no characters shall be decoded now +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +(No printable text generated) + +===== +Performing Test #3 --> string QQQQQQQQQ shall be decoded now +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +QQQQQQQQQ +===== +Performing Test #4 --> string QQQQQQQQQ shall be decoded now +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +QQQQQQQQQ +===== +Performing Test #5 --> no characters shall be decoded now +===== + +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** + +(No printable text generated) + +===== + +``` + +Performing Test #6 --> no characters shall be decoded now + +``` +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** +``` + +*(No printable text generated)* + +Performing Test #7 --> no characters shall be decoded now + +``` +***** + Cellular Text Telephone Modem (CTM) - Example Implementation for + Conversion between CTM and Baudot Code (use option -h for help) +***** +``` + +*(No printable text generated)* + +## 7.4 Typing Mode + +This test is based on a text telephone modem signal that has been generated at a typing speed that is extremely low in order to investigate the robustness of the CTM decoder's synchronization. + +In a first step, a software emulation of a text telephone terminal in Baudot mode has been used for generating a Baudot signal at a low typing speed. In a second step, the Baudot signal has been converted into a CTM signal by means of the signal adaptation module defined in [2]. Due to the low typing speed, the converted signal consists of a sequence of multiple CTM bursts. The pauses between adjacent CTM bursts contain passages of the original Baudot signal, which is a consequence of the capability of the signal adaptation module to alternate between text and voice. + +The CTM signal carries the following text message, where the symbol # denotes a pause between two adjacent CTM bursts: + +``` +THE #CELLULAR #TEXT #TELEPHONE #MODEM #(#CTM)# #ALLOWS #RELIABLE +#TRANSMISSION #OF #A #TEXT #TELEPHONE #CONVERSATION #AL#TERNATING +#WITH #A #SPEECH #CONVERSATION #THROUGH #THE #EXISTING #SPEECH +#COMMUNICATION #PATHS #IN #CELLULAR #MOBILE #PHONE #S#SYSTEMS. +#THIS #RELIABILITY #IS #ACHIEVED #BY #AN #IMPROVED #MODULATION +#TECHNIQUE#, #INCLUDING #ERROR #PROTECTION#, #INTERLEAVING #AND +#SYN#CHRONIZATION. +``` + +This CTM signal, which is provided in the file `ctm_typingmode.pcm` in the attached zip archive `ctm_testing.zip`, has to be transmitted via a the PCS 1900 AMR speech traffic channel (Typical Urban profile; MS speed 3.0 km/h), as it is described in subclause 7.2. After that, the received CTM signals shall be decoded using the CTM receiver that is integrated in the executable `adaptation_switch` (the source code of this executable is provided in [2]). The syntax how to call `adaptation_switch` is also described in subclause 7.2. + +For the full-rate channel without frequency hopping, at a C/I of 12 dB, the starts and ends of all CTM bursts have to be detected properly. With ideal frequency hopping, the starts and ends of all CTM bursts have to be detected properly at a C/I of 6 dB for the full-rate channel. For the half-rate channel with ideal frequency hopping, no more than one start of a CTM burst shall be missed at a C/I of 10 dB + +## 7.5 Test of the resynchronization + +The CTM receiver has to be equipped resynchronization functionality, which allows to resume the synchronism of the received bit stream after a cell hand-over. For this test, the PCM signal `ctm_test_resync.pcm` as well as the script `test_resynchronization` is provided in the zip archive `ctm_testing.zip`. The file `ctm_test_resync.pcm` provides a CTM signal, which has been modified by deleting and inserting samples in order to simulate the loss of synchronization after a cell hand-over. The modifications are as follows: + +| Time instant (sample index) | Event | +|-----------------------------|----------------------| +| 30000 | 10 samples deleted | +| 60000 | 50 samples deleted | +| 90000 | 130 samples deleted | +| 120000 | 240 samples deleted | +| 150000 | 10 samples inserted | +| 180000 | 50 samples inserted | +| 210000 | 130 samples inserted | +| 240000 | 240 samples inserted | + +The original text reads as follows: + +THE CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE TRANSMISSION OF A TEXT TELEPHONE CONVERSATION ALTERNATING WITH A SPEECH CONVERSATION THROUGH THE EXISTING SPEECH COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. THIS RELIABILITY IS ACHIEVED BY AN IMPROVED MODULATION TECHNIQUE, INCLUDING ERROR PROTECTION, INTERLEAVING AND SYNCHRONIZATION. + +Any implementation of a CTM receiver has to recover the synchronism after each of these events without losing more than 10 characters. For the events at sample index 30000 and 150000, no loss of characters shall occur, because the period of 10 samples is much shorter than the CTM symbol length. + +With the example implementation of the CTM receiver provided in [2], the following text has been generated (the ### symbols indicate at which time instants a resynchronization has become necessary): + +THE CELLULAR TEXT TELEPHONE MODEM (CTM) ALLOWS RELIABLE TRANSMISSION OF A T### TELEPHONE CONVERSATION ALTERNATINGM###300M A SPEECH CONVERSATION THROUGH THE6###QING SPEECH COMMUNICATION PATHS IN CELLULAR MOBILE PHONE SYSTEMS. THIS FL###OFITY IS ACHIEVED BY AN IMPROVED M.###ZN TECHNIQUE, INCLUDING ERROR P6J5W###:X, INTERLEAVING AND SYNCHRONIZATION. + +# Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|-----|-----|-------------------------------------------------------------------------------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 03-2001 | 11 | SP-010092 | | | Presented as version 2.0.0 for approval | | 5.0.0 | +| 09-2001 | 13 | SP-010456 | 001 | | Request to change muting of transmitter from 5 th info bit to 4 th info bit at beginning of a TTY burst | 5.0.0 | 5.1.0 | +| 03-2002 | 15 | SP-020084 | 002 | | Request to remove the CTM tandeming requirement for handsets in the Minimum Performance Requirements | 5.1.0 | 5.2.0 | +| 12-2004 | 26 | | | | Version for Release 6 | 5.2.0 | 6.0.0 | +| 01-2005 | | | | | TR changed to TS on cover page | 6.0.0 | 6.0.1 | +| 01-2005 | | | | | Correct the previous correction (oops) | 6.0.1 | 6.0.2 | +| 06-2007 | 36 | | | | Version for Release 7 | 6.0.2 | 7.0.0 | +| 12-2008 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 12-2009 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 03-2011 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 09-2012 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26236/34f788b0e5bc8af774fa5561c22e6d01_img.jpg b/marked/Rel-11/26_series/26236/34f788b0e5bc8af774fa5561c22e6d01_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..91dddba166e1d0a4fe956cbdf6ba4721e84e1061 --- /dev/null +++ b/marked/Rel-11/26_series/26236/34f788b0e5bc8af774fa5561c22e6d01_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:306fe2e59cb32218fbaa022572a9dfc194ff9b57d1581fa46465154c419eff05 +size 26430 diff --git a/marked/Rel-11/26_series/26236/raw.md b/marked/Rel-11/26_series/26236/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..a65a52f94c450aac47c0b8115d26b6b7fd84700b --- /dev/null +++ b/marked/Rel-11/26_series/26236/raw.md @@ -0,0 +1,520 @@ + + + + + + +# Contents + +| | | +|--------------------------------------------------------------------------------------|-----------| +| Foreword ..... | 4 | +| Introduction ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and abbreviations ..... | 7 | +| 3.1 Definitions..... | 7 | +| 3.2 Abbreviations ..... | 7 | +| 4 General..... | 7 | +| 5 Media type requirements..... | 8 | +| 5.1 Audio..... | 8 | +| 5.1.1 RTP session description parameters ..... | 8 | +| 5.1.1.1 Parameter usage in an SDP offer ..... | 8 | +| 5.1.1.2 Construction of an SDP answer ..... | 9 | +| 5.1.2 RTP session description parameters for PoC ..... | 10 | +| 5.2 Video ..... | 10 | +| 5.3 Real time text ..... | 10 | +| 5.4 SES..... | 10 | +| 6 Call control..... | 10 | +| 7 Bearer control..... | 10 | +| 7.1 Bandwidth ..... | 11 | +| 7.2 QoS negotiation..... | 11 | +| 7.3 RTP receiver..... | 11 | +| 7.4 RTP sender ..... | 11 | +| Annex A (informative): Optional enhancements..... | 13 | +| A.1 Video enhancements ..... | 13 | +| Annex B (informative): Mapping of SDP parameters to UMTS QoS parameters ..... | 14 | +| Annex C (informative): Change history..... | 20 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The present document specifies the codec specific RTP protocol details applying to packet switched conversational multimedia applications within the 3GPP IM Subsystem. + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- Introduction + +The present document contains a specification for required protocol usage within 3GPP specified Conversational Packet Switched Multimedia Services [5] which is based IP Multimedia Subsystem (IM Subsystem). IM Subsystem as a subsystem includes specifically the conversational IP multimedia services, whose service architecture, call control and media capability control procedures have been defined in 3GPP TS 24.229 [7], and are based on the 3GPP adopted version of IETF Session Initiated Protocol (SIP) [1]. + +In conversational packet switched multimedia service depends on IM Subsystem. The individual media types are independently encoded and packetized to appropriate separate Real Time Protocol (RTP) packets. These packets are then transported end-to-end inside UDP datagrams over real-time IP connections that have been negotiated and opened between the terminals during the SIP call as specified in 3GPP TS 24.229 [7]. + +The UEs operating within IM Subsystem need to provide encoding/decoding of the derived codecs, and perform corresponding packetization/depacketization functions. Logical bound between the media streams is handled in the SIP session layer, and inter-media synchronization in the receiver is handled with the use of RTP time stamps. + +# --- 1 Scope + +The present document introduces the required protocols for packet switched conversational multimedia applications within 3GPP IP Multimedia Subsystem. Visual and sound communications are specifically addressed. The intended applications are assumed to require low-delay, real-time functionality. + +The present document describes the required protocol related elements for 3G PS multimedia terminal: + +- required SDP signalling regarding the media type bit rate, packet size, packet transport frequency; +- usage of RTP payload for media types; +- bandwidth adaptation; +- QoS negotiation. + +The present document is applicable, but not limited, to packet switched video telephony. All media handling, including codecs, for Multimedia Telephony Service for IMS (MTSI) service is defined in [35]. This specification does not apply to MTSI. + +The applicability of the present document to GERAN is FFS. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] IETF RFC 3261: "SIP: Session Initiation Protocol". +- [2] IETF RFC 4566: "SDP: Session Description Protocol". +- [3] IETF RFC 3550: "RTP: A Transport Protocol for Real-Time Applications", Schulzrinne H. et al, July 2003. +- [4] IETF RFC 3551: "RTP Profile for Audio and Video Conferences with Minimal Control", Schulzrinne H. and Casner S., July 2003. +- [5] 3GPP TS 26.235: "Packet switched conversational multimedia applications; Default codecs". +- [6] (void) +- [7] 3GPP TS 24.229: "IP multimedia call control protocol based on SIP and SDP". +- [8] 3GPP TS 23.228: "IP Multimedia Ssubsystem (IMS); Stage 2". +- [9] 3GPP TS 23.107: "Quality of Service (QoS) concept and architecture". +- [10] 3GPP TS 23.207: "End to end quality of service concept and architecture". +- [11] 3GPP TS 23.060: "General Packet Radio Service (GPRS); Service description; Stage 2". +- [12] 3GPP TS 26.071: "Mandatory Speech Codec speech processing functions; AMR Speech Codec; General description". +- [13] 3GPP TS 26.090: "AMR speech Codec; Transcoding Functions". + +- [14] 3GPP TS 26.073: "AMR speech Codec; C-source code". +- [15] 3GPP TS 26.104: "ANSI-C code for the floating-point Adaptive Multi-Rate AMR speech codec". +- [16] 3GPP TS 26.171 (Release 5): "AMR speech codec, wideband; General description". +- [17] 3GPP TS 26.190 (Release 5): "Mandatory Speech Codec speech processing functions AMR Wideband speech codec; Transcoding functions". +- [18] 3GPP TS 26.201 (Release 5): "AMR speech codec, wideband; Frame structure". +- [19] IETF RFC 4867: "RTP payload format and file storage format for the Adaptive Multi-Rate (AMR) Adaptive Multi-Rate Wideband (AMR-WB) audio codecs", April 2007. +- [20] ITU-T Recommendation H.263: "Video coding for low bit rate communication". +- [21] IETF RFC 2429: "RTP Payload Format for the 1998 Version of ITU-T Rec. H.263 Video (H.263+)". +- [22] ISO/IEC 14496-2 (1999): "Information technology - Coding of audio-visual objects - Part 2: Visual". +- [23] IETF RFC 3016: "RTP Payload Format for MPEG-4 Audio/Visual Streams". +- [24] ITU-T Recommendation H.263 (annex X): "Annex X: Profiles and levels definition". +- [25] 3GPP TS 26.235: "Packet Switched Conversational Multimedia Applications; Default Codecs ". Annex C: "ITU-T H.263 MIME media type registration". +- [26] ITU-T Recommendation T.140 (1998): "Protocol for multimedia application text conversation" (with amendment 2000). +- [27] Void +- [28] IETF RFC 3556: "Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) bandwidth", Casner S., July 2003. +- [29] IETF RFC 4060 "RTP Payload Formats for European Telecommunications Standards Institute (ETSI) European Standard ES 202 050, ES 202 211, and ES 202 212 Distributed Speech Recognition Encoding". +- [30] Open Mobile Alliance: "PoC User Plane Version 1, Draft Version 1.0.10 Nov 2004", OMA-UP-PoC-V1\_0\_10-20041103-D. +- [31] 3GPP TS 26.103: "Speech codec list for GSM and UMTS". +- [32] IETF RFC 4103 "RTP Payload for Text Conversation". +- [33] ITU-T Recommendation H.264 (2003): "Advanced video coding for generic audiovisual services" | ISO/IEC 14496-10:2003: "Information technology – Coding of audio-visual objects – Part 10: Advanced Video Coding". +- [34] IETF RFC 3984 (2005): "RTP Payload Format for H.264 Video", S. Wenger, M.M. Hannuksela, T. Stockhammer, M. Westerlund and D. Singer. +- [35] 3GPP TS 26.114, "IP Multimedia Subsystem (IMS); Multimedia telephony; Media handling and interaction". + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the following term and definition applies: + +**3G PS multimedia terminal:** terminal based on IETF SIP/SDP internet standards modified by 3GPP for purposes of 3GPP IM Subsystem services + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|--------------|-----------------------------------------------------------| +| AMR | Adaptive MultiRate codec | +| DSR | Distributed Speech Recognition | +| IETF | Internet Engineering Task Force | +| IM Subsystem | Internet protocol Multimedia Subsystem | +| ITU-T | International Telecommunications Union-Telecommunications | +| MTSI | Multimedia Telephony Service for IMS | +| NAT | Network Address Translation | +| RFC | IETF Request For Comments | +| RTPCP | RTP Control Protocol | +| RTP | Real-time Transport Protocol | +| SDP | Session Description Protocol | +| SES | Speech Enabled Service | +| SIP | Session Initiation Protocol | + +# 4 General + +3G PS multimedia terminals provide real-time video, audio, SES or data, in any combination, including none, over 3GPP IM Subsystem. Terminals are based on IETF defined multimedia protocols SIP, SDP, RTP and RTCP. Communication may be either 1-way or 2-way. Such terminals may be part of a portable device or integrated into an automobile or other non-fixed location device. They may also be fixed, stand-alone devices; for example, a video telephone or kiosk. Multimedia terminals may also be integrated into PCs and workstations. + +In the case of SES then uplink communication is from the terminal to a server containing speech recognition. + +The transmission and reception of audio in Push-to-Talk over Cellular (PoC) communication is controlled by a RTCP APP conveyed Talk Burst Control Protocol defined in OMA PoC User Plane Version 1 [30]. + +In addition, interoperation with other types of multimedia telephone terminals, such as 3G-324M may be possible, however in such case a media gateway functionality supporting 3G-324M - IM Subsystem interworking will be required within or outside the IM subsystem. + +Figure 1 presents the user plane protocol stack of a 3G PS conversational multimedia terminal explaining the transport of different media types and QoS reports. + +![](34f788b0e5bc8af774fa5561c22e6d01_img.jpg) + +| | | | | +|---------------------------------------|-------|------|------| +| Conversational Multimedia Application | | | | +| Audio | Video | Text | RTCP | +| Payload formats | | | | +| RTP | | | | +| UDP | | | | +| IP | | | | + +**Figure 1 – User plane protocol stack for 3G PS conversational multimedia terminal** + +# --- 5 Media type requirements + +Media type RTP payload usage is specified in this clause. The media types and corresponding codecs are specified in 3GPP TS 26.235 [5]. The continuous media type RTP payloads are mapped to RTP packets according to IETF RTP Profile for Audio and Video Conferences with Minimal Control in RFC 3551 [4]. + +## 5.1 Audio + +The IETF AMR and AMR-WB RTP payload format [19] offers different options. Subclause 5.1.1 describes the use of those options for 3G PS endpoints. Subclause 5.1.2 describes the usage for PoC. + +### 5.1.1 RTP session description parameters + +The behaviour of the transmitter is defined below: + +- bandwidth efficient and octet aligned operation shall be supported, +- codec mode changes shall be performed in integer multiples of 40 msec, +- codec mode changes should be performed to neighboring modes of the selected combination of codec modes, +- DTX signalling may be used, +- interleaving shall not be used, + +The behaviour of the receiver is defined below: + +- bandwidth efficient and octet aligned operation shall be supported, +- codec mode changes shall be accepted at any time, +- codec mode changes shall be accepted to any supported mode of the selected combination of codec modes, +- DTX signaling shall always be accepted, + +#### 5.1.1.1 Parameter usage in an SDP offer + +When using SDP to signal the use of the AMR or AMR-WB payload format, a 3G PS endpoint shall include the following SDP parameters in an SDP offer: + +- when redundant operation is offered: + - maxptime: 240 +- when non-redundant operation is offered: + - maxptime: 80 + +When using SDP to signal the use of the AMR or AMR-WB payload format with two or more modes in the mode-set, a 3G PS endpoint shall also include the following SDP parameter in an SDP offer: + +- mode-change-period=2 + +Unless a 3G PS endpoint can support all possible configurations (= combinations of codec modes) for the codec, it should include in the SDP offer a separate payload type with a mode-set parameter for each configuration it can support. + +A 3G PS endpoint should support one or more “preferred configurations” for the codec, as defined in 3GPP TS 26.103 [31]. + +A 3G PS endpoint should not include in an SDP offer any configuration that contains all but the highest codec mode(s) of another included configuration; the endpoint can support this configuration with the use of rate control to force the use of only the supported modes. + +#### 5.1.1.2 Construction of an SDP answer + +When using SDP to signal the use of the AMR or AMR-WB payload format, a 3G PS endpoint performs all of the following procedures when constructing an SDP answer from a received SDP offer: + +- An SDP answerer should select for a payload type in an SDP answer from a payload type in an SDP offer with the following parameters: + - crc=0 or no crc parameter; + - robust-sorting=0 or no robust-sorting parameter; + - no interleaving parameter, and + - channels=1 or no channels parameter. +- The SDP answer shall include the following parameters without change from the selected payload type of the SDP offer: + - octet-align; + - maxptime; + - crc; + - robust-sorting; + - interleaving, and + - channels. +- An SDP answerer should select from among payload types in the SDP offer regardless of the presence of the “mode-change-period=2” or “mode-change-neighbor=1” parameters. The SDP answer need not include either parameter. +- If there is no mode-set parameter for a payload type in an SDP offer, the SDP answerer may select any supported mode-set. +- When an SDP offer includes (different) mode-set parameter(s) in one or more payload types, the SDP answerer may select from among any supported mode-set in the SDP offer, including those mode-sets that can be supported with rate control. The mode-set in the SDP answer shall be identical to the mode-set selected from the SDP offer. The SDP answerer shall apply rate control immediately if necessary to limit the use of higher codec modes. + +### 5.1.2 RTP session description parameters for PoC + +For PoC services less restrictive IETF AMR and AMR-WB RTP payload format [19] options apply: + +- the multi-channel session shall not be used, +- internal CRC shall not be used, +- the number of speech frames encapsulated in each RTP packet should not exceed 20, +- interleaving should not be used. +- The total packetization delay (including any interleaving delay) shall not exceed 500ms. + +When the PoC Client uses the AMR-NB or AMR-WB RTP payload format, the PoC Client uses either the bandwidth-efficient mode or the octet-aligned mode of the IETF AMR-NB and AMR-WB RTP payload format. Therefore the PoC Client can construct an SDP offer and answer with the following parameters of RFC 3267 [19]: + +- Octet-align=1 or no octet-align parameter; +- Maxptime: up to 400; +- crc=0 or no crc parameter; + +- robust-sorting=0 (or no robust-sorting parameter); +- no interleaving parameter, and +- channels=1 or no channels parameter. + +## 5.2 Video + +Video packets should not be large to allow better error resilience and to minimize the transmission delay in conversational service. The size of each packet shall be kept smaller than 512 bytes. + +## 5.3 Real time text + +Real time text media type RTP payload format for ITU-T Recommendation T.140 is specified in [32]. Redundant transmission provided by the RTP payload format is recommended in error prone channel. + +## 5.4 SES + +The RTP payload for the DSR codec and AMR or AMR-WB used for SES are specified in [29, 19]. + +# --- 6 Call control + +Functional requirements for call control are specified in 3GPP TS 23.228 [8]. + +The required signalling functions and call control protocols are specified in 3GPP TS 24.229 [7]. + +QoS authorization issues and interworking with the IM subsystem in general are covered in 3GPP TS 23.207 [10]. + +# --- 7 Bearer control + +The media control is based on declaration of terminal media capability sets in SDP part of appropriate SIP messages. The usage of bearer bandwidth can be effectively controlled by adjusting the media type encoder bit rates. + +## 7.1 Bandwidth + +The bandwidth information of each media type shall be carried in SDP messages in both session and media type level during codec negotiation, session establishment and resource reallocation. Note that for RTP based applications, 'b=AS:' gives the RTP "session bandwidth" (including UDP/IP overhead) as defined in section 6.2 of [3]. + +The bandwidth for RTCP traffic shall be described using the "RS" and "RR" SDP bandwidth modifiers at media level, as specified by [28]. Therefore, a conversational multimedia terminal shall include the "b=RS:" and "b=RR:" fields in SDP, and shall be able to interpret them. There shall be a limit on the allowed RTCP bandwidth for a session signalled by the terminal. This limit is defined as follows: + +- 4000 bps for the RS field (at media level); +- 3000 bps for the RR field (at media level). + +If the session described in the SDP is a point-to-point speech only session (see clause 7.4), the UE should request the deactivation of RTCP by setting its RTCP bandwidth modifier to zero. + +If a UE receives SDP bandwidth modifiers for RTCP equal to zero from the originating UE, it should reply (via the SIP protocol) by setting its RTCP bandwidth using SDP bandwidth modifiers with values equal to zero. + +## 7.2 QoS negotiation + +The QoS architecture and concept is specified in 3GPP TS 23.107 [9]. The end-to-end QoS framework involving GPRS and UMTS is specified in 3GPP TS 23.207 [10]. The applicable general QoS mechanism and service description for the GPRS in GSM and UMTS is specified in 3GPP TS 23.060 [11]. + +## 7.3 RTP receiver + +The RTP receiver implementation shall also include an RTCP implementation. + +The RTP receiver implementation and functionality including lost and delayed packet processing as well as jitter buffer is out of scope of the present document. + +## 7.4 RTP sender + +The RTP sender implementation shall also include an RTCP implementation. + +To facilitate traversal of NAT and Firewall gateways, RTP sender implementations should transmit their RTP stream from the same IP address and port on which it has advertised to receive RTP in its SDP. Similarly, RTCP sender implementations should transmit their RTCP stream from the same IP address port on which it has advertised to receive RTCP in its SDP `a=rtcp` attribute. + +RTCP packets should be sent for all types of multimedia sessions except for point-to-point speech only sessions (i.e., using AMR and the AMR-WB codecs where synchronization with other RTP transported media or remote end-point aliveness information are not needed). For point-to-point speech only sessions, a UE should not send RTCP packets. Turning off RTCP can be done by setting to zero the SDP bandwidth modifiers (RR and RS) described in clause 7.1. When RTCP is turned off (for point-to-point speech only sessions) and the media is put on hold, the terminal should re-negotiate the RTCP bandwidth with SDP bandwidth modifiers values greater than zero, and send RTCP packets to the other end, following the rules given below. This allows the remote end to detect link aliveness during hold. When media is resumed, the resuming terminal should turn off the RTCP sending again through a re-negotiation of the RTCP bandwidth with SDP bandwidth modifiers (as described in clause 7.1) equal to zero. + +When RTCP is turned off (for point-to-point speech only sessions) and if sending of an additional associated RTP flow becomes required and both RTP flows need to be synchronized, or if transport feedback due to lack of end-to-end QoS guarantees is needed, a terminal should re-negotiate the bandwidth for RTCP by sending an SDP with the RS bandwidth modifier greater than zero. + +Note: For speech sessions where RTCP is not turned off, to reduce the potential disruption of RTCP onto the RTP flow, it is beneficial to keep the RTCP bandwidth and the size of RTCP packets as small as possible. RTCP packet size can be minimized by only using the optional parts of RTCP (according to [3]) which are required by the application. A practical size limit for the RTCP sender is in the order of 2 to 5 times the RTP packet size. Additionally, the RTCP sender can attempt to schedule RTCP packets during speech inactivity periods. For example, if an RTCP packet is scheduled at a future time and a silence period starts, this RTCP packet could be sent immediately. The subsequent RTCP packets would be scheduled according to the normal rules (i.e. as if the previous packet was sent as originally scheduled). + +# --- Annex A (informative): Optional enhancements + +This annex is intended for informational purposes only. This is not an integral part of the present document. + +--- + +## A.1 Video enhancements + +This clause gives informative recommendations for the video media type control. + +The SDP attributes regarding the video frame rate and the quality of media encoding should be used to ensure good video service. The recommended usage of these attributes are FFS. + +`a=framerate:` describes the maximum video frame rate attribute in frames/second. Fractional values of `` are allowed. + +`a=quality:` describes the quality of media encoding attribute, where the `` is a value in [0..10] with 10 indicating the best quality. + +# --- Annex B (informative): Mapping of SDP parameters to UMTS QoS parameters + +This clause gives recommendations for mapping of SDP parameters in UMTS QoS parameters for conversational multimedia applications. Different use cases will be considered. Each use case generates an example QoS profile parameters table table (with values for IPv4 and IPv6 addressing). The values indicated are derived by applications' QoS requirements, and may not be fulfilled by the network. In the parameters for guaranteed and maximum bit rates a granularity of 1 kbps is assumed for bearers up to 64 kbps, as defined in the TS 24.008. Therefore the "Ceiling" function is used for up-rounding fractional values, wherever needed. In addition, the same specification defines a granularity of 10 bytes for the Maximum SDU sizes values. This is taken into account in the computation of this field in the QoS profile. + +### Use case 1 – Voice over IP + +This use case includes the scenario in which two conversational multimedia terminals establish a bi-directional Voice over IP (VoIP) connection for speech communication, using the AMR or AMR-WB codecs with the same bit rate in both uplink and downlink directions. + +For example an AMR VoIP stream encoded at 12.2 kbps, with one speech frame encapsulated into an RTP packet, would yield IP packets of the following size (using the mandated bandwidth efficient mode): + +20 (IPv4) + 8 (UDP) + 12 (RTP) + 32 (AMR RTP payload) = 72 bytes, or + +40 (IPv6 with no extension headers) + 8 (UDP) + 12 (RTP) + 32 (AMR RTP payload) = 92 bytes. + +The gross bit rate including uncompressed RTP/UDP/IPv4 headers would be 28.8 kbps. The value in the b=AS media level parameter would be 29. The gross bit rate including uncompressed RTP/UDP/IPv6 headers would be 36.8 kbps. The value in the b=AS media level parameter would be 37. + +To determine the Maximum SDU size parameter we should consider the maximum packet size that can be generated with a speech codec. This is exactly that generated by a AMR-WB stream at 23.85 kbps packetized in bandwidth efficient mode and with 1 speech frame per packet. Considering uncompressed RTP/UDP/IPv6 headers, the maximum packet size is 121 bytes. + +The QoS profile would be set then using the following parameters: + +**Table B.1: QoS profile for AMR VoIP at 12.2 kbps** + +| QoS parameter | Parameter value | Comment | +|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| Delivery of erroneous SDUs | No | | +| Delivery order | No | To minimize delay in the access stratum. The application should take care of eventual packet reordering | +| Traffic class | Conversational | | +| Maximum SDU size | 130 bytes | 10 bytes granularity. The RTCP packet size might change the maximum SDU size limitation [tbc] | +| Guaranteed bitrate for downlink | SDP media bw in DL + 2.5% * (SDP media bw in DL + SDP media bw in UL) =
Ceil(30.45)=31 kbps (for the IPv4 case)
Ceil(38.85)=39 kbps (for the IPv6 case) | | +| Maximum bit rate for downlink | Ceil(30.45)=31 kbps (for the IPv4 case)
Ceil(38.85)=39 kbps (for the IPv6 case) | | +| Guaranteed bitrate for uplink | SDP media bw in UL + 2.5% * (SDP media bw in UL + SDP media bw in DL) =
Ceil(30.45)=31 kbps (for the IPv4 case)
Ceil(38.85)=39 kbps (for the IPv6 case) | | +| Maximum bit rate for uplink | Ceil(30.45)=31 kbps (for the IPv4 case)
Ceil(38.85)=39 kbps (for the IPv6 case) | | +| Residual BER | $10^{-5}$ | 16 bit CRC | +| SDU error ratio | $7 \cdot 10^{-3}$ | | +| Traffic handling priority | Not used in Conversational traffic class | | +| Transfer delay | 100 ms | | +| SDU format information | Not used | | +| Allocation/retention priority | Subscribed allocation/retention priority | Not relevant for the application | +| Source statistics descriptor | "Speech" | | + +In some cases, multiple AMR or AMR-WB rates are available, and rate control techniques allow to switch between different modes based on the received speech quality. For example, if the available AMR mode set is {4.75, 10.2, 12.2} kbps, the set of gross bit rates are: + +AMR 4.75 kbps: 21.6 kbps (including RTP/UDP/IPv4 headers). [SDP b=AS parameter would be 22]. + +AMR 10.2 kbps: 26.8 kbps (including RTP/UDP/IPv4 headers). [SDP b=AS parameter would be 27]. + +AMR 12.2 kbps: 28.8 kbps (including RTP/UDP/IPv4 headers). [SDP b=AS parameter would be 29]. + +In case of IPv6 addressing, the gross bit rates are: + +AMR 4.75 kbps: 29.6 kbps (including RTP/UDP/IPv6 headers). [SDP b=AS parameter would be 30]. + +AMR 10.2 kbps: 34.8 kbps (including RTP/UDP/IPv6 headers). [SDP b=AS parameter would be 35]. + +AMR 12.2 kbps: 36.8 kbps (including RTP/UDP/IPv6 headers). [SDP b=AS parameter would be 37]. + +The maximum bit rate is set to the highest mode of the codec. However, the procedure on how to choose the guaranteed bit rate when several codec rates are available is to be defined. Here we provide an example QoS profile in which the guaranteed speech quality is at least that of 10.2 kbps AMR for both uplink and downlink directions, while the non-guaranteed maximum quality is that of 12.2 kbps for both uplink and downlink directions. + +**Table B.2: QoS profile for AMR VoIP at 3 bit rates with rate control** + +| QoS parameter | Parameter value | Comment | +|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| Delivery of erroneous SDUs | No | | +| Delivery order | No | To minimize delay in the access stratum. The application should take care of eventual packet reordering | +| Traffic class | Conversational | | +| Maximum SDU size | 130 bytes | 10 bytes granularity. The RTCP packet size might change the maximum SDU size limitation [tbc] | +| Guaranteed bitrate for downlink | SDP media bw in DL + 2.5% * (SDP media bw in DL+ SDP media bw in UL) =
Ceil(28.35)=29 kbps (for the IPv4 case)
Ceil(36.75)=37 kbps (for the IPv6 case) | Guaranteed quality 10.2 kbps | +| Maximum bit rate for downlink | SDP media bw in DL + 2.5% * (SDP media bw in DL+ SDP media bw in UL) =
Ceil(30.35)=31 kbps (for the IPv4 case)
Ceil(38.85)=39 kbps (for the IPv6 case) | Non-guaranteed quality 12.2 kbps | +| Guaranteed bitrate for uplink | SDP media bw in UL+ 2.5% * (SDP media bw in UL+ SDP media bw in DL) =
Ceil(28.35)=29 kbps (for the IPv4 case)
Ceil(36.75)=37 kbps (for the IPv6 case) | Guaranteed quality 10.2 kbps | +| Maximum bit rate for uplink | SDP media bw in UL + 2.5% * (SDP media bw in UL+ SDP media bw in DL) =
Ceil(30.35)=31 kbps (for the IPv4 case)
Ceil(38.85)=39 kbps (for the IPv6 case) | Non-guaranteed quality 12.2 kbps | +| Residual BER | $10^{-5}$ | 16 bit CRC | +| SDU error ratio | $7 \cdot 10^{-3}$ | | +| Traffic handling priority | Not used in Conversational traffic class | | +| Transfer delay | 100 ms | | +| SDU format information | Not used | | +| Allocation/retention priority | Subscribed allocation/retention priority | Not relevant for the application | +| Source statistics descriptor | "Speech" | | + +### Use case 2 – Unidirectional video + +This use case includes the scenario in which two conversational multimedia terminals establish a uni-directional video connection, using the H.263, H.264 or MPEG-4 codecs. + +The video codec in this example has a bitrate of 36 kbps, with RTP payload packets of 75 bytes (excluding payload header which is, for example, 2 bytes). The sending terminal would produce IP packets of the following size: + +20 (IPv4) + 8 (UDP) + 12 (RTP) + 77 (video RTP payload+payload header) = 117 bytes, or + +40 (IPv6 with no extension headers) + 8 (UDP) + 12 (RTP) + 77 (video RTP payload+payload header) = 137 bytes. + +The gross bit rate including uncompressed RTP/UDP/IPv4 headers would be 56.2 kbps. The value in the b=AS media level parameter would be 57. The gross bit rate including uncompressed RTP/UDP/IPv6 headers would be 65.8 kbps. The value in the b=AS media level parameter would be 66. + +The maximum video packet size is limited to 512 bytes in section 5.2. This value is fine if transmission occurs over the UMTS Iu interface. However, in order to avoid SNDPC fragmentation of packets over the GERAN Gb interface (where the default size for LLC data field (=SNDPC frame) is 500 bytes) the maximum IP packet size is 500 – 4 (unacknowledged mode SNDPC header) = 496 bytes. Therefore, the maximum size of a video packet is 496 – 60 (RTP/UDP/IPv6 uncompressed headers) = 436 bytes (including RTP payload header). 400 bytes is a safer value. + +The QoS profile of the receiving terminal would be set then using the following parameters: + +Table B.3: QoS profile for unidirectional video at 36 kbps + +| QoS parameter | Parameter value | Comment | +|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| Delivery of erroneous SDUs | No | | +| Delivery order | No | To minimize delay in the access stratum. The application should take care of eventual packet reordering | +| Traffic class | Conversational | | +| Maximum SDU size | 500 bytes | 10 bytes granularity | +| Guaranteed bitrate for downlink | SDP media bw in DL +
2.5% * (SDP media bw in DL) =
Ceil(58.43)=59 kbps (for the IPv4 case)
Ceil(67.65)=68 kbps (for the IPv6 case) | | +| Maximum bit rate for downlink | Equal or higher than guaranteed bit rate | | +| Guaranteed bitrate for uplink | 2.5% * (SDP media bw in DL) =
Ceil(1.43)=2 kbps (for the IPv4 case)
Ceil(1.65)=2 kbps (for the IPv6 case) | For RTCP | +| Maximum bit rate for uplink | Equal or higher than guaranteed bit rate | | +| Residual BER | $10^{-5}$ | 16 bit CRC | +| SDU error ratio | $10^{-3}$ | | +| Traffic handling priority | Not used in Conversational traffic class | | +| Transfer delay | 250 ms | | +| SDU format information | Not used | | +| Allocation/retention priority | Subscribed allocation/retention priority | Not relevant for the application | +| Source statistics descriptor | "Unknown" | | + +### Use case 3 – Video telephony + +This use case includes the scenario in which two conversational multimedia terminals establish a bi-directional speech/video connection, using the AMR/AMR-WB and H.263/H.264/MPEG-4 codecs at the same bit rates in uplink and downlink directions. + +The video codec in this case has a bitrate of 28 kbps, with RTP payload packets of 250 bytes (excluding payload header which is, for example, 2 bytes). The total video bit rate is 32.7 kbps (including RTP/UDP/IPv4 headers). The value in the b=AS media level parameter would be 33. For IPv6 addressing, the total video bit rate is 34.9 kbps (including RTP/UDP/IPv6 headers). The value in the b=AS media level parameter would be 35. + +In the same bearer there is an AMR stream at 10.2 kbps with 1 frame encapsulated per RTP packet using the bandwidth efficient mode. The total voice bit rate is 26.8 kbps (including RTP/UDP/IPv4 headers). The value in the b=AS media level parameter would be 27. For IPv6 addressing, the total voice bit rate is 34.8 kbps (including RTP/UDP/IPv6 headers). The value in the b=AS media level parameter would be 35. + +The total media bit rate is 28+10.2=38.2 kbps. The total session bit rate is 33+27=60 kbps for IPv4 addressing, and 35+35=70 kbps for IPv6 addressing. + +The terminal would produce IP packets of the following size: + +AMR: 20 (IPv4) + 8 (UDP) + 12 (RTP) + 27 (AMR RTP payload) = 67 bytes (or 87 bytes for IPv6 with no extension headers). + +Video: 20 (IPv4) + 8 (UDP) + 12 (RTP) + 252 (video RTP payload+payload header) = 292 bytes (or 312 bytes for IPv6 with no extension headers). + +The same considerations done in Use Case 2 about the maximum packet sizes apply also for this use case. + +The QoS profile of the videotelephony terminal would be set then using the following parameters: + +Table B.4: QoS profile for videotelephony at 38.2 kbps + +| QoS parameter | Parameter value | Comment | +|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| Delivery of erroneous SDUs | No | | +| Delivery order | No | To minimize delay in the access stratum. The application should take care of eventual packet reordering | +| Traffic class | Conversational | | +| Maximum SDU size | 500 bytes | 10 bytes granularity | +| Guaranteed bitrate for downlink | SDP media bw in DL for AMR +
2.5% * (SDP media bw in DL for AMR+
SDP media bw in UL for AMR) +

SDP media bw in DL for video +
2.5% * (SDP media bw in DL for video+
SDP media bw in UL for video)
= Ceil(63.0)=63 kbps (for the IPv4 case)
= Ceil(73.3)=74 kbps (for the IPv6 case) | | +| Maximum bit rate for downlink | Equal or higher than guaranteed bit rate | | +| Guaranteed bitrate for uplink | SDP media bw in UL for AMR +
2.5% * (SDP media bw in UL for AMR+
SDP media bw in DL for AMR) +

SDP media bw in UL for video +
2.5% * (SDP media bw in UL for video+
SDP media bw in DL for video)
= Ceil(63.0)=63 kbps (for the IPv4 case)
= Ceil(73.3)=74 kbps (for the IPv6 case) | | +| Maximum bit rate for uplink | Equal or higher than guaranteed bit rate | | +| Residual BER | $10^{-5}$ | 16 bit CRC | +| SDU error ratio | $10^{-3}$ | | +| Traffic handling priority | Not used in Conversational traffic class | | +| Transfer delay | 100 ms | | +| SDU format information | Not used | | +| Allocation/retention priority | Subscribed allocation/retention priority | Not relevant for the application | +| Source statistics descriptor | "Unknown" | | + +In case of usage of separate PDP contexts for the speech and video streams, the speech stream QoS profile parameters are set similarly to use case 1, while the video stream QoS profile parameters are set similarly to use case 2 (but considering that the video flow is bi-directional and considering possibly the same UMTS bearer transfer delay constraints for both media). + +# Annex C (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|---------------------------------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2002-03 | 15 | SP-020074 | | | Version 2.0.0 presented for approval | 2.0.0 | 5.0.0 | +| 2002-12 | 18 | SP-020695 | 001 | 2 | QoS profile parameters for conversational multimedia applications | 5.0.0 | 5.1.0 | +| 2002-12 | 18 | SP-020695 | 002 | 1 | Clarification on SDP session bandwidth parameter | 5.0.0 | 5.1.0 | +| 2003-03 | 19 | SP-030092 | 003 | 2 | SDP bandwidth modifier for RTCP bandwidth | 5.1.0 | 5.2.0 | +| 2003-03 | 19 | SP-030092 | 004 | | Correction on QoS profile parameters for conversational multimedia applications | 5.1.0 | 5.2.0 | +| 2003-06 | 20 | SP-030219 | 005 | | Examples of QoS profiles for conversational multimedia applications | 5.2.0 | 5.3.0 | +| 2003-09 | 21 | SP-030449 | 006 | | Correction of obsolete RTP references | 5.3.0 | 5.4.0 | +| 2003-09 | 21 | SP-030449 | 007 | 1 | Correction of wrong reference | 5.3.0 | 5.4.0 | +| 2004-06 | 24 | SP-040356 | 010 | 3 | Introduction of the DSR codec | 5.4.0 | 6.0.0 | +| 2004-06 | 24 | SP-040357 | 012 | | RTCP usage for IMS | 5.4.0 | 6.0.0 | +| 2004-12 | 26 | SP-040843 | 013 | 1 | Inclusion of PoC support | 6.0.0 | 6.1.0 | +| 2005-03 | 27 | SP-050099 | 015 | 1 | Introduction of AMR SDP parameters | 6.1.0 | 6.2.0 | +| 2005-06 | 28 | SP-050249 | 017 | 1 | Clarification to the Introduction of AMR SDP parameters | 6.2.0 | 6.3.0 | +| 2005-09 | 29 | SP-050424 | 0018 | 1 | Clarifications on RTP Session Description Parameters for PoC | 6.3.0 | 6.4.0 | +| 2006-03 | 31 | SP-060219 | 0019 | 3 | Update of a RFC on real time text and DSR codec | 6.4.0 | 7.0.0 | +| 2006-09 | 33 | SP-060598 | 0021 | 1 | Symmetric RTP and RTCP Port Usage | 7.0.0 | 7.1.0 | +| 2007-09 | 37 | SP-070627 | 0023 | | Correction of references | 7.1.0 | 7.2.0 | +| 2008-03 | 39 | SP-080009 | 0024 | 1 | Correction of RTP usage for audio for PS conversational multimedia applications | 7.2.0 | 7.3.0 | +| 2008-12 | 42 | | | | Version for Release 8 | 7.3.0 | 8.0.0 | +| 2009-12 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 2011-03 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 2012-09 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26237/03d9aaba6c1af8bfd8e42c1d2422ae5c_img.jpg b/marked/Rel-11/26_series/26237/03d9aaba6c1af8bfd8e42c1d2422ae5c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ef41ed44945eed33283d689df3323623bc9e1294 --- /dev/null +++ b/marked/Rel-11/26_series/26237/03d9aaba6c1af8bfd8e42c1d2422ae5c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fd0b90b5689041381a694c062a1ef441fac90b34c487e1f192f486d2afa0687 +size 43434 diff --git a/marked/Rel-11/26_series/26237/09036266c6dba47efb2613ceaebe2b19_img.jpg b/marked/Rel-11/26_series/26237/09036266c6dba47efb2613ceaebe2b19_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9da7a35754dfbd404b159a0870b12be14acd0412 --- /dev/null +++ b/marked/Rel-11/26_series/26237/09036266c6dba47efb2613ceaebe2b19_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab898449ea5aaf218b32ce89d89cb4f56eb0303ed1066d9922d0c9c35dcf3fd4 +size 55860 diff --git a/marked/Rel-11/26_series/26237/098802c99831a6a7d445310d5e874e16_img.jpg b/marked/Rel-11/26_series/26237/098802c99831a6a7d445310d5e874e16_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2439a46851996b489b2e12d18d16339529db5802 --- /dev/null +++ b/marked/Rel-11/26_series/26237/098802c99831a6a7d445310d5e874e16_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eeeb95bfff958bf0ab32791f6752596990391ff4cbb7868c9002868c1ba076b4 +size 63608 diff --git a/marked/Rel-11/26_series/26237/0a3ab80d35c138cc4038b5758f6ff34d_img.jpg b/marked/Rel-11/26_series/26237/0a3ab80d35c138cc4038b5758f6ff34d_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f6fc19f10547b966154d208216c3a64f7b9eeeca --- /dev/null +++ b/marked/Rel-11/26_series/26237/0a3ab80d35c138cc4038b5758f6ff34d_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be9218a2d62a37aaf88efe529886b51ab1d3ad050205934536d8e1fafdfb5cdc +size 42338 diff --git a/marked/Rel-11/26_series/26237/0a73b03fba21af142d619a9a662e6490_img.jpg b/marked/Rel-11/26_series/26237/0a73b03fba21af142d619a9a662e6490_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0399e64468df2ace3994eb770049c0a97009f8e4 --- /dev/null +++ b/marked/Rel-11/26_series/26237/0a73b03fba21af142d619a9a662e6490_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2497928bd92da1820b4ff0d33ed907f92c6212ee21e3db790e3cf035210bb07 +size 52833 diff --git a/marked/Rel-11/26_series/26237/0a957b7cafb28935849ea4c05d6e80a1_img.jpg b/marked/Rel-11/26_series/26237/0a957b7cafb28935849ea4c05d6e80a1_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b5f469e8786654f5cf6f2e325a7e53f115d01a71 --- /dev/null +++ b/marked/Rel-11/26_series/26237/0a957b7cafb28935849ea4c05d6e80a1_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a43fb5018bb34464a7d0561c2dcc63c7e3aed20d2a7cd74adcc4e1b997c2df +size 21520 diff --git a/marked/Rel-11/26_series/26237/0b998e3ad8f9d104768642612605cb35_img.jpg b/marked/Rel-11/26_series/26237/0b998e3ad8f9d104768642612605cb35_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..510752f4dae3d128f92d922367ffc31845de87ad --- /dev/null +++ b/marked/Rel-11/26_series/26237/0b998e3ad8f9d104768642612605cb35_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8a492b2bfea3eb00c6e349acb6d61ee5f47a360ce99e3e584d478e5a9beaeb6 +size 48259 diff --git a/marked/Rel-11/26_series/26237/107cbeda15ddd53da92c2f677b441c93_img.jpg b/marked/Rel-11/26_series/26237/107cbeda15ddd53da92c2f677b441c93_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4f8679df130c3700d7632d99572e0032fa3b2f6d --- /dev/null +++ b/marked/Rel-11/26_series/26237/107cbeda15ddd53da92c2f677b441c93_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7ca0ad567bd1065156836650f9108c2ea5980bac8f1d46596d44a1f8b9e9583 +size 58399 diff --git a/marked/Rel-11/26_series/26237/11fc7b58448f884cac1a5481f7def5dc_img.jpg b/marked/Rel-11/26_series/26237/11fc7b58448f884cac1a5481f7def5dc_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2f93542c15f02a9947537219879cc1834ca9c171 --- /dev/null +++ b/marked/Rel-11/26_series/26237/11fc7b58448f884cac1a5481f7def5dc_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1b7314ff7fe8f9733ec6d8365ece033feb68a38a715fe78c53e7d9be12ed4d5 +size 13705 diff --git a/marked/Rel-11/26_series/26237/17f0cf80b9c38adb460d4ca836960da7_img.jpg b/marked/Rel-11/26_series/26237/17f0cf80b9c38adb460d4ca836960da7_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ede44d1f50eb0e5c3cd693130c227bba4b352dac --- /dev/null +++ b/marked/Rel-11/26_series/26237/17f0cf80b9c38adb460d4ca836960da7_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef59f74c27de8b3a6efe82b3bd37742790f2867035f3207ab97b5b58e317e9a8 +size 54562 diff --git a/marked/Rel-11/26_series/26237/256e8716b024671206b023fab056678e_img.jpg b/marked/Rel-11/26_series/26237/256e8716b024671206b023fab056678e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7f1d7fd7789b3aa6ab03c10935ffacfa4eaa7bab --- /dev/null +++ b/marked/Rel-11/26_series/26237/256e8716b024671206b023fab056678e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc3acfa92e1ea31b4c035cf28faeb36cbb44c2760fb8177a68332cb78f9b5206 +size 52648 diff --git a/marked/Rel-11/26_series/26237/2837ffdadcdb1e5bababa56b564e56ed_img.jpg b/marked/Rel-11/26_series/26237/2837ffdadcdb1e5bababa56b564e56ed_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..581d9447efdb4b610cfbf33a214650bc973f0737 --- /dev/null +++ b/marked/Rel-11/26_series/26237/2837ffdadcdb1e5bababa56b564e56ed_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f24260fe8654643581911320206cb45d676b6b9438ba77eb883e89fcc8c0bdd +size 118601 diff --git a/marked/Rel-11/26_series/26237/2cf3896394a2342a2b46c504ab9a8830_img.jpg b/marked/Rel-11/26_series/26237/2cf3896394a2342a2b46c504ab9a8830_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bfbac7a470e63cf9099730a61279e5d0c2eb5625 --- /dev/null +++ b/marked/Rel-11/26_series/26237/2cf3896394a2342a2b46c504ab9a8830_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27e97cfe8b18713a2446e66f6f9db80ee4ebe9c93e0347194f117569cb66d8f2 +size 95439 diff --git a/marked/Rel-11/26_series/26237/2dfd7b53bd3c518fc1f68921ed2bf441_img.jpg b/marked/Rel-11/26_series/26237/2dfd7b53bd3c518fc1f68921ed2bf441_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..36d01c5cb61a6ffb3960c1205f415cf61c931e85 --- /dev/null +++ b/marked/Rel-11/26_series/26237/2dfd7b53bd3c518fc1f68921ed2bf441_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a776d38838fc040c1117c9f9d3025d2ae8712245cf058f9b163b02c78ee1f3c3 +size 21970 diff --git a/marked/Rel-11/26_series/26237/3337af75dfee8af7687b4f49914d6c93_img.jpg b/marked/Rel-11/26_series/26237/3337af75dfee8af7687b4f49914d6c93_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..03cc954b3048d68a9bc84bc8e89348e72d5edd93 --- /dev/null +++ b/marked/Rel-11/26_series/26237/3337af75dfee8af7687b4f49914d6c93_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8addb3938dd3bb196992bebe78fdfb7852d1b56f201086071a937f65168d6596 +size 33470 diff --git a/marked/Rel-11/26_series/26237/40a8c30f7ea5ecea4912e040c97c5b9c_img.jpg b/marked/Rel-11/26_series/26237/40a8c30f7ea5ecea4912e040c97c5b9c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aebbc8d64d28249a0ac19188dd563baee10d57d1 --- /dev/null +++ b/marked/Rel-11/26_series/26237/40a8c30f7ea5ecea4912e040c97c5b9c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e825980a7bc9fcac07f0f832d6cbfdee42ca6a55b7b5753365bf9822b75638f +size 66374 diff --git a/marked/Rel-11/26_series/26237/4847c98185bc52e8786b78738bc52b45_img.jpg b/marked/Rel-11/26_series/26237/4847c98185bc52e8786b78738bc52b45_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..130ea0e6c6eada3a806aabef870842ca86223dd9 --- /dev/null +++ b/marked/Rel-11/26_series/26237/4847c98185bc52e8786b78738bc52b45_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfe831adb66b34aafa4edff591e02867352e9212e0100deba8d71c7f9cfc17fd +size 50474 diff --git a/marked/Rel-11/26_series/26237/49fe8fe978c0f7e73112d231feb377eb_img.jpg b/marked/Rel-11/26_series/26237/49fe8fe978c0f7e73112d231feb377eb_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eb4fcf8da84d64242fddc54b5ac23680f60c2e90 --- /dev/null +++ b/marked/Rel-11/26_series/26237/49fe8fe978c0f7e73112d231feb377eb_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eff5dcf08f40d233de6035b21e99f2658abf5b2bac3862013a5a9732cd51bcd3 +size 151995 diff --git a/marked/Rel-11/26_series/26237/4b398c5e8c4fd656d5b7a61806400650_img.jpg b/marked/Rel-11/26_series/26237/4b398c5e8c4fd656d5b7a61806400650_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c98ee13a96bcee3b3a15dcf0a2556105aa39a284 --- /dev/null +++ b/marked/Rel-11/26_series/26237/4b398c5e8c4fd656d5b7a61806400650_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57118149c45b423c654b045be5e004a97c4e5c0c43e30ae750f153ed362031d4 +size 88818 diff --git a/marked/Rel-11/26_series/26237/56a5265d174ce056c1dbe5e7a60839fc_img.jpg b/marked/Rel-11/26_series/26237/56a5265d174ce056c1dbe5e7a60839fc_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ef7aaac07c36a3d125e0f9b052838b6c75526b7 --- /dev/null +++ b/marked/Rel-11/26_series/26237/56a5265d174ce056c1dbe5e7a60839fc_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cfa8e6210c5a79ce369cdb7feda28c53ad284228ae2c7268bb094b9c3c9d2ac +size 93271 diff --git a/marked/Rel-11/26_series/26237/575d7d345b3ec04393bb2ec720ebabca_img.jpg b/marked/Rel-11/26_series/26237/575d7d345b3ec04393bb2ec720ebabca_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e0464a188925b450f51e8a3ac07f82f4f5404d94 --- /dev/null +++ b/marked/Rel-11/26_series/26237/575d7d345b3ec04393bb2ec720ebabca_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a7e12838edfd9fb83cab6dcf2eded208c186f4f021139157aa2e37201bccc92 +size 56593 diff --git a/marked/Rel-11/26_series/26237/5a01395925fc88802da68fb5ac0f31ff_img.jpg b/marked/Rel-11/26_series/26237/5a01395925fc88802da68fb5ac0f31ff_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f11d87dd7d9edc581b393bc3620d59f958df7f2b --- /dev/null +++ b/marked/Rel-11/26_series/26237/5a01395925fc88802da68fb5ac0f31ff_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cd716a08a07e522686df6ab530a6ca7d7f7c022e359840b3ba3df9ed675e0a3 +size 50312 diff --git a/marked/Rel-11/26_series/26237/5bf7ad352d821318a0d56c50cb452c2e_img.jpg b/marked/Rel-11/26_series/26237/5bf7ad352d821318a0d56c50cb452c2e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eb5df000297fa01dd9030f0cc990f2c66df1557a --- /dev/null +++ b/marked/Rel-11/26_series/26237/5bf7ad352d821318a0d56c50cb452c2e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cee32270dd4eb2f6a803d25f5173de3f0dc3a283261371ea4f6a1153406e4520 +size 66456 diff --git a/marked/Rel-11/26_series/26237/63a2519518616620ef0e53d98b923c05_img.jpg b/marked/Rel-11/26_series/26237/63a2519518616620ef0e53d98b923c05_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..36e952c22749fb37317f1133e5cf79d46d2052a8 --- /dev/null +++ b/marked/Rel-11/26_series/26237/63a2519518616620ef0e53d98b923c05_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:787180df25930322081132680b6d0a85c66ddaca112f03b2d94e12894812b0b4 +size 54695 diff --git a/marked/Rel-11/26_series/26237/6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg b/marked/Rel-11/26_series/26237/6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1a94f519dbf6f15e9cb5709258ec5c947de63758 --- /dev/null +++ b/marked/Rel-11/26_series/26237/6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e2af5d88f1ce6d4535394c4fd7ff9f2bbecba345be2fb5207e07857e9d7f373 +size 70503 diff --git a/marked/Rel-11/26_series/26237/6707cae4df136f92a0c9f3a4676f91a6_img.jpg b/marked/Rel-11/26_series/26237/6707cae4df136f92a0c9f3a4676f91a6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4e7834129b34dcc488d5bb3e1b6601557d3f1264 --- /dev/null +++ b/marked/Rel-11/26_series/26237/6707cae4df136f92a0c9f3a4676f91a6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cbe229e641833c90c566789390e41be9d418c075558d327ebec424f841991de +size 22967 diff --git a/marked/Rel-11/26_series/26237/6929132b4964d52244da61d4614bc4d6_img.jpg b/marked/Rel-11/26_series/26237/6929132b4964d52244da61d4614bc4d6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c7f796d0212639722331eabe95bf7fcad67545bb --- /dev/null +++ b/marked/Rel-11/26_series/26237/6929132b4964d52244da61d4614bc4d6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc1fe7275d329beb1ecaabc404be87272b8833879e551bd3663f3496a92044c4 +size 55575 diff --git a/marked/Rel-11/26_series/26237/6984a27b2b89e0995d5216ec29b41d1c_img.jpg b/marked/Rel-11/26_series/26237/6984a27b2b89e0995d5216ec29b41d1c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..37da5884e1bf362eaeca129efec1d22bdc196c0a --- /dev/null +++ b/marked/Rel-11/26_series/26237/6984a27b2b89e0995d5216ec29b41d1c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9d5470cb5a017b6ee51f0c3d74ec9b921d2f7c8dd500584c268e347733ce4f8 +size 19237 diff --git a/marked/Rel-11/26_series/26237/6e9d059430baba0c363e33749f68b107_img.jpg b/marked/Rel-11/26_series/26237/6e9d059430baba0c363e33749f68b107_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5523f9c968cc0ad506bf1b4f99c4fe3ed4a04ecd --- /dev/null +++ b/marked/Rel-11/26_series/26237/6e9d059430baba0c363e33749f68b107_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cc4785735e62ccd4d8bd0a6677489c21ca97fc33a9183b6e3a281f0de595767 +size 38724 diff --git a/marked/Rel-11/26_series/26237/704082cc3e11776bda29595c76411362_img.jpg b/marked/Rel-11/26_series/26237/704082cc3e11776bda29595c76411362_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..64f873570c294711ccc461d726005b131fcb9668 --- /dev/null +++ b/marked/Rel-11/26_series/26237/704082cc3e11776bda29595c76411362_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac184e89005b4d7d3ec18bf2dd31121350a4c54fdefbe4db1d3ebf812a9ab06a +size 34513 diff --git a/marked/Rel-11/26_series/26237/76d19e4271bf243b20d55a98efd51483_img.jpg b/marked/Rel-11/26_series/26237/76d19e4271bf243b20d55a98efd51483_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2fdc407bc045116a3402557e2f37d1d80c574dea --- /dev/null +++ b/marked/Rel-11/26_series/26237/76d19e4271bf243b20d55a98efd51483_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5edf874cc364a0169743896d54a907420b62477de127a6f1028d929c715e4c75 +size 66182 diff --git a/marked/Rel-11/26_series/26237/781be1b7270da21ee7b75b51db2ee1b3_img.jpg b/marked/Rel-11/26_series/26237/781be1b7270da21ee7b75b51db2ee1b3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8a14e57246e2cb9cee3e17ad0928faafb0541854 --- /dev/null +++ b/marked/Rel-11/26_series/26237/781be1b7270da21ee7b75b51db2ee1b3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ca467e36e9d9c6d4a1b27d9226d2bb44291a7f8190ce3d39d370a594313116a +size 22024 diff --git a/marked/Rel-11/26_series/26237/79e1709a7317ead45379cbb8ff3ba802_img.jpg b/marked/Rel-11/26_series/26237/79e1709a7317ead45379cbb8ff3ba802_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0ef1fa3b7161a0a51272b049e9c16dc7082092ea --- /dev/null +++ b/marked/Rel-11/26_series/26237/79e1709a7317ead45379cbb8ff3ba802_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:432129632fbe4cf107b2e1de5b0042c140aa978c2163755e121e39037dd8550b +size 15117 diff --git a/marked/Rel-11/26_series/26237/7d3d5fb5d09c0cd35a9d637be241651e_img.jpg b/marked/Rel-11/26_series/26237/7d3d5fb5d09c0cd35a9d637be241651e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c9bf6cb45f7ba1dfa955da8012cb1070f558392d --- /dev/null +++ b/marked/Rel-11/26_series/26237/7d3d5fb5d09c0cd35a9d637be241651e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f3094f8d5aace7adbe07cea0f12feedbefe01749abc965ba3c486fe739c6f1 +size 41342 diff --git a/marked/Rel-11/26_series/26237/7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg b/marked/Rel-11/26_series/26237/7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..554e179af5f75f42df1b59c7a1e78ad9c2548992 --- /dev/null +++ b/marked/Rel-11/26_series/26237/7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:438f747730eb345b533385db3b62695ff2f6c52ea56dc0f8b112aa5a3b11a42f +size 32137 diff --git a/marked/Rel-11/26_series/26237/898fb89a50d9ec1dfb4e425c816976a7_img.jpg b/marked/Rel-11/26_series/26237/898fb89a50d9ec1dfb4e425c816976a7_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..565cc02097a92416b90f047bb9f2035ec9e4804e --- /dev/null +++ b/marked/Rel-11/26_series/26237/898fb89a50d9ec1dfb4e425c816976a7_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbc0e780996ea36013fed5bff3ae15c0c85a7820d42a8a912ce1e8d95a80a8fe +size 54430 diff --git a/marked/Rel-11/26_series/26237/94d3fdcc244924326f02533aeb2d93fc_img.jpg b/marked/Rel-11/26_series/26237/94d3fdcc244924326f02533aeb2d93fc_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2d7ca8399c6962bb0bc370bf277333300c52deef --- /dev/null +++ b/marked/Rel-11/26_series/26237/94d3fdcc244924326f02533aeb2d93fc_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34aa99930787771a44f93a959b2561158547f69205c74ac29ca093f8bc50a965 +size 21968 diff --git a/marked/Rel-11/26_series/26237/9a14684f8ae1345c6efea6f5994c730c_img.jpg b/marked/Rel-11/26_series/26237/9a14684f8ae1345c6efea6f5994c730c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bc786e0dfc415a279631055e129cafc00156cac5 --- /dev/null +++ b/marked/Rel-11/26_series/26237/9a14684f8ae1345c6efea6f5994c730c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d3e6f825978a992e8620342de01a35457ef11c2de76c4101c35be869ba39a6d +size 28122 diff --git a/marked/Rel-11/26_series/26237/9e5d66cdb5112ad5cab89552b126e4b9_img.jpg b/marked/Rel-11/26_series/26237/9e5d66cdb5112ad5cab89552b126e4b9_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2e99ac58eb1990e427fb0831d84742ac3b59c47b --- /dev/null +++ b/marked/Rel-11/26_series/26237/9e5d66cdb5112ad5cab89552b126e4b9_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:760d873993c78b2dde9512c73d7dbb13d77735b5b696a8263732d8cd288d754a +size 30395 diff --git a/marked/Rel-11/26_series/26237/a0eb8d30ac11ba97b2733c187b89ff22_img.jpg b/marked/Rel-11/26_series/26237/a0eb8d30ac11ba97b2733c187b89ff22_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..455585e6d7634133c7e8ae45b82a5bb6a180cb3d --- /dev/null +++ b/marked/Rel-11/26_series/26237/a0eb8d30ac11ba97b2733c187b89ff22_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:227ddd2eb01e09b3d60609a198ac28d61e9fa4d35779004975adc1a071811c8e +size 49866 diff --git a/marked/Rel-11/26_series/26237/a7c51c18111139f9aca2805114108565_img.jpg b/marked/Rel-11/26_series/26237/a7c51c18111139f9aca2805114108565_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..daf45d171a8c6ce0dce7040224bd8c43b60b3eb3 --- /dev/null +++ b/marked/Rel-11/26_series/26237/a7c51c18111139f9aca2805114108565_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f9eb26a24640b1f68493630be99f0efc00e01deedd730ed1ef3d600ed2a53de +size 94966 diff --git a/marked/Rel-11/26_series/26237/b44f89b176c971c7dd264c07bfef2c2a_img.jpg b/marked/Rel-11/26_series/26237/b44f89b176c971c7dd264c07bfef2c2a_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8a7c1d503393c025ce3b2212bb6f92cca420ff3c --- /dev/null +++ b/marked/Rel-11/26_series/26237/b44f89b176c971c7dd264c07bfef2c2a_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78a95733be9c94e195d480aaebd3804346e9ac2ca2ba2d08ddd12c9f7a3811f1 +size 34879 diff --git a/marked/Rel-11/26_series/26237/b5335262987c819d7f71ce40f99cb71b_img.jpg b/marked/Rel-11/26_series/26237/b5335262987c819d7f71ce40f99cb71b_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..39cf93cfa41ca79fffc74ce2e4afb1f424c84366 --- /dev/null +++ b/marked/Rel-11/26_series/26237/b5335262987c819d7f71ce40f99cb71b_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a79088d456543681526054416937536eeab0784aef78fd42a6d4c9d782be38cb +size 58202 diff --git a/marked/Rel-11/26_series/26237/bbddeb46a8bee133d49003273fcfc8dd_img.jpg b/marked/Rel-11/26_series/26237/bbddeb46a8bee133d49003273fcfc8dd_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..14322a1bf8c81a12821ecc78e696dd02f3c91748 --- /dev/null +++ b/marked/Rel-11/26_series/26237/bbddeb46a8bee133d49003273fcfc8dd_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a8e30db982782d0a84e70c11b920619e5f7fa6f680d45fbafb20b6f07837675 +size 37476 diff --git a/marked/Rel-11/26_series/26237/c00d3fb4f9d9609639a6e7d7a356afd3_img.jpg b/marked/Rel-11/26_series/26237/c00d3fb4f9d9609639a6e7d7a356afd3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..88885920e7de4f27a6cc770866be32db85d64419 --- /dev/null +++ b/marked/Rel-11/26_series/26237/c00d3fb4f9d9609639a6e7d7a356afd3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05979ec7ea6349f9528b9622a82cd5f3a4407e01f4dea3197d0ea8f2271e2d6c +size 49858 diff --git a/marked/Rel-11/26_series/26237/c07e21a8d65991db04263322f859c94f_img.jpg b/marked/Rel-11/26_series/26237/c07e21a8d65991db04263322f859c94f_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c0b35a53c2c1dbe61b4800c54eed0318ee796b42 --- /dev/null +++ b/marked/Rel-11/26_series/26237/c07e21a8d65991db04263322f859c94f_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8972e19d0c73cd527248d7ba088985a0ce0973685c89a37f265b6fa9b07e7478 +size 137723 diff --git a/marked/Rel-11/26_series/26237/ca322f838ed1785bc0de168636f7b426_img.jpg b/marked/Rel-11/26_series/26237/ca322f838ed1785bc0de168636f7b426_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..713de3db7b169c87040708cbad14e680e4d299a4 --- /dev/null +++ b/marked/Rel-11/26_series/26237/ca322f838ed1785bc0de168636f7b426_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3be98d30f179c8888f6a1d0b71bab764736667e018fb2df8767f76dfa7522d68 +size 30185 diff --git a/marked/Rel-11/26_series/26237/d7948c38a18636aefecdd95388196460_img.jpg b/marked/Rel-11/26_series/26237/d7948c38a18636aefecdd95388196460_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..752941cd78bec75c179e742c7c79747bdc5ff9ee --- /dev/null +++ b/marked/Rel-11/26_series/26237/d7948c38a18636aefecdd95388196460_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fc6ec4e6bb0d5fe49134791b535e8a069d745661c3a3fd7b1bf7991f18c72a6 +size 36350 diff --git a/marked/Rel-11/26_series/26237/dc1f232cfd39be5c20b21374ad4c04c0_img.jpg b/marked/Rel-11/26_series/26237/dc1f232cfd39be5c20b21374ad4c04c0_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ef6f67f5cb4921e8c5ff2b97077a08378052c888 --- /dev/null +++ b/marked/Rel-11/26_series/26237/dc1f232cfd39be5c20b21374ad4c04c0_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbb6bdce583b30ddec0184292f8e1be62eb69eb7aec03d58fdc840d354ca564a +size 31768 diff --git a/marked/Rel-11/26_series/26237/ddcdc1712375261ba1d89165fdf12aa6_img.jpg b/marked/Rel-11/26_series/26237/ddcdc1712375261ba1d89165fdf12aa6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..126121d38249fc655347767bc84e05c289458e32 --- /dev/null +++ b/marked/Rel-11/26_series/26237/ddcdc1712375261ba1d89165fdf12aa6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc6cc11da1dbc61f480413c7d3f09e05233b11f4c6f1c7cd16504ffb35d1e041 +size 30880 diff --git a/marked/Rel-11/26_series/26237/e5ded42f8e352da02ee86cb55550c45d_img.jpg b/marked/Rel-11/26_series/26237/e5ded42f8e352da02ee86cb55550c45d_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..81c8570adde5c93c0363fb15ab6cf5b330feaf1f --- /dev/null +++ b/marked/Rel-11/26_series/26237/e5ded42f8e352da02ee86cb55550c45d_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50af2eef5fe5b5162250062c7e641e5f8d2154f1e4c1a396108c1ae7246037c7 +size 38068 diff --git a/marked/Rel-11/26_series/26237/ef8f4838401ece0abd51d63b897fa388_img.jpg b/marked/Rel-11/26_series/26237/ef8f4838401ece0abd51d63b897fa388_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e1d3ebf74817e74356cac0f4b35e604411264420 --- /dev/null +++ b/marked/Rel-11/26_series/26237/ef8f4838401ece0abd51d63b897fa388_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:004bae1d0865345dbff88234778b260af792ffb4a2903e7796e7822d898928f7 +size 43059 diff --git a/marked/Rel-11/26_series/26237/f10dc32e3673e1392029a49e958a9d6c_img.jpg b/marked/Rel-11/26_series/26237/f10dc32e3673e1392029a49e958a9d6c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..86427c3f7f1b273aa8edf20bd8ab874fbdbbdf2a --- /dev/null +++ b/marked/Rel-11/26_series/26237/f10dc32e3673e1392029a49e958a9d6c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ab02ce96a101f41aed55d8994424a674f2182bb11fd944f68323faee60550e2 +size 94968 diff --git a/marked/Rel-11/26_series/26237/f23879f003c58b57f690e2dc6c95816a_img.jpg b/marked/Rel-11/26_series/26237/f23879f003c58b57f690e2dc6c95816a_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..39b5445d3394c4300864d55c76d6b30b915bd759 --- /dev/null +++ b/marked/Rel-11/26_series/26237/f23879f003c58b57f690e2dc6c95816a_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3afaeb6652188329fc566708b6fec71b87947011db7a5c7f1fc704ab3ec7762 +size 68376 diff --git a/marked/Rel-11/26_series/26237/f2486d5031b55e42b300903a716b0a00_img.jpg b/marked/Rel-11/26_series/26237/f2486d5031b55e42b300903a716b0a00_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..05fe29c2035587984bf85820c4d3587cfb89cc3a --- /dev/null +++ b/marked/Rel-11/26_series/26237/f2486d5031b55e42b300903a716b0a00_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24a1d7dcc8d215bbd9ddb060023c9732b9867cfdd270049641b14a684d2eb2a7 +size 34825 diff --git a/marked/Rel-11/26_series/26237/f61d0925551545b5938b3a4d1bbf63c3_img.jpg b/marked/Rel-11/26_series/26237/f61d0925551545b5938b3a4d1bbf63c3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cd1b0aff6f3e733637ae095cb26bc339941e2cba --- /dev/null +++ b/marked/Rel-11/26_series/26237/f61d0925551545b5938b3a4d1bbf63c3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:671345d60c302a8df30ece027e8fef4eeb254e3c470d6faf2949765c79788c2f +size 46927 diff --git a/marked/Rel-11/26_series/26237/ff3417b75213b8688e6504a21220b430_img.jpg b/marked/Rel-11/26_series/26237/ff3417b75213b8688e6504a21220b430_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a12d4e57a32f3fca9786a7ff42589bd48cd0b387 --- /dev/null +++ b/marked/Rel-11/26_series/26237/ff3417b75213b8688e6504a21220b430_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7463aff331d117bcfaa2fb089e33bdd021c1250b3f8e037c669c6e316654a958 +size 66103 diff --git a/marked/Rel-11/26_series/26237/raw.md b/marked/Rel-11/26_series/26237/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..841e428806c1d88e851b84a5cf3ecf832fdc35e4 --- /dev/null +++ b/marked/Rel-11/26_series/26237/raw.md @@ -0,0 +1,6077 @@ + + + + +Error: + +2 + +Error: Reference source not found + +# Contents + +| | | +|-------------------------------------------------------------------------------------------------------|----| +| Foreword..... | 10 | +| Introduction..... | 10 | +| 1 Scope..... | 11 | +| 2 References..... | 11 | +| 3 Definitions and abbreviations..... | 13 | +| 3.1 Definitions..... | 13 | +| 3.2 Abbreviations..... | 13 | +| 4 System description..... | 14 | +| 4.1 Introduction..... | 14 | +| 4.2 Architecture..... | 14 | +| 4.2.1 Non IMS 3GPP PSS and MBMS User Service architecture..... | 14 | +| 4.2.2 IMS based PSS and MBMS User Service architecture..... | 15 | +| 4.3 IMS based PSS and MBMS US procedures overview..... | 18 | +| 4.4 PSS and MBMS user profile and UE capabilities..... | 20 | +| 4.4.1 User profile description..... | 20 | +| 4.4.2 UE capabilities..... | 20 | +| 4.4.3 Storage location..... | 20 | +| 5 Service Provider Discovery..... | 21 | +| 5.1 Introduction..... | 21 | +| 5.2 DNS..... | 21 | +| 5.3 Others..... | 21 | +| 6 User Service Discovery..... | 22 | +| 6.1 Introduction..... | 22 | +| 6.2 Subscribe/Notify..... | 22 | +| 6.2.1 General description..... | 22 | +| 6.2.2 Procedures at the UE..... | 23 | +| 6.2.2.1 Introduction..... | 23 | +| 6.2.2.2 Subscription..... | 23 | +| 6.2.2.3 Receiving notifications..... | 23 | +| 6.2.3 Procedures at the SDF..... | 24 | +| 7 User Service Description retrieval..... | 25 | +| 7.1 Introduction..... | 25 | +| 7.2 User Service Description retrieval for PSS and MBMS..... | 25 | +| 7.2.1 Procedures at the UE..... | 25 | +| 7.2.1.1 Procedure for Service Personalisation..... | 25 | +| 7.2.1.2 Request of OMA BCAST ESG..... | 25 | +| 7.2.1.3 Use of Service Description information..... | 25 | +| 7.2.2 Procedures at the SSF..... | 25 | +| 7.2.2.1 Authentication and authorisation in case of personalized service description information..... | 25 | +| 7.2.2.2 Procedure for Service Personalization..... | 26 | +| 7.2.2.3 Delivery of OMA BCAST ESG..... | 26 | +| 8 Streaming session and media control..... | 26 | +| 8.1 General..... | 26 | +| 8.2 PSS Streaming..... | 26 | +| 8.2.1 PSS Media codecs and formats..... | 26 | +| 8.2.2 Procedure for providing missing parameters..... | 27 | +| 8.2.2.1 Procedures at the UE..... | 27 | +| 8.2.2.2 Procedures at the SCF..... | 27 | +| 8.2.2.3 Procedures at the PSS Adapter..... | 27 | +| 8.2.3 PSS Streaming Session initiation..... | 28 | +| 8.2.3.1 General description..... | 28 | +| 8.2.3.2 Procedures at the UE..... | 28 | +| 8.2.3.3 Procedures at the IM CN Subsystem..... | 29 | + +| | | | +|-----------|------------------------------------------------------------------------------------------------|----| +| 8.2.3.4 | Procedures at the SCF..... | 30 | +| 8.2.3.5 | Procedures at the PSS Adapter..... | 30 | +| 8.2.4 | PSS Streaming Playback Control..... | 32 | +| 8.2.4.1 | General Description..... | 32 | +| 8.2.4.2 | Procedures at the UE..... | 32 | +| 8.2.4.3 | Procedures at the PSS Adapter..... | 33 | +| 8.2.4.4 | Procedures at the PSS Server..... | 33 | +| 8.2.5 | PSS content switching..... | 33 | +| 8.2.5.1 | PSS Streaming session modification..... | 33 | +| 8.2.5.1.1 | General description..... | 33 | +| 8.2.5.1.2 | Procedures at the UE..... | 34 | +| 8.2.5.1.3 | Procedures at the IM CN subsystem..... | 35 | +| 8.2.5.1.4 | Procedures at the SCF..... | 35 | +| 8.2.5.1.5 | Procedures at the PSS adapter..... | 35 | +| 8.2.5.1.6 | Procedures at the PSS server..... | 35 | +| 8.2.5.2 | PSS Content switching with available SDP, no change of media component and bandwidth..... | 35 | +| 8.2.5.2.1 | General description..... | 35 | +| 8.2.5.2.2 | Procedures at the UE..... | 36 | +| 8.2.5.2.3 | Procedures at the IM CN Subsystem..... | 36 | +| 8.2.5.2.4 | Procedures at the SCF..... | 36 | +| 8.2.5.2.5 | Procedures at the PSS Adapter..... | 37 | +| 8.2.5.2.6 | Procedures at the PSS Server..... | 37 | +| 8.2.5.3 | PSS Content switching with available SDP, change of media components or QoS..... | 37 | +| 8.2.5.3.1 | General Description..... | 37 | +| 8.2.5.3.2 | Procedures at the UE..... | 38 | +| 8.2.5.3.3 | Procedures at the IM CN Subsystem..... | 39 | +| 8.2.5.3.4 | Procedures at the SCF..... | 39 | +| 8.2.5.3.5 | Procedures at the PSS Adapter..... | 39 | +| 8.2.5.3.6 | Procedures at the PSS Server..... | 39 | +| 8.2.5.4 | PSS Content switching with unavailable SDP, no change of media component and/or bandwidth..... | 39 | +| 8.2.5.4.1 | General description..... | 39 | +| 8.2.5.4.2 | Procedures at the UE..... | 40 | +| 8.2.5.4.3 | Procedures at the IM CN Subsystem..... | 40 | +| 8.2.5.4.4 | Procedures at the SCF..... | 40 | +| 8.2.5.4.5 | Procedures at the PSS Adapter..... | 40 | +| 8.2.5.4.6 | Procedures at the PSS Server..... | 41 | +| 8.2.5.5 | PSS Content switching with unavailable SDP, change of media component and/or bandwidth..... | 41 | +| 8.2.5.5.1 | General description..... | 41 | +| 8.2.5.5.2 | Procedures at the UE..... | 42 | +| 8.2.5.5.3 | Procedures at the IM CN Subsystem..... | 42 | +| 8.2.5.5.4 | Procedures at the SCF..... | 42 | +| 8.2.5.5.5 | Procedures at the PSS Adapter..... | 43 | +| 8.2.5.5.6 | Procedures at the PSS Server..... | 43 | +| 8.2.5.6 | PSS content switching reporting update..... | 43 | +| 8.2.5.6.1 | General Description..... | 43 | +| 8.2.5.6.2 | Procedures at the PSS adapter..... | 43 | +| 8.2.5.6.3 | Procedures at the SCF..... | 43 | +| 8.2.5.7 | PSS Content Report Configuration..... | 44 | +| 8.2.5.7.1 | General Description..... | 44 | +| 8.2.5.7.2 | Procedures in SCF..... | 44 | +| 8.2.5.7.3 | Procedures at the IM CN Subsystem..... | 44 | +| 8.2.5.7.4 | Procedures in PSS Adapter..... | 44 | +| 8.2.6 | PSS Streaming Session Teardown..... | 45 | +| 8.2.6.0 | Introduction..... | 45 | +| 8.2.6.1 | General Description..... | 45 | +| 8.2.6.1.1 | UE-initiated PSS streaming session teardown..... | 45 | +| 8.2.6.1.2 | SCF-initiated PSS streaming session teardown..... | 46 | +| 8.2.6.1.3 | PSS adapter-initiated PSS streaming session teardown..... | 46 | +| 8.2.6.2 | Procedures at the UE..... | 47 | +| 8.2.6.2.1 | UE-initiated PSS streaming session teardown..... | 47 | +| 8.2.6.2.2 | Network-initiated PSS streaming session teardown..... | 47 | + +| | | | +|-----------|-----------------------------------------------------------|----| +| 8.2.6.3 | Procedures at the IM CN Subsystem..... | 47 | +| 8.2.6.4 | Procedures at the SCF..... | 47 | +| 8.2.6.4.1 | UE-initiated PSS streaming session teardown..... | 47 | +| 8.2.6.4.2 | SCF-initiated PSS streaming session teardown..... | 47 | +| 8.2.6.4.3 | PSS adapter-initiated PSS streaming session teardown..... | 47 | +| 8.2.6.5 | Procedures at the PSS Adapter..... | 47 | +| 8.2.6.5.1 | UE-initiated PSS streaming session teardown..... | 47 | +| 8.2.6.5.2 | SCF-initiated PSS streaming session teardown..... | 48 | +| 8.2.6.5.3 | PSS adapter-initiated PSS streaming session teardown..... | 48 | +| 8.2.6.6 | Procedures at the PSS Server..... | 48 | +| 8.2.7 | Supported procedures..... | 48 | +| 8.3 | MBMS Streaming..... | 48 | +| 8.3.1 | MBMS Media codecs and formats..... | 48 | +| 8.3.2 | Procedure for providing missing parameters..... | 48 | +| 8.3.2.1 | Procedures at the UE..... | 48 | +| 8.3.2.2 | Procedures at the SCF..... | 49 | +| 8.3.3 | MBMS Streaming Session initiation..... | 49 | +| 8.3.3.1 | General description..... | 49 | +| 8.3.3.2 | Procedures at the UE..... | 49 | +| 8.3.3.3 | Procedures at the IM CN Subsystem..... | 50 | +| 8.3.3.4 | Procedures at the SCF..... | 50 | +| 8.3.3.5 | Procedures at the BMSC/UPF..... | 51 | +| 8.3.4 | MBMS content switching..... | 51 | +| 8.3.4.1 | General Description..... | 51 | +| 8.3.4.2 | Procedures at the UE..... | 52 | +| 8.3.4.2 | Procedures at the IM CN Subsystem..... | 52 | +| 8.3.4.3 | Procedures at the SCF..... | 52 | +| 8.3.4.4 | Procedures at the BMSC/UPF..... | 52 | +| 8.3.5 | MBMS Streaming Session Teardown..... | 53 | +| 8.3.5.1 | General Description..... | 53 | +| 8.3.5.2 | Procedures at the UE..... | 53 | +| 8.3.5.3 | Procedures at the IM CN Subsystem..... | 53 | +| 8.3.5.4 | Procedures at the SCF..... | 53 | +| 8.3.5.5 | Procedures at the BMSC/UPF..... | 53 | +| 8.3.6 | MBMS Content Report Configuration..... | 53 | +| 8.3.6.1 | General Description..... | 53 | +| 8.3.6.2 | Procedures in SCF..... | 54 | +| 8.3.6.3 | Procedures at the IM CN Subsystem..... | 54 | +| 8.3.6.4 | Procedures in UE..... | 54 | +| 8.4 | Combined PSS and MBMS Streaming..... | 54 | +| 8.4.1 | Introduction..... | 54 | +| 8.4.2 | PSS - MBMS Switching..... | 55 | +| 8.4.3 | Switching from MBMS streaming to PSS streaming..... | 55 | +| 8.4.3.1 | Combined Session establishment..... | 56 | +| 8.4.3.1.1 | Procedures at the UE..... | 56 | +| 8.4.3.1.2 | Procedures at the IM CN Subsystem..... | 56 | +| 8.4.3.1.3 | Procedures at the SCF..... | 57 | +| 8.4.3.1.4 | Procedures at the PSS Adapter..... | 57 | +| 8.4.3.1.5 | Procedures at the PSS Server..... | 57 | +| 8.4.3.2 | Combined session teardown..... | 57 | +| 8.4.4 | Switching from PSS streaming to MBMS streaming..... | 57 | +| 8.4.4.1 | Combined Session establishment..... | 58 | +| 8.4.4.1.1 | Procedures at the UE..... | 58 | +| 8.4.4.1.2 | Procedures at the IM CN Subsystem..... | 58 | +| 8.4.4.1.3 | Procedures at the SCF..... | 58 | +| 8.4.4.1.4 | Procedures at the PSS Adapter..... | 59 | +| 8.4.4.1.5 | Procedures at the PSS Server..... | 59 | +| 8.4.4.2 | Combined session teardown..... | 59 | +| 9 | Policy and charging control..... | 59 | +| 9.1 | General..... | 59 | +| 9.2 | QoS control..... | 59 | + +| | | | +|------------|-------------------------------------------------------------------------|----| +| 10 | Security Procedures..... | 60 | +| 10.1 | General..... | 60 | +| 10.2 | Secure Service Description Retrieval..... | 61 | +| 10.3 | PSS Authentication and Content encryption..... | 62 | +| 10.4 | MBMS Security procedures..... | 62 | +| 10.4.1 | HTTP based MBMS security procedure..... | 62 | +| 10.4.1.1 | MSK procedures..... | 63 | +| 10.4.1.1.1 | IMS based MBMS user service key registration procedure..... | 63 | +| 10.4.1.1.2 | IMS based MBMS user service key deregistration procedure..... | 64 | +| 10.4.1.1.3 | IMS based MBMS user service MSK request procedure..... | 64 | +| 10.4.1.1.4 | IMS based MBMS user service MSK delivery procedure..... | 64 | +| 10.4.1.2 | MTK procedure..... | 64 | +| 10.4.2 | SIP based MBMS security procedures..... | 64 | +| 10.4.2.0 | General..... | 64 | +| 10.4.2.1 | SIP based MBMS User Service Registration..... | 65 | +| 10.4.2.1a | SIP based MBMS User Service De-registration..... | 67 | +| 10.4.2.2 | SIP based Basic MSK Request..... | 69 | +| 10.4.2.3 | Updating MUK..... | 71 | +| 10.4.2.4 | SIP based BM-SC solicited pull..... | 71 | +| 11 | Blending of Presence and PSS/MBMS user services..... | 71 | +| 11.1 | General description..... | 71 | +| 11.2 | Procedures at the UE acting as presentity..... | 72 | +| 11.3 | Procedures at the UE acting as watcher..... | 72 | +| 12 | Networked Bookmark Service..... | 72 | +| 12.1 | Bookmarking Creation and Storage..... | 73 | +| 12.2 | Bookmarking Retrieval..... | 74 | +| 12.2.1 | Bookmarking Retrieval independent to session establishment..... | 74 | +| 12.2.2 | Bookmarking Retrieval during session establishment..... | 74 | +| 13 | User generated content service..... | 75 | +| 13.1 | UGC content provision procedure..... | 76 | +| 13.2 | UGC distribution procedure..... | 77 | +| 14 | MBMS Download Service..... | 77 | +| 14.1 | Missing parameters before session initiation..... | 77 | +| 14.1.1 | Procedures at the UE..... | 77 | +| 14.1.2 | Procedures at the SCF..... | 78 | +| 14.2 | MBMS Download Session Initiation, File Repair and Reception Report..... | 78 | +| 14.2.1 | General description..... | 78 | +| 14.2.2 | Procedures at the UE..... | 79 | +| 14.2.3 | Procedures at the IM CN Subsystem..... | 79 | +| 14.2.4 | Procedures at the SCF..... | 79 | +| 14.2.5 | Procedures at the BMSC/UPF..... | 80 | +| 14.3 | MBMS Download Session Teardown..... | 80 | +| 14.3.1 | General Description..... | 80 | +| 14.3.2 | Procedures at the UE..... | 80 | +| 14.3.3 | Procedures at the IM CN Subsystem..... | 81 | +| 14.3.4 | Procedures at the SCF..... | 81 | +| 14.3.5 | Procedures at the BMSC/UPF..... | 81 | +| 15 | PSS download service..... | 81 | +| 15.1 | General Description..... | 81 | +| 15.2 | Procedures at the UE..... | 82 | +| 15.3 | Procedures at the IM CN subsystem..... | 83 | +| 15.4 | Procedures at the SCF..... | 83 | +| 15.5 | Procedures at the HTTP/SIP adapter..... | 83 | +| 15.6 | Procedures at the HTTP server..... | 84 | +| 15.7 | Session termination..... | 85 | +| 15.7.1 | General description..... | 85 | +| 15.7.1.1 | UE-initiated PSS download session teardown..... | 85 | +| 15.7.1.2 | SCF-initiated PSS download session teardown..... | 86 | + +| | | +|------------------------------------------------------------------------|-----| +| 15.7.1.3 HTTP/SIP adapter-initiated PSS download session teardown..... | 87 | +| 15.7.2 Procedures at the UE..... | 87 | +| 15.7.2.1 UE-initiated PSS download session teardown..... | 87 | +| 15.7.2.2 Network-initiated PSS download session teardown..... | 87 | +| 15.7.3 Procedures at the IM CN Subsystem..... | 87 | +| 15.7.4 Procedures at the SCF..... | 88 | +| 15.7.4.1 UE-initiated PSS download session teardown..... | 88 | +| 15.7.4.2 SCF-initiated PSS download session teardown..... | 88 | +| 15.7.4.3 HTTP/SIP adapter-initiated PSS download session teardown..... | 88 | +| 15.7.5 Procedures at the HTTP/SIP adapter..... | 88 | +| 15.7.5.1 UE-initiated PSS download session teardown..... | 88 | +| 15.7.5.2 SCF-initiated PSS download session teardown..... | 88 | +| 15.7.5.3 HTTP/SIP adapter-initiated PSS download session teardown..... | 88 | +| 15.7.6 Procedures at the HTTP server..... | 88 | +| 16 Inter UE Session Transfer..... | 88 | +| 16.0 Introduction..... | 88 | +| 16.1 Push mode..... | 89 | +| 16.2 Pull mode..... | 90 | +| 17 Parental Control Service..... | 92 | +| 17.1 Preventive Parental Control..... | 92 | +| 17.1.1 Parental Control during PSS Session initialization..... | 92 | +| 17.1.1.1 Procedure at UE..... | 92 | +| 17.1.1.2 Procedure at SCF..... | 93 | +| 17.1.1.3 Procedure at PSS Adapter..... | 93 | +| 17.1.2 Parental Control during MBMS Session initialization..... | 93 | +| 17.1.2.1 Procedure at UE..... | 93 | +| 17.1.2.2 Procedure at SCF..... | 93 | +| 17.2 Interactive Parental Control service..... | 93 | +| 17.2.1 Blocking..... | 93 | +| 17.2.1.1 General Description..... | 93 | +| 17.2.1.2 Procedure at Parent UE..... | 94 | +| 17.2.1.3 Procedure at SCF..... | 94 | +| 17.2.2 Allowing..... | 95 | +| 17.2.2.1 Allowing in PSS Session Initialization..... | 95 | +| 17.2.2.1.1 General Description..... | 95 | +| 17.2.2.1.2 Procedure at Child UE..... | 96 | +| 17.2.2.1.3 Procedure at Parent UE..... | 96 | +| 17.2.2.1.4 Procedure at SCF..... | 96 | +| 17.2.2.2 Allowing in MBMS Session Initialization..... | 97 | +| 17.2.2.2.1 General Description..... | 97 | +| 17.2.2.2.2 Procedure at Child UE..... | 97 | +| 17.2.2.2.3 Procedure at Parent UE..... | 98 | +| 17.2.2.2.4 Procedure at SCF..... | 98 | +| 18 Forced Playout Constraints..... | 99 | +| 18.1 General Description..... | 99 | +| 18.2 Procedures at the UE..... | 99 | +| 18.3 Procedures at the IM CN Subsystem..... | 99 | +| 18.4 Procedures at the SCF..... | 100 | +| 18.5 Procedures at the PSS Adapter..... | 100 | +| 19 3GP-DASH (Dynamic and Adaptive Streaming over HTTP) service..... | 101 | +| 19.1 Session initiation and QoS reservation..... | 101 | +| 19.1.1 General description..... | 101 | +| 19.1.2 Procedures at the UE..... | 101 | +| 19.1.3 Procedures at the IM CN subsystem..... | 102 | +| 19.1.4 Procedures at the SCF..... | 103 | +| 19.1.5 Procedures at the HTTP/SIP adapter..... | 103 | +| 19.1.6 Procedures at the HTTP server..... | 104 | +| 19.2 MPD Update..... | 104 | +| 19.2.1 General description..... | 104 | + +| | | | +|-------------------------------|----------------------------------------------------------------|------------| +| 19.2.2 | Procedures at the UE..... | 105 | +| 19.2.3 | Procedures at the IM CN subsystem..... | 105 | +| 19.2.4 | Procedures at the SCF..... | 106 | +| 19.2.5 | Procedures at the HTTP/SIP adapter..... | 106 | +| 19.2.6 | Procedures at the HTTP server..... | 106 | +| 19.3 | Session termination..... | 107 | +| 19.3.1 | General description..... | 107 | +| 19.3.1.1 | UE-initiated session termination..... | 107 | +| 19.3.1.2 | SCF-initiated session termination..... | 108 | +| 19.3.1.3 | HTTP/SIP adapter-initiated session termination..... | 109 | +| 19.3.2 | Procedures at the UE..... | 109 | +| 19.3.2.1 | UE-initiated session termination..... | 109 | +| 19.3.2.2 | Network-initiated session termination..... | 109 | +| 19.3.3 | Procedures at the IM CN Subsystem..... | 109 | +| 19.3.4 | Procedures at the SCF..... | 110 | +| 19.3.4.1 | UE-initiated session termination..... | 110 | +| 19.3.4.2 | SCF-initiated session termination..... | 110 | +| 19.3.4.3 | HTTP/SIP adapter-initiated session termination..... | 110 | +| 19.3.5 | Procedures at the HTTP/SIP adapter..... | 110 | +| 19.3.5.1 | UE-initiated session termination..... | 110 | +| 19.3.5.2 | SCF-initiated session termination..... | 110 | +| 19.3.5.3 | HTTP/SIP adapter-initiated session termination..... | 110 | +| 19.3.6 | Procedures at the HTTP server..... | 110 | +| 20 | Network PVR..... | 110 | +| 20.1 | NPVR Recording procedure..... | 110 | +| 20.1.1 | General Description..... | 110 | +| 20.1.2 | Procedures at UE..... | 112 | +| 20.1.3 | Procedures at SCF..... | 112 | +| 20.1.4 | Procedures at PSS Adapter..... | 113 | +| 20.1.5 | Procedures at Recording server..... | 114 | +| 20.2 | NPVR Retrieving..... | 115 | +| 20.2.1 | Procedures at UE..... | 115 | +| 20.2.2 | Procedures at SCF..... | 115 | +| 20.2.3 | Procedures at PSS Adapter..... | 115 | +| 20.2.4 | Procedures at PSS server..... | 115 | +| 21 | Content Referral Service (CRS)..... | 115 | +| 21.1 | User Initiated CRS..... | 115 | +| 21.1.1 | General Description..... | 115 | +| 21.1.2 | Procedure at Initiated UE..... | 116 | +| 21.1.3 | Procedure at SCF..... | 117 | +| 21.1.4 | Procedure at Target UE..... | 117 | +| 21.2 | Service Provider Initiated CRS..... | 118 | +| 21.2.1 | General Description..... | 118 | +| 21.2.2 | Procedure at Initiated UE..... | 118 | +| 21.2.3 | Procedure at SCF..... | 118 | +| Annex A (normative): | 3gpp_rtsp application..... | 120 | +| Annex B (informative): | Examples..... | 121 | +| Annex C (normative): | Void..... | 122 | +| Annex D (normative): | XML Schema for PSS and MBMS commands..... | 123 | +| Annex E (normative): | XML Schemas for the PSS content switch data..... | 124 | +| Annex F (normative): | XML Schemas for the MBMS content switch data..... | 125 | +| Annex G (normative): | XML Schema for PSS and MBMS UE Device Capabilities..... | 126 | +| Annex H (normative): | XML Schema for Service Attachment Information..... | 127 | + +| | | | +|-------------------------------|--------------------------------------------------------------------------------------|------------| +| Annex I (normative): | XML Schemas for SIP based MBMS security procedures..... | 130 | +| I.1 | Bootstrapping transaction identifier..... | 130 | +| I.2 | NAF key information..... | 130 | +| Annex J (normative): | XML Schema for nBookmark..... | 131 | +| J.1 | XML Schema..... | 131 | +| J.2 | Syntax..... | 132 | +| Annex K (normative): | XML Schema for Content Report Configuration..... | 133 | +| Annex L (normative): | XML Schema for Parental Control Service..... | 134 | +| Annex M (normative): | PSS&MBMS User Profile Extension..... | 135 | +| Annex N (normative): | XML Schema for Network PVR..... | 136 | +| Annex O (normative): | XML Schema for Service Provider Initiated Content Referral Service (CRS)..... | 138 | +| Annex P (informative): | File Naming convention for XML schemas..... | 139 | +| Annex Q (normative): | Content Reporting Configuration Info Package..... | 140 | +| Q.1 | Overall Description..... | 140 | +| Q.2 | Applicability..... | 140 | +| Q.3 | Info Package Name..... | 140 | +| Q.4 | Info Package Parameters..... | 140 | +| Q.5 | SIP Option Tags..... | 140 | +| Q.6 | INFO Message Body Parts..... | 140 | +| Q.6.1 | General..... | 140 | +| Q.6.2 | SIP Content-Type header field value..... | 141 | +| Q.6.3 | SIP Content-Disposition header field value..... | 141 | +| Q.6.4 | Message body syntax..... | 141 | +| Q.7 | Info Package Usage Restrictions..... | 141 | +| Q.8 | Rate of INFO Requests..... | 141 | +| Q.9 | Info Package Security Considerations..... | 141 | +| Q.10 | Implementation Details and Examples..... | 141 | +| Annex R (informative): | Change history..... | 142 | + +--- + +--- + +## Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +--- + +## Introduction + +The 3GPP Packet Switch Streaming (PSS) provides a framework for Internet Protocol (IP) based streaming applications in by specifying protocols and codecs within the 3GPP system. Protocols for control signalling, capability exchange, media transport, rate adaptation and protection are specified. Codecs for speech, natural and synthetic audio, video, still images, bitmap graphics, vector graphics, timed text and text are specified. + +The 3GPP Multimedia Broadcast and Multicast Service (MBMS) provides a framework for broadcast and Multicast streaming and download applications in 3GPP networks supporting the MBMS bearer service. The MBMS user services are enabled by a set of specified media codecs, formats and transport/application protocols. MBMS user services are built on top of the MBMS bearer service. There are two delivery methods for the MBMS user services: download and streaming. + +The 3GPP IP Multimedia Subsystem (IMS) enables the deployment of IP multimedia applications. PSS and MBMS User Services are IP multimedia services but they were specified before IMS. IMS brings enablers and features to operators and subscribers that can enhance the experience of PSS and MBMS User Services. + +The purpose of the present document is the specification of use of the IMS to initiate and control PSS and MBMS User Service. This should enable deployment of PSS and MBMS user services as IMS services. Note that the present specification uses components of the 3GPP PSS, 3GPP MBMS , ETSI TISPAN IPTV and Open IPTV Forum standards specifications. + +--- + +# 1 Scope + +The present document specifies the usage of IMS protocols to initiate and control PSS and MBMS Streaming and Download User Services based applications. It applies to IMS enabled UEs that also implement PSS and/or MBMS clients. Existing protocols that are used are described in reference to relevant specifications. + +The present document is applicable to IP-based packet-switched networks over 3GPP systems. + +The present document includes information applicable to network operators, service providers and manufacturers. + +--- + +# 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TR 21.905: "Vocabulary for 3GPP Specifications". +- [2] 3GPP TS 22.146: "Multimedia Broadcast/Multicast Service; Stage 1". +- [3] 3GPP TS 22.246: "Multimedia Broadcast/Multicast Service (MBMS) user services; Stage 1". +- [4] 3GPP TS 23.246: "Multimedia Broadcast/Multicast Service (MBMS); Architecture and functional description". +- [5] 3GPP TS 33.246: "3G Security; Security of Multimedia Broadcast/Multicast Service (MBMS)". +- [6] 3GPP TS 23.228: "IP multimedia subsystem; Stage 2". +- [7] 3GPP TS 24.229: "IP multimedia call control protocol based on Session Initiation Protocol (SIP) and Session Description Protocol (SDP); Stage 3". +- [8] 3GPP TS 26.234: "Transparent end-to-end streaming service; Protocols and codecs". +- [9] 3GPP TS 22.233: "Transparent End-to-End Packet-switched Streaming Service; Stage 1". +- [10] 3GPP TS 26.233: "Transparent end-to-end packet switched streaming service (PSS); General description". +- [11] 3GPP TS 26.346: "Multimedia Broadcast/Multicast Service (MBMS); Protocols and codecs". +- [12] 3GPP TS 23.203: "Policy and charging control architecture". +- [13] IETF RFC 4145 (September 2005): "TCP-Based Media Transport in the Session Description Protocol (SDP)". +- [14] IETF RFC 4572 (July 2006) Connection-Oriented Media Transport over the Transport Layer Security (TLS) Protocol in the Session Description Protocol (SDP) +- [15] void +- [16] 3GPP TS 23.060: "General Packet Radio Service (GPRS); Service description; Stage 2". +- [17] IETF RFC 2782: "A DNS RR for specifying the location of services (DNS SRV)". +- [18] Void. + +- [19] Void. +- [20] 3GPP TS 33.222: "Generic Authentication Architecture (GAA); Access to network application functions using Hypertext Transfer Protocol over Transport Layer Security (HTTPS)". +- [21] 3GPP TS 24.423: "TISPAN; PSTN/ISDN simulation services; Extensible Markup Language (XML) Configuration Access Protocol (XCAP) over the Ut interface for Manipulating NGN PSTN/ISDN Simulation Services". +- [22] 3GPP TS 24.109: "Bootstrapping interface (Ub) and network application function interface (Ua); Protocol details". +- [23] Void. +- [24] ETSI TS 183 063 V3.5.2 (2011-03): "Telecommunications and Internet converged Services and Protocols for Advanced Networking (TISPAN); IMS based IPTV Stage 3 Specification". +- [25] IETF RFC 2326: "Real Time Streaming Protocol (RTSP)". +- [26] 3GPP TS 33.220: "Generic Authentication Architecture (GAA); Generic bootstrapping architecture". +- [27] OMA-TS-BCAST\_Service\_Guide-V1\_0: "Method and Apparatus for Broadcast Signaling in a Wireless Communication System". +- [28] IETF RFC 6080: "A Framework for Session Initiation Protocol User Agent Profile Delivery". +- [29] 3GPP TS 23.003: "Numbering, addressing and identification". +- [30] 3GPP TS 23.401: "General Packet Radio Service (GPRS) enhancements for Evolved Universal Terrestrial Radio Access Network (E-UTRAN) access". +- [31] 3GPP TS 33.203: "3G security; Access security for IP-based services". +- [32] 3GPP TS 33.210: "3G security; Network Domain Security (NDS); IP network layer security". +- [33] 3GPP TS 29.109: "Generic Authentication Architecture (GAA); Zh and Zn Interfaces based on the Diameter protocol; Stage 3". +- [34] IETF RFC 2616: "Hypertext Transfer Protocol -- HTTP/1.1". +- [35] 3GPP TS 23.141: "Presence Service; Architecture and functional description". +- [36] 3GPP TS 24.141: "Presence Service using the IP Multimedia (IM) Core network (CN) subsystem". +- [37] OMA-TS-Presence-SIMPLE-V1-00-20060725-A: "Open Mobile Alliance: Presence SIMPLE specification". +- [38] 3GPP TS 26.114: "IP Multimedia Subsystem (IMS); Multimedia telephony; Media handling and interaction". +- [39] 3GPP TS 26.244: "Transparent end-to-end packet switched streaming service (PSS); 3GPP file format (3GP)". +- [40] 3GPP TS 23.237: "IP Multimedia Subsystem (IMS) Service Continuity; Stage 2". +- [41] 3GPP TS 24.237: "IP Multimedia Subsystem (IMS) Service Continuity; Stage 3". +- [42] IETF RFC 6086: "Session Initiation Protocol (SIP) INFO Method and Package Framework". +- [43] IETF RFC 3515: "The Session Initiation Protocol (SIP) Refer Method". +- [44] Open IPTV Forum, "Release 2 Specification, Volume 4 - Protocols" V2.1, June 2011. + +## 3 Definitions and abbreviations + +### 3.1 Definitions + +For the purposes of the present document, the terms and definitions given in 3GPP TR 21.905 [1] and the following apply: + +**On Demand:** users can select their required content, for example with the assistance of the Electronic Programme Guide (EPG), at the user preferred time. + +**NOTE:** The content is then transmitted uniquely (unicast) to that consumer who can usually use trick-modes functionalities to control their viewing of the content. e.g. TV Content on Demand (CoD) + +**IMS registration:** registration procedure for a public user identity initiated by the UE in the absence of any valid registration + +**Live:** content is streamed and intended for reception by anyone where the consumer has no control over the content or timing of what he receives, apart from the ability to select a particular channel. e.g. linear TV. + +**"Non-IMS" BM-SC:** BM-SC function as defined in 3GPP TS 23.246 [5] and 3GPP TS 26.346 [11] without any IMS support + +**Multimedia Broadcast/Multicast Service (MBMS):** See 3GPP TS 22.146 [2]. + +**MBMS User Services:** MBMS User Service may use more than one Multimedia Broadcast/Multicast Service (bearer service) and more than one Broadcast and/or Multicast session +(See 3GPP TS 22.246 [3].) + +**MBMS user service discovery/announcement:** user service discovery refers to methods for the UE to obtain the list of available MBMS user services along with information on the user service and the user service announcement refers to methods for the MBMS service provider to make the list of available MBMS user services along with information on the user service available to the UE + +**MBMS delivery method:** mechanism used by a MBMS user service to deliver content +An MBMS delivery method uses MBMS bearers in delivering content and may make use of associated procedures. + +**MBMS download delivery method:** delivery of discrete objects (e.g. files) by means of a MBMS download session + +**MBMS streaming delivery method:** delivery of continuous media (e.g. real-time video) by means of a MBMS streaming session + +**MBMS streaming session:** time, protocols and protocol state (i.e. parameters) which define sender and receiver configuration for the streaming of content + +**PSS client:** client for the 3GPP packet switched streaming service based on the IETF RTSP/SDP and/or HTTP standards, with possible additional 3GPP requirements according to the present document + +**PSS server:** server for the 3GPP packet switched streaming service based on the IETF RTSP/SDP and/or HTTP standards, with possible additional 3GPP requirements according to the present document + +**Trick Play:** streaming playback mode during which the user can control playback by playing, seeking, pausing, fast forwarding and fast rewinding + +### 3.2 Abbreviations + +For the purposes of the present document, the abbreviations given in 3GPP TR 21.905 [1] and the following apply: + +| | | +|-------|--------------------------------------| +| BM-SC | Broadcast-Multicast - Service Centre | +| CoD | Content on Demand | +| ESG | Electronic Service Guide | +| GGSN | Gateway GPRS Serving Node | +| IMPI | IMS Private Identity | +| IMPU | IMS Public Identity | + +| | | +|------|----------------------------------------| +| IMS | IP Multimedia Subsystem | +| IUT | Inter UE Session Transfer | +| IP | Internet Protocol | +| MBMS | Multimedia Broadcast/Multicast Service | +| PSS | Packet Switch Streaming | +| PSI | Public Service Identity | +| RTP | Real-Time transport Protocol | +| RTSP | Real-Time Streaming Protocol | +| SCC | Service Centralization and Continuity | +| SCF | Service Control Function | +| SDF | Service Discovery Function | +| SDP | Session Description Protocol | +| SSF | Service Selection Function | +| UE | User Equipment | +| URI | Uniform Resource Identifier | +| USD | User Service Description | + +## 4 System description + +### 4.1 Introduction + +This clause describes the IMS initiated and controlled PSS and MBMS User Service system. It gives a description of the architecture, the role of each new and modified entity and interface. + +The description of the PSS system is in 3GPP TS 22.233 [9] and 3GPP TS 26.233 [10]. The description of the MBMS system is in 3GPP TS 23.246 [4]. + +### 4.2 Architecture + +#### 4.2.1 Non IMS 3GPP PSS and MBMS User Service architecture + +Figure 1 describes the Non IMS PSS and MBMS User Service architecture. + +![Diagram of Non IMS PSS and MBMS User Service Architecture. A central oval labeled 'Core Network and Radio Access Network' is connected to three rectangular blocks. On the left is 'PSS and MBMS client'. On the right are two stacked blocks: 'PSS server' (top) and 'BM-SC' (bottom). Both 'PSS server' and 'BM-SC' are connected to a large rectangular block on the far right labeled 'Sources Live encoders, On demand Files'. Above the central oval is the text 'Unicast/Multicast/Broadcast Bearers'.](704082cc3e11776bda29595c76411362_img.jpg) + +``` + +graph LR + subgraph Bearers [Unicast/Multicast/Broadcast Bearers] + CN((Core Network and Radio Access Network)) + end + Client[PSS and MBMS client] --- CN + CN --- PSS[PSS server] + CN --- BMSC[BM-SC] + PSS --- Sources["Sources
Live encoders,
On demand Files"] + BMSC --- Sources + +``` + +Diagram of Non IMS PSS and MBMS User Service Architecture. A central oval labeled 'Core Network and Radio Access Network' is connected to three rectangular blocks. On the left is 'PSS and MBMS client'. On the right are two stacked blocks: 'PSS server' (top) and 'BM-SC' (bottom). Both 'PSS server' and 'BM-SC' are connected to a large rectangular block on the far right labeled 'Sources Live encoders, On demand Files'. Above the central oval is the text 'Unicast/Multicast/Broadcast Bearers'. + +**Figure 1: Non IMS PSS and MBMS User Service Architecture** + +The sources consist of all multimedia content in streaming or file form. E.g. live encoders processing in feeds from TV or Music Radio channels. + +The PSS server performs control and streaming delivery functions on a Unicast access type. + +The BM-SC performs control and streaming/download delivery functions in a hybrid Unicast/Multicast/Broadcast access type. + +The core network and RAN enable the mobility, and provides IP connectivity over Unicast/Multicast/Broadcast bearers between the servers and the clients. + +The PSS & MBMS client, located in the UE, performs service selection and initiation, receives and present the content to the user. + +The PSS client interfaces to the PSS server transparently through the Packet Switch Network. The PSS client can discover the PSS services via multiple means like e.g. browsing. The session description protocol is SDP. The session control protocol is RTSP. The transport protocol is RTP. + +The MBMS client interfaces to the BM-SC via layer 3 protocols defined between the UE and the GGSN and the GGSN with the BM-SC (Gmb). + +The PSS and MBMS client interfaces via the Radio interface to the RAN and the CN. + +The interface between the sources and the PSS server & BM-SC are outside the scope of the present document. + +## 4.2.2 IMS based PSS and MBMS User Service architecture + +Figure 2 describes the IMS based PSS and MBMS User Service functional architecture. In addition to PSS and MBMS User Service functions, the IMS core and various functions are added. + +![Figure 2: IMS based PSS and MBMS functional architecture diagram. The diagram shows the functional architecture for IMS-based PSS and MBMS. On the left, the UE (User Equipment) is shown with its internal components: EPC / PS Core / RAN, P C R F, and various interfaces (U b, G m (SIP), U, R x, G x, G i (R SP), G i (R P), G i (HTTP), G mb, G i (R P/FLUTE/MIKEY), G i (HTTP), G i (MIKEY/UDP), G i (HTTP)). The central part of the diagram features the IMS CN subsystem, which includes S D F, H S S, and I S C (SIP) interfaces. To the right, the S S F (Service Session Function) contains P S S p o r t a l, B M S C . I A F, and B M S C . U S D / A. Below the S S F is the S C F (Service Control Function). Further right, the P S S A d a p t e r and H T T P / S I P a d a p t e r are shown, with a note (TS 26.346). Below these are the P S S S e r v e r and H T T P s e r v e r. At the bottom right, the B M S C . S n T F and B M S C . K F are shown, with a note (TS 26.346). The B M S C . U P F is at the very bottom right. Various interfaces connect these components, including Z h, Z n, C x, S h, and (SIP).](a7c51c18111139f9aca2805114108565_img.jpg) + +Figure 2: IMS based PSS and MBMS functional architecture diagram. The diagram shows the functional architecture for IMS-based PSS and MBMS. On the left, the UE (User Equipment) is shown with its internal components: EPC / PS Core / RAN, P C R F, and various interfaces (U b, G m (SIP), U, R x, G x, G i (R SP), G i (R P), G i (HTTP), G mb, G i (R P/FLUTE/MIKEY), G i (HTTP), G i (MIKEY/UDP), G i (HTTP)). The central part of the diagram features the IMS CN subsystem, which includes S D F, H S S, and I S C (SIP) interfaces. To the right, the S S F (Service Session Function) contains P S S p o r t a l, B M S C . I A F, and B M S C . U S D / A. Below the S S F is the S C F (Service Control Function). Further right, the P S S A d a p t e r and H T T P / S I P a d a p t e r are shown, with a note (TS 26.346). Below these are the P S S S e r v e r and H T T P s e r v e r. At the bottom right, the B M S C . S n T F and B M S C . K F are shown, with a note (TS 26.346). The B M S C . U P F is at the very bottom right. Various interfaces connect these components, including Z h, Z n, C x, S h, and (SIP). + +**Figure 2: IMS based PSS and MBMS functional architecture** + +In figure 2: + +- Solid lines are standard interfaces. E.g. interface between PSS server and UE4. + +- Dotted lines are for interfaces for which the protocols in use is out of the scope of the present document. +E.g. interface between SSF and BMSC.UPF. + +Description of functional entities: + +- IM CN Subsystem: IMS Core Network Subsystem as defined in 3GPP TS 23.228 [6]. The IM CN Subsystem supports, user registration and authentication, mobility and roaming, control of multimedia sessions, QoS control, Policy control, charging and interworking with circuit switched. +- EPC/PS Core/RAN: Evolved Packet Core, Packet Switch Core Network and Radio Access Network. See 3GPP TS 23.060 [16] and TS 23.401 [30]. + +NOTE 0: the various packet core networks may offer different levels of support (e.g. the EPC does not support MBMS in 3GPP Release 8). + +- UE: The UE contains an GBA/IMS/PSS/MBMS client, which performs service discovery and selection, handles service initiation, modification and termination, receives and present the content to the user. In addition to the procedures specified in this document, the UE shall support the procedures specified in 3GPP TS 24.229 [7] and 3GPP TS 24.109 [22] for the UE functional entity. +- SDF: Service Discovery Function (SDF): this function provides an entry point to SSF for the client to attach to the service provided by the service provider. In addition to the procedures specified in this document, the SDF shall support the procedures specified in 3GPP TS 24.229 [7] for the terminating UA functional entity. +- SSF: Service Selection Function (SSF): this function provides a list of available PSS and MBMS User Services and relevant User Service Description information. It can be personalized to the client's identity. The SSF shall support Service Announcement functions according to the Xa interface in TISPAN. The PSS portal is for formatting and delivery of PSS Service Description information. The BMSC.IAF and BMSC.USD/A functions are according to 3GPP TS 26.346 [11]. The interface between BMSC.IAF and UE is according to 3GPP TS 26.346 [11] and out of the scope of the present specification. If the User Service Description information exists in a BMSC.USD/A of a "Non-IMS" BM-SC, or in a PSS portal, the SSF takes USD information from them. The SSF may then reformat the USD information before delivery to the UE. The reformat may include information for the IMS UE to build a SIP URI to initiate PSS and MBMS user service. +- SCF: Service Control Function (SCF): it provides service logic and functions required to support execution of such logic. It does service authorization during session initiation and session modification, which includes checking PSS and MBMS user's service subscription in order to allow or deny access to the service. It selects the relevant PSS and MBMS media functions. In addition to the procedures specified in this document, the SCF shall support the procedures specified in 3GPP TS 24.229 [7]: + - For PSS, the SCF acts as a proxy or B2BUA. + - For MBMS, the SCF acts as a terminating UA. +- BSF: Bootstrapping Server Function (BSF) as defined in 3GPP TS 33.220 [26] and 3GPP TS 24.109 [22] to perform GBA/GAA procedures with the UE. The BSF supports procedures defined in 3GPP TS 33.220 [26] and 3GPP TS 29.109 [x] with the HSS and the BMSC.UPF (see clause 10.4.1) and with the HSS and the SCF (see clause 10.4.2) to enable GBA/GAA procedures. +- HSS: Home Subscriber Server as defined in 3GPP TS 23.002. Contains the IMS User Profile and optionally the GBA User Security Settings (GUSS) defined in 3GPP TS 33.220 [26] and 3GPP TS 29.109 [33]. It also may contain PSS and MBMS User Service specific User and UE data. +- PSS Adapter: this function performs bi-directional protocol translation between SIP and RTSP to offer control of PSS servers as defined in clause 8.2.3.5 and also control of Recording servers as defined in clause 20.1.4. It proxies RTSP messaging from the UE and SIP/RTSP translation towards the PSS server and Recording server. Note that these functions can be incorporated into the SCF, the PSS Server or a new stand-alone entity. In addition to the procedures specified in this document, the PSS Adapter shall support the procedures specified in 3GPP TS 24.229 [7] for the terminating UA functional entity. +- HTTP/SIP adapter: this function correlates SIP session with HTTP incoming requests. In addition to the procedures specified in this document, the HTTP/SIP adapter shall support the procedures specified in 3GPP TS 24.229 [7] for the terminating UA functional entity. + +- PCRF: Policy and Charging Rules Function (3GPP TS 23.203 [12]). This function controls the charging and the establishment of resources in the RAN and PS core network. +- PSS Server: Packet Switch Streaming server function as described in 3GPP TS 26.234 [8]. It functionally contains media control and media delivery functions. +- Recording Server: Recording Server function performs live content recording. This function contains two part, to the content resource, it retrieves live streaming content; to PSS Adapter, it act as a RTSP client as defined in section X.1.5. +- HTTP server: this function is described in 3GPP TS 26.234 [8]. +- BMSC.UPF: it contains all BMSC User Plane sub-functions. + +NOTE 1: The BM-SC Membership function and Proxy and Transport function are defined in 3GPP TS 23.246 [4]. These functions are not described on the architecture in figure 2. The BM-SC Membership function is invoked for the establishment and release of Multicast bearers. + +Description of interfaces: + +The interface between the UE and the SSF is used to retrieve service selection information. It is part of the SGi/Gi interface and based on HTTP protocol. + +Gm: This is a SIP based interface between the UE (IMS Client) and the P-CSCF. It is used to forward the SIP service request and response between UE and network. + +The interface between the UE (PSS Client) and the PSS Adapter allows media flow control. It is part of the SGi/Gi interface and based on RTSP protocol. + +The interface between the PSS Server and the UE is for delivery of streaming data. It is part of the SGi/Gi interface and based on RTP and RTCP protocols. + +The interface between the HTTP server and the UE is for delivery of download data. It is part of Sgi/Gi interface and based on HTTP. + +The interface between the BMSC.UPF and the UE is for delivery of streaming data and traffic keys. It is part of the SGi/Gi interface and based on (S)RTP, FLUTE and MIKEY protocols. + +Gmb: This interface is between the BMSC.UPF and the GGSN. The Gmb interface is defined in 3GPP TS 23.246 [4]. + +The interface between the PSS Adapter and the PSS Server allows control of the PSS Server. This interface is based on RTSP protocol. + +NOTE 2: This interface needs to be named. + +The interface between the PSS Adapter and the Recording Server allows control of the Recording Server. This interface is based on RTSP protocol. + +The interface between the PSS Server and the Recording Server is for delivery of recorded streaming content. + +The interface between the HTTP/SIP adapter and the HTTP server is based on HTTP. + +The interface between the IM CN subsystem and the SCF is an ISC (IMS Service Control) interface based on SIP. The interface between the IM CN subsystem and the PSS adapter is an interface based on SIP protocol.. Both interfaces are used to setup, modify and teardown PSS sessions. + +NOTE 3: Under certain conditions this interface between the SCF and the PSS adapter can be implemented as a direct interface (i.e. not going via the IM CN subsystem). + +NOTE 4: The interface between the IM CN subsystem and the PSS adapter needs to be named. + +The interface between the IM CN subsystem and the SCF is an ISC (IMS Service Control) interface based on SIP. The interfaces between the IM CN subsystem and the HTTP/SIP adapter is an interface based on SIP. + +NOTE 5: Under certain conditions this interface between the SCF and the PSS adapter can be implemented as a direct interface (i.e. not going via the IM CN subsystem). + +This interface between the SSF and the BMSC.UPF is according to 3GPP TS 26.346 [11]. It may be used to carry USD over MBMS bearers. + +The interface between the SDF and the IM CN subsystem is an ISC (IMS Service Control) interface based on SIP protocol. + +The interface between the UE and SCF is used for PSS and MBMS User Service and User Profile configuration. It is equivalent to the Ut interface in TISPAN IPTV. + +The interface between the SCF and the BMSC.UPF is used for security related functions (see clauses 10.4.1 and 10.4.2, respectively). + +The interface between the SCF and the PSS Server is FFS. + +The interface between the UE to the BMSC.SnTF is used for MBMS Associated Delivery procedures as defined in 3GPP TS 26.346 [11]. It is part of the SGi/Gi interface. + +The interface between the UE and the BMSC.KF is used for delivery of the MSK as defined in 3GPP TS 33.246 [5]. It is part of the SGi/Gi interface and based on MIKEY/UDP protocols. + +The interface between the UE and the BMSC.KF may be used for Key Request Functions (see clause 10.4.1). + +The interface between the BSF and the UE is part of the Ub interface defined in 3GPP TS 33.220 [26] and 3GPP TS 24.109 [22] and used for security functionalities. + +The interface between the BSF and the HSS is part of the Zh interface to fetch the Authentication Vectors (AV) and optionally the GBA User Security Settings (GUSS) and defined in 3GPP TS 33.220 [26] and 3GPP TS 29.109 [33]. + +The interface between the BSF and the BMSC.UPF (see clause 10.4.1) and between the BSF and the SCF (see clause 10.4.2) is part of the Zn interface to deliver the application security information and defined in 3GPP TS 29.109 [33] and 3GPP TS 33.220 [26]. + +## 4.3 IMS based PSS and MBMS US procedures overview + +Figure 3 describes the IMS based PSS and MBMS procedures from connection establishment to User Service Description retrieval. + +![A sequence diagram titled 'Figure 3: Procedures overview - part 1' showing interactions between UE, PS Core/RAN, IMS CN subsystem, SDF, SCF, and SSF. Six numbered steps are shown as horizontal boxes spanning different entities: 1) Establish Connectivity (UE to PS Core, RAN), 2) P-CSCF discovery (UE to PS Core, RAN), 3) IMS registration (UE to IMS CN subsystem), 4) Service Discovery (UE to SDF), 5) GBA/GAA bootstrapping procedures (UE to SCF), and 6) Retrieval of User Service Description (UE to SSF).](098802c99831a6a7d445310d5e874e16_img.jpg) + +``` + +sequenceDiagram + participant UE + participant PS Core, RAN + participant IMS CN subsystem + participant SDF + participant SCF + participant SSF + + Note over UE, PS Core, RAN: 1) Establish Connectivity + Note over UE, PS Core, RAN: 2) P-CSCF discovery + Note over UE, IMS CN subsystem: 3) IMS registration + Note over UE, SDF: 4) Service Discovery + Note over UE, SCF: 5) GBA/GAA bootstrapping procedures + Note over UE, SSF: 6) Retrieval of User Service Description + +``` + +A sequence diagram titled 'Figure 3: Procedures overview - part 1' showing interactions between UE, PS Core/RAN, IMS CN subsystem, SDF, SCF, and SSF. Six numbered steps are shown as horizontal boxes spanning different entities: 1) Establish Connectivity (UE to PS Core, RAN), 2) P-CSCF discovery (UE to PS Core, RAN), 3) IMS registration (UE to IMS CN subsystem), 4) Service Discovery (UE to SDF), 5) GBA/GAA bootstrapping procedures (UE to SCF), and 6) Retrieval of User Service Description (UE to SSF). + +**Figure 3: Procedures overview - part 1** + +- Step 1 to 3: are outside the scope of the present document. +- Step 4: Service discovery, allows the Client to be informed of the available Service Providers. +- Step 5: GBA/GAA bootstrapping procedures, authenticates the User for signalling outside IMS and generates the Long Term Key that will be used during content key management procedures. +- Step 6: Retrieval of User Service description, allows the client to obtain the service session information for the selected provider. + +Figure 4 describes the IMS based PSS and MBMS procedures from session establishment to content key management. + +![Figure 4: Procedures overview - part 2. A sequence diagram showing three main steps across seven entities: UE, PS Core, RAN, IMS CN subsystem, SCF, PSS Adapter, PSS Server, and BMSC.UPF. Step 7 (Session Establishment) involves the UE and PS Core, RAN. Step 8 (Policy and Charging Control) involves the UE, PS Core, RAN, and IMS CN subsystem. Step 9 (Content Key Management, Media Delivery and Session Control) involves all seven entities.](898fb89a50d9ec1dfb4e425c816976a7_img.jpg) + +| UE | PS Core, RAN | IMS CN subsystem | SCF | PSS Adapter | PSS Server | BMSC.UPF | +|---------------------------------------------------------------|--------------|------------------|-----|-------------|------------|----------| +| 7) Session Establishment | | | | | | | +| 8) Policy and Charging Control | | | | | | | +| 9) Content Key Management, Media Delivery and Session Control | | | | | | | + +Figure 4: Procedures overview - part 2. A sequence diagram showing three main steps across seven entities: UE, PS Core, RAN, IMS CN subsystem, SCF, PSS Adapter, PSS Server, and BMSC.UPF. Step 7 (Session Establishment) involves the UE and PS Core, RAN. Step 8 (Policy and Charging Control) involves the UE, PS Core, RAN, and IMS CN subsystem. Step 9 (Content Key Management, Media Delivery and Session Control) involves all seven entities. + +**Figure 4: Procedures overview - part 2** + +- Step 7: Session Establishment, allows the Client to initiate a PSS or MBMS User Service session to receive content. +- Step 8: Policy and Charging Control, are procedures performed via the IMS core to setup relevant bearer QoS and charging functions. +- Step 9: Content Key Management is necessary to generate and distribute the keys to allow secure delivery of content to the User. At this stage, the delivery session is established and content is delivered to the client. + +## 4.4 PSS and MBMS user profile and UE capabilities + +### 4.4.1 User profile description + +The PSS and MBMS user profile data contains all information required to operate PSS and MBMS user services. + +The part of the PSS & MBMS user profile used for On Demand (CoD in TISPAN) and Live (BC in TISPAN) services shall be as defined in TISPAN TS 183 063, Annex C. + +The part of the PSS & MBMS user profile used for Parental Control Service shall be as defined in Annex M. + +### 4.4.2 UE capabilities + +A set of PSS and MBMS UE capabilities is required to personalize and operate PSS and MBMS user services. These capabilities are described in 2 documents: + +- The PSS and MBMS UE Capabilities XML document defined in Annex G. +- The RDF/XML document for the PSS base vocabulary specified in Annex F of TS 26.234 [8]. + +These 2 documents are sent during the Service Discovery procedure. See clause 6. + +### 4.4.3 Storage location + +PSS and MBMS user profile and UE capabilities information may be stored in the following locations: + +- Application Server functions. +- In a stand-alone server associated with one or more Application Server functions. +- In the HSS as transparent data associated to these Application Server functions. + +The first and second options are recommended for data to be accessed by 3rd party application server functions. In the first and second case the Application Server function or the stand-alone server may exhibit the behaviour of an XDMS. + +User data stored in the HSS can be accessed by Application Servers at the Sh reference point. + +A subset of PSS and MBMS user-profile information may be accessed from the User Equipment at the Ut reference point. + +For the purpose of personalized service selection, the SSF may need to access user data. + +In the case when such user data is stored in the HSS, it can be accessed by the SSF at the Sh reference point when the SSF is in the same domain. + +On the contrary, when such user data is stored in the AS or in a stand alone server associated with one or more application servers or if the SSF is not in the same domain as the HSS, the user data can be accessed by the SSF using an interface that is out of scope for this release. + +The SSF may also request notification of user data updates. + +--- + +## 5 Service Provider Discovery + +### 5.1 Introduction + +In order for the UE to access the PSS and MBMS User Service using IMS, it shall implement an IMS client that registers to the IM CN Subsystem [7]. This assumes that the UE has attached to a network and established PS connectivity through a PDP context according to 3GPP TS 23.060 [16] and has successfully completed the P-CSCF discovery procedure [7]. Once the UE is registered to the IM CN Subsystem, it can proceed to the Discovery of the PSS and MBMS User Service. + +This clause specifies how the UE performs the PSS and MBMS Service Provider Discovery. This is equivalent to discovering the list of IMS PSI of the SDF and relative Service Providers. There are several means for the UE to acquire this information. The UE shall implement the DNS based Service Provider Discovery as defined in clause 5.2. Other methods are optional. + +### 5.2 DNS + +In this case, the SDFs are discovered using the DNS SRV mechanism in accordance with RFC 2782 [17], with the following input parameters: + +- Service: Defined as "pss-mbms-user-service". + +NOTE: to be registered with IANA. + +- Protocol: Can take values "http" or "sip". Specifies the protocol to contain the particular service. +- Domain name: the domain for which the returned records are valid. The value can be derived from the ISIM. Without ISIM it can be derived from USIM together with MCC (Mobile Country Code) and MNC (Mobile Network Code) according to TS 23.003 [29]. If not possible, the domain name can be derived from network attachment phase (DHCP server). Manual configuration overrides these possibilities. + +![Sequence diagram for Service Provider Discovery with DNS](79e1709a7317ead45379cbb8ff3ba802_img.jpg) + +``` +sequenceDiagram + participant UE + participant PS core/RAN + participant DNS server + Note right of PS core/RAN: Error: Reference source not found + UE->>DNS server: DNS query + DNS server-->>UE: DNS Reply +``` + +The diagram illustrates a sequence of interactions for Service Provider Discovery using DNS. It features three vertical dashed lines representing the lifelines of the UE (User Equipment), PS core/RAN (Packet Switched core/Radio Access Network), and a DNS server. The UE sends a 'DNS query' message to the DNS server. The DNS server responds with a 'DNS Reply' message back to the UE. Above the PS core/RAN lifeline, there is a text label 'Error: Reference source not found'. + +Sequence diagram for Service Provider Discovery with DNS + +**Figure 5: Service Provider Discovery with DNS** + +The output of the DNS SRV lookup is an ordered list of domain name, each pointing to a SDF server available within the specified Domain name. + +## 5.3 Others + +Alternatively, the SDF PSI may also be signalled to the UE by the following means: + +- Manually provisioned in the UE. +- OMA Device Management. +- SMS. +- OMA Push. +- MBMS. +- DHCP. + +--- + +# 6 User Service Discovery + +## 6.1 Introduction + +This clause specifies how the UE performs the PSS and MBMS User Service Discovery. This is equivalent to discovering the address of the SSF. + +## 6.2 Subscribe/Notify + +### 6.2.1 General description + +![Sequence diagram illustrating Service Discovery with Subscribe/Notify. The diagram shows three participants: UE, IM CN subsystem, and SDF. The sequence of messages is: 1. UE sends SIP SUBSCRIBE to IM CN subsystem. 2. IM CN subsystem forwards SIP SUBSCRIBE to SDF. 3. SDF responds with SIP 200 OK to IM CN subsystem. 4. IM CN subsystem forwards SIP 200 OK to UE. 5. SDF sends SIP NOTIFY to IM CN subsystem. 6. IM CN subsystem forwards SIP NOTIFY to UE. 7. UE responds with SIP 200 OK to IM CN subsystem. 8. IM CN subsystem forwards SIP 200 OK to SDF.](7d3d5fb5d09c0cd35a9d637be241651e_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN subsystem + participant SDF + Note left of UE: UE sends SIP SUBSCRIBE + UE->>IM CN subsystem: SIP SUBSCRIBE + IM CN subsystem->>SDF: SIP SUBSCRIBE + SDF-->>IM CN subsystem: SIP 200 OK + IM CN subsystem-->>UE: SIP 200 OK + SDF->>IM CN subsystem: SIP NOTIFY + IM CN subsystem->>UE: SIP NOTIFY + UE-->>IM CN subsystem: SIP 200 OK + IM CN subsystem-->>SDF: SIP 200 OK + +``` + +Sequence diagram illustrating Service Discovery with Subscribe/Notify. The diagram shows three participants: UE, IM CN subsystem, and SDF. The sequence of messages is: 1. UE sends SIP SUBSCRIBE to IM CN subsystem. 2. IM CN subsystem forwards SIP SUBSCRIBE to SDF. 3. SDF responds with SIP 200 OK to IM CN subsystem. 4. IM CN subsystem forwards SIP 200 OK to UE. 5. SDF sends SIP NOTIFY to IM CN subsystem. 6. IM CN subsystem forwards SIP NOTIFY to UE. 7. UE responds with SIP 200 OK to IM CN subsystem. 8. IM CN subsystem forwards SIP 200 OK to SDF. + +**Figure 6: Service Discovery with Subscribe/Notify** + +- 1) The UE sends a SIP SUBSCRIBE message to the IM CN subsystem. It should indicate its capabilities in the message. +- 2) The IM CN subsystem forwards the request to the SDF, e.g. thanks to an iFC. +- 3) The SDF determines the proper service discovery information, e.g. according to the UE capabilities, the user's profile (Personalized Service Discovery). The user profile may be retrieved from the HSS or any other entity where it is stored. +- 4) The SDF sends a SIP 200 OK response to the IM CN subsystem, which forwards it to the UE. +- 5) The SDF sends a SIP NOTIFY message to the UE, with service discovery information that includes the SSF(s) address(es). +- 6) The IM CN subsystem relays the SIP NOTIFY message back to the UE, with the service discovery information related to PSS and MBMS user service. +- 7) The UE sends back a SIP 200 OK response to the IM CN subsystem. +- 8) The IM CN subsystem forwards the SIP 200 OK to the SDF. + +### 6.2.2 Procedures at the UE + +#### 6.2.2.1 Introduction + +The UE shall generate a SUBSCRIBE request. The behaviour of the UE when processing a SUBSCRIBE request shall conform to 3GPP TS 24.229 [7]. + +#### 6.2.2.2 Subscription + +When the UE intends to retrieve service attachment information from the SDF, it shall generate a SUBSCRIBE request for the "ua-profile" event package defined in [28] and extended as described in Annex Y of [24]. + +The contents of the SUBSCRIBE request shall be as follows: + +- The value of the Request-URI shall be set to one of following: + +- the PSI of the SDF which is retrieved using SDF Discovery procedures in clause 5 Service Provider Discovery; or +- the public user identity of the end user (when the UE does not know the PSI of the SDF). +- The From and To header shall be set to the public user identity of the user. +- The Accept header shall include the content-type identifier that corresponds to the registered MIME type of XML documents representing UE capabilities included in the body, See clause 4.4.2: + - A first Content Type set to "application/3gpp-ims-pss-mbms-ue-capabilities+xml". + - A second Content Type set to "application/rdf+xml". +- The Event header shall be set to the "ua-profile" event package. +- The Event parameters shall be set as follows: + - The "profile-type" parameter shall be set to "application". + - The "vendor", "model" and "version" parameter values shall be set to values specified by the implementer of the user equipment, as specified in 3GPP TS 24.229 [7]. + - The "appids" parameter shall be present and set to "urn:org:3gpp:applications:ims-pss-mbms-service-discovery". + +The UE shall include a SIP SUBSCRIBE multipart/mixed content-type message body associated with the appid including the PSS and MBMS UE Device Capabilities defined in Annex G and the RDF/XML document describing the PSS base vocabulary defined in Annex F of TS 26.234 [8]. + +Upon receipt of a 2xx response to the SUBSCRIBE request, the UE shall store the information for the established dialog and the expiration time as indicated in the Expires header of the received response. + +The UE shall automatically refresh the subscription, either 600 seconds before the expiration time if the initial subscription was for greater than 1 200 seconds, or when half of the time has expired if the initial subscription was for 1 200 seconds or less. If a SUBSCRIBE request to refresh a subscription fails with a non-481 response, the UE shall still consider the original subscription valid for the duration of the most recently known "Expires" value according to 3GPP TS 24.229 [7]. Otherwise, the UE shall consider the subscription invalid and start a new initial subscription according to 3GPP TS 24.229 [7]. + +### 6.2.2.3 Receiving notifications + +Upon receipt of a NOTIFY request on the dialog which was generated during subscription, the application within the UE shall parse the XML document contained in the message body. The XML document schema is defined in Annex H. The definition of each parameter in the XML document is defined in 5.2.2.3 of [24] + +The list of parameters in the XML document shall be used for service selection information retrieval according to clause 7. + +When parsing the list of parameters the UE shall take the following action: + +- information relates to an SSF with whom the UE has already an entry. + - If the "@version" attribute is present and has not the same value or if not present, then the UE performs the following actions: + - for parameters related to this SSF already present in the UE: the UE shall update these parameters with the new values sent by the SDF. If the Segment@Version has not the same value, the UE shall update user service selection information from the SSF before using it, + - for parameters related to this SSF not present in the UE: the UE shall store the new parameters. + - If the "@version" attribute is present and has the same value, the UE shall not update the stored SSF information. + +- information relates to an SSF not known by the UE: the UE creates a new entry for this SSF with all indicated parameters. + +After all elements have been processed, the UE shall return a 200 OK response to the NOTIFY request. + +Failure to perform subscription refresh does not imply that there is a loss of communication to SSF or SCF. The UE has an option to continue using the lists of parameters from the last NOTIFY. + +After deregistration, the UE may keep stored information on per user basis. As for subscription refresh, the UE may use the stored information if initial subscription fails after a new registration. + +## 6.2.3 Procedures at the SDF + +The SDF addresses are determined by the UE using any of the alternatives as defined in clause 5. + +When the SDF receives a SUBSCRIBE request, it may perform user's identity verification as defined in 3GPP TS 24.229 [7]. After successful user identification, if a User Profile is available it is possible to perform personalization of the body (Service Attachment Information) of the NOTIFY request. + +The SDF shall examine the parameters specified in the SIP SUBSCRIBE body and shall then record UE capabilities information as part of the user profile data. + +NOTE: The UE capabilities that are recorded as part of the user profile may be used by the SSF for personalization purposes. + +In case of successful subscription, the SDF shall generate a SIP 200 OK in response to the SUBSCRIBE request. The SDF shall then send a NOTIFY request immediately. + +The contents of the NOTIFY request shall be as follows: + +- The Event header shall be set to the "ua-profile" event package. +- The "effective-by" parameter for the event header shall be set to 0. +- The content type shall be set to "application/3gpp-ims-pss-mbms-service-discovery+xml"; +- The message body shall contain an XML document listing SSF addresses and the means of connecting to the SSFs for retrieving service selection information defined in Annex H. The definition of each parameter in the XML document is defined in 5.2.2.3 of [24]. The "@technology" element name indicates the technology used to for delivering service selection information. It shall be set to the "openmobilealliance.org\_bcast". + +When any parameter of service configuration information has changed, the SDF may generate a NOTIFY request including new service configuration information. + +--- + +# 7 User Service Description retrieval + +## 7.1 Introduction + +User Service Description retrieval can be done in several ways + +- By retrieving OMA BCAST Service Guide information [27] from the SSF. See clause 7.2; +- By retrieving MBMS USD from the SSF as defined in 3GPP TS 26.346 [11] clause 5.2; +- By executing the Procedure for providing missing parameters before session initiation described in clauses 8.2.2 and 8.3.2 for PSS and MBMS user service respectively. + +## 7.2 User Service Description retrieval for PSS and MBMS + +### 7.2.1 Procedures at the UE + +#### 7.2.1.1 Procedure for Service Personalisation + +For HTTP-based data retrieval, when sending the HTTP request to the SSFs, the UE may provide personalized information to enable a personalized answer. This shall be done by adding the X-3GPP-Intended-Identity HTTP header to the request to transmit the public identity. + +The authentication shall follow 3GPP TS 33.222 [20]. + +The UE shall implement Transport Layer Security (TLS), as described in 3GPP TS 33.222 [20]. + +#### 7.2.1.2 Request of OMA BCAST ESG + +In the pull model of unicast delivery of an OMA BCAST ESG, the HTTP protocol shall be used conforming to OMA BCAST Service\_Guide [27], clause 5.4.3. + +#### 7.2.1.3 Use of Service Description information + +The UE shall use parameters received from the SSF for session initiation. + +NOTE: There is no restriction on the UE to use any parameter received from SSF also for other purposes than session initiation, e.g. to present SSF information to the user. + +The UE may store a part of the ESG information covering certain period of time and refresh this information periodically This avoid the UE to contact the SSF every time the user needs to consult the ESG. + +If the UE is unable to contact any discovered SSF, it shall not delete stored information immediately. + +### 7.2.2 Procedures at the SSF + +#### 7.2.2.1 Authentication and authorisation in case of personalized service description information + +In case of service selection personalisation the SSF shall authenticate the user. + +The authentication shall follow 3GPP TS 33.222 [20]. + +The SSF shall implement Transport Layer Security (TLS) as described in 3GPP TS 33.222 [20]. + +An authentication proxy (AP) may exist between the UE and the SSF in which case the behaviour of the AP is assumed to conform to 3GPP TS 24.423 [21]. + +If an Authentication Proxy (AP) is provided in the path of the HTTP request, then the SSF receives an HTTP request from a trusted source (the AP) and the request contains an HTTP X-3GPP-Asserted-Identity header (3GPP TS 24.109 [22]) that includes an asserted identity of the user. In this case the SSF does not need to authenticate the user, but just provide authorization to access the requested resource. + +If an HTTP X-3GPP-Asserted-Identity header (3GPP TS 24.109 [22]) is not present in the HTTP request or if the request is received from a non-trusted source, then the SSF needs to authenticate the user prior to providing personalise information by applying the procedures defined in 3GPP TS 33.222 [20] and + +authorize or deny authorization depending on the authenticated identity. + +#### 7.2.2.2 Procedure for Service Personalization + +If the public user identity information is present in the query from the UE, the SSF shall extract it to customize/personalize the service information that is returned in the query response. + +The SSF shall use the public user identity that is specified in the X-3GPP-Intended-Identity header or the X-3GPP-Asserted-Identity header if an authentication proxy is used to fetch the corresponding user profile associated + +with the user. For instance, the Parental Control (if present) should be used to remove unsuitable elements from the COD listings that are returned to the UE. + +### 7.2.2.3 Delivery of OMA BCAST ESG + +The procedure for retrieving OMA BCAST service selection information is employed to retrieve one or more Service Guide Delivery Descriptors (SGDD) and/or Service Guide Delivery Units (SGDU). The SGDD describes service level information as well as access information to the Service Guide fragments. The SGDU is the transport-independent network structure for encapsulating Service Guide fragments. + +When the ESG SSF receives a HTTP POST request, if personalization headers are presents (in the form of key-value pairs) it shall use those headers in order to build a personalized response. For instance, the ESG SSF may use the provided user identity to retrieve the associated Parental Control Level in the user profile. This Parental Control Level would then be used to remove non suitable elements from the ESG data that are sent back. The provided user identity may also be used to retrieve a personalized ESG using the method in OMA BCAST Service Guide [27], clause 5.4.3.3. The ESG SSF shall send an HTTP response conforming to OMA BCAST Service Guide [27], clause 5.4.3.1. The body of the HTTP response shall contain an XML document with SGResponse data, conforming to OMA BCAST Service Guide[27], clause 5.4.3.1.1. + +--- + +## 8 Streaming session and media control + +### 8.1 General + +This clause specifies the procedures and protocols used for the IMS based initiation and control of streaming sessions on PSS or MBMS User Service. + +The client shall use SIP to initiate and control PSS and MBMS streaming sessions. Once a PSS streaming session is established, the client shall use RTSP protocols to perform media control. + +### 8.2 PSS Streaming + +#### 8.2.1 PSS Media codecs and formats + +PSS Media codecs and formats defined in 3GPP TS 26.234 [8] are applicable to the present document for IMS initiated and controlled PSS services. + +#### 8.2.2 Procedure for providing missing parameters + +##### 8.2.2.1 Procedures at the UE + +If the UE does not have all the information it needs to form an SDP offer, the UE shall send a SIP OPTIONS message: + +- The "Request-URI" is related to the PSS session that the user wants to activate. The Request-URI shall be composed of a user and domain part as defined as follows: + - The user part contains the content identifier, retrieved from user service description information from SSF. + - For COD service, content identifier is constructed by "PSS\_COD\_", wherein content-id shall be globalContentID defined in [27]. + - For Live service, content identifier shall be globalServiceID defined in [27] or serviceId defined in [11]. + - The domain part is the Service Provider domain name, obtained from SSF. +- The TO header shall contain the same URI as in the "Request-URI" parameter. + +The other headers shall be set according to TS 24.229 [7]. + +Upon reception of the 200 OK including SDP, the UE may initiate PSS session as described in clause 8.2.3. + +### 8.2.2.2 Procedures at the SCF + +When receiving the SIP OPTIONS message, the SCF shall select the appropriate PSS Adapter and forward the SIP request to the appropriate PSS Adapter by changing the "Request-URI" accordingly. + +The SCF shall not change the user-part of the TO header in order to keep the content-id in the OPTIONS request. + +### 8.2.2.3 Procedures at the PSS Adapter + +When receiving SIP OPTIONS request, the PSS Adapter shall examine the content identifier present in the user-part of the TO header. + +If the PSS adapter does not have the user service description information, it shall send an RTSP DESCRIBE message to the PSS server to retrieve the user service description information + +Then, the PSS Adapter shall answer with the user service description information of the content delivery channel in SDP as requested by the request URI. + +## 8.2.3 PSS Streaming Session initiation + +### 8.2.3.1 General description + +![Sequence diagram for IMS based PSS initiation showing interactions between UE, IM CN Subsystem, SCF, PSS Adapter, and PSS Server.](6929132b4964d52244da61d4614bc4d6_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant PSS Adapter + participant PSS Server + + Note left of UE: SIP INVITE (Request-URI, SDP) + UE->>IM CN Subsystem: SIP INVITE (Request-URI, SDP) + IM CN Subsystem->>SCF: SIP INVITE + SCF->>PSS Adapter: SIP INVITE + PSS Adapter->>PSS Server: RTSP DESCRIBE + PSS Server-->>PSS Adapter: RTSP SDP + PSS Adapter->>PSS Server: RTSP SETUP(s) + PSS Server-->>PSS Adapter: RTSP 200 OK(s) + PSS Adapter->>SCF: SIP 200 OK + SCF->>IM CN Subsystem: SIP 200 OK + IM CN Subsystem->>UE: SIP 200 OK (SDP, Session ID, URI) + +``` + +Sequence diagram for IMS based PSS initiation showing interactions between UE, IM CN Subsystem, SCF, PSS Adapter, and PSS Server. + +**Figure 7: IMS based PSS initiation** + +NOTE 1: This sequence is simplified and does not e.g. show session progress messages and the ACK message from the UE in response to the reception of 200 OK. + +NOTE 2: SIP messages between PSS adapter and SCF go through the IM CN Subsystem even if not indicated on the sequences. + +### 8.2.3.2 Procedures at the UE + +The UE shall generate an initial INVITE request according to TS 24.229 [7] with the following additions: + +- The Request-URI is related to the PSS session that the user wants to activate. + - For an On Demand service, it shall be composed of a user part and a domain part, as follows: + - A user part containing the content identifier in a free string format. + +- Content identifier is constructed by “PSS\_COD\_”, wherein content-id shall be globalContentID defined in [27]. +- A domain part containing the content provider domain name, obtained from the SSF. +- For Live content, it shall contain the PSI (Public Service Identity) of the "Live stream@", wherein the domain name is obtained from SSF". +- The To header shall contain the same URI as in the Request-URI. +- The Recv-Info header shall be empty [42]. + +The other headers shall be set according to TS 24.229 [7]. + +An SDP Offer shall be included in the initial INVITE request, in accordance with media capabilities and policies available for the PSS session and with the parameters received from the SSF during service selection procedure. + +The SDP offer shall contain a media description for the RTSP content control channel and one for the content delivery channel. The RTSP content control media description shall be carried by TCP. + +The SDP parameters for the RTSP content control channel shall be set as follows: + +- a 'm' line for an RTSP stream of format: m= + - The media field shall have a value of "application". + - The port field shall be set to a value of 9, which is the discard port. See RFC 4145 [13] and RFC 4572 [14]. + - The transport field shall be set to TCP or TCP/TLS. The former is used when RTSP runs directly on top of TCP and the latter is used when RTSP runs on top of TLS, which in turn runs on top of TCP. + - The parameter shall be included and shall be set to *3gpp\_rtsp*. + +NOTE: the *3gpp\_rtsp* application format should have a new MIME subtype registered in IANA. + +- An "a=setup" attribute shall be present and set to "active" indicating that the UE will initiate an outgoing TCP connection to the PSS Adapter [7] and [13]. +- An "a=connection" attribute shall be present and set as "new" indicating that the UE will establish a new outgoing TCP connection towards the PSS Adapter [7] and [13]. +- A "c" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and IP address of the flow of the related RTSP content control (ex. c=IN IP4 ). +- For Live service, an “a=PSS\_Live\_service: ServiceID” line shall be include to indicate the PSS live service which the UE intends to initiate. The ServiceID shall be globalServiceID defined in [27] or serviceId defined in [11], which is retrieved from service selection information. + +Example of RTSP 'm' line offer from the UE: + +``` +m=application 9 TCP 3gpp_rtsp +c=IN IP4 192.0.2.2 +a=setup:active +a=connection:new +``` + +For each media stream controlled by the RTSP content control channel, the SDP offer shall include a "receiver only" content delivery channel media description set as defined in 3GPP TS 26.234 [8], clause 5.3.3: + +- the "m=" line indicates the type of the media, the transport protocol and the port of the related content delivery channel. It may also include a fmt parameter which shall indicate the format given by the SSF or by executing the procedure for providing missing parameters before session initiation described in clauses 8.2.2, a subset of them or the format offered by the UE if none is given by the SSF; +- the "c=" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and unicast address of the flow of the related content delivery channel; (ex. c=IN IP4 ) + +- optionally a "b=" line may contain the proposed bandwidth. If the user has fetched the bandwidth required for this particular content delivery channel during service selection retrieval, the bandwidth attribute at media level shall be set to this value. Otherwise, this attribute shall be set to a pre-configured value; (ex. b=AS:15000) +- A "a=" line with a "recvonly". + +The UE should receive a SIP 200 OK back containing the answer SDP. + +### 8.2.3.3 Procedures at the IM CN Subsystem + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 8.2.3.4 Procedures at the SCF + +Upon receipt of SIP INVITE request, the SCF shall examine the Request-URI and SDP parameters to determine that it is a PSS session initiation request for Live Streaming or Content-On-Demand. According to the user subscription information, the SCF shall check the service rights of the requested PSS service. + +If the Request-URI contains a content identifier in the user part and a domain name in the domain part, the SCF determines that the PSS streaming session is initiated for On Demand content. In this case, the SCF shall select a suitable PSS adapter and forwards the SIP INVITE to the selected PSS adapter by changing the Request-URI accordingly. The SCF shall not change the user part of the To header in order to keep the content identifier in the INVITE request. + +When receiving a 301 or 302 response from the PSS adapter, the SCF shall not forward this message to the UE. It may check if the PSS adapter indicated in the Contact header belong to allowed destination. If allowed, the SCF shall use one of the PSS adapter URI indicated in the Contact header of this response and use it as a destination for the redirected INVITE. + +If the request-URI contains the PSI " Live Stream", the SCF determines that the PSS streaming session is initiated for Live content. In this case, the SCF shall select a suitable PSS adapter and forwards the SIP INVITE to the selected PSS adapter. The SCF shall include the list of authorized Live content channels for the user in the SIP INVITE transmitted to the PSS adapter by including the package identifiers containing to the list of authorized Live content channels for the session and optionally transmitting the list of authorized RTSP URIs. + +The Recv-Info header shall indicate the supported Info Package ("Content-Reporting") for reception and processing by the SCF [42]. The "Content-Reporting" info package is defined in annex Q of [44]. + +Based on the Request-URI and SDP parameters, the SCF selects a suitable PSS Adapter and forwards the SIP INVITE to the selected PSS Adapter. + +Once receiving a SIP 200 OK response from PSS Adapter, the SCF shall check the Recv-Info header and remove it from the response. Following that the SCF shall forward the revised response to UE. + +### 8.2.3.5 Procedures at the PSS Adapter + +The PSS Adapter shall be statefully aware of any sessions between the PSS Adapter and a UE, and the PSS Adapter and the PSS Server related to the same streaming session . This means that the RTSP session between the PSS Adapter and the PSS Server and the SIP & RTSP sessions between the PSS Adapter and the UE are associated at the PSS Adapter in order to keep session structure and alignment. This includes, but is not limited to, RTSP parameters such as sessionId, IP version, CSeq, etc. + +The PSS Adapter shall support the following RTSP methods for PSS Server session establishment and teardown control: + +- DESCRIBE (PSS Adapter to PSS Server). +- SETUP (PSS Adapter to PSS Server). +- TEARDOWN (PSS Adapter to PSS Server). + +The PSS Adapter should support the "3gpp-pipelined" feature so as to be able to pipeline SETUP messages. + +Upon receipt of a SIP INVITE message, the PSS Adapter performs the following actions: + +- It shall resolve the RTSP URI based on the R-URI, the SDP parameters and the selected PSS Server. +- It may send a DESCRIBE message to the PSS Server to fetch the SDP file. +- It shall construct and send the RTSP SETUP message(s) to setup the relevant media streams. +- Return the answer SDP to the UE in the SIP 200 OK. + +The PSS Adapter shall construct the RTSP SETUP message according to the SIP Invite as follows: + +- The Request-Line shall be present of format: Request-Line = Method SP Request-URI SP RTSP-Version CRLF: + - Method field is set to SETUP; + - RTSP-Version field to be set of RTSP/1.0. +- The CSeq header field is set to a value allocated by PSS Adapter according to RFC 2326 [25] +- The transport header field: + - the protocol and profile sub-fields together are set to a value of the protocol sub-field of the corresponding "m=" line in the SDP offer, + - the unicast | multicast parameter is set to unicast. + - The destination parameter is set to a value of the "c=" line of the corresponding media delivery channel in the SDP offer, + - The RTP port value of client\_port parameter is set to the value of the port sub-field of the corresponding "m=" line in the SDP offer, and the RTCP port value of client\_port parameter is set to a value of the RTP port value plus 1. + +An example of the RTSP SETUP message is: + +*PSS Adapter->PSS Server: SETUP rtsp://media.example.com/movie001/audiotrack RTSP/1.0* + +*CSeq: 1* + +*Transport: RTP/AVP/UDP; unicast; destination=; client\_port=3400-3401* + +The PSS Adapter may send multiple RTSP SETUP messages if multiple media delivery channels are carried within the SDP offer. In this case, the pipeline of multiple RTSP SETUP messages may be supported. + +When receiving a RTSP 200 OK response from the PSS Server, the PSS Adapter parses the response, constructs a SIP 200 OK response with the final SDP, and sends the SIP 200 OK response to the SCF. The final SDP shall describe the RTSP session established by the PSS Adapter and the TCP connection to be established by the UE. + +The PSS Adapter shall construct the SIP 200 OK message according to RTSP 200 OK as follows: + +- The Recv-Info header shall be set to "ContentReportConfig" [42]. +- an 'm' line for an RTSP stream of format: m= + - The media field shall have a value of "application". + - The port field shall be set to the value allocated by PSS Adapter for the UE to establish RTSP session, such as 554. + - The transport field shall be set to TCP or TCP/TLS. The former is used when RTSP runs directly on top of TCP and the latter is used when RTSP runs on top of TLS, which in turn runs on top of TCP. +- a "c" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and IP address of PSS Adapter for the flow of the related RTSP content control (e.g. c=IN IP4 ). +- The "setup" attribute is set to 'passive' indicating that connection shall be initiated by the other endpoint (UE). +- An "a= connection" attribute shall be present and set as "new" indicating that the UE will establish a new outgoing TCP connection towards the PSS Adapter [7][13]. +- An "a=control" attribute shall be present in the format of an absolute URI to be used for the UE in the subsequent RTSP requests. +- One or more a=fmtp lines representing RTSP specific attributes set as follows: + - a "fmtp:3gpp\_rtsp h-session" attribute representing the session identifier for the RTSP session to be established with the UE. + +The PSS Adapter may include "fmtp: 3gpp\_rtsp h-offset" attribute that indicates where the playback is to start from. + +Example of RTSP 'm' line answer from the PSS Adapter: + +``` + +m=application 554 TCP 3gpp_rtsp +c=IN IP4 192.0.2.1 +a=setup:passive +a=connection:new +a=control:rtsp://example.com/channel/content1.sdp +a=fmtp 3gpp_rtsp h-session=12345 +a=fmtp 3gpp_rtsp h-offset=30 + +``` + +For each media stream controlled by the RTSP content control channel, the SDP answer shall include a content delivery channel media description set as follows: + +- the "m=" line indicates the type of the media, the transport protocol and the port of the related content delivery channel. +- The port value shall be set to the RTP port value retrieved from the server\_port parameter in the RTSP 200 OK message. +- If an fmtp parameter is in the SDP offer it shall be completed with the supported format by the PSS Server; +- the "c=" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and the unicast address of the PSS Server for the flow related to the content delivery channel, (ex. c=IN IP4 ); +- the "b=" line shall contain the proposed bandwidth. Since the PSS media stream is unidirectional the bandwidth shall be set to 0, except for the case that the transport is RTP and RTCP is allowed. (ex. b=AS:0); +- an "a=" line with a value of "sendonly". (ex. a=sendonly). + +## 8.2.4 PSS Streaming Playback Control + +### 8.2.4.1 General Description + +![Sequence diagram showing Initial Playback flow between UE, PSS Adapter, and PSS Server.](dc1f232cfd39be5c20b21374ad4c04c0_img.jpg) + +``` + +sequenceDiagram + participant UE + participant PSS Adapter + participant PSS Server + UE->>PSS Adapter: RTSP PLAY + PSS Adapter->>PSS Server: RTSP PLAY + PSS Server-->>PSS Adapter: RTSP 200 OK + PSS Adapter-->>UE: RTSP 200 OK + PSS Server->>UE: RTP (Media Stream) + +``` + +The diagram illustrates the message exchange for initial playback. The UE sends an 'RTSP PLAY' request to the PSS Adapter, which forwards it to the PSS Server. The PSS Server responds with 'RTSP 200 OK' to the PSS Adapter, which then forwards it to the UE. Finally, a thick line indicates the 'RTP' media stream flowing from the PSS Server to the UE. + +Sequence diagram showing Initial Playback flow between UE, PSS Adapter, and PSS Server. + +**Figure 8: Initial Playback** + +### 8.2.4.2 Procedures at the UE + +The UE shall support the following RTSP methods for RTSP playback control: + +- PLAY (UE to PSS Adapter). +- PAUSE (UE to PSS Adapter). +- GET\_PARAMETER (UE to PSS Adapter). +- SET\_PARAMETER (UE to PSS Adapter). +- OPTIONS (UE to PSS Adapter). + +When receiving any SIP response, the UE shall examine the media parameters in the received SDP: the UE shall immediately setup the TCP connection carrying RTSP. The UE shall fetch the RTSP session ID from the SDP answer contained in the SIP response. This RTSP session ID shall be used for RTSP media control messages. + +After SIP session establishment, the UE can exchange RTSP messages to start to receive media streams. The UE shall send an RTSP PLAY message to the PSS adapter according to 3GPP TS 26.234 [8]. + +- The RTSP URL shall be set to the value retrieved from the SDP "a=control" attribute in the case of an absolute URI. If the value of "a=control" is a relative URI that is in the form of a media path, then the RTSP absolute URL is constructed by the UE using the SDP IP address (from c-line) and port (from m-line) as the base followed by "a=control" value for the media path. +- The RTSP session ID in the h-session received in the SDP shall be used in RTSP media control messages. +- The version attribute shall be present in the SDP and its value shall be 1.0 in this version of the specification. +- If the h-offset attribute is present in the SDP, the Range parameter in the first RTSP PLAY message may be set to its value. E.g. Range: npt=- (with OFFSET being the value of the h-offset attribute). + +#### 8.2.4.3 Procedures at the PSS Adapter + +If the PSS Adapter supports the proxying of RTSP towards the PSS Server then the following methods shall be supported: + +- PLAY; +- PAUSE; +- GET\_PARAMETER; +- SET\_PARAMETER; +- OPTIONS. + +Upon receipt of a RTSP message from an UE, the PSS Adapter shall match the RTSP session with the RTSP sessions once established with PSS Server according to the Session ID carried in the received RTSP message. If there is a session match, PSS Adapter shall send the RTSP message to PSS Server on the matched RTSP session. If no session matches, PSS Adapter shall response with a RTSP error code 454 (Session Not Found). + +When receiving a RTSP response message from a PSS Server, the PSS Adapter shall match the RTSP session with the RTSP sessions once established with UEs according to the Session ID carried in the received RTSP response message, and send the RTSP response message to UE on the matched RTSP session. + +The PSS Adapter should send a SIP INFO message to the SCF indicating that playback has started. This SIP INFO message should be equal to the SIP INFO messages for PSS content switching defined in clause 8.2.5. + +#### 8.2.4.4 Procedures at the PSS Server + +The procedures at the PSS Server shall conform to those defined in 3GPP TS 26.234 [8]. + +### 8.2.5 PSS content switching + +#### 8.2.5.1 PSS Streaming session modification + +##### 8.2.5.1.1 General description + +NOTE 1: The specification assumes the UE will trigger a Re-INVITE procedure to change the QoS to fit the new channel requirements. It will be considered whether the network can trigger the QoS change without the UE taking management. + +This procedure presents the generic PSS streaming session modification procedure. It can be referred in some cases for PSS Content Switching, when there is a change of media components and/or bandwidth. + +![Sequence diagram for UE-initiated PSS session modification. Lifelines: UE, IM CN Subsystem, SCF, PSS Adapter, PSS Server. The sequence starts with the UE sending a SIP Re-INVITE (SDP offer) to the IM CN Subsystem. The IM CN Subsystem forwards it to the SCF. The SCF forwards it to the PSS Adapter. The PSS Adapter sends RTSP SETUP(s) to the PSS Server. The PSS Server responds with RTSP 200 OK(s) to the PSS Adapter. The PSS Adapter sends a SIP 200 OK (SDP answer) to the SCF. The SCF forwards it to the IM CN Subsystem, which then forwards it to the UE. Finally, the UE sends an ACK to the IM CN Subsystem, which forwards it to the SCF, which then forwards it to the PSS Adapter.](b5335262987c819d7f71ce40f99cb71b_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant PSS Adapter + participant PSS Server + + Note right of UE: Error: Reference source not found + UE->>IM CN Subsystem: SIP Re-INVITE (SDP offer) + IM CN Subsystem->>SCF: SIP Re-INVITE (SDP offer) + SCF->>PSS Adapter: SIP Re-INVITE (SDP offer) + PSS Adapter->>PSS Server: RTSP SETUP(s) + PSS Server-->>PSS Adapter: RTSP 200 OK(s) + PSS Adapter->>SCF: SIP 200 OK (SDP answer) + SCF->>IM CN Subsystem: SIP 200 OK (SDP answer) + IM CN Subsystem->>UE: SIP 200 OK (SDP answer) + UE->>IM CN Subsystem: ACK + IM CN Subsystem->>SCF: ACK + SCF->>PSS Adapter: ACK + +``` + +Sequence diagram for UE-initiated PSS session modification. Lifelines: UE, IM CN Subsystem, SCF, PSS Adapter, PSS Server. The sequence starts with the UE sending a SIP Re-INVITE (SDP offer) to the IM CN Subsystem. The IM CN Subsystem forwards it to the SCF. The SCF forwards it to the PSS Adapter. The PSS Adapter sends RTSP SETUP(s) to the PSS Server. The PSS Server responds with RTSP 200 OK(s) to the PSS Adapter. The PSS Adapter sends a SIP 200 OK (SDP answer) to the SCF. The SCF forwards it to the IM CN Subsystem, which then forwards it to the UE. Finally, the UE sends an ACK to the IM CN Subsystem, which forwards it to the SCF, which then forwards it to the PSS Adapter. + +**Figure 9: UE-initiated PSS session modification** + +NOTE 2: Like in other call-flows of the specification, the figure does not show that messages exchanged between the PSS adapter and the SCF are routed through the IM CN subsystem. + +- 1) The UE sends the Re-INVITE request containing the SDP offer to the IM CN Subsystem to establish the content delivery channel. The IM CN Subsystem may require the PCRF to reserve additional resources for RTP streams according to the SDP in the Re-INVITE. The IM CN subsystem may also issue the PCRF to release resources for RTP streams. +- 2) The IM CN Subsystem forwards the Re-INVITE request to the SCF. +- 3) The SCF sends the Re-INVITE to the PSS adapter via the IM CN Subsystem. +- 4) The PSS adapter sends the according number of RTSP SETUP to the PSS server, if additional media components are described in the SDP. +- 5) The PSS server responds with RTSP 200 OK to the PSS adapter (only, if the PSS adapter has send SETUP messages to the PSS Server). +- 6) The PSS adapter sends one SIP 200 OK to the SCF with the SDP answer containing the new media descriptions of RTP streams to be used. +- 7) The SCF sends the SIP 200 OK to the IM CN Subsystem. The IM CN subsystem interacts with the PCRF to commit the reservation, and then forwards the SIP 200 OK to the UE. +- 8) The UE sends the SIP ACK to the IM CN subsystem, which forwards to the SCF. The SCF forwards the SIP ACK to the PSS adapter. + +#### 8.2.5.1.2 Procedures at the UE + +To modify the session, the UE shall send a Re-INVITE or an UPDATE request as specified in TS 24.229 [7] for an originating UE. + +The UE shall not modify RTSP channel m-line description in the SDP if the media delivery streams controlled by RTSP are not removed (port not set to 0 in the m lines) in the SDP. + +#### 8.2.5.1.3 Procedures at the IM CN subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +#### 8.2.5.1.4 Procedures at the SCF + +Upon receipt of a Re-INVITE request or an UPDATE request, the SCF shall follow the procedures defined in TS 24.229 [7] concerning the AS acting as a proxy or a B2BUA. + +When receiving an SDP offer, the SCF may modify the SDP offer in accordance to the user subscription. If the SCF finds a media line not compatible with the user's subscription, it shall set the port of this media line to 0. If none of the media lines are acceptable, it shall reply with a 403 error response. + +Then the SCF forwards the Re-INVITE message to the PSS adapter. + +#### 8.2.5.1.5 Procedures at the PSS adapter + +Upon receipt of a Re-INVITE request or an UPDATE request, the PSS adapter shall modify the session as specified in TS 24.229 [7] if the request is acceptable to the PSS adapter in accordance with the user subscription. + +The PSS adapter sets up new media components, if the SDP file contains additional components. + +#### 8.2.5.1.6 Procedures at the PSS server + +Upon receipt of an RTSP setup, the PSS server executes the requested method and responds with an RTSP status code to the PSS adapter. + +### 8.2.5.2 PSS Content switching with available SDP, no change of media component and bandwidth + +#### 8.2.5.2.1 General description + +The UE has retrieved the SDP prior to the content switching. The procedure is as described as in 3GPP TS 26.234 [8], with the server role being played by the PSS adapter. + +![Sequence diagram illustrating IMS PSS Content switching. The diagram shows four lifelines: UE, SCF, PSS Adapter, and PSS Server. The process starts with an 'RTP (Old stream)' from the PSS Server to the UE. The UE sends an 'RTSP PLAY (with Switch Stream header)' to the SCF. The SCF forwards this to the PSS Adapter, which then sends it to the PSS Server. The PSS Server responds with 'RTSP 200 OK' to the PSS Adapter, which in turn sends 'RTSP 200 OK' to the UE. Finally, the UE receives an 'RTP (new stream)' from the PSS Server. The SCF also sends a 'SIP INFO (channel switch)' to the PSS Adapter, which responds with 'SIP 200 OK'.](5bf7ad352d821318a0d56c50cb452c2e_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SCF + participant PA as PSS Adapter + participant PS as PSS Server + + Note left of UE: RTP (Old stream) + UE->>SCF: RTSP PLAY (with Switch Stream header) + SCF->>PA: RTSP PLAY (with Switch Stream header) + PA->>PS: RTSP PLAY (with Switch Stream header) + PS-->>PA: RTSP 200 OK + PA-->>UE: RTSP 200 OK + Note left of UE: RTP (new stream) + SCF->>PA: SIP INFO (channel switch) + PA-->>SCF: SIP 200 OK + +``` + +Sequence diagram illustrating IMS PSS Content switching. The diagram shows four lifelines: UE, SCF, PSS Adapter, and PSS Server. The process starts with an 'RTP (Old stream)' from the PSS Server to the UE. The UE sends an 'RTSP PLAY (with Switch Stream header)' to the SCF. The SCF forwards this to the PSS Adapter, which then sends it to the PSS Server. The PSS Server responds with 'RTSP 200 OK' to the PSS Adapter, which in turn sends 'RTSP 200 OK' to the UE. Finally, the UE receives an 'RTP (new stream)' from the PSS Server. The SCF also sends a 'SIP INFO (channel switch)' to the PSS Adapter, which responds with 'SIP 200 OK'. + +Figure 10: IMS PSS Content switching + +- 1) The UE sends a PLAY request with the aggregated control URI of the new content to the PSS adapter. The PSS client adds the media control URIs of the new streams in the "Switch-Stream" header field to the RTSP PLAY method request as defined 3GPP TS 26.234 [8] clause 5.5.4.3. +- 2) The PSS Adapter sends the RTSP PLAY message to the PSS Server. +- 3) The PSS Server responses a RTSP 200 OK message to the PSS Adapter. +- 4) The PSS Adapter sends the RTSP 200 OK message to UE. +- 5) The PSS server delivers the switched content streams to the UE. +- 6) The PSS Adapter should send a SIP INFO message including the Info Package (Content Reporting) to the SCF with content switching information. See clause 8.2.5.2.5. + +The SCF may utilize the content switching information for statistic, charging etc. purpose, and may initiate a SIP Re-INVITE request to the UE to adjust the QoS reservation if the transport resources changed before and after switching. + +#### 8.2.5.2.2 Procedures at the UE + +To switch content of the PSS streaming session the UE shall send an RTSP PLAY request with the new content URI as defined in TS 26.234 [8] clause 5.5.4. + +#### 8.2.5.2.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +#### 8.2.5.2.4 Procedures at the SCF + +Upon receipt of a SIP INFO message the SCF shall send a SIP 200 OK to the PSS adapter. + +#### 8.2.5.2.5 Procedures at the PSS Adapter + +Upon identification of a successful content switch, the PSS Adapter starts the content switching timer for a particular session. If another content switch occurs during the life of the timer, the timer is restarted. If the session is terminated during the life of the timer, the timer is stopped. After timer expiration, the PSS Adapter should send a SIP INFO message with the Info Package (Content Reporting) to the SCF. The Content Reporting Info Package shall contain an XML document as defined in Annex D and Annex E. + +- ImsPssMbmsCommand shall be set to "PssSwitch". +- ContentID is set to the RTSP URI of the new content. +- DateTime is set to the current date and time. + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-command+xml". + +#### 8.2.5.2.6 Procedures at the PSS Server + +The PSS Server reacts as defined in 3GPP TS 26.234 [8] clause 5.5.4. + +### 8.2.5.3 PSS Content switching with available SDP, change of media components or QoS + +#### 8.2.5.3.1 General Description + +Fast Content Switching as defined in 26.234 [8] Clause 5.5.4 allows also changing content when the new content channel requires a different number or characteristics of media components as the old content channel, or when the bandwidth needs to be modified. + +For instance, the old content stream consists out of an audio and a video stream and the new content channel offers an audio, video and 3GPP Timed Text media component. Addition a media component to an ongoing stream is defined in 26.234 [8] clause 5.5.4.6 and removing a media component in 26.234 [8] clause 5.5.4.7. + +![Sequence diagram for IMS PSS Content switching showing interactions between UE, SCF, PSS Adapter, and PSS Server.](2837ffdadcdb1e5bababa56b564e56ed_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SCF + participant PA as PSS Adapter + participant PS as PSS Server + + Note left of UE: Error: Reference source not found + + UE->>PS: RTP (Old stream) + UE->>PA: RTSP PLAY (with Switch Stream header) + PA->>PS: RTSP PLAY (with Switch Stream header) + PS->>PA: RTSP 200 OK + PA->>UE: RTSP 200 OK + UE->>PS: RTP (new stream, not all media components) + + Note right of SCF: Error: Reference source not found + SCF->>PA: SIP INFO (channel switch) + PA->>SCF: SIP 200 OK + + subgraph PSS Session Modification + UE->>SCF: Re-INVITE (new SDP) + SCF->>PA: Re-INVITE (new SDP) + PA->>PS: SETUP (new flow) + PS->>PA: RTSP 200 OK + PA->>SCF: SIP 200 OK + SCF->>UE: SIP 200 OK + end + + UE->>PA: RTSP PLAY + PA->>PS: RTSP PLAY + PS->>PA: RTSP 200 OK + PA->>UE: RTSP 200 OK + UE->>PS: RTP (new stream, all media components) + +``` + +The diagram illustrates the IMS PSS Content switching process. It begins with the UE sending an RTP (Old stream) to the PSS Server. The UE then sends an RTSP PLAY (with Switch Stream header) to the PSS Adapter, which in turn sends it to the PSS Server. The PSS Server responds with RTSP 200 OK to the adapter, which then responds to the UE. A new RTP stream (not all media components) is sent from the UE to the server. Next, the SCF sends a SIP INFO (channel switch) to the adapter, which responds with SIP 200 OK. The UE sends a Re-INVITE (new SDP) to the SCF, which is passed to the adapter. The adapter sends a SETUP (new flow) to the server, which responds with RTSP 200 OK. The adapter then sends a SIP 200 OK to the SCF, which in turn sends a SIP 200 OK to the UE. Finally, the UE sends an RTSP PLAY to the adapter, which sends it to the server. The server responds with RTSP 200 OK to the adapter, which responds to the UE. A new RTP stream (all media components) is sent from the UE to the server. + +Sequence diagram for IMS PSS Content switching showing interactions between UE, SCF, PSS Adapter, and PSS Server. + +**Figure 11: IMS PSS Content switching** + +NOTE 1: This sequence is simplified and does not e.g. show the ACK message from in response to the reception of 200 OK. + +NOTE 2: The number of required RTSP SETUP interactions between the PSS Adapter and the PSS Server depend on the number of new media components in the SDP. + +The UE determines that the new SDP file contains a different number of media components as the old SDP. The UE updates the streaming session by sending a Re-INVITE with the new SDP file, as described in clause 8.2.3.2. The Re-INVITE is sent either before, during or after the RTSP PLAY switch. As soon as the UE receives the 200 OK for the Re-INVITE, the UE initiates a PLAY to get the new synchronization information. + +### 8.2.5.3.2 Procedures at the UE + +The UE shall send an RTSP PLAY request with the new content URI as defined in TS 26.234 [8] clause 5.5.4. The UE changes the number of media components by sending a Re-INVITE message with the new SDP offer. After receiving the 200 OK for the Re-INVITE the UE initiates a PLAY to get the new synchronization information. + +### 8.2.5.3.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 8.2.5.3.4 Procedures at the SCF + +Upon receipt of a SIP INFO message the SCF shall send a SIP 200 OK to the PSS adapter. + +### 8.2.5.3.5 Procedures at the PSS Adapter + +Upon identification of a successful content switch, the PSS Adapter starts the content switching timer for a particular session. If another content switch occurs during the life of the timer, the timer is restarted. If the session is terminated during the life of the timer, the timer is stopped. After timer expiration, the PSS Adapter should send a SIP INFO message with the Info Package (Content Reporting) to the SCF. The Content Reporting Info Package shall contain an XML document as defined in Annex D and Annex E. + +- ImsPssMbmsCommand shall be set to "PssSwitch". +- ContentID is set to the RTSP URI of the new content. +- DateTime is set to the current date and time. + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-command+xml". + +When receiving the SIP Re-INVITE message from the SCF, if a new media component needs to be added or removed, the PSS adapter shall send the RTSP SETUP to the PSS server, indicating the new media component that needs to be added or removed. + +### 8.2.5.3.6 Procedures at the PSS Server + +The PSS Server behaves as defined in 3GPP TS 26.234 [8] clause 5.5.4 + +## 8.2.5.4 PSS Content switching with unavailable SDP, no change of media component and/or bandwidth + +### 8.2.5.4.1 General description + +In this case, the UE does not have the SDP for the streams it intends to switch to. The new content has same media and bandwidth characteristics. + +![Sequence diagram for IMS PSS Content switching without available SDP, no change of media component and/or bandwidth. The diagram shows interactions between UE, SCF, PSS Adapter, and PSS Server. The UE sends an RTSP PLAY (with SDP requested) to the PSS Adapter. The PSS Adapter sends an RTSP PLAY (SDP requested) to the PSS Server. The PSS Server responds with an RTSP 200 OK (new SDP) to the PSS Adapter, which then sends an RTSP 200 OK (new SDP) to the UE. The UE receives a new RTP stream. The PSS Adapter also sends a SIP INFO (channel switch) to the SCF, which responds with a SIP 200 OK.](6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SCF + participant PA as PSS Adapter + participant PS as PSS Server + + Note right of PS: Error: Reference source not found + + UE->>PA: RTSP PLAY (with SDP requested) + PA->>PS: RTSP PLAY (SDP requested) + PS-->>PA: RTSP 200 OK (new SDP) + PA-->>UE: RTSP 200 OK (new SDP) + Note left of UE: RTP (Old stream) + Note left of UE: RTP (new stream) + PA->>SCF: SIP INFO (channel switch) + SCF-->>PA: SIP 200 OK + +``` + +Sequence diagram for IMS PSS Content switching without available SDP, no change of media component and/or bandwidth. The diagram shows interactions between UE, SCF, PSS Adapter, and PSS Server. The UE sends an RTSP PLAY (with SDP requested) to the PSS Adapter. The PSS Adapter sends an RTSP PLAY (SDP requested) to the PSS Server. The PSS Server responds with an RTSP 200 OK (new SDP) to the PSS Adapter, which then sends an RTSP 200 OK (new SDP) to the UE. The UE receives a new RTP stream. The PSS Adapter also sends a SIP INFO (channel switch) to the SCF, which responds with a SIP 200 OK. + +**Figure 12: IMS PSS Content switching without available SDP, no change of media component and/or bandwidth** + +The UE sends a PLAY request to the PSS adapter indicating that it needs the SDP for the new streams. The PSS Adapter sends the RTSP PLAY message to the PSS Server. + +The PSS Server responds a RTSP 200 OK message to the PSS Adapter, PSS Adapter sends the RTSP 200 OK message to UE containing the SDP for the new streams. + +The PSS server starts streaming the switched content streams to the UE. + +The PSS Adapter should send a SIP INFO message including the Info Package (Content Reporting) to the SCF according to clause 8.2.5.2.1. + +#### 8.2.5.4.2 Procedures at the UE + +To switch content of the PSS streaming session the UE shall send an RTSP PLAY to request the new SDP as defined in TS 26.234 [8]. + +#### 8.2.5.4.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +#### 8.2.5.4.4 Procedures at the SCF + +Upon receipt of a SIP INFO message the SCF shall send a SIP 200 OK to the PSS adapter. + +#### 8.2.5.4.5 Procedures at the PSS Adapter + +Upon identification of a successful content switch, the PSS Adapter starts the content switching timer for a particular session. If another content switch occurs during the life of the timer, the timer is restarted. If the session is terminated during the life of the timer, the timer is stopped. After timer expiration, the PSS Adapter should send a SIP INFO message with the Info Package (Content Reporting) to the SCF. The Content Reporting Info Package shall contain an XML document as defined in Annex D and Annex E. + +- ImsPssMbmsCommand shall be set to "PssSwitch". + +- ContentID is set to the RTSP URI of the new content. +- DateTime is set to the current date and time. + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-command+xml". + +The PSS Adapter sends the RTSP 200 OK message to UE containing the SDP for the new stream. + +#### 8.2.5.4.6 Procedures at the PSS Server + +The PSS Server behaves as defined in 3GPP TS 26.234 [8] clause 5.5.4. + +#### 8.2.5.5 PSS Content switching with unavailable SDP, change of media component and/or bandwidth + +##### 8.2.5.5.1 General description + +In this case, the UE does not have the SDP for the streams it intends to switch to. And the new content has different media and/or bandwidth characteristics. + +![Sequence diagram illustrating IMS PSS Content switching without available SDP, change of media component and/or bandwidth. The diagram shows interactions between UE, SCF, PSS Adapter, and PSS Server. It starts with an old RTP stream, followed by a PLAY request, a 206 Partial Data response, and a new RTP stream. A PSS Session Modification phase follows, involving Re-INVITE, SETUP, and RTSP 200 OK messages. Finally, a new RTP stream with all media components is established.](f10dc32e3673e1392029a49e958a9d6c_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SCF + participant PA as PSS Adapter + participant PS as PSS Server + + Note left of UE: RTP (Old stream) + UE->>PA: RTSP PLAY (SDP requested) + PA->>PS: RTSP PLAY (SDP requested) + PS->>PA: RTSP 206 Partial Data + PA->>UE: RTSP 206 Partial Data (incl. New SDP) + Note left of UE: RTP (new stream, not all media components) + UE->>SCF: SIP INFO (channel switch) + SCF->>PA: SIP 200 OK + Note right of UE: PSS Session Modification + UE->>SCF: Re-INVITE (new SDP) + SCF->>PA: Re-INVITE (new SDP) + PA->>PS: SETUP (new flow) + PS->>PA: RTSP 200 OK + PA->>SCF: SIP 200 OK + SCF->>UE: SIP 200 OK + UE->>PA: RTSP PLAY + PA->>PS: RTSP PLAY + PS->>PA: RTSP 200 OK + PA->>UE: RTSP 200 OK + Note left of UE: RTP (new stream, all media components) + +``` + +Sequence diagram illustrating IMS PSS Content switching without available SDP, change of media component and/or bandwidth. The diagram shows interactions between UE, SCF, PSS Adapter, and PSS Server. It starts with an old RTP stream, followed by a PLAY request, a 206 Partial Data response, and a new RTP stream. A PSS Session Modification phase follows, involving Re-INVITE, SETUP, and RTSP 200 OK messages. Finally, a new RTP stream with all media components is established. + +**Figure 13: IMS PSS Content switching without available SDP, change of media component and/or bandwidth** + +The UE sends a PLAY request to the PSS adapter indicating that it needs the SDP for the new streams. The PSS Adapter sends the RTSP PLAY message to the PSS Server.. If the UE receives a "206 Partial Data" success status code, + +then the UE changes the number of media components and/or bandwidth by sending a RE-INVITE message with the new SDP file, as described in clause 8.2.5.1. + +#### 8.2.5.5.2 Procedures at the UE + +If the UE receives a "206 Partial Data" success status code, then the UE changes the number of media components by sending a re-INVITE message with the new SDP file. + +#### 8.2.5.5.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +#### 8.2.5.5.4 Procedures at the SCF + +Upon receipt of a SIP INFO message the SCF shall send a SIP 200 OK to the PSS adapter. + +#### 8.2.5.5.5 Procedures at the PSS Adapter + +Upon identification of a successful content switch, the PSS Adapter starts the content switching timer for a particular session. If another content switch occurs during the life of the timer, the timer is restarted. If the session is terminated during the life of the timer, the timer is stopped. After timer expiration, the PSS Adapter should send a SIP INFO message with the Info Package (Content Reporting) to the SCF. The Content Reporting Info Package shall contain an XML document as defined in Annex D and Annex E. + +- ImsPssMbmsCommand shall be set to "PssSwitch". +- ContentID is set to the RTSP URI of the new content. +- DateTime is set to the current date and time. + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-command+xml". + +When receiving the SIP RE-INVITE message from the SCF, if a new media component needs to be added, the PSS adapter shall send the RTSP SET-UP to the PSS server, indicating the new media component that needs to be added. + +#### 8.2.5.5.6 Procedures at the PSS Server + +The PSS Server reacts as defined in 3GPP TS 26.234 [8] clause 5.5.4. + +### 8.2.5.6 PSS content switching reporting update + +#### 8.2.5.6.1 General Description + +If the SCF does not want to receive content switching information anymore or would like to start content switching reporting, the SCF should send a SIP UPDATE message to the PSS adapter with the Recv-Info header set appropriately. + +Note: In this case, the SCF is acting as B2BUA. + +![Sequence diagram showing the interaction between SCF and PSS Adapter for content switching reporting update.](11fc7b58448f884cac1a5481f7def5dc_img.jpg) + +``` +sequenceDiagram + participant SCF + participant PSS Adapter + Note left of SCF: SCF acting as B2BUA + SCF->>PSS Adapter: SIP UPDATE + PSS Adapter-->>SCF: SIP 200 OK +``` + +The diagram illustrates a sequence of messages between the SCF and the PSS Adapter. The SCF sends a SIP UPDATE message to the PSS Adapter, and the PSS Adapter responds with a SIP 200 OK message. The SCF is acting as a B2BUA. + +Sequence diagram showing the interaction between SCF and PSS Adapter for content switching reporting update. + +Figure 13a: PSS content switching reporting update + +### 8.2.5.6.2 Procedures at the PSS adapter + +After receiving a SIP UPDATE message from the SCF, the PSS adapter shall dependent on the Recv-Info header, stop or start the content switching reporting. + +### 8.2.5.6.3 Procedures at the SCF + +If the SCF does not want to receive content switching information anymore, it should send a SIP UPDATE message with the Recv-Info header set to nil to the PSS adapter. + +If the SCF decides to start content switching reports, the SCF should send a SIP UPDATE message with the Recv-Info header set to content info to the PSS adapter. + +## 8.2.5.7 PSS Content Report Configuration + +### 8.2.5.7.1 General Description + +During service consumption with PSS session, the SCF may request the PSS Adapter to re-config the content report behaviours e.g. report timer, etc. The following clauses describe how the SCF can reconfigure a PSS Adapter. + +According to sub-clause 8.2.3, a PSS streaming session was initiated and the PSS Adapter has indicated his willing to accept Content Reporting Configuration Info-Package. + +In order to send the updated content report configuration information, the SCF issues a SIP INFO request to the PSS Adapter, with the new configuration information. + +After receiving SIP INFO request, the PSS Adapter responses with SIP 200 OK and config itself with the new configuration information. + +![Sequence diagram showing the interaction between SCF and PSS Adapter for Content Report Configuration Information Delivery. The SCF sends a SIP INFO request with the Content Reporting Configuration Info-Package to the PSS Adapter, which responds with a SIP 200 OK. The SCF also performs an internal check for the update of content reporting config. info.](2dfd7b53bd3c518fc1f68921ed2bf441_img.jpg) + +``` + +sequenceDiagram + participant SCF + participant PSS Adapter + Note left of SCF: 1. Check the update of content reporting config. info + SCF->>PSS Adapter: 2. SIP INFO With Content Reporting Configuration Info-Package + PSS Adapter-->>SCF: 3. SIP 200 OK + +``` + +Sequence diagram showing the interaction between SCF and PSS Adapter for Content Report Configuration Information Delivery. The SCF sends a SIP INFO request with the Content Reporting Configuration Info-Package to the PSS Adapter, which responds with a SIP 200 OK. The SCF also performs an internal check for the update of content reporting config. info. + +**Figure 13b: Content Report Configuration Information Delivery to PSS Adapter** + +### 8.2.5.7.2 Procedures in SCF + +Whenever the SCF wants to re-configure a PSS Adapter, the SCF shall issue a SIP INFO request to the PSS Adapter with the Info Package (Content Report Configuration). The Content Reporting Configuration Package shall contain an XML document as defined in Annex K. + +- ReportTimer shall be set to the time value (in seconds) of the updated report timer; + +### 8.2.5.7.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 8.2.5.7.4 Procedures in PSS Adapter + +Upon receipt of a SIP INFO message the PSS Adapter shall send a SIP 200 OK to the SCF. + +The PSS Adapter shall then parse the XML file in the message body, according the schema defined in Annex X. Following that the PSS Adapter shall configure itself according to the XML file: + +- If the “ReportTimer” is different from the timer which is set for content report, then reset the timer with the value “ReportTimer”. + +## 8.2.6 PSS Streaming Session Teardown + +### 8.2.6.0 Introduction + +Assuming the streaming session is established, the session can be terminated either by the UE or by the network. For the network-initiated PSS streaming session teardown, either the SCF or the PSS adapter can initiate the procedure. + +### 8.2.6.1 General Description + +#### 8.2.6.1.1 UE-initiated PSS streaming session teardown + +![Sequence diagram of UE-initiated IMS PSS Session termination](63a2519518616620ef0e53d98b923c05_img.jpg) + +The diagram illustrates the sequence of messages for a UE-initiated IMS PSS Session termination. The participants are UE, IMS, SCF, PSS Adapter, and PSS Server. A thick horizontal line at the top represents the active RTP stream. The sequence of messages is as follows: 1. The UE sends a SIP BYE message to the IMS. 2. The IMS forwards the SIP BYE message to the SCF. 3. The SCF sends a SIP BYE message to the PSS Adapter. 4. The PSS Adapter sends a RTSP TEARDOWN message to the PSS Server. 5. The PSS Server responds with a RTSP 200 OK message to the PSS Adapter. 6. The SCF receives a SIP 200 OK message from the PSS Adapter. 7. The IMS forwards the SIP 200 OK message to the UE. 8. The UE receives the SIP 200 OK message. + +Sequence diagram of UE-initiated IMS PSS Session termination + +**Figure 14a: UE-initiated IMS PSS Session termination** + +Here the case of UE termination is described. The following steps are carried out: + +- 1) Note that the PSS Adapter should maintain the RTSP session to the PSS Server until after step 5. +- 2) The UE sends a SIP BYE message. +- 3) The IMS CN subsystem forwards the SIP BYE message to the SCF. +- 4) The SCF sends the SIP BYE message to the PSS adapter. +- 5) The PSS adapter sends a RTSP TEARDOWN to the PSS server. +- 6) In case the PSS Server is transmitting RTP data it stops sending RTP data for this session. The PSS server sends a RTSP 200 OK to the PSS adapter. + +- 7) The PSS adapter sends a SIP 200 OK to the UE via SCF and IMS CN subsystem. + +#### 8.2.6.1.2 SCF-initiated PSS streaming session teardown + +![Sequence diagram for SCF-initiated IMS PSS Session termination. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, PSS adapter, and PSS Server. The sequence of messages is: 1. SCF sends SIP BYE to PSS adapter. 2. PSS adapter sends RTSP TEARDOWN to PSS Server. 3. PSS Server sends RTSP 200 OK to PSS adapter. 4. PSS adapter sends SIP 200 OK to SCF. 5. SCF sends SIP BYE to IM CN Subsystem. 6. IM CN Subsystem sends SIP BYE to UE. 7. UE sends SIP 200 OK to IM CN Subsystem. 8. IM CN Subsystem sends SIP 200 OK to SCF.](9a14684f8ae1345c6efea6f5994c730c_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant PSS adapter + participant PSS Server + SCF->>PSS adapter: SIP BYE + PSS adapter->>PSS Server: RTSP TEARDOWN + PSS Server-->>PSS adapter: RTSP 200 OK + PSS adapter-->>SCF: SIP 200 OK + SCF->>IM CN Subsystem: SIP BYE + IM CN Subsystem->>UE: SIP BYE + UE-->>IM CN Subsystem: SIP 200 OK + IM CN Subsystem-->>SCF: SIP 200 OK + +``` + +Sequence diagram for SCF-initiated IMS PSS Session termination. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, PSS adapter, and PSS Server. The sequence of messages is: 1. SCF sends SIP BYE to PSS adapter. 2. PSS adapter sends RTSP TEARDOWN to PSS Server. 3. PSS Server sends RTSP 200 OK to PSS adapter. 4. PSS adapter sends SIP 200 OK to SCF. 5. SCF sends SIP BYE to IM CN Subsystem. 6. IM CN Subsystem sends SIP BYE to UE. 7. UE sends SIP 200 OK to IM CN Subsystem. 8. IM CN Subsystem sends SIP 200 OK to SCF. + +**Figure 14b: SCF-initiated IMS PSS Session termination** + +Here the case of the SCF-initiated teardown procedure is described. The following steps are carried out: + +- 1) The SCF sends a SIP BYE to the PSS adapter. +- 2) The PSS adapter sends the RTSP TEARDOWN message to the PSS server. +- 3) The PSS server sends the RTSP 200 OK message to the PSS adapter. +- 4) The PSS adapter sends the SIP 200 OK message to the SCF. +- 5) Upon receipt of the SIP 200 OK, the SCF sends the SIP BYE message to the IM CN subsystem. +- 6) The IM CN Subsystem forwards the SIP BYE message to the UE. +- 7) The UE sends a SIP 200 OK message to the IM CN Subsystem. +- 8) The IM CN Subsystem forwards the SIP 200 OK to the SCF. + +#### 8.2.6.1.3 PSS adapter-initiated PSS streaming session teardown + +![Sequence diagram for PSS adapter-initiated IMS PSS Session termination. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, PSS adapter, and PSS Server. The sequence of messages is: 1. PSS adapter sends RTSP TEARDOWN to PSS Server. 2. PSS Server sends RTSP 200 OK to PSS adapter. 3. PSS adapter sends SIP BYE to SCF. 4. SCF sends SIP 200 OK to PSS adapter. 5. SCF sends SIP BYE to IM CN Subsystem. 6. IM CN Subsystem sends SIP BYE to UE. 7. UE sends SIP 200 OK to IM CN Subsystem. 8. IM CN Subsystem sends SIP 200 OK to SCF.](9e5d66cdb5112ad5cab89552b126e4b9_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant PSS adapter + participant PSS Server + PSS adapter->>PSS Server: RTSP TEARDOWN + PSS Server-->>PSS adapter: RTSP 200 OK + PSS adapter->>SCF: SIP BYE + SCF-->>PSS adapter: SIP 200 OK + SCF->>IM CN Subsystem: SIP BYE + IM CN Subsystem->>UE: SIP BYE + UE-->>IM CN Subsystem: SIP 200 OK + IM CN Subsystem-->>SCF: SIP 200 OK + +``` + +Sequence diagram for PSS adapter-initiated IMS PSS Session termination. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, PSS adapter, and PSS Server. The sequence of messages is: 1. PSS adapter sends RTSP TEARDOWN to PSS Server. 2. PSS Server sends RTSP 200 OK to PSS adapter. 3. PSS adapter sends SIP BYE to SCF. 4. SCF sends SIP 200 OK to PSS adapter. 5. SCF sends SIP BYE to IM CN Subsystem. 6. IM CN Subsystem sends SIP BYE to UE. 7. UE sends SIP 200 OK to IM CN Subsystem. 8. IM CN Subsystem sends SIP 200 OK to SCF. + +**Figure 14c: PSS adapter-initiated IMS PSS Session termination** + +Here the case of the SCF-initiated teardown procedure is described. The following steps are carried out: + +- 1) The PSS adapter sends the RTSP TEARDOWN to the PSS server. +- 2) The PSS server sends the RTSP 200 OK to the PSS adapter. + +- 3) The PSS adapter sends the SIP BYE message to the SCF. +- 4) The SCF sends the SIP 200 OK message to the PSS adapter. +- 5) The SCF sends the SIP BYE message to the IM CN Subsystem. +- 6) The IM CN Subsystem forwards the SIP BYE message to the UE. +- 7) The UE sends a SIP 200 OK message to the IM CN Subsystem. +- 8) The IM CN Subsystem forwards the SIP 200 OK to the SCF. + +## 8.2.6.2 Procedures at the UE + +### 8.2.6.2.1 UE-initiated PSS streaming session teardown + +To teardown the PSS streaming session the UE shall close the TCP connection for RTSP between UE and PSS Adapter, if existing. Further, the UE shall send a SIP BYE to the SCF. + +### 8.2.6.2.2 Network-initiated PSS streaming session teardown + +Upon receipt of the SIP BYE message, the UE shall send the SIP 200 OK message to the SCF. The UE proceeds to release the associated resources held for the PSS session. + +## 8.2.6.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +## 8.2.6.4 Procedures at the SCF + +### 8.2.6.4.1 UE-initiated PSS streaming session teardown + +Upon receipt of a SIP BYE message the SCF shall forward it to the PSS adapter. + +### 8.2.6.4.2 SCF-initiated PSS streaming session teardown + +The SCF initiates the PSS streaming session teardown by sending a SIP BYE message to the PSS adapter. Upon receipt of the SIP 200 OK from the PSS adapter, the SCF shall send a SIP BYE message to the UE. + +### 8.2.6.4.3 PSS adapter-initiated PSS streaming session teardown + +Upon receipt of the SIP BYE message received from the PSS adapter, the SCF sends the SIP 200 OK message to the PSS adapter. Then the SCF forwards the SIP BYE message to the UE. + +## 8.2.6.5 Procedures at the PSS Adapter + +### 8.2.6.5.1 UE-initiated PSS streaming session teardown + +Upon receipt of a SIP BYE message from the SCF the PSS adapter shall send a RTSP TEARDOWN message to the PSS Server. + +Upon receipt of a RTSP 200 OK message from the PSS server, the PSS adapter shall send a SIP 200 OK message to the SCF. + +The PSS Adapter shall not close the RTSP session to the PSS Server on receipt of a TCP close, but waits until it has received the SIP BYE message in step 4 of clause 8.2.6.1.1. + +### 8.2.6.5.2 SCF-initiated PSS streaming session teardown + +Upon receipt of the SIP BYE message, the PSS adapter sends the RTSP TEARDOWN message to the PSS server. Upon receipt of the RTSP 200 OK message from the PSS server, the PSS adapter sends the SIP 200 OK to the SCF. + +### 8.2.6.5.3 PSS adapter-initiated PSS streaming session teardown + +The PSS adapter sends the RTSP TEARDOWN to the PSS server. Upon receipt of the RTSP 200 OK, the PSS adapter sends the SIP BYE message to the SCF. + +### 8.2.6.6 Procedures at the PSS Server + +Upon receipt of a RTSP TEARDOWN from the PSS adapter, the PSS server shall stop still on-going RTP transmissions and send a RTSP 200 OK message to the PSS adapter. + +## 8.2.7 Supported procedures + +Clause 8.2 specifies IMS initiated and controlled PSS streaming sessions. Protocols and procedures as defined in 3GPP TS 26.234 [8] are supported including + +- Fast content switching and start-up (clause 5.5). In the case of fast content start-up, the pipelining takes place between the PSS adapter and the PSS server. +- Time-shifting support (clause 5.6) +- RTP and RTCP extensions (clause 6.2.3) +- Adaptation of continuous media (clause 10) +- Quality of Experience reporting (clause 11). + +## 8.3 MBMS Streaming + +### 8.3.1 MBMS Media codecs and formats + +MBMS Media codecs and formats defined in 3GPP TS 26.346 [11] are applicable to the present document for IMS initiated and controlled MBMS User service. + +### 8.3.2 Procedure for providing missing parameters + +#### 8.3.2.1 Procedures at the UE + +If the UE does not have the all the information it needs to form an SDP offer, the UE shall send a SIP OPTIONS message. + +The "Request-URI" is related to the MBMS service that the user wants to activate. The "Request-URI" shall be composed of a user and domain part as defined as follows: + +- The user part contains the serviceId. The serviceId shall be globalServiceID defined in [27] or serviceId defined in [11], which is retrieved from service selection information. +- The domain part is the Service Provider domain name, obtained from SSF. + +The TO header shall contain the same URI as in the "Request-URI" parameter. + +The FROM header shall indicate the public user identity of the user. + +Upon reception of the 200 OK including service access information encapsulated in multipart/MIME, the UE may initiate MBMS session as described in clause 8.3.3. + +#### 8.3.2.2 Procedures at the SCF + +When receiving the SIP OPTIONS message, the SCF shall examine the serviceId present in the user-part of the TO header and lookup the requested User Service Description information. + +The SCF shall answer with the user service description information of the content delivery channel (encapsulated in multipart/MIME) as requested by the serviceId. + +### 8.3.3 MBMS Streaming Session initiation + +#### 8.3.3.1 General description + +![Sequence diagram of MBMS Streaming Session Initiation. Lifelines: UE, IM CN Subsystem, SCF, BM-SC.UPF. The sequence is: 1. SIP INVITE (Request-URI) from UE to IM CN Subsystem; 2. SIP INVITE from IM CN Subsystem to SCF; 3. SIP 200 OK from SCF to IM CN Subsystem; 4. SIP 200 OK (SDP) from IM CN Subsystem to UE; 5. RTP/MIKEY from BM-SC.UPF to UE.](b44f89b176c971c7dd264c07bfef2c2a_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant BM-SC.UPF + Note left of UE: + UE->>IM CN Subsystem: 1. SIP INVITE (Request-URI) + IM CN Subsystem->>SCF: 2. SIP INVITE + SCF-->>IM CN Subsystem: 3. SIP 200 OK + IM CN Subsystem-->>UE: 4. SIP 200 OK (SDP) + Note right of BM-SC.UPF: + BM-SC.UPF-->>UE: 5. RTP/MIKEY + +``` + +Sequence diagram of MBMS Streaming Session Initiation. Lifelines: UE, IM CN Subsystem, SCF, BM-SC.UPF. The sequence is: 1. SIP INVITE (Request-URI) from UE to IM CN Subsystem; 2. SIP INVITE from IM CN Subsystem to SCF; 3. SIP 200 OK from SCF to IM CN Subsystem; 4. SIP 200 OK (SDP) from IM CN Subsystem to UE; 5. RTP/MIKEY from BM-SC.UPF to UE. + +**Figure 15: MBMS Streaming Session Initiation** + +It is assumed that the UE has already received the MBMS USD containing the SDP and associated fragments for the service from the SSF before initiating the MBMS session. + +- Step 1, 2: UE initiates a SIP INVITE message to SCF, indicating which MBMS Streaming User Service the user has chosen. +- Step 3, 4: SCF responds UE with a SIP 200 OK message when the SIP INVITE is successfully handled. The SIP 200 OK contains an SDP files containing the Multicast address of the service. The UE then activates the MBMS bearers either using the MBMS Broadcast Service Activation procedure [4] or the MBMS Multicast Service Activation Procedure [4]. +- Step 5: The UE can start receiving the MBMS Streaming session data when transmitted by the BM-SC.UPF. + +The construction of the SDP is not affected by the use of MBMS stream bundling, see section 8.2.2 of [11], nor are any of the procedures. + +#### 8.3.3.2 Procedures at the UE + +The UE shall support the procedures specified in TS 24 229 [7] for originating sessions. + +The UE shall generate an initial INVITE request: + +- The Request-URI in the INVITE request shall be the well known PSI (Public Service Identifier) of the MBMS Service, i.e. Live Stream@. +- The To header shall contain the same URI as in the Request-URI. +- The From header shall indicate the public user identity of the user. +- The Recv-Info header shall be set to "ContentReportConfig" [42]. + +An SDP offer shall be included in the request. The SDP offer shall be done in accordance with the parameters received during UE service selection procedure and with media capabilities and required bandwidth available for the MBMS session. The SDP offer corresponds to the MBMS Streaming Session. See 3GPP TS 26.346 [11], clause 8.3.1. . The SDP offer at media level shall include the following elements: + +- The m-line(s) shall be set to the media parameters retrieved via service selection procedures for the requested MBMS service. +- The c-line(s) shall be set according to the multicast address retrieved via service selection procedures for the requested MBMS service. + +- An `a=mbms_service:MBMS_ServiceId` line to indicate the MBMS service which the UE intends to initiate first. The `MBMS_ServiceId` shall be `globalServiceID` defined in [27] or `serviceId` defined in [11], which is retrieved from service selection information. +- The `a`-attribute shall be set to the value of "recvonly". + +Once the UE receives the SIP response, the UE shall examine the media parameters in the received SDP, and initiate the MBMS channel according to the `a=mbms_service` line. It can activate the corresponding MBMS User Service as described in the USDs. MBMS User Service reception initiation may correspond to the MBMS Broadcast Mode activations as described in 3GPP TS 23.246 [4], clause 8.12 or the MBMS Multicast Mode activation procedure as described in 3GPP TS 23.246 [4], clause 8.2. + +The received SDP may contain an `a=suggestedPresentationOffset:value` line. The value of `suggestedPresentationOffset` specifies a delay offset from the time when the first octet of a data unit was generated at the sender that is suggested to be used for presentation of the first octet of the data unit. For a received RTP packet, if the wall-clock time corresponding to the RTP timestamp carried in the RTP packet is $T$ , a UE may present the data contained in the first octet of the associated RTP packet to the user at $T + \text{suggestedPresentationOffset}$ in terms of the wall-clock time if synchronized playout with other UEs adhering to the same rule is desired. + +### 8.3.3.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. The corresponding PCC procedures are performed as described in clause 9. + +### 8.3.3.4 Procedures at the SCF + +The SCF shall support the procedures specified in TS 24.229 [7] applicable to an AS acting as a terminating UA. + +Upon receipt of SIP INVITE request, the SCF shall perform service authorization procedures to check the service rights of requested MBMS service according to the user subscription information, See clause 10.4. + +The SCF shall examine the SDP parameters in the SDP offer. + +- It shall examine the `a=mbms_service` parameter. This parameter contains the channel the UE intends to join. If the `mbms_service` parameter does not point to a channel that the UE is allowed to join the SCF shall not accept the offer and shall answer with a 403 error code. +- It shall examine the `c`-line(s) to determine that it is a multicast session. It may also check that it corresponds to the `mbms_service` parameter. If not, the SCF shall answer with a 403 error code. + +If the SDP parameters are examined successfully, the SCF shall answer with a SIP 200 OK, indicating the SDP answer as follows: + +- The `c`-lines and `m`-lines shall be identical to ones indicated in the SDP offer. +- It shall include an `a=sendonly` attribute. +- It may include an `a= suggestedPresentationOffset:value` line. The value of `suggestedPresentationOffset` provides a mapping of the presentation time of each data unit to the wall-clock time to enable synchronized playout of the UEs adhering to the same rule. + +The SIP 200 OK shall indicate the supported Info Packages in the Recv-Info header (Content Reporting) [42]. + +### 8.3.3.5 Procedures at the BMSC.UPF + +The MBMS session is already ongoing at the BMSC.UPF. No specific action is required. + +## 8.3.4 MBMS content switching + +### 8.3.4.1 General Description + +It is assumed that MBMS streaming reception is already active and a stream is delivered to the UE via MBMS. In case of MBMS content switching, the UE tunes into a new content channel e.g. in case of MBMS multicast mode the UE leaves a multicast channel and joins another one. + +The UE should send a SIP INFO Message with the included Info Package (Content Reporting) to inform the SCF about which channel is being received unless the SCF prohibits it. A timer is started with a preconfigured value with default value of 10 seconds, when the channel switch is executed. After timer expiration the SIP INFO message is sent. + +![Sequence diagram for MBMS content switching reporting. Lifelines: UE, IM CN Subsystem, SCF, BM-SC/UPF. A thick horizontal line labeled 'RTP' connects the IM CN Subsystem and BM-SC/UPF. The UE sends a 'SIP INFO (info-event = content reporting)' message to the IM CN Subsystem. The IM CN Subsystem forwards it as 'SIP INFO' to the SCF. The SCF responds with 'SIP 200 OK' to the IM CN Subsystem, which then forwards it as 'SIP 200 OK' to the UE.](7fe5741e83bc9702d1b1d7585ddf66bd_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant BM-SC/UPF + Note over IM CN Subsystem, BM-SC/UPF: RTP + UE->>IM CN Subsystem: SIP INFO (info-event = content reporting) + IM CN Subsystem->>SCF: SIP INFO + SCF-->>IM CN Subsystem: SIP 200 OK + IM CN Subsystem-->>UE: SIP 200 OK + +``` + +Sequence diagram for MBMS content switching reporting. Lifelines: UE, IM CN Subsystem, SCF, BM-SC/UPF. A thick horizontal line labeled 'RTP' connects the IM CN Subsystem and BM-SC/UPF. The UE sends a 'SIP INFO (info-event = content reporting)' message to the IM CN Subsystem. The IM CN Subsystem forwards it as 'SIP INFO' to the SCF. The SCF responds with 'SIP 200 OK' to the IM CN Subsystem, which then forwards it as 'SIP 200 OK' to the UE. + +**Figure 16: MBMS content switching reporting** + +The UE sends content switching information to the SCF. + +The content switching information may include the serviceId after switching. The SCF may utilize the content switching information for statistical or charging purposes etc. + +If the SCF does not want to receive content switching information anymore or would like to start content switching reporting, the SCF should send a SIP UPDATE message to the UE with the Recv-Info header set appropriately. + +![Sequence diagram for MBMS content switching reporting update. Lifelines: UE, IM CN Subsystem, SCF. The SCF sends a 'SIP UPDATE' message to the IM CN Subsystem, which forwards it as 'SIP UPDATE' to the UE. The UE responds with 'SIP 200 OK' to the IM CN Subsystem, which then forwards it as 'SIP 200 OK' to the SCF.](94d3fdcc244924326f02533aeb2d93fc_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + SCF->>IM CN Subsystem: SIP UPDATE + IM CN Subsystem->>UE: SIP UPDATE + UE-->>IM CN Subsystem: SIP 200 OK + IM CN Subsystem-->>SCF: SIP 200 OK + +``` + +Sequence diagram for MBMS content switching reporting update. Lifelines: UE, IM CN Subsystem, SCF. The SCF sends a 'SIP UPDATE' message to the IM CN Subsystem, which forwards it as 'SIP UPDATE' to the UE. The UE responds with 'SIP 200 OK' to the IM CN Subsystem, which then forwards it as 'SIP 200 OK' to the SCF. + +**Figure 16a: MBMS content switching reporting update** + +### 8.3.4.2 Procedures at the UE + +The UE performs MBMS content switching according to the deactivation/activation procedures defined in [4]. + +Upon identification of a successful content switch, the UE starts the content switching timer for a particular session. If another content switch occurs during the life of the timer, the timer is restarted. If the session is terminated during the life of the timer, the timer is stopped. After timer expiration, the UE should send a SIP INFO message with the Info Package (Content Reporting) to the SCF. The Content Reporting Info Package shall contain an XML document as defined in Annex D and Annex F. + +- ImsPssMbmsCommand shall be set to "MbmsSwitch"; + +- ServiceId shall be set to the value of the new channel. If the OMA BCAST Service Guide [27] is used, this shall be set to Global Service ID, otherwise shall be set to the MBMS User Service Description serviceId. +- ProgrammeId may be present and if present shall be set to the identifier of the current programme of the new channel. If the OMA BCAST Service Guide [27] is used, this shall be set to service Name. +- DateTime shall be set to the date & time of the channel switch. + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-command+xml". + +After receiving a SIP UPDATE message from the SCF, the UE shall dependent on the Recv-Info header, stop or start the content switching reporting. + +### 8.3.4.2 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 8.3.4.3 Procedures at the SCF + +Upon receipt of a SIP INFO message the SCF shall send a SIP 200 OK to the UE. + +If the SCF does not want to receive content switching information anymore, it should send a SIP UPDATE message with the Recv-Info header set to nil. + +If the SCF decides to start content switching reports, the SCF should send a SIP UPDATE message with the Recv-Info header set to Content Reporting to the UE. + +### 8.3.4.4 Procedures at the BMSC.UPF + +The BMSC.UPF transmits the RTP flows, and is not involved in the reporting of content switching information. + +## 8.3.5 MBMS Streaming Session Teardown + +### 8.3.5.1 General Description + +![Sequence diagram illustrating MBMS Streaming Session Termination. The diagram shows four participants: UE, IM CN Subsystem, SCF, and BM-SC.UPF. The sequence of messages is: 1. RTP/MIKEY from BM-SC.UPF to UE; 2. SIP BYE from UE to IM CN Subsystem; 3. SIP BYE from IM CN Subsystem to SCF; 4. SIP 200 OK from SCF to IM CN Subsystem; 5. SIP 200 OK from IM CN Subsystem to UE.](ca322f838ed1785bc0de168636f7b426_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant BM-SC.UPF + Note left of UE: 1. RTP/MIKEY + UE->>IM CN Subsystem: 2. SIP BYE + IM CN Subsystem->>SCF: 3. SIP BYE + SCF->>IM CN Subsystem: 4. SIP 200 OK + IM CN Subsystem->>UE: 5. SIP 200 OK + +``` + +Sequence diagram illustrating MBMS Streaming Session Termination. The diagram shows four participants: UE, IM CN Subsystem, SCF, and BM-SC.UPF. The sequence of messages is: 1. RTP/MIKEY from BM-SC.UPF to UE; 2. SIP BYE from UE to IM CN Subsystem; 3. SIP BYE from IM CN Subsystem to SCF; 4. SIP 200 OK from SCF to IM CN Subsystem; 5. SIP 200 OK from IM CN Subsystem to UE. + +**Figure 17: MBMS Streaming Session Termination** + +- Step 1: UE receives Streaming content from the BM-SC.UPF. +- Step 2, 3: UE initiates a SIP BYE message to SCF, indicating which MBMS Streaming session to close. +- Step 4, 5: SCF responds UE with a SIP 200 OK message when the SIP BYE is successfully handled and session terminated. At this stage, the UE can stop receiving the MBMS Streaming session. + +The UE may deactivate the according MBMS Bearer Service during steps 2 to 5 or after step 5. The deactivation is either according to the MBMS Broadcast Service deactivation (3GPP TS 23.246 [4]) or the MBMS Multicast Mode deactivation procedure (3GPP TS 23.246 [4]). + +### 8.3.5.2 Procedures at the UE + +The UE shall send a SIP BYE to the SCF. + +The UE may deactivate the according MBMS Bearer Service during steps 2 to 5 or after step 5 of clause 8.3.5.1. The deactivation is either according to the MBMS Broadcast Service deactivation (3GPP TS 23.246 [4]) or the MBMS Multicast Mode deactivation procedure (3GPP TS 23.246 [4]). + +### 8.3.5.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 8.3.5.4 Procedures at the SCF + +The SCF responds to the UE with a SIP 200 OK message after handling of the SIP BYE message. + +### 8.3.5.5 Procedures at the BMSC.UPF + +The BMSC.UPF is acting as described in 3GPP TS 23.246 [4]. + +## 8.3.6 MBMS Content Report Configuration + +### 8.3.6.1 General Description + +During service consumption with MBMS session, the SCF may request the UE to re-config the content report behaviours e.g. report timer, etc. The following clauses describe how the SCF can reconfigure a UE. + +According to sub-clause 8.3.3, a MBMS streaming session was initiated and the UE has indicated his willing to accept Content Reporting Configuration Info-Package. + +In order to send the updated content report configuration information, the SCF issues a SIP INFO request to the UE, with the new configuration information. + +After receiving SIP INFO request, the UE responses with SIP 200 OK and config itself with the new configuration information. + +![Sequence diagram showing the interaction between UE and SCF for Content Report Configuration Information Delivery. The SCF performs an internal check, then sends a SIP INFO request to the UE, which responds with a SIP 200 OK.](781be1b7270da21ee7b75b51db2ee1b3_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SCF + Note right of SCF: 1. Check the update of content reporting config. info + SCF->>UE: 2. SIP INFO With Content Reporting Configuration Info-Package + UE->>SCF: 3. SIP 200 OK + +``` + +Sequence diagram showing the interaction between UE and SCF for Content Report Configuration Information Delivery. The SCF performs an internal check, then sends a SIP INFO request to the UE, which responds with a SIP 200 OK. + +Figure 17a: Content Report Configuration Information Delivery to UE + +### 8.3.6.2 Procedures in SCF + +Whenever the SCF wants to re-configure an UE, the SCF shall issue a SIP INFO request to the UE with the Info Package (Content Report Configuration). The Content Reporting Configuration Package shall contain an XML document as defined in Annex K. + +- ReportTimer shall be set to the time value (in seconds) of the updated report timer; + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-contentReportConfig+xml". + +### 8.3.6.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 8.3.6.4 Procedures in UE + +Upon receipt of a SIP INFO message the UE shall send a SIP 200 OK to the SCF. + +The UE shall then parse the XML file in the message body, according the schema defined in Annex X. Following that the UE shall configure itself according to the XML file: + +- If the “ReportTimer” is different from the timer which is set for content report, then reset the timer with the value “ReportTimer”. + +## 8.4 Combined PSS and MBMS Streaming + +### 8.4.1 Introduction + +Combined PSS and MBMS streaming is important to ensure a consistent user experience. An UE may switch between one and the other depending on certain circumstances, e.g. changing between a PSS and MBMS coverage etc., or triggered by specific user action, e.g. trick play, etc. + +It is assumed that the UE has an already established PSS or MBMS session and is capable of switching to the other delivery method. + +Clause 8.4.2 gives the different cases and scenarios for switching between PSS and MBMS . + +### 8.4.2 PSS - MBMS Switching + +In the case of hybrid PSS-MBMS switching, it is distinguished between: + +(a) switching from MBMS streaming to PSS streaming: + +- Without channel change e.g. when a user is viewing an MBMS user service and moves out of MBMS coverage, or the user initiates trick play mode action, etc. +- With channel change e.g. changing to a channel only available on PSS. + +(b) switching from PSS streaming to MBMS streaming: + +- Without channel change e.g. the user returns back from trick play mode to a normal MBMS user service, etc. +- With channel change e.g. changing to a channel available on MBMS. + +### 8.4.3 Switching from MBMS streaming to PSS streaming + +According to clause 8.3.3 an MBMS streaming session was initiated and the UE is receiving the MBMS session from the BM-SC/UPF. + +In order to switch from MBMS to unicast reception of a stream via PSS e.g. for allowing trick play mode, a SIP Re-INVITE is issued by the UE. An SDP offer and Request-URI shall be included according to clause 8.2.3. + +After receiving the 200 OK, the UE leaves the multicast channel and starts playback. + +![Sequence diagram for IMS Hybrid PSS-MBMS-to-PSS content switching. Lifelines: UE, IM CN Subsystem, SCF, BM-SC-UPF, PSS adapter, PSS Server. The sequence starts with a thick black bar labeled R P (M B M S) between UE and BM-SC-UPF. The UE sends a SIP Re-INVITE (SDP) to the IM CN Subsystem, which forwards it to the SCF. The SCF sends a SIP INVITE (SDP) to the BM-SC-UPF, which then sends an R SP DESCRIBE to the PSS adapter. The PSS adapter responds with R SP SDP, R SP SETUP(s), and R SP 200 OK(s) to the BM-SC-UPF. The BM-SC-UPF sends a SIP 200 OK to the SCF, which then sends a SIP 200 OK to the IM CN Subsystem. The IM CN Subsystem sends a SIP 200 OK (SDP, Session ID, URI) to the UE. The UE then sends an R SP PLA to the PSS adapter, which responds with R SP PLA and R SP 200 OK to the UE. Finally, a thick black bar labeled R P (P S S) is shown between the UE and the PSS adapter.](40a8c30f7ea5ecea4912e040c97c5b9c_img.jpg) + +Sequence diagram for IMS Hybrid PSS-MBMS-to-PSS content switching. Lifelines: UE, IM CN Subsystem, SCF, BM-SC-UPF, PSS adapter, PSS Server. The sequence starts with a thick black bar labeled R P (M B M S) between UE and BM-SC-UPF. The UE sends a SIP Re-INVITE (SDP) to the IM CN Subsystem, which forwards it to the SCF. The SCF sends a SIP INVITE (SDP) to the BM-SC-UPF, which then sends an R SP DESCRIBE to the PSS adapter. The PSS adapter responds with R SP SDP, R SP SETUP(s), and R SP 200 OK(s) to the BM-SC-UPF. The BM-SC-UPF sends a SIP 200 OK to the SCF, which then sends a SIP 200 OK to the IM CN Subsystem. The IM CN Subsystem sends a SIP 200 OK (SDP, Session ID, URI) to the UE. The UE then sends an R SP PLA to the PSS adapter, which responds with R SP PLA and R SP 200 OK to the UE. Finally, a thick black bar labeled R P (P S S) is shown between the UE and the PSS adapter. + +Figure 18: IMS Hybrid PSS-MBMS-to-PSS content switching + +#### 8.4.3.1 Combined Session establishment + +##### 8.4.3.1.1 Procedures at the UE + +When the UE switches from an MBMS User Service to a PSS user service, the UE sends a session modification request, i.e. SIP re-INVITE, with an SDP Offer and Request-URI. + +The Request-URI is related to the PSS session that the user wishes to activate. The Request-URI shall be composed of a user and domain part as defined in clause 8.2.3.2. + +The SDP offer shall include previously negotiated media descriptions with the port set to zero and two or more additional media descriptions: one for media control channel (i.e. RTSP control channel) and one or more for media delivery channel (i.e. delivery channel for the unicast streams). + +The RTSP control media descriptor shall follow TS 24.229 [7]. The SDP offer for media delivery shall be identical to the previous SDP offer done for broadcast in term of codecs and transport protocol. + +The UE may record the media offset for the MBMS user service. + +When receiving SIP 200 OK response, the UE shall setup a media control channel with the PSS Adapter, and setup a media delivery channel with PSS Server according to the SDP answer. The UE shall send RTSP PLAY message to start the delivery of the media streams. + +##### 8.4.3.1.2 Procedures at the IM CN Subsystem + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +#### 8.4.3.1.3 Procedures at the SCF + +When receiving the SIP modification request, the SCF will determine if the programme currently broadcasted has MBMS to PSS switching support. + +NOTE: The SCF may determine whether the SIP modification request is for MBMS to PSS switching according to the addition of the RTSP media control channel or unicast media delivery channel in the SDP offer. + +If MBMS to PSS switching is not available for the UE, the session modification is rejected and the old MBMS session (along with the previous reserved resources) is maintained. + +If MBMS to PSS switching is available for the UE, the SCF acting as a B2BUA, shall: + +- Handle the SIP modification request as defined in clause 8.2.3.4; +- If the Request-URI contains a content identifier in the user part and a domain name in the domain part, the SCF shall select a suitable PSS adapter and generate a SIP INVITE request to the selected PSS adapter. The To header of the SIP INVITE request shall contain the same content identifier as in the Request-URI of the SIP modification request received from the UE; +- Send the SIP INVITE request to the PSS Adapter with the SDP parameters for the content control channel of RTSP, and for the media delivery channel of unicast streams. The SCF shall precise the content identifier in the user part of the Request-URI. + +When sending the SIP INVITE message to PSS Adapter, SCF shall follow the procedures defined in TS 24.229 [7] concerning the AS acting as B2BUA. + +#### 8.4.3.1.4 Procedures at the PSS Adapter + +When receiving a SIP INVITE request from SCF, as well as receiving RTSP 200 OK message from PSS Server, the PSS Adapter shall conform to clause 8.2.3.5. + +Prior to replying, the PSS Adapter uses real time to calculate the media offset for the MBMS user service when replying with the offered media. + +When receiving RTSP message from UE, the PSS Adapter shall conform to clause 8.2.4.2. + +#### 8.4.3.1.5 Procedures at the PSS Server + +The procedures at the PSS Server shall conform to those defined in 3GPP TS 26.234 [8]. + +#### 8.4.3.2 Combined session teardown + +The combined session teardown shall conform to clause 8.2.6. + +### 8.4.4 Switching from PSS streaming to MBMS streaming + +According to clause 8.2.2 a PSS streaming session was initiated and the UE is receiving the PSS session from the PSS server. + +In order to switch from PSS to MBMS reception of a stream, a SIP Re-INVITE is issued by the UE and sent to the SCF. The SCF shall act as a B2BUA, and send a SIP BYE message to PSS Adapter to terminate the SIP session between them. The PSS Adapter shall send a RTSP TEARDOWN message to PSS Server to release the RTSP session. + +Once the UE receives the SIP 200 OK response, it can activate the corresponding MBMS User Service as described in the SDP as defined in clause 8.3.3.2. + +After switching to MBMS reception, the PSS session shall be terminated. + +![Sequence diagram for IMS PSS-to-MBMS content switching. Lifelines: UE, IM CN Subsystem, SCF, BM-SC-UPF, PSS adapter, PSS server. The sequence starts with a thick horizontal line labeled R P (P S S) across all lifelines. The UE sends a SIP Re-INVITE (SDP) to the IM CN Subsystem, which forwards it to the SCF. The SCF sends a SIP BYE to the PSS adapter, which sends an R S P E A R D O W N to the PSS server. The PSS server responds with an R S P 2 0 0 O K to the PSS adapter, which then sends a SIP 2 0 0 O K to the SCF. The SCF sends a SIP 2 0 0 O K (SDP) to the IM CN Subsystem, which finally sends it to the UE. The sequence ends with a thick horizontal line labeled R P (M B M S) across all lifelines.](0a73b03fba21af142d619a9a662e6490_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM_CN Subsystem + participant SCF + participant BM-SC-UPF + participant PSS_adapter + participant PSS_server + + Note left of UE: R P (P S S) + UE->>IM_CN Subsystem: SIP Re-INVITE (SDP) + IM_CN Subsystem->>SCF: SIP Re-INVITE + SCF->>PSS_adapter: SIP BYE + PSS_adapter->>PSS_server: R S P E A R D O W N + PSS_server-->>PSS_adapter: R S P 2 0 0 O K + PSS_adapter-->>SCF: SIP 2 0 0 O K + SCF-->>IM_CN Subsystem: SIP 2 0 0 O K (SDP) + IM_CN Subsystem-->>UE: SIP 2 0 0 O K (SDP) + Note left of UE: R P (M B M S) + +``` + +Sequence diagram for IMS PSS-to-MBMS content switching. Lifelines: UE, IM CN Subsystem, SCF, BM-SC-UPF, PSS adapter, PSS server. The sequence starts with a thick horizontal line labeled R P (P S S) across all lifelines. The UE sends a SIP Re-INVITE (SDP) to the IM CN Subsystem, which forwards it to the SCF. The SCF sends a SIP BYE to the PSS adapter, which sends an R S P E A R D O W N to the PSS server. The PSS server responds with an R S P 2 0 0 O K to the PSS adapter, which then sends a SIP 2 0 0 O K to the SCF. The SCF sends a SIP 2 0 0 O K (SDP) to the IM CN Subsystem, which finally sends it to the UE. The sequence ends with a thick horizontal line labeled R P (M B M S) across all lifelines. + +Figure 19: IMS PSS-to-MBMS content switching + +#### 8.4.4.1 Combined Session establishment + +##### 8.4.4.1.1 Procedures at the UE + +When the UE switches from a PSS User Service to an MBMS user service, the UE sends a session modification request, i.e. SIP re-INVITE, an SDP offer shall be included according to clause 8.3.3. The SDP offer for media delivery shall be identical to the previous SDP offer done for PSS in term of codecs and transport protocol. + +Once the UE receives the SIP 200 OK response, it can activate the corresponding MBMS User Service as described in the SDP as defined in clause 8.3.3.2. MBMS User Service reception initiation may correspond to the MBMS Broadcast Mode activation procedure as described in 3GPP TS 23.246 [4], clause 8.12 or the MBMS Multicast Mode activation procedure as described in 3GPP TS 23.246 [4], clause 8.2. + +##### 8.4.4.1.2 Procedures at the IM CN Subsystem + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +##### 8.4.4.1.3 Procedures at the SCF + +When receiving the SIP modification request, the SCF will determine if the content currently delivered has PSS to MBMS switching support. + +If PSS to MBMS switching is not available for the UE, the session modification is rejected and the old PSS session (along with the previous reserved resources) is maintained. + +If PSS to MBMS switching is available for the UE, the SCF shall act as a B2BUA, and send a SIP BYE message to the PSS Adapter to terminate the SIP session between them. When sending the SIP BYE message to PSS Adapter, SCF shall follow the procedures defined in TS 24.229 [7] concerning the AS acting as B2BUA. + +Once receiving a SIP 200 OK message from PSS Adapter, SCF sends a SIP 200 OK message to UE with a SDP answer + +as defined in clause 8.3.3.4. + +#### 8.4.4.1.4 Procedures at the PSS Adapter + +When receiving a SIP BYE message from SCF, as well as receiving RTSP 200 OK message from PSS Server, the PSS Adapter shall conform to clause 8.2.6.5. + +#### 8.4.4.1.5 Procedures at the PSS Server + +The procedures at the PSS Server shall conform to those defined in 3GPP TS 26.234 [8]. + +#### 8.4.4.2 Combined session teardown + +The combined session teardown shall conform to clause 8.3.5. + +--- + +## 9 Policy and charging control + +### 9.1 General + +For the purpose of the present specification, the policy and charging control (PCC) is according to 3GPP TS 23.203 [12]. This clause is relevant when PCC is present. However, IMS based PSS and MBMS User Services can be realized without PCC. When PCC is not present, the UE is responsible for allocation of the resources based on Session Description information. + +Service subscription control is performed by the SCF at registration and at PSS and MBMS session initiation. + +QoS control is different for PSS and MBMS User Services. + +### 9.2 QoS control + +The P-CSCF is used as the Application Function in the PCC architecture. The PCRF decides how policy control of the QoS is performed for IMS initiated and controlled PSS and MBMS User Service. + +In case of PSS, the PCRF shall use the SDP received from the P-CSCF during session establishment to calculate the proper QoS authorization. The way the QoS is enforced in this architecture is defined in 3GPP TS 23.203 [12]. + +In case of MBMS, the PCRF shall not initiate the establishment of a specific bearer. + +![Sequence diagram for PSS QoS Policy Control showing interactions between UE, RAN, GW, PCRF, P-CSCF, S-CSCF, SCF, PSS adapter, and PSS Server.](2cf3896394a2342a2b46c504ab9a8830_img.jpg) + +``` + +sequenceDiagram + participant UE + participant RAN + participant GW + participant PCRF + participant P-CSCF + participant S-CSCF + participant SCF + participant PSS_adapter as PSS adapter + participant PSS_Server as PSS Server + + Note left of UE: Resource allocation + + UE->>P-CSCF: SIP INVITE (Request-URI, SDP) + P-CSCF->>S-CSCF: SIP INVITE + S-CSCF->>SCF: SIP INVITE + SCF->>PSS_adapter: SIP INVITE + PSS_adapter->>PSS_Server: R SP DESCRIBE + PSS_Server-->>PSS_adapter: R SP SDP + PSS_adapter->>PSS_Server: R SP SETUP(s) + PSS_Server-->>PSS_adapter: R SP 200 OK(s) + PSS_adapter->>SCF: SIP 200 OK (SDP) + SCF->>S-CSCF: SIP 200 OK (SDP) + S-CSCF->>P-CSCF: SIP 200 OK (SDP) + P-CSCF->>PCRF: Diameter AR + PCRF->>P-CSCF: Diameter AR + P-CSCF->>UE: SIP 200 OK (SDP, Session ID, URI) + UE->>GW: Diameter RAR + GW->>PCRF: Diameter RAA + Note right of UE: Establish CP Connection for R SP + UE->>PSS_adapter: R SP PLA + PSS_adapter->>PSS_Server: R SP PLA + PSS_Server-->>PSS_adapter: R SP 200 OK + PSS_adapter->>UE: R SP 200 OK + Note bottom: R P + +``` + +Sequence diagram for PSS QoS Policy Control showing interactions between UE, RAN, GW, PCRF, P-CSCF, S-CSCF, SCF, PSS adapter, and PSS Server. + +**Figure 20: PSS QoS Policy Control** + +NOTE: The sequence shown is simplified and does not e.g. show session progress messages and the ACK message from the UE in response to the reception of 200 OK. + +The PSS case of QoS control is shown on figure 20. The appropriate existing bearers are used or new required bearers are allocated. Network initiated bearer control and UE initiated bearer control are possible. When receiving the final SDP, the UE shall initiate the establishment of the required bearers unless a network initiated bearer allocation procedure is already ongoing, or the UE has been configured to use network initiated resource control. + +## 10 Security Procedures + +### 10.1 General + +Different security procedures apply for IMS, MBMS and PSS. + +IMS level authentication and access security is performed during IMS registration in accordance to [7]. + +PSS-Only: PSS defines an optional confidentiality protection of individual RTP payloads used in a streaming session. If PSS confidentiality protection as defined in 3GPP TS 26.234 [8], Annex K. is used, then the terminal initiates the GAA/GBA Bootstrapping procedure 3GPP TS 33.220 [26] after a successful IMS registration and Service discovery. + +MBMS-only and combined PSS/MBMS service offerings: MBMS security is based on GAA/GBA [26]. The GAA/GBA Bootstrapping procedure is initiated by the UE after a successful IMS registration and Service discovery. It is necessary before any service description retrieval and session initiation. + +GBA (see 3GPP TS 33.220 [26]) is used to generate a master key Ks from which NAF specific keys (e.g. Ks\_NAF for ME based key management) can be derived when needed. It is also used to authenticate the user for signaling that is not performed via the IMS core network (e.g. HTTP based service description retrieval). + +GBA is also used to generate and provision the NAF keys (e.g. Ks\_NAF for ME based key management) - which is the Long Term Key that is used in content encryption/decryption procedures – and the B-TID – which is the corresponding bootstrapping transaction identifier. + +![Sequence diagram of the GBA/GAA Bootstrapping procedure. The diagram shows four lifelines: USIM/ISIM, ME, BSF, and HSS. The sequence of messages is: 1. ME sends an HTTP REQ (User ID) to BSF. 2. BSF sends an AV Req to HSS. 3. HSS sends an AV Resp to BSF. 4. BSF sends an HTTP 401 (RAND+ AUTN) to ME. 5. USIM/ISIM sends a RAND+ AUTN to ME. 6. ME sends a RES to USIM/ISIM. 7. ME sends an HTTP REQ (RES) to BSF. 8. BSF sends a 200 OK (B-TID) to ME.](d7948c38a18636aefecdd95388196460_img.jpg) + +``` + +sequenceDiagram + participant ME + participant BSF + participant HSS + participant USIM/ISIM + Note left of USIM/ISIM: USIM/ISIM + ME->>BSF: HTTP REQ (User ID) + BSF->>HSS: AV Req + HSS-->>BSF: AV Resp + BSF-->>ME: HTTP 401 (RAND+ AUTN) + USIM/ISIM->>ME: RAND+ AUTN + ME-->>USIM/ISIM: RES + ME->>BSF: HTTP REQ (RES) + BSF-->>ME: 200 OK (B-TID) + +``` + +Sequence diagram of the GBA/GAA Bootstrapping procedure. The diagram shows four lifelines: USIM/ISIM, ME, BSF, and HSS. The sequence of messages is: 1. ME sends an HTTP REQ (User ID) to BSF. 2. BSF sends an AV Req to HSS. 3. HSS sends an AV Resp to BSF. 4. BSF sends an HTTP 401 (RAND+ AUTN) to ME. 5. USIM/ISIM sends a RAND+ AUTN to ME. 6. ME sends a RES to USIM/ISIM. 7. ME sends an HTTP REQ (RES) to BSF. 8. BSF sends a 200 OK (B-TID) to ME. + +**Figure 21: GBA/GAA Bootstrapping procedure** + +Figure 21 illustrates the GBA/GAA bootstrapping procedure. The following steps are performed. See [26] for details: + +- The UE sends a request to the BSF with its IMPI as User ID. The UE discovers the address of the BSF as specified in [26]. +- The BSF then acquires one Authentication Vector from the HSS and may acquire the User's GUSS (GBA User Security Settings) and forwards the RAND and AUTN to the UE in the HTTP 401 message. +- The UE checks AUTN to verify that the challenge is from an authorised network. +- The UE sends another HTTP request, containing the Digest AKA response (calculated using RES), to the BSF. +- The BSF authenticates the UE by verifying the Digest AKA response. The BSF shall send a 200 OK message, including a B-TID, to the UE to indicate the success of the authentication. + +If UICC based MBMS key management is required, then USIM shall be used. Otherwise either USIM or ISIM may be used. + +NOTE: The reason for this is that UICC based MBMS key management is currently specified only for USIM. + +## 10.2 Secure Service Description Retrieval + +The Service Description retrieval procedure allows the UE to acquire the necessary information to select and initiate PSS and/or MBMS sessions using IMS procedures. See clause 7 for more details on this procedure. + +![Sequence diagram illustrating Service Description retrieval with authentication. The diagram shows three participants: UE, SSF, and BSF. The sequence of messages is: 1. UE sends HTTP REQ USD (B-TID) to SSF. 2. SSF sends AUTH Req. (B-TID) to BSF. 3. BSF sends AUTH Resp. (KS_NAF) to SSF. 4. SSF sends HTTP 401 (MD5 Challenge) to UE. 5. UE sends HTTP REQ USD (B-TID, PW=MD5(KS_NAF)) to SSF. 6. SSF sends HTTP 200 OK to UE.](3337af75dfee8af7687b4f49914d6c93_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SSF + participant BSF + Note left of UE: Error: + UE->>SSF: HTTP REQ USD (B-TID) + SSF->>BSF: AUTH Req. (B-TID) + BSF-->>SSF: AUTH Resp. (KS_NAF) + SSF-->>UE: HTTP 401 (MD5 Challenge) + UE->>SSF: HTTP REQ USD (B-TID, PW=MD5(KS_NAF)) + SSF-->>UE: HTTP 200 OK + +``` + +Sequence diagram illustrating Service Description retrieval with authentication. The diagram shows three participants: UE, SSF, and BSF. The sequence of messages is: 1. UE sends HTTP REQ USD (B-TID) to SSF. 2. SSF sends AUTH Req. (B-TID) to BSF. 3. BSF sends AUTH Resp. (KS\_NAF) to SSF. 4. SSF sends HTTP 401 (MD5 Challenge) to UE. 5. UE sends HTTP REQ USD (B-TID, PW=MD5(KS\_NAF)) to SSF. 6. SSF sends HTTP 200 OK to UE. + +**Figure 22: Service Description retrieval with authentication** + +Figure 22 describes the Service Description retrieval procedure with authentication. + +The UE requesting a service description towards the SSF (acting as a GBA Network Application Function (NAF)) shall include the B-TID corresponding to the Ks established during the bootstrapping procedure. When the SSF receives the service description request, it shall trigger an authentication request towards the BSF to acquire the NAF keys ( e.g. Ks\_NAF for ME based key management) of the user if the SSF does not already have the NAF keys available. The SSF shall trigger HTTP digest authentication procedure towards the UE in accordance with 3GPP TS 33.222 [20]. + +The SSF shall use TLS to encrypt the Service Description during retrieval. + +## 10.3 PSS Authentication and Content encryption + +Void (TBD). + +## 10.4 MBMS Security procedures + +The IMS based MBMS user service security procedures shall fulfil the key management procedures defined in TS 33.246 [5], including MSK procedures in clause 6.3.2 of TS 33.246 [5], and MTK procedures in clause 6.3.3 of TS 33.246 [5]. The MSK procedure further includes MBMS user service registration procedure, deregistration procedure, MSK request procedure and MSK delivery procedure. + +Clause 10.4.1 describes MBMS security procedures where HTTP is used as described in TS 33.246 [5], and BMSC.UPF acts as NAF to interact with BSF and derives security keys. + +Clause 10.4.2 describes MBMS security procedures where SIP is used and SCF act as a NAF to interact with BSF and derives security keys. + +The procedures according to clause 10.4.1 and clause 10.4.2, respectively, are alternatives for MBMS security procedures. They are equal in terms of security provision. The UE shall support both alternatives for MBMS security procedures. The UE is informed about the supported MBMS security procedure by retrieval of the service attachment information from the SDF as defined in Annex H. + +### 10.4.1 HTTP based MBMS security procedure + +Clause 10.4.1 describes MSK procedures, and clause 10.4.2 describes MTK procedures. + +#### 10.4.1.1 MSK procedures + +The IMS based MBMS user service registration procedure, deregistration procedure, MSK request procedure and MSK delivery procedure are defined in clause 10.4.1 to 10.4.4 respectively. + +#### 10.4.1.1.1 IMS based MBMS user service key registration procedure + +![Sequence diagram illustrating the IMS based MBMS user service key registration procedure. The diagram shows interactions between five entities: U.E., IM CN Subsystem, S.C.F., B.M.S.C.U.P.F., and B.S.F. The sequence of messages is: 1. SIP INVITE from U.E. to IM CN Subsystem; 2. SIP INVITE from IM CN Subsystem to S.C.F.; 3. Authorization Ntf from S.C.F. to B.M.S.C.U.P.F.; 4. Authorization ack from B.M.S.C.U.P.F. to S.C.F.; 5. SIP 200 OK from S.C.F. to IM CN Subsystem; 6. SIP 200 OK from IM CN Subsystem to U.E.; 7. HTTP Key Registration from U.E. to B.M.S.C.U.P.F.; 8. AUTH REQ from B.M.S.C.U.P.F. to B.S.F.; 9. AUTH RSP from B.S.F. to B.M.S.C.U.P.F.; 10. HTTP 200 OK from B.M.S.C.U.P.F. to U.E.; 12. R P/MIKEY from U.E. to B.M.S.C.U.P.F. (indicated by a thick line).](03d9aaba6c1af8bfd8e42c1d2422ae5c_img.jpg) + +``` + +sequenceDiagram + participant U.E. + participant IM CN Subsystem + participant S.C.F. + participant B.M.S.C.U.P.F. + participant B.S.F. + + U.E.>>IM CN Subsystem: 1 SIP INVITE + IM CN Subsystem->>S.C.F.: 2 SIP INVITE + S.C.F.->>B.M.S.C.U.P.F.: 3 Authorization Ntf + B.M.S.C.U.P.F.->>S.C.F.: 4 Authorization ack + S.C.F.->>IM CN Subsystem: 5 SIP 200 OK + IM CN Subsystem->>U.E.: 6 SIP 200 OK + U.E.->>B.M.S.C.U.P.F.: 7 HTTP Key Registration + B.M.S.C.U.P.F.->>B.S.F.: 8 AUTH REQ + B.S.F.->>B.M.S.C.U.P.F.: 9 AUTH RSP + B.M.S.C.U.P.F.->>U.E.: 10 HTTP 200 OK + Note over U.E., B.M.S.C.U.P.F.: 12 R P/MIKEY + +``` + +Sequence diagram illustrating the IMS based MBMS user service key registration procedure. The diagram shows interactions between five entities: U.E., IM CN Subsystem, S.C.F., B.M.S.C.U.P.F., and B.S.F. The sequence of messages is: 1. SIP INVITE from U.E. to IM CN Subsystem; 2. SIP INVITE from IM CN Subsystem to S.C.F.; 3. Authorization Ntf from S.C.F. to B.M.S.C.U.P.F.; 4. Authorization ack from B.M.S.C.U.P.F. to S.C.F.; 5. SIP 200 OK from S.C.F. to IM CN Subsystem; 6. SIP 200 OK from IM CN Subsystem to U.E.; 7. HTTP Key Registration from U.E. to B.M.S.C.U.P.F.; 8. AUTH REQ from B.M.S.C.U.P.F. to B.S.F.; 9. AUTH RSP from B.S.F. to B.M.S.C.U.P.F.; 10. HTTP 200 OK from B.M.S.C.U.P.F. to U.E.; 12. R P/MIKEY from U.E. to B.M.S.C.U.P.F. (indicated by a thick line). + +**Figure 23: Security procedures for IMS based MSMS user service** + +##### 10.4.1.1.1.1 Procedures at the UE + +When the user indicates to view an MBMS user service, the UE shall send a SIP INVITE message to SCF via IM CN Subsystem. The SIP INVITE message shall include MBMS Service ID to indicate which service the user intends to watch, as defined in clause 8.3.3.2, and a P-Preferred-Identity header with the value set to the desired user public identity. + +After receiving a SIP 200 OK message, the UE shall perform MSK registration procedure as defined in clause 6.3.2.1a of TS 33.246[5]. The HTTP POST message initiated by the UE and addressed to BMSC.UPF shall conform to TS 33.246[5], and include an HTTP X-3GPP- Intended -Identity header as defined in TS 24.109 [22] with the value set to the user's public identity. + +##### 10.4.1.1.1.2 Procedures at the IM CN Subsystem + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +##### 10.4.1.1.1.3 Procedures at the SCF + +Upon receipt of a SIP INVITE request, the SCF shall perform service authorization procedure as defined in clause 8.3.3.4. + +After successfully service authorization, the SCF shall send an Authorization Notification HTTP POST message to BMSC.UPF. The HTTP POST message shall be populated as follows: + +- the HTTP version shall be 1.1 which is specified in RFC2616 [34]; +- the base of the Request-URI shall contain the full BM-SC key management URI (e.g. ); +- the Request-URI shall contain an URI parameter "requesttype" that shall be set to "authorize", i.e. Request-URI takes the form of "/keymanagement?requesttype= authorize"; + +- the HTTP X-3GPP-Asserted-Identity header shall be the IMPU of the user retrieved from the SIP INVITE message. +- the HTTP header Content-Type shall be the MIME type of the payload, i.e. "application/mbms-authorize+xml". +- the HTTP payload shall contain request including the authorized MBMS Service ID ServiceId carried in the SIP INVITE message; + +After receiving an authorization acknowledgement, the SCF shall send a SIP 200 OK message to the UE as defined in clause 8.3.3.4. + +#### 10.4.1.1.1.4 Procedures at the BM-SC.UPF + +Upon receiving an Authorization Notification message from SCF, the BMSC.UPF shall store the received message, and respond an Authorization Acknowledgment HTTP 200 OK message. + +Upon receiving MSK registration message from a UE, the BMSC.UPF shall act as a NAF and perform GBA usage procedure with BSF to get GBA keys to derive MUK. The MUK is used for BM-SC.UPF to protect the transfer of MSK. + +The BMSC.UPF shall authorize the UE according to the stored information. The BMSC.UPF shall send MSKs to the UE corresponding to the service IDs in the received message via MIKEY, as defined in clause 6.3.2.1a of TS 33.246[5]. + +#### 10.4.1.1.2 IMS based MBMS user service key deregistration procedure + +The IMS based MBMS user service MSK request procedure conforms to clause 6.3.2.1B of TS 33.246[5]. Additionally, The HTTP POST message initiated by the UE and addressed to BMSC.UPF shall include an HTTP X-3GPP- Intended -Identity header as defined in TS 24.109 [22] with the value set to the user's public identity. + +#### 10.4.1.1.3 IMS based MBMS user service MSK request procedure + +The IMS based MBMS user service MSK request procedure conforms to clause 6.3.2.2 of TS 33.246[5]. Additionally, The HTTP POST message initiated by the UE and addressed to BMSC.UPF shall include an HTTP X-3GPP- Intended -Identity header as defined in TS 24.109 [22] with the value set to the user's public identity. + +#### 10.4.1.1.4 IMS based MBMS user service MSK delivery procedure + +The IMS based MBMS user service MSK delivery procedure conforms to clause 6.3.2.3 of TS 33.246[5]. + +#### 10.4.1.2 MTK procedure + +The IMS based MBMS user service MTK procedure conforms to clause 6.3.3 of TS 33.246[5]. + +### 10.4.2 SIP based MBMS security procedures + +#### 10.4.2.0 General + +Clause 10.4.2 describes an alternative to clause 10.4.1 for MBMS security procedures, where the NAF for the MBMS User Services is implemented in the SCF and interacts with the BSF. The procedures apply for both ME and UICC based key management. + +The MBMS Security specification 3GPP TS 33.246 [5] defines a set of security procedures. The following list describes how these procedures are applied in the context of IMS based MBMS user services when using SIP based MBMS security procedures. + +- “MBMS User Service Registration procedure”. + - In the context of SIP based MBMS security procedure, this procedure is applied as specified in clause 10.4.2.1 in the present document. +- “MBMS User Service Deregistration procedure”. + - In the context of SIP based MBMS security procedure, this procedure is applied as specified in clause 10.4.2.1A in the present document. +- “Basic MSK request procedure”. + +- In the context of SIP based MBMS security procedure, this procedure is applied as specified in clause 10.4.2.2 in the present document. +- “Missed key update procedure”. +- This procedure is equivalent to Basic MSK request procedure. +- “BM-SC solicited pull procedure”. +- In the context of SIP based MBMS security procedure, this procedure is applied as specified in clause 10.4.2.4 in the present document. +- “MSK delivery procedure” +- In the context of SIP based MBMS security procedure, this procedure is applied as defined TS 33.246 [5] with exception that SCF FQDN is sent instead of BM-SC FQDN. +- “MTK update procedure” +- In the context of SIP based MBMS user services this procedure is applied as defined TS 33.246 [5]. + +#### 10.4.2.1 SIP based MBMS User Service Registration + +This procedure is used to register a UE with one or more MBMS User Services. + +It is assumed that the UE has received the service description (cf. clause 10.2). The service description includes, e.g. the service protection description. The service protection description is similar as defined in 3GPP TS 33.246 [5] with the following exception: the FQDN of the BM-SC is not included in the service protection description. Instead, the service protection description for the service shall include an FQDN belonging to the SCF as the SCF acts as a NAF. + +NOTE 1: This is to ensure consistent NAF key derivation in the UE and in the BSF as the SCF acts as a NAF and as the FQDN of the NAF is used as input in NAF key derivation. + +In case more than one BM-SCs are connected to the SCF, the SCF shall locally associate a different one of its FQDNs to each connected BM-SC. As there is one NAF FQDN indicated in the service protection description for each service, the SCF (NAF) will know from the *userServiceId* indicated by the UE which NAF FQDN to be used for NAF key derivation. + +NOTE 2: This will ensure that each connected BM-SC will get different NAF key, and consequently will get different MUK. GBA TS 33.220 [26] allows the NAF to be known in DNS under several FQDNs if it is ensured that the correct NAF FQDN is used in NAF key derivation. + +It is also assumed that the UE has been registered and authenticated to IMS and the SIP procedures are protected according to 3GPP TS 33.203 [31], and that the UE has run GBA bootstrapping with the BSF as defined in 3GPP TS 33.220 [26]. It is also assumed that the network interfaces are protected with Network Domain Security (NDS/IP) as defined in 3GPP TS 33.210 [32]. + +![Sequence diagram for SIP based MBMS User Service Registration. Lifelines: UE, IM CN, SCF, BSF, BM-SC. The process involves GBA bootstrapping, SIP INVITE, AUTH REQ/RSP, HTTP POST, SIP 200 OK, and MIKEY messages.](56a5265d174ce056c1dbe5e7a60839fc_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN + participant SCF + participant BSF + participant BM-SC + + Note over UE, BSF: GBA bootstrapping: Ks, B-TID + UE->>IM CN: SIP INVITE +Msg body: [userServiceId, B-TID] + IM CN->>SCF: SIP INVITE +Msg body: [userServiceId, B-TID] + SCF->>BSF: AUTH REQ +[NAF-Id, B-TID] + BSF-->>SCF: AUTH RSP +[NAF key] + SCF->>BM-SC: HTTP POST +Msg body: [userServiceId, UE IP address, NAF FQDN, B-TID, MUK, MUK lifetime] + BM-SC-->>SCF: HTTP 200 OK +Msg body: [userServiceId Status codes] + SCF-->>IM CN: SIP 200 OK +Msg body: [userServiceId Status codes] + IM CN-->>UE: SIP 200 OK +Msg body: [userServiceId Status codes] + SCF->>UE: MIKEY +[IDi: NAF FQDN, IDr: B-TID +MSK protected with MUK] + SCF->>UE: MIKEY MTK (protected with MSK) + SCF->>UE: MBMS Data (protected with MTK) + +``` + +Sequence diagram for SIP based MBMS User Service Registration. Lifelines: UE, IM CN, SCF, BSF, BM-SC. The process involves GBA bootstrapping, SIP INVITE, AUTH REQ/RSP, HTTP POST, SIP 200 OK, and MIKEY messages. + +**Figure 24: SIP based MBMS User Service Registration** + +The procedure is as follows (cf. figure 24 which is simplified as it does not show all parameters): + +- The UE sends a SIP INVITE to the SCF via the IM CN subsystem. The INVITE indicates SCF in the Request-URI and the message includes the identities of the requested MBMS user services (userServiceIds) for which the UE wants to register and the bootstrapping transaction identifier (B-TID) in the body of the SIP INVITE. The XML schema for the list of MBMS user service IDs is defined in TS 26.346 [11] and the XML schema for the B-TID is defined in annex I.1. +- The SCF receives the IP address of the UE and the asserted identitie(s) of the UE from the headers of the SIP INVITE message. The SCF performs a check based on stored subscription information whether the UE is authorized to access the requested MBMS user services. If yes, the procedure continues. If not, the procedure is terminated. +- If there is no B-TID stored for the UE or if the received B-TID is different than the one stored for the UE, the SCF runs GBA usage procedure with the BSF over Zn to fetch the NAF keys corresponding to the UE as defined in 3GPP TS 33.220 [26]. The NAF-Id which the SCF uses over Zn is constructed from the NAF FQDN indicated in the service protection description for this service and Ua security protocol identifier specified in 3GPP TS 33.220 [26]. As there is one NAF FQDN indicated in the service protection description for each service, the SCF will know from the userServiceId indicated by the UE which FQDN to be used as NAF FQDN. Upon receiving the NAF keys from the BSF, the SCF derives MBMS User Key (MUK) as defined in TS 33.246 [5]. If the received B-TID is not valid or if the SCF desires the UE to make a new GBA bootstrapping, the SCF shall response to the UE with an appropriate error message. The error message will trigger the UE to run new GBA bootstrapping. +- The SCF sends a HTTP POST message to the BM-SC. The SCF populates the HTTP POST as follows: + +- the HTTP version shall be 1.1 which is specified in RFC 2616 [34]; + - the base of the Request-URI shall contain the full BM-SC key management URI (e.g. ); + - the Request-URI shall contain an URI parameter "requesttype" that shall be set to "sip-based-register", i.e. Request-URI takes the form of "/keymanagement?requesttype= sip-based-register "; + - the SCF may add additional URI parameters to the Request-URI; + - X-3GPP-Asserted-Identity header which includes the identitie(s) of the UE; + - the HTTP header Content-Type shall be the MIME type of the payloads; + - the HTTP payload shall contain an XML document including a list of one or more userServiceIds of MBMS User Services to which the UE wants to register, IP address of the UE, MBMS user key (MUK), lifetime of MUK, NAF FQDN and B-TID. NAF FQDN and B-TID are included as they are further included in the MIKEY MSK messages from the BM-SC to the UE to identify the used MUK (i.e. NAF key). The XML schema for the list of MBMS user service IDs is defined in TS 26.346 [11] and the XML schema for carrying IP address, MUK, MUK lifetime, NAF FQDN and BTID is defined in annex x.2. + - the SCF may add additional HTTP headers to the HTTP POST request. +- Upon receiving the HTTP POST message, the BM-SC checks that the HTTP POST is valid, and extracts the request for further processing. As the HTTP POST message came from SCF with asserted identitie(s), the BM-SC does not need to authenticate the UE as the UE has been authenticated by the IMS. Also, the HTTP POST message also implicitly indicates to the BM-SC that the SCF has authorized the UE to register to the indicated MBMS User Service(s). + +The BM-SC stores the received information and returns HTTP 200 OK to the SCF. The BM-SC shall populate HTTP response as follows: + +- the HTTP status code in the HTTP status line shall be 200; +- the HTTP header Content-Type shall be the MIME type of the payload, i.e. "application/mbms-register-response+xml "; +- the HTTP payload shall contain an XML document including a list including one status code for each MBMS User Service. The XML schema of the payload is the same that is used for MBMS Registration in 3GPP TS 33.246 [5] and it is specified in 3GPP TS 26.346 [11]. +- Upon receiving the HTTP 200 OK., the SCF then includes the XML body from the HTTP 200 OK message into a SIP 200 OK message and sends the SIP 200 OK message to the UE via the IM CN subsystem. +- Upon receiving the 200 OK the UE derives NAF keys corresponding to the NAF-Id. The NAF-Id is constructed from the NAF FQDN indicated in the service description and Ua security protocol identifier specified in 3GPP TS 33.220 [26]. The UE derives MBMS User Key (MUK) from the NAF key as defined in 3GPP TS 33.246 [5]. + +BM-SC can now start sending MIKEY MSK messages (protected with MUK) to the UE as defined in 3GPP TS 33.246 [5]. In MIKEY MSK messages the BM-SC shall include the NAF FQDN and B-TID received from the SCF as they are used to identify the used MUK (i.e. NAF keys). + +#### 10.4.2.1a SIP based MBMS User Service De-registration + +This procedure is used to de-register a UE from one or more MBMS User Services. + +The same assumptions apply as in SIP based MBMS User Service Registration in clause 10.4.2.1. + +![Sequence diagram for SIP based MBMS User Service De-registration. Lifelines: UE, IM CN, SCF, BSF, BM-. The sequence starts with UE sending a SIP re-INVITE to IM CN. IM CN forwards it to SCF. SCF sends AUTH REQ to BSF, BSF responds with AUTH RSP. SCF sends HTTP POST to BM-. BM- responds with HTTP 200 OK. SCF sends SIP 200 OK to IM CN, which then sends it to UE.](575d7d345b3ec04393bb2ec720ebabca_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM_CN as IM CN + participant SCF + participant BSF + participant BM_ as BM- + + Note right of UE: Error: Reference source not found + + UE->>IM_CN: SIP re-INVITE +Msg body: [userServiceIds, B-TID] + IM_CN->>SCF: SIP re-INVITE +Msg body: [userServiceIds, B-TID] + SCF->>BSF: AUTH REQ + BSF-->>SCF: AUTH RSP + SCF->>BM_: HTTP POST +Msg body: [userServiceIds, ...] + BM_-->>SCF: HTTP 200 OK +Msg body: [userServiceId +Status codes] + SCF-->>IM_CN: SIP 200 OK +Msg body: [userServiceId +Status codes] + IM_CN-->>UE: SIP 200 OK +Msg body: [userServiceId +Status codes] + +``` + +Sequence diagram for SIP based MBMS User Service De-registration. Lifelines: UE, IM CN, SCF, BSF, BM-. The sequence starts with UE sending a SIP re-INVITE to IM CN. IM CN forwards it to SCF. SCF sends AUTH REQ to BSF, BSF responds with AUTH RSP. SCF sends HTTP POST to BM-. BM- responds with HTTP 200 OK. SCF sends SIP 200 OK to IM CN, which then sends it to UE. + +**Figure 24a: SIP based MBMS User Service De-registration** + +The procedure is as follows (cf. figure 24a which is simplified as it does not show all parameters): + +- UE sends a SIP re-INVITE to the SCF via the IM CN subsystem. The re-INVITE indicates SCF in the Request-URI and the message includes the identities of the requested MBMS user services (userServiceIds) from which the UE wants to de-register and the bootstrapping transaction identifier (B-TID) in the body of the SIP INVITE.. The XML schema for the list of MBMS user service IDs is defined in TS 26.346 [11] and the XML schema for the B-TID is defined in annex x.1. +- The SCF receives the asserted identitie(s) of the UE from the headers of the SIP re-INVITE message. +- If there is no B-TID stored for the UE or if the received B-TID is different than the one stored for the UE, the SCF runs GBA usage procedure with the BSF over Zn to fetch the NAF keys corresponding to the UE as defined in 3GPP TS 33.220 [26]. The NAF-Id which the SCF uses over Zn constructed from the NAF FQDN indicated in the service protection description for this service and Ua security protocol identifier specified in 3GPP TS 33.220 [26]. Upon receiving the NAF key from the BSF, the SCF derives MBMS User Key (MUK) as defined in 3GPP TS 33.246 [5]. + +If the received B-TID is not valid or if the SCF desires the UE to make a new GBA bootstrapping, the SCF shall response to the UE with an appropriate error message. The error message will trigger the UE to run new GBA bootstrapping. + +- The SCF sends a HTTP POST message to the BM-SC. The SCF populates the HTTP POST as follows: + - the HTTP version shall be 1.1 which is specified in RFC 2616 [34]; + - the base of the Request-URI shall contain the full BM-SC key management URI (e.g. http://bmsc.home1.net:1234); + - the Request-URI shall contain an URI parameter "requesttype" that shall be set to "sip-based-deregister", i.e. Request-URI takes the form of "keymanagement?requesttype= sip-based-deregister"; + - the SCF may add additional URI parameters to the Request-URI; + - X-3GPP-Asserted-Identity header which includes the identities of the UE; + - the HTTP header Content-Type shall be the MIME type of the payloads; + +- the HTTP payload shall contain the request an XML document including a list of one or more userServiceIds of MBMS User Services from which the UE wants to deregister. If new NAF keys were created in the previous step, then the SCF shall also include MBMS user key (MUK), lifetime of MUK, NAF FQDN and B-TID. E.g. the BM-SC may send an MSK message to invalidate the MSKs in the UE as defined in 3GPP TS 33.246 [5]. The XML schema for the list of MBMS user service IDs is defined in 3GPP TS 26.346 [11] and the XML schema for carrying MUK, MUK lifetime, NAF FQDN and BTID is defined in annex x.2; +- the SCF may add additional HTTP headers to the HTTP POST request. +- The BM-SC receives the HTTP POST message. The BM-SC checks that the HTTP POST is valid, and extracts the request for further processing. As the HTTP POST message came from SCF with asserted identities, the BM-SC does not need to authenticate the UE as the UE has been authenticated by the IMS. + +The BM-SC returns HTTP 200 OK to the SCF. The BM-SC shall populate HTTP response as follows: + +- the HTTP status code in the HTTP status line shall be 200; +- the HTTP header Content-Type shall be the MIME type of the payload, i.e. "application/mbms-register-response+xml". XML document is the same that is used for MBMS De-registration in 3GPP TS 33.246 [5] and it is specified in 3GPP TS 26.346 [11]; +- the HTTP payload shall contain a list including one status code for each MBMS User Service. +- Upon receiving the HTTP 200 OK, the SCF then includes the XML body from the HTTP 200 OK message into a SIP 200 OK message and sends the SIP 200 OK message to the UE via the IM CN subsystem. + +#### 10.4.2.2 SIP based Basic MSK Request + +This procedure is used to by the UE to request one or more MSKs. + +![Sequence diagram for SIP based MBMS MSK request. The diagram shows the interaction between UE, IM CN, SCF, BSF, and BM-SC. The UE sends a SIP re-INVITE to the IM CN with MSK identifiers and B-TID. The IM CN forwards this to the SCF. The SCF sends an AUTH REQ to the BSF, which responds with AUTH RSP. The SCF then sends an HTTP POST to the BM-SC with MSK identifiers. The BM-SC responds with HTTP 200 OK containing MSK status codes. The SCF then sends a SIP 200 OK to the IM CN with MSK status codes, which is then forwarded to the UE. Finally, the UE receives MIKEY MSK (protected with MUK), MIKEY MTK (protected with MSK), and MBMS Data (protected with MTK) from the BM-SC.](f23879f003c58b57f690e2dc6c95816a_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM_CN as IM CN + participant SCF + participant BSF + participant BM-SC as BM-SC + + Note left of UE: SIP re-INVITE (MSK identifiers, B-TID) + UE->>IM_CN: SIP re-INVITE + IM_CN->>SCF: SIP re-INVITE + SCF->>BSF: AUTH REQ + BSF-->>SCF: AUTH RSP + SCF->>BM-SC: HTTP POST (MSK identifiers, ...) + BM-SC-->>SCF: HTTP 200 OK (MSK status codes) + SCF->>IM_CN: SIP 200 OK (MSK status codes) + IM_CN->>UE: SIP 200 OK (MSK status codes) + BM-SC->>UE: MIKEY MSK (protected with MUK) + BM-SC->>UE: MIKEY MTK (protected with MSK) + BM-SC->>UE: MBMS Data (protected with MTK) + +``` + +Sequence diagram for SIP based MBMS MSK request. The diagram shows the interaction between UE, IM CN, SCF, BSF, and BM-SC. The UE sends a SIP re-INVITE to the IM CN with MSK identifiers and B-TID. The IM CN forwards this to the SCF. The SCF sends an AUTH REQ to the BSF, which responds with AUTH RSP. The SCF then sends an HTTP POST to the BM-SC with MSK identifiers. The BM-SC responds with HTTP 200 OK containing MSK status codes. The SCF then sends a SIP 200 OK to the IM CN with MSK status codes, which is then forwarded to the UE. Finally, the UE receives MIKEY MSK (protected with MUK), MIKEY MTK (protected with MSK), and MBMS Data (protected with MTK) from the BM-SC. + +**Figure 25: SIP based MBMS MSK request** + +The same assumptions apply as in IMS based MBMS User Service Registration in clause 10.4.2.1. + +The procedure is as follows (cf. figure 25 which is simplified as it does not show all parameters): + +- UE sends a SIP re-INVITE to the SCF via the IM CN subsystem. The re-INVITE indicates SCF in the Request-URI and the message includes a list of one or more Key Domain ID - MSK ID pair(s) of the MSKs that the UE wants to receive and the bootstrapping transaction identifier (B-TID) in the body of the SIP INVITE. The XML + +schema for the list of MBMS user service IDs is defined in TS 26.346 [11] and the XML schema for the B-TID is defined in annex x.1. + +- The SCF receives the asserted identitie(s) of the UE from the headers of the SIP re-INVITE message. The SCF performs a check based on stored subscription information whether the UE is authorized to receive the specified MSK(s). If yes, the procedure continues. If not, the procedure is terminated. +- If there is no B-TID stored for the UE or if the received B-TID is different than the one stored for the UE, the SCF runs GBA usage procedure with the BSF over Zn to fetch the NAF keys corresponding to the UE as defined in 3GPP TS 33.220 [26]. The NAF-Id which the SCF uses over Zn is constructed from the NAF FQDN indicated in the service protection description for this service and Ua security protocol identifier specified in 3GPP TS 33.220 [26]. Upon receiving the NAF keys from the BSF, the SCF derives MUK from the NAF key as defined in 3GPP TS 33.246 [5]. + +If the received B-TID is not valid or if the SCF desires the UE to make a new GBA bootstrapping, the SCF shall response to the UE with an appropriate error message. The error message will trigger the UE to run new GBA bootstrapping. + +- The SCF sends a HTTP POST message to the BM-SC. The SCF populates the HTTP POST as follows: + - the HTTP version shall be 1.1 which is specified in RFC 2616 [34]; + - the base of the Request-URI shall contain the full BM-SC key management URI (e.g. http://bmsc.home1.net:1234); + - the Request-URI shall contain an URI parameter "requesttype" that shall be set to "sip-based-msk-request", i.e. Request-URI takes the form of "/keymanagement?requesttype= sip-based-msk-request"; + - the SCF may add additional URI parameters to the Request-URI; + - X-3GPP-Asserted-Identity header which includes the identities of the UE; + - the HTTP header Content-Type shall be the MIME type of the payloads; + - the HTTP payload shall contain a list of one or more Key Domain ID - MSK ID pair(s) of the MSKs that the UE wants to receive. If new NAF keys were created in the previous step, then the SCF shall also include MBMS user key (MUK), lifetime of MUK, NAF FQDN and B-TID. NAF FQDN and B-TID are included as they may be further included in the MIKEY MSK messages from the BM-SC to the UE, The XML schema for the list of Key Domain ID - MSK ID pair(s) is defined in 3GPP TS 26.346 [11] and the XML schema for carrying IP address, MUK, MUK lifetime, NAF FQDN and BTID is defined in annex x.2. + - the UE may add additional HTTP headers to the HTTP POST request. +- The BM-SC receives the HTTP POST message. The BM-SC checks that the HTTP POST is valid, and extracts the request for further processing. As the HTTP POST message came from SCF with asserted identities, the BM-SC does not need to authenticate the UE as the UE has been authenticated by the IMS. Also, the HTTP POST message also implicitly indicates to the BM-SC that the SCF has authorized the UE to receive the specified MSK(s). + +The BM-SC stores the received information and returns HTTP 200 OK to the SCF. The BM-SC shall populate HTTP response as follows: + +- the HTTP status code in the HTTP status line shall be 200; +- the HTTP header Content-Type shall be the MIME type of the payload, i.e. "application/mbms-msk-response+xml"; +- the HTTP payload shall contain a list including one status code for each MSK. The XML schema of the payload is the same that is used for MBMS MSK request in 3GPP TS 33.246 [5] and it is specified in 3GPP TS 26.346 [11]. +- The SCF receives the HTTP 200 OK. The SCF then includes the XML body from the HTTP 200 OK message into a SIP 200 OK message and sends the SIP 200 OK message to the UE via the IM CN subsystem. + +### 10.4.2.3 Updating MUK + +The GBA session (i.e. key Ks derived NAF specific keys, e.g. MUK) has a limited lifetime. The GBA session may expire during service consumption. In this case the UE shall run GBA bootstrapping again to create a new Ks. The UE shall then re-register to the services with the SIP based MBMS registration procedure defined in clause 10.4.2.1 with re-INVITE and the new B-TID. This will create a new MUK in the UE and network. + +### 10.4.2.4 SIP based BM-SC solicited pull + +According to 3GPP TS 33.246 BM-SC solicited pull procedure is triggered by the BM-SC by sending an MSK message with a specific MSK-ID value. This will trigger the UE to perform MSK request. IMS based MBMS uses the BM-SC solicited pull procedure as defined in TS 33.246 to trigger the UE to perform SIP based basic MSK request procedure which is specified in clause 10.4.2.2. + +## 11 Blending of Presence and PSS/MBMS user services + +### 11.1 General description + +This clause describes the mechanisms that apply when IMS based PSS and MBMS user services are combined with presence service. + +The architecture and functional description of the presence service when used in relation to the IMS based PSS & MBMS services shall conform to [37]. + +The protocol details for the presence service when used in relation to the IMS based PSS & MBMS services shall conform to [36]. + +The following call flow gives a high-level description for presence service used in the context of IMS based PSS and MBMS. In this example, the UE 1 is the watcher and the UE 2 is the presentity. The UE 2 is in the UE 1's list of contacts and wants to publish on-demand content currently watching. + +![Sequence diagram illustrating the high-level description for presence service used in the context of IMS based PSS and MBMS. The diagram shows interactions between UE 1, IM CN Subsystem, Presence Server, and UE 2. UE 1 sends a SIP SUBSCRIBE to the Presence Server. The Presence Server sends a SIP 200 OK to UE 1. UE 2 sends a SIP PUBLISH to the Presence Server. The Presence Server sends a SIP 200 OK to UE 2. The Presence Server sends a SIP NOTIFY to UE 1. UE 1 sends a SIP 200 OK to the Presence Server. Internal components of the Presence Server, Watcher authorization and Publisher authorization, are shown interacting with the server.](ef8f4838401ece0abd51d63b897fa388_img.jpg) + +``` + +sequenceDiagram + participant UE1 as UE 1 + participant IMS1 as IM CN Subsystem + participant PS as Presence Server + participant IMS2 as IM CN Subsystem + participant UE2 as UE 2 + + Note right of PS: Watcher authorization + Note right of PS: Publisher authorization + + UE1->>PS: 1. SIP SUBSCRIBE + PS-->>UE1: 1. SIP 200 OK + UE2->>PS: 2. SIP PUBLISH + PS-->>UE2: 2. SIP 200 OK + PS->>UE1: 3. SIP NOTIFY + UE1-->>PS: 3. SIP 200 OK + +``` + +Sequence diagram illustrating the high-level description for presence service used in the context of IMS based PSS and MBMS. The diagram shows interactions between UE 1, IM CN Subsystem, Presence Server, and UE 2. UE 1 sends a SIP SUBSCRIBE to the Presence Server. The Presence Server sends a SIP 200 OK to UE 1. UE 2 sends a SIP PUBLISH to the Presence Server. The Presence Server sends a SIP 200 OK to UE 2. The Presence Server sends a SIP NOTIFY to UE 1. UE 1 sends a SIP 200 OK to the Presence Server. Internal components of the Presence Server, Watcher authorization and Publisher authorization, are shown interacting with the server. + +**Figure 26: High-level description for presence service used in the context of IMS based PSS and MBMS** + +1. The UE 1 subscribes for presence information for a list of contacts which includes the UE 2, by sending a SIP SUBSCRIBE message to the Presence Server as defined in [36]. + +2. After having initiated the PSS or MBMS session, or after a content switching, the UE 2 decides to publish what content is being consumed. The UE 2 sends a SIP Publish message to the Presence Server, as defined in [36], including additional attributes specific to PSS and MBMS such as the content being consumed. +3. On reception of the SIP Publish, the Presence server notifies the UE 1 of what the UE 2 is doing, by sending a SIP NOTIFY message as defined in [36]. + +## 11.2 Procedures at the UE acting as presentity + +The UE acting as presentity may send a SIP PUBLISH in the following cases: + +- On receipt of a final SIP 200 OK concerning a PSS streaming session initiation procedure; +- On receipt of a final SIP 200 OK concerning a MBMS streaming session initiation procedure; + +During a streaming session, the UE may also send a PUBLISH request after having performed content switching. This includes the cases of: + +- PSS content switching, +- MBMS content switching, +- Switching from PSS to MBMS streaming with channel change, +- Switching from MBMS to PSS streaming with channel change. + +The content of the PUBLISH request shall be set as follows: + +- The request-URI, the To and the From headers shall be set to the public user identity of the user, +- The Event header shall be set to the "presence" event package, +- The content type shall be set to "application/pidf+xml" + +The SIP PUBLISH generated by the UE acting as presentity shall conform to [36]. + +The presence XML document included in the PUBLISH body shall conform to [36] and [37]. + +Additional elements specific to PSS and MBMS services shall be included in the XML document. In case of a Live TV service, these specific additional elements are the Live TV channel currently watched, and the current TV program. In case of an on-demand service, specific additional element is the on-demand content. + +The XML schema used when the presence documents are published by the UE is described in Annex E of [24], with the following conformity: + +- the "currentBCServiceID" refers to the LiveTV channel delivered in PSS or MBMS, +- the "currentBCProgramID" refers to the currently watched program delivered in PSS or MBMS, +- the "currentCoDContentID" refers to the currently watched on-demand content delivered in PSS. + +## 11.3 Procedures at the UE acting as watcher + +The SIP SUBSCRIBE generated by the UE acting as a watcher shall conform to [36]. + +The UE acting as a watcher may then receive a SIP NOTIFY message including the content consumed by the UE acting as presentity. + +--- + +## 12 Networked Bookmark Service + +Bookmarking allows a user receiving a content item at an UE to mark a point in time in the streamed content which he can access at a later time. The content item is CoD delivered by a PSS server. + +The user can later retrieve the bookmark from any device on which he is registered. + +The XML schema used for networked bookmark service is defined in Annex J. + +## 12.1 Bookmarking Creation and Storage + +The call flow in Figure 27 depicts the sequence for creating a bookmark for a CoD item and storing it in the user's service profile for later retrieval. + +![Sequence diagram for IMS-based Content Bookmark creation and Storage. Lifelines: UE, IM CN Subsystem, SCF, Service Profile, PSS Adaptor/Server. The process involves RTSP GET_PARAMETER, SIP INFO, and XCAP messages to create and store a bookmark.](76d19e4271bf243b20d55a98efd51483_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant Service Profile + participant PSS Adaptor/Server + + Note over UE, PSS Adaptor/Server: UE has established a PSS Session + UE->>PSS Adaptor/Server: User request a bookmark + Note right of UE: 1. RTSP GET_PARAMETER (position) + PSS Adaptor/Server-->>UE: 2. 200 OK (position=x) + Note right of UE: 3. SIP INFO ( Content Bookmark Info, content id) + UE->>IM CN Subsystem: 3. SIP INFO ( Content Bookmark Info, content id) + Note right of IM CN Subsystem: 4. SIP INFO ( Content Bookmark Info, content id) + IM CN Subsystem->>SCF: 4. SIP INFO ( Content Bookmark Info, content id) + Note right of SCF: 5. XCAP put (Content Bookmark, other data) + SCF->>Service Profile: 5. XCAP put (Content Bookmark, other data) + Note right of Service Profile: 6. 200 OK + Service Profile-->>SCF: 6. 200 OK + Note right of SCF: 7. 200 OK + SCF-->>IM CN Subsystem: 7. 200 OK + Note right of IM CN Subsystem: 8. 200 OK + IM CN Subsystem-->>UE: 8. 200 OK + +``` + +Sequence diagram for IMS-based Content Bookmark creation and Storage. Lifelines: UE, IM CN Subsystem, SCF, Service Profile, PSS Adaptor/Server. The process involves RTSP GET\_PARAMETER, SIP INFO, and XCAP messages to create and store a bookmark. + +**Figure 27: IMS-based Content Bookmark creation and Storage** + +The following is a brief description of the steps: + +1. The UE has established a CoD session. At some point in time, the user decides he wants to create a bookmark. If the UE does not have the current play out position, it sends an RTSP GET-PARAMETER request to the PSS server to request it. +2. The response to the RTSP GET-PARAMETER request is returned by the PSS server in an RTSP 200 OK. +3. The UE sends to the IM CN Subsystem a SIP INFO Message that includes the Content-Bookmark Info package as well as the CoD content id. The Content Type shall include the registered MIME type of XML documents representing bookmarking data, and shall be set to "application/3gpp-ims-pss-mbms-bookmark+xml" (see Annex J). +4. The IM CN Subsystem forwards the SIP INFO Message to the SCF. +5. The SCF issues an XCAP request, on behalf of the user, to update the service profile with the Content-Bookmark Info data. +6. The Service Profile returns the response to the SCF. +7. The SCF returns a SIP 200 OK to the IM CN Subsystem. +8. The IM CN Subsystem forwards the SIP 200 OK to the UE. + +## 12.2 Bookmarking Retrieval + +Once a bookmark is created, a user can later retrieve the bookmark anytime, e.g. prior to or during PSS session establishment procedure, from any device on which he is registered. + +Clause 12.2.1 depicts the bookmarking retrieval procedure which is independent to PSS session establishment procedure, and clause 12.2.2 depicts the bookmarking retrieval procedure during a PSS session establishment process. + +### 12.2.1 Bookmarking Retrieval independent to session establishment + +The call flow in Figure 28 depicts the bookmark retrieval procedure for retrieving bookmarks stored in the user's service profile. + +![Sequence diagram for Figure 28: Bookmark retrieval independent to session establishment. Lifelines: UE, IM CN Subsystem, SC, Service Profile, PSS Adaptor/Server. The UE sends an XCAP Get (Content Bookmark, other) to the Service Profile, which responds with an HTTP 200 OK (data).](6707cae4df136f92a0c9f3a4676f91a6_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SC + participant Service Profile + participant PSS Adaptor/Server + Note left of UE: 1. XCAP Get (Content Bookmark, other) + UE->>Service Profile: 1. XCAP Get (Content Bookmark, other) + Note right of Service Profile: 2. HTTP 200 OK (data) + Service Profile-->>UE: 2. HTTP 200 OK (data) +``` + +Sequence diagram for Figure 28: Bookmark retrieval independent to session establishment. Lifelines: UE, IM CN Subsystem, SC, Service Profile, PSS Adaptor/Server. The UE sends an XCAP Get (Content Bookmark, other) to the Service Profile, which responds with an HTTP 200 OK (data). + +**Figure 28: Bookmark retrieval independent to session establishment** + +The following is a brief description of the steps: + +1. The UE issues an XCAP GET request to the Service Profile to request the bookmarks. +2. The bookmarks are returned in an HTTP 200 OK response. + +### 12.2.2 Bookmarking Retrieval during session establishment + +The call flow in Figure 29 depicts the bookmark retrieval procedure for retrieving bookmarks stored in the user's service profile during a PSS session establishment process. + +![Sequence diagram for Figure 29: Bookmark Retrieval during session establishment. Lifelines: UE, IM CN Subsystem, SCF, Service Profile, PSS Adapter/Server. The sequence starts with a SIP Invite from UE to IM CN Subsystem, followed by IM CN Subsystem to SCF. SCF then sends an XCAP GET to Service Profile, which responds with 200 OK. SCF then sends a SIP Invite to PSS Adapter/Server, which responds with SIP 200 OK. SCF then sends a SIP 200 OK to IM CN Subsystem, which finally sends a SIP 200 OK to UE. A note at the bottom indicates the UE displays the bookmark list and selects one.](256e8716b024671206b023fab056678e_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant Service Profile + participant PSS Adapter/Server + Note left of UE: 1. SIP Invite + UE->>IM CN Subsystem: 1. SIP Invite + Note right of IM CN Subsystem: 2. SIP Invite + IM CN Subsystem->>SCF: 2. SIP Invite + Note right of SCF: 3. XCAP GET + SCF->>Service Profile: 3. XCAP GET + Note right of Service Profile: 4. 200 OK + Service Profile-->>SCF: 4. 200 OK + Note right of SCF: 5. SIP Invite + SCF->>PSS Adapter/Server: 5. SIP Invite + Note right of PSS Adapter/Server: 6. SIP 200 OK + PSS Adapter/Server-->>SCF: 6. SIP 200 OK + Note right of SCF: 7. SIP 200 OK + SCF-->>IM CN Subsystem: 7. SIP 200 OK + Note right of IM CN Subsystem: 8. SIP 200 OK + IM CN Subsystem-->>UE: 8. SIP 200 OK + Note left of UE: 9. Display the bookmark list, and the UE selects to start from one of the bookmarks. +``` + +Sequence diagram for Figure 29: Bookmark Retrieval during session establishment. Lifelines: UE, IM CN Subsystem, SCF, Service Profile, PSS Adapter/Server. The sequence starts with a SIP Invite from UE to IM CN Subsystem, followed by IM CN Subsystem to SCF. SCF then sends an XCAP GET to Service Profile, which responds with 200 OK. SCF then sends a SIP Invite to PSS Adapter/Server, which responds with SIP 200 OK. SCF then sends a SIP 200 OK to IM CN Subsystem, which finally sends a SIP 200 OK to UE. A note at the bottom indicates the UE displays the bookmark list and selects one. + +**Figure 29 Bookmark Retrieval during session establishment** + +1. The UE sends an SIP INVITE to the SCF via the IM CN Subsystem. +2. The IM CN Subsystem forwards the SIP INVITE to the SCF. +3. The SCF validates the SIP INVITE request, and checks the rights of user for the requested content by sending an XCAP GET with the user ID and content identifier to the Service Profile. +4. The Service Profile authorizes the user, and returns the user's service profile with the bookmark list if it is set before. Each bookmark in the list should contain at least the content ID and the time reference. +5. The SCF selects the appropriate PSS Adapter for the requested content, and sends the SIP INVITE to the PSS Adapter via the IM CN Subsystem. The PSS Adapter then selects the PSS Server and sends the RTSP SETUP to the PSS Server. +6. The PSS Server returns an RTSP 200 OK to PSS Adapter, which returns a SIP 200 OK to the SCF via the IM CN Subsystem. +7. The SCF returns the SIP 200 OK to the UE via the IM CN Subsystem, with the bookmark list. +8. The IM CN Subsystem forwards the SIP 200 OK to UE. +9. The UE plays out the bookmark list to the user, and the user selects the bookmark from which they wish to start viewing the content. + +--- + +## 13 User generated content service + +This clause defines the provision and distribution procedures of user generated content (UGC) for IMS based PSS and MBMS User Services. + +User generated content refers to content that is provided by an UE e.g. video or audio captured by an in-built camera or microphone. In the following this UE is noted as providing UE, and the UE receiving UGC by PSS or MBMS is noted as receiving UE. + +The UGC provision procedure allows a providing UE to declare and upload/upstream UGC content to the network, which is defined in clause 13.1. The UGC distribution procedure allows a receiving UE to select and watch User Generated Content which is defined in clause 13.2. + +### 13.1 UGC content provision procedure + +UGC provision procedure is carried out in four steps as shown in figure 30: + +![Sequence diagram illustrating IMS Based UGC Provision Procedures. The diagram shows five lifelines: UE, SSF, IM CN Subsystem, SCF, and UGC Reception Server. The sequence of messages is: 1. Declaration of UGC (UE to SCF), 2. Publication of UGC information by the providing UE (UE to SCF), 3. UGC creation session initiation (UE to UGC Reception Server), 4. Publication of UGC information by the SCF (SCF to UGC Reception Server). A dashed box labeled 'UGC creation session modification/termination' follows the main sequence.](4b398c5e8c4fd656d5b7a61806400650_img.jpg) + +``` + +sequenceDiagram + participant UE + participant SSF + participant IM CN Subsystem + participant SCF + participant UGC Reception Server + + Note right of SCF: 1. Declaration of UGC + UE->>SCF: + Note right of SCF: 2. Publication of UGC information by the providing UE + UE->>SCF: + Note right of UGC Reception Server: 3. UGC creation session initiation + UE->>UGC Reception Server: + Note right of SCF: 4. Publication of UGC information by the SCF + SCF->>UGC Reception Server: + Note right of UGC Reception Server: UGC creation session modification/termination + +``` + +Sequence diagram illustrating IMS Based UGC Provision Procedures. The diagram shows five lifelines: UE, SSF, IM CN Subsystem, SCF, and UGC Reception Server. The sequence of messages is: 1. Declaration of UGC (UE to SCF), 2. Publication of UGC information by the providing UE (UE to SCF), 3. UGC creation session initiation (UE to UGC Reception Server), 4. Publication of UGC information by the SCF (SCF to UGC Reception Server). A dashed box labeled 'UGC creation session modification/termination' follows the main sequence. + +**Figure 30 : IMS Based UGC Provision Procedures** + +NOTE: The UGC reception server can be implemented independent to, or within PSS Server, or BMSC.UPF. + +**Step 1: Declaration of UGC:** + +The providing UE sends a UGC declaration request to the SCF. The SCF records the UGC information, generates a unique UGC content ID and sends a UGC declaration response with the content ID to the providing UE. + +NOTE: The content ID that should be used is out of scope of this release. + +**Step 2: Publication of UGC information by the providing UE:** + +The providing UE sends to the SCF a UGC description request including a UGC description, e.g. name, type, restriction, textual description, special group users etc. together with the UGC content ID. + +The SCF records the UGC description, establishes the relationship between UGC content ID and UGC description, and sends UGC description response to the providing UE. + +NOTE: Step 1 is always the first step. Step 2 may happen at any time during the UGC provision procedure and can be repeated during the lifetime of the content, e.g. for updating of the UGC description. + +NOTE: The messages supporting steps 1 and 2 may be embedded in the messages supporting step 3. + +**Step 3: Creation of UGC:** + +User generated content could be provided for distribution by different means i.e. uploading and upstreaming from the providing UE. + +Uploading should be used for user generated content that is stored at the UE. For uploading, HTTP should be used. 3GPP file format according to [39] should be supported. + +Upstreaming should be used for live content that is continuously generated during upstreaming. For upstreaming, multimedia telephony service over IMS (MTSI) as defined in [38] should be used. + +The SCF should signal the address of the UGC reception server to the providing UE. + +In case of uploading, a HTTP connection is established and UGC is uploaded to a UGC upload reception server. In this case the upload reception server must support HTTP. + +In case of upstreaming, the providing UE initiates a MTSI session and upstreams the UGC to the UGC upstreaming reception server. In this case, the upstreaming reception server must support MTSI specifications [38]. + +#### Step 4: Publication of UGC information by the SCF: + +The SCF establishes the relationship between UGC content ID, UGC description and optionally UGC location (address), and publishes the UGC description information. + +Step 4 may take place before, during or after step 3. In case of upstreaming, step 4 is carried out before step 3. + +The UE can modify or terminate the established UGC creation session later on. + +NOTE: Updating the SSF for UGC information from the SCF is required, but the method for achieving this is out of scope of this specification. + +## 13.2 UGC distribution procedure + +The UGC reception server is responsible for repackaging and/or transcoding the uploaded or upstreamed content into such a form that can be served to legacy PSS servers and BMSCs. The UGC reception server is responsible for serving received UGC to legacy PSS Servers and BMSC in live and pre-recorded forms. This interface is out of scope for this release. + +Content distribution is carried out using either PSS or MBMS. In case of PSS, UGC is distributed by the PSS server. In case of MBMS, UGC is distributed via the BMSC/UPF. + +Distribution of user generated content to PSS and MBMS clients (receiving UEs) uses the same procedures for service provider discovery (clause 5), user service discovery (clause 6) and description retrieval (clause 7), streaming (clause 8) and download delivery as content that is provided in a different way. + +--- + +## 14 MBMS Download Service + +This section depicts the procedures for retrieval of missing parameters before session initiation in clause 14.1, the MBMS download session initiation, file repair and reception report procedures in clause 14.2, and session teardown procedure in clause 14.3. + +### 14.1 Missing parameters before session initiation + +#### 14.1.1 Procedures at the UE + +If the UE does not have the all the information it needs to form an SDP offer, the UE shall send a SIP OPTIONS message. + +The "Request-URI" is related to the MBMS service that the user wants to activate. The "Request-URI" shall be composed of a user and domain part as defined as follows: + +- The user part contains the serviceId. +- The domain part is the Service Provider domain name, obtained from SSF. + +The TO header shall contain the same URI as in the "Request-URI" parameter. + +The FROM header shall indicate the public user identity of the user. + +Upon reception of the 200 OK including service access information encapsulated in multipart/MIME, the UE shall initiate MBMS download session as described in 14.2. + +#### 14.1.2 Procedures at the SCF + +When receiving the SIP OPTIONS message, the SCF shall examine the serviceId present in the user-part of the TO header and lookup the requested User Service Description information. + +The SCF shall answer with the user service description information of the content delivery channel (encapsulated in multipart/MIME) as requested by the serviceId. + +## 14.2 MBMS Download Session Initiation, File Repair and Reception Report + +### 14.2.1 General description + +Figure 31 gives an overview about the procedures for an IMS based MBMS Download Session initiation, File-Repair and reception report. + +If an associated delivery procedure description for File-Repair operations is available, then the UE receiver may use the File-Repair service as specified in [11] sub-clause 9.3. + +If an associated delivery procedure description for reception reporting is available, then the UE shall provide reception reports as specified in [11] sub-clause 9.4. + +![Sequence diagram showing the procedures for IMS based MBMS Download. The diagram involves four lifelines: UE, IM CN Subsystem, SCF, and BM-SC/UPF. The sequence starts with the UE sending a SIP INVITE (Request-URI) to the IM CN Subsystem. The IM CN Subsystem then sends a SIP INVITE to the SCF. The SCF responds with a SIP 200 OK to the IM CN Subsystem, which in turn sends a SIP 200 OK to the UE. Following the SIP exchange, the UE receives data via FLUTE. If the download is incomplete, File Repair procedures are executed. Finally, the UE sends a Reception Report (SIP) to the SCF and a Reception Report (HTTP) to the BM-SC/UPF.](ddcdc1712375261ba1d89165fdf12aa6_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant BM-SC/UPF + + Note left of UE: Step 1, 2: UE generates initial SIP INVITE + UE->>IM CN Subsystem: SIP INVITE (Request-URI) + Note right of IM CN Subsystem: Step 3, 4: SCF examines SDP + IM CN Subsystem->>SCF: SIP INVITE + SCF-->>IM CN Subsystem: SIP 200 OK + IM CN Subsystem-->>UE: SIP 200 OK + Note left of UE: Step 5: UE receives MBMS download data using FLUTE + UE-->>BM-SC/UPF: FLUTE + Note left of UE: Step 6: In case of incomplete download, file repair procedures are executed + UE-->>BM-SC/UPF: File Repair + Note left of UE: Step 7, 8: UE reports reception statistics + UE-->>SCF: Reception Report (SIP) + UE-->>BM-SC/UPF: Reception Report (HTTP) + +``` + +Sequence diagram showing the procedures for IMS based MBMS Download. The diagram involves four lifelines: UE, IM CN Subsystem, SCF, and BM-SC/UPF. The sequence starts with the UE sending a SIP INVITE (Request-URI) to the IM CN Subsystem. The IM CN Subsystem then sends a SIP INVITE to the SCF. The SCF responds with a SIP 200 OK to the IM CN Subsystem, which in turn sends a SIP 200 OK to the UE. Following the SIP exchange, the UE receives data via FLUTE. If the download is incomplete, File Repair procedures are executed. Finally, the UE sends a Reception Report (SIP) to the SCF and a Reception Report (HTTP) to the BM-SC/UPF. + +**Figure 31 Procedures for IMS based MBMS Download** + +Step 1, 2: The UE generates an initial SIP INVITE message sent to the SCF, indicating the chosen MBMS Download Service. A SDP offer is included in the SIP INVITE message. + +Step 3, 4: Upon receipt of SIP INVITE the SCF examine the SDP parameters in the SDP offer. In case of a successful examination, the SCF answers with a SIP 200 OK including the SDP answer. + +Step 5: The UE receives the MBMS download data using FLUTE. + +Step 6: In case of incomplete download, file repair procedures are executed. + +Step 7, 8: The UE reports the reception statistics using either HTTP or SIP INFO message. + +### 14.2.2 Procedures at the UE + +The UE shall support the procedures specified in TS 24 229 [7] for originating sessions. + +The UE shall generate an initial INVITE request: + +- The Request-URI in the INVITE request shall be the well known PSI (Public Service Identifier) of the MBMS Download Service. +- The To header shall contain the same URI as in the Request-URI. +- The From header shall indicate the public user identity of the user. + +An SDP offer shall be included in the request. The SDP offer shall be done in accordance with the parameters received during UE service selection procedure and with media capabilities and required bandwidth available for the MBMS download service. The SDP offer shall include the following elements: + +- An a=source-filter line to indicate the IP source address of the FLUTE session. +- An a=flute-tsi line to indicate Transport Session ID (TSI) of the FLUTE session. + +NOTE: The combination of the TSI and the IP source address identifies the FLUTE session. + +- The m-line(s) shall be set to the media parameters retrieved via service selection procedures for the requested MBMS download service. +- The c-line(s) shall be set according to the multicast address retrieved via service selection procedures for the requested MBMS download service. + +The descriptions of above parameters conform to section 7.3 of 3GPP TS 26.346[11]. + +- An a=mbms\_download\_service:ServiceId line to indicate the MBMS download service which the UE intends to initiate. + +Once the UE receives the SIP response, the UE shall examine the FLUTE session parameters in the received SDP, and receive the MBMS download data accordingly. + +In case the FDT is unavailable, the UE shall get the FDT according to fdt\_address attribute in the SDP Answer. The FDT contains content description information for the files delivered in the FLUTE session. + +In case of incomplete download, the UE shall execute the file repair procedures towards the repair server indicated by repair-server-address attribute in the SDP Answer. In the case the file repair procedures are to be conducted over broadcast/multicast delivery, the repair-server-address:uri should instead indicate the Session Description (SDP file) for the broadcast/multicast repair session and UE shall then use this URI to fetch the SDP and join the corresponding broadcast/multicast repair session. + +The UE shall report the reception statistics using either HTTP or SIP INFO message according to report-channel parameter of the SDP Answer. The XML contents in the report message refer to section 9.5.3.2 of 3GPP TS 26.346[11]. + +### 14.2.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 14.2.4 Procedures at the SCF + +The SCF shall support the procedures specified in TS 24.229 [7] applicable to an AS acting as a terminating UA. + +Upon receipt of SIP INVITE request, the SCF shall perform service authorization procedures to check the service rights of requested MBMS download service according to the user subscription information, See clause 10.4. + +The SCF shall examine the SDP parameters in the SDP offer. + +- It shall examine the a=mbms\_download\_service parameter. This parameter contains the channel the UE intends to join. If the mbms\_download\_service parameter does not point to a channel that the UE is allowed to join the SCF shall not accept the offer and shall answer with a 403 error code. +- It shall examine the c-line(s) to determine that it is a multicast session. It may also check that it corresponds to the mbms\_download\_service parameter. If not, the SCF shall answer with a 403 error code. + +If the SDP parameters are examined successfully, the SCF shall answer with a SIP 200 OK, indicating the SDP answer as follows: + +- The m-line(s) and c-line(s) shall be identical to ones indicated in the SDP offer. +- The source-filter and flute-tsi attributes shall be identical to ones indicated in the SDP offer. +- An a=fdt\_address:uri to indicate the address of the File Delivery Table. +- An a=repair-server-address:uri to indicate the address of the repair server. In the case the file repair procedures are to be conducted over broadcast/multicast delivery, the repair-server-address:uri should instead be the URI of the Session Description (SDP file) of the broadcast/multicast repair session. + +- An a=report-channel:SIP/HTTP line to indicate to the UE that the reception report procedure should be performed by SIP or HTTP channel. +- It shall include an a=recvonly attribute. + +## 14.2.5 Procedures at the BMSC.UPF + +The MBMS FLUTE session is already ongoing at the BMSC.UPF. No specific action is required. + +# 14.3 MBMS Download Session Teardown + +## 14.3.1 General Description + +![Sequence diagram illustrating MBMS Download Session Termination. The diagram shows four lifelines: UE, IM CN Subsystem, SCF, and BM-SC.UPF. The process starts with a FLUTE session (1) from BM-SC.UPF to UE. The UE sends a SIP BYE (2) to the IM CN Subsystem. The IM CN Subsystem forwards the SIP BYE (3) to the SCF. The SCF responds with a SIP 200 OK (4) to the IM CN Subsystem. Finally, the IM CN Subsystem sends a SIP 200 OK (5) back to the UE.](6984a27b2b89e0995d5216ec29b41d1c_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM_CN as IM CN Subsystem + participant SCF + participant BM_SC_UPF as BM-SC.UPF + + Note over BM_SC_UPF, UE: 1. FLUTE + UE->>IM_CN: 2. SIP BYE + IM_CN->>SCF: 3. SIP BYE + SCF-->>IM_CN: 4. SIP 200 OK + IM_CN-->>UE: 5. SIP 200 OK + +``` + +Sequence diagram illustrating MBMS Download Session Termination. The diagram shows four lifelines: UE, IM CN Subsystem, SCF, and BM-SC.UPF. The process starts with a FLUTE session (1) from BM-SC.UPF to UE. The UE sends a SIP BYE (2) to the IM CN Subsystem. The IM CN Subsystem forwards the SIP BYE (3) to the SCF. The SCF responds with a SIP 200 OK (4) to the IM CN Subsystem. Finally, the IM CN Subsystem sends a SIP 200 OK (5) back to the UE. + +**Figure 32: MBMS Download Session Termination** + +Step 1: UE receives download content from the BM-SC.UPF. + +Step 2, 3: UE initiates a SIP BYE message to SCF, indicating which MBMS download session to close. + +Step 4, 5: SCF responds UE with a SIP 200 OK message when the SIP BYE is successfully handled and session terminated. At this stage, the UE can stop receiving the MBMS download session. + +The UE may deactivate the according MBMS Bearer Service during steps 2 to 5 or after step 5. The deactivation is either according to the MBMS Broadcast Service deactivation (3GPP TS 23.246 [4]) or the MBMS Multicast Mode deactivation procedure (3GPP TS 23.246 [4]). + +## 14.3.2 Procedures at the UE + +The UE shall send a SIP BYE to the SCF. + +The UE may deactivate the according MBMS Bearer Service during steps 2 to 5 or after step 5 of clause 8.3.5.1. The deactivation is either according to the MBMS Broadcast Service deactivation (3GPP TS 23.246 [4]) or the MBMS Multicast Mode deactivation procedure (3GPP TS 23.246 [4]). + +## 14.3.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +## 14.3.4 Procedures at the SCF + +The SCF responds to the UE with a SIP 200 OK message after handling of the SIP BYE message. + +## 14.3.5 Procedures at the BMSC.UPF + +The BMSC.UPF is acting as described in 3GPP TS 23.246 [4]. + +## 15 PSS download service + +### 15.1 General Description + +![Sequence diagram for IMS based session set-up for progressive download](17f0cf80b9c38adb460d4ca836960da7_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP server + + Note left of UE: 1. SIP INVITE + UE->>IM CN Subsystem: 1. SIP INVITE + Note right of IM CN Subsystem: 2. SIP INVITE + IM CN Subsystem->>SCF: 2. SIP INVITE + Note right of SCF: 3. SIP INVITE + SCF->>HTTP/SIP adapter: 3. SIP INVITE + Note right of HTTP/SIP adapter: 4. HTTP POST + HTTP/SIP adapter->>HTTP server: 4. HTTP POST + Note right of HTTP server: 5. HTTP 200 OK + HTTP server->>HTTP/SIP adapter: 5. HTTP 200 OK + Note right of HTTP/SIP adapter: 6. SIP 200 OK + HTTP/SIP adapter->>SCF: 6. SIP 200 OK + Note right of SCF: 7. SIP 200 OK + SCF->>IM CN Subsystem: 7. SIP 200 OK + Note right of IM CN Subsystem: 8. SIP 200 OK + IM CN Subsystem->>UE: 8. SIP 200 OK + Note left of UE: 9. HTTP GET + UE->>HTTP server: 9. HTTP GET + Note right of HTTP server: 10. HTTP response (content file) + HTTP server->>UE: 10. HTTP response (content file) +``` + +The sequence diagram illustrates the interaction for a progressive download service. It starts with the UE sending a SIP INVITE to the IM CN Subsystem. The IM CN Subsystem forwards this to the SCF, which then forwards it to the HTTP/SIP adapter. The adapter sends an HTTP POST to the HTTP server, which responds with an HTTP 200 OK. The adapter then sends a SIP 200 OK back to the SCF, which forwards it to the IM CN Subsystem, which finally forwards it to the UE. The UE then sends an HTTP GET to the HTTP server, which delivers the content file in an HTTP response. + +Sequence diagram for IMS based session set-up for progressive download + +**Figure 33: IMS based session set-up for progressive download** + +1. The UE initiates the progressive download session by sending SIP INVITE to the IM CN subsystem, including an SDP offer. +2. The IM CN subsystem forwards the SIP INVITE message to the SCF. +3. The SCF verifies the user rights for the requested content, selects a HTTP/SIP adapter, and forwards the SIP INVITE message to the HTTP/SIP adapter. +4. The HTTP/SIP adapter selects a HTTP Server, and sends an HTTP POST message to the HTTP server, including the IP address of the UE. +5. The HTTP server answers to the HTTP/SIP adapter with a HTTP 200 OK response. +6. The HTTP/SIP adapter sends the SIP 200 OK answer to the SCF, including download URL of the requested content file in the SDP answer. +7. The SCF forward the SIP 200 OK to the IM CN subsystem. +8. The IM CN subsystem forwards the SIP 200 OK to the UE. +9. The UE sends HTTP request to the URL obtained from the SIP 200 OK message. +10. The HTTP server delivers the content file in the HTTP response to the UE. + +## 15.2 Procedures at the UE + +The UE initiates the progressive download session by sending SIP INVITE to the IM CN subsystem. The content of the SIP INVITE shall be as follows: + +- The Request URI is related to the session the user wants to activate The Request-URI shall be composed of a user and domain part as defined as follows: + - The user part contains the content identifier, retrieved from user service description information from SSF + - The domain part is the Service Provider domain name, obtained from SSF. +- The To header shall contain the same URI as in the Request URI. +- The From header shall indicate the public user identity of the user. + +The content identifier shall be retrieved from service selection information. + +The other headers shall be set according to 24.229 [7]. + +An SDP offer shall be included in the initial INVITE request, in accordance with media capabilities and policies available for the PSS session and with the parameters received from the SSF during service selection procedure or during the procedure for retrieving missing parameters by SIP OPTIONS. + +The SDP media parameters should describe the HTTP progressive download session. The differences with the SDP offer defined for streaming is the absence of media line corresponding to the control protocol (RTSP), and the indication of TCP transport and HTTP progressive download method instead of streaming in "m" line. + +The SDP parameters for the HTTP progressive download channel shall be set as follows: + +- a 'm' line for an HTTP progressive download channel of format: *m= * + - The media field shall have a value of "application". + - The port field shall be set to a value of 9, which is the discard port. See RFC 4145 [13] and RFC 4572 [14]. + - The transport field shall be set to TCP or TCP/TLS. The former is used when HTTP runs directly on top of TCP and the latter is used when HTTP runs on top of TLS, which in turn runs on top of TCP. + - The parameter shall be included and shall be set to *3gpp\_http*. + +NOTE: the *3gpp\_http* application format should have a new MIME subtype registered in IANA. + +- An "a=setup" attribute shall be present and set to "active" indicating that the UE will initiate an outgoing TCP connection to the HTTP Server. +- An "a= connection" attribute shall be present and set as "new" indicating that the UE will establish a new outgoing TCP connection towards the HTTP Server. +- A "c" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and IP address of the flow of the related HTTP progressive download channel (ex. *c=IN IP4 *). +- Optionally a "b=" line may contain the proposed bandwidth. If the user has fetched the bandwidth required for this particular content delivery channel during service selection retrieval, the bandwidth attribute at media level shall be set to this value. Otherwise, this attribute shall be set to a pre-configured value; (ex. *b=AS:15000*) + +An example of the SDP offer for IMS-based PSS progressive download is: + +``` +v=0 +o=bob 2890844527 2890844527 IN IP4 192.0.2.2 +s=Download Session +i=A download session declared within the session description protocol +t=0 0 +m=application 9 TCP 3gpp_http +a=connection:new +a=setup:active +c= IN IP4 192.0.2.2 +``` + +b=AS:15000 + +Once the UE has received the SIP 200 OK from the HTTP/SIP adapter, it sends the HTTP GET request to the URL obtained in download session description. The HTTP "Connection" header shall be set to "Keep-Alive" to require persistent TCP connection. + +An example of the HTTP GET request sent by the UE is: + +HTTP GET http://123.23.23.23/ movie1.mpeg + +## 15.3 Procedures at the IM CN subsystem + +The IM CN subsystem shall forward the SIP INVITE to the SCF. + +Upon reception of the SIP 200 OK from the SCF, the IM CN subsystem forwards the SIP 200 OK to the UE. + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +## 15.4 Procedures at the SCF + +Upon reception of the SIP INVITE from the UE, the SCF checks the user rights for the requested content, identifies that the request is for progressive download, selects and forwards the SIP request to the HTTP/SIP adapter which is in charge of the download service by changing the "Request-URI" accordingly. + +When receiving a 301 or 302 response from the HTTP/SIP adapter, the SCF shall not forward this message to the UE. + +## 15.5 Procedures at the HTTP/SIP adapter + +Upon reception of the download session initiation request, the HTTP/SIP adapter shall examine the content identifier present in the user-part of the To header and the media parameters in the SDP, selects a HTTP Server according to the Request URI, and sends a HTTP POST message to the HTTP server including the IP address of the UE. + +The HTTP/SIP adapter may decide to redirect the request to another HTTP/SIP adapter server. In this case the HTTP/SIP adapter shall return a 301 response if the content is not managed by this HTTP/SIP adapter or 302 response for any other reasons (e.g. load balancing). The redirecting HTTP/SIP adapter indicates one or more destination HTTP/SIP adapter addresses in the Contact header. + +The HTTP/SIP adapter returns the SIP 200 OK message to the SCF, including the SDP answer. The SDP answer should describe the HTTP progressive download session. The differences with the SDP answer defined for streaming is the absence of media line corresponding to the control protocol (RTSP), the indication of TCP transport and HTTP progressive download method instead of streaming in "m" line, the indication of HTTP URL instead of RTSP URI. + +If the content that the user has selected cannot be found the HTTP/SIP adapter shall reply with appropriate, SIP error code 404 Not Found response. + +The HTTP/SIP adapter shall construct the SIP 200 OK message as follows: + +- an 'm' line for an HTTP progressive download channel of format: `m= ` + - The media field shall have a value of "application". + - The port field shall be set to the value of HTTP Server for the progressive download channel, such as 80. + - The transport field shall be set to TCP or TCP/TLS. The former is used when HTTP runs directly on top of TCP and the latter is used when HTTP runs on top of TLS, which in turn runs on top of TCP. + - The fmt field shall be identical to the one received in the SDP offer. +- a "c" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and IP address of HTTP Server for the flow of the related HTTP progressive download channel (e.g. `c=IN IP4 `). +- The "a=setup" attribute shall be present and set to 'passive' indicating that connection shall be initiated by the other endpoint (UE). +- An "a= connection" attribute shall be present and set as "new" indicating that the UE will establish a new outgoing TCP connection towards the HTTP Server. + +- One or more a=fmtp lines representing HTTP specific attributes set as follows: + - a "fmtp:3gpp\_http http-url" attribute in the format of an absolute URI to be used for the UE in the subsequent HTTP requests. The h-uri can be in form of absolute or relative URI. If absolute URI is specified then it is used as-is in subsequent HTTP requests. If relative URI is specified in form of a media path, then the HTTP absolute URI could be constructed by the UE using the IPAddress (from c-line) and port (from m-line) as the base followed by h-uri value for the content path. +- the "b=" line shall contain the proposed bandwidth. Since the content download is unidirectional the bandwidth shall be set to 0. (ex. b=AS:0). + +An example of the SDP answer in the SIP 200 OK response is: + +``` +v=0 +o=bob 2890844527 2890844527 IN IP4 192.0.2.1 +s=Download Session +i=A download session declared within the session description protocol +t=0 0 +m=application 80 TCP 3gpp_http +a=connection:new +a=setup:passive +a=fmtp 3gpp_http h-url http://operator.com/movie1.mpeg +c=IN IP4 192.0.2.1 +b=AS:0 +``` + +## 15.6 Procedures at the HTTP server + +Upon reception of the HTTP POST message received from the HTTP/SIP adapter, the HTTP server answers with an HTTP 200 OK message to the HTTP/SIP adapter. + +Upon reception of the HTTP GET received from the UE, the HTTP server delivers in the HTTP response the content file corresponding to the URL obtained in the received HTTP GET. The HTTP "Connection" header shall be set to "Keep-Alive" to indicate it is a persistent TCP connection. + +## 15.7 Session termination + +### 15.7.1 General description + +#### 15.7.1.1 UE-initiated PSS download session teardown + +![Sequence diagram of UE-initiated IMS PSS download session termination](4847c98185bc52e8786b78738bc52b45_img.jpg) + +The diagram illustrates the sequence of messages for UE-initiated IMS PSS download session termination. The participants are UE, IMS, SCF, HTTP/SIP Adapter, and HTTP Server. The sequence starts with the UE sending a SIP BYE message to the IMS. The IMS then forwards the SIP BYE message to the SCF. The SCF sends the SIP BYE message to the HTTP/SIP Adapter. The HTTP/SIP Adapter sends an HTTP POST message to the HTTP Server. The HTTP Server responds with an HTTP 200 OK message to the HTTP/SIP Adapter. The HTTP/SIP Adapter then sends a SIP 200 OK message to the SCF. The SCF forwards the SIP 200 OK message to the IMS. Finally, the IMS sends the SIP 200 OK message to the UE. A thick horizontal line at the top of the diagram, spanning from the UE to the HTTP Server, is labeled 'HTTP response (content file)', indicating the data transfer phase that precedes the termination sequence. + +Sequence diagram of UE-initiated IMS PSS download session termination + +**Figure 33a: UE-initiated IMS PSS download session termination** + +Here the case of UE termination is described. The following steps are carried out: + +1. The UE sends a SIP BYE message. +2. The IM CN subsystem forwards the SIP BYE message to the SCF. +3. The SCF sends the SIP BYE message to the HTTP/SIP adapter. +4. The HTTP/SIP adapter sends an HTTP POST to the HTTP server. +5. In case the HTTP Server is transmitting the content file, it stops sending data for this session. The HTTP server sends a HTTP 200 OK to the HTTP/SIP adapter. +6. The HTTP/SIP adapter sends a SIP 200 OK to the UE via SCF and IM CN subsystem. + +### 15.7.1.2 SCF-initiated PSS download session teardown + +![Sequence diagram for SCF-initiated IMS PSS download session termination](e5ded42f8e352da02ee86cb55550c45d_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM_CN_Subsystem + participant SCF + participant HTTP_SIP_adapter as HTTP/SIP adapter + participant HTTP_server + + Note right of SCF: SCF-initiated + SCF->>HTTP_SIP_adapter: SIP BYE + HTTP_SIP_adapter->>HTTP_server: HTTP POST + HTTP_server-->>HTTP_SIP_adapter: HTTP 200 OK + HTTP_SIP_adapter-->>SCF: SIP 200 OK + SCF->>IM_CN_Subsystem: SIP BYE + IM_CN_Subsystem->>UE: SIP BYE + UE-->>IM_CN_Subsystem: SIP 200 OK + IM_CN_Subsystem-->>SCF: SIP 200 OK +``` + +The sequence diagram illustrates the SCF-initiated IMS PSS download session termination. It involves five lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, and HTTP server. The process begins with the SCF sending a SIP BYE message to the HTTP/SIP adapter. The adapter then sends an HTTP POST message to the HTTP server, which responds with an HTTP 200 OK. The adapter then sends a SIP 200 OK message back to the SCF. Upon receiving the SIP 200 OK, the SCF sends a SIP BYE message to the IM CN Subsystem, which in turn forwards it to the UE. The UE responds with a SIP 200 OK message to the IM CN Subsystem, which finally forwards it to the SCF. + +Sequence diagram for SCF-initiated IMS PSS download session termination + +**Figure 33b: SCF-initiated IMS PSS download session termination** + +Here the case of the SCF-initiated teardown procedure is described. The following steps are carried out: + +- 1) The SCF sends a SIP BYE to the HTTP/SIP adapter. +- 2) The HTTP/SIP adapter sends HTTP POST message to the HTTP server. +- 3) The HTTP server sends the HTTP 200 OK message to the HTTP/SIP adapter. +- 4) The HTTP/SIP adapter sends the SIP 200 OK message to the SCF. +- 5) Upon receipt of the SIP 200 OK, the SCF sends the SIP BYE message to the IM CN subsystem. +- 6) The IM CN Subsystem forwards the SIP BYE message to the UE. +- 7) The UE sends a SIP 200 OK message to the IM CN Subsystem. +- 8) The IM CN Subsystem forwards the SIP 200 OK to the SCF. + +### 15.7.1.3 HTTP/SIP adapter-initiated PSS download session teardown + +![Sequence diagram for HTTP/SIP adapter-initiated IMS based session teardown for PSS download. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, and HTTP server. The sequence of messages is: 1. HTTP/SIP adapter sends HTTP POST to HTTP server. 2. HTTP server sends HTTP 200 OK to HTTP/SIP adapter. 3. HTTP/SIP adapter sends SIP BYE to SCF. 4. SCF sends SIP 200 OK to HTTP/SIP adapter. 5. SCF sends SIP BYE to IM CN Subsystem. 6. IM CN Subsystem sends SIP BYE to UE. 7. UE sends SIP 200 OK to IM CN Subsystem. 8. IM CN Subsystem sends SIP 200 OK to SCF.](0a3ab80d35c138cc4038b5758f6ff34d_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP server + + Note right of HTTP/SIP adapter: 1) HTTP POST + HTTP/SIP adapter->>HTTP server: HTTP POST + Note right of HTTP server: 2) HTTP 200 OK + HTTP server-->>HTTP/SIP adapter: HTTP 200 OK + Note right of HTTP/SIP adapter: 3) SIP BYE + HTTP/SIP adapter->>SCF: SIP BYE + Note right of SCF: 4) SIP 200 OK + SCF-->>HTTP/SIP adapter: SIP 200 OK + Note right of SCF: 5) SIP BYE + SCF->>IM CN Subsystem: SIP BYE + Note right of IM CN Subsystem: 6) SIP BYE + IM CN Subsystem->>UE: SIP BYE + Note right of UE: 7) SIP 200 OK + UE-->>IM CN Subsystem: SIP 200 OK + Note right of IM CN Subsystem: 8) SIP 200 OK + IM CN Subsystem-->>SCF: SIP 200 OK + +``` + +Sequence diagram for HTTP/SIP adapter-initiated IMS based session teardown for PSS download. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, and HTTP server. The sequence of messages is: 1. HTTP/SIP adapter sends HTTP POST to HTTP server. 2. HTTP server sends HTTP 200 OK to HTTP/SIP adapter. 3. HTTP/SIP adapter sends SIP BYE to SCF. 4. SCF sends SIP 200 OK to HTTP/SIP adapter. 5. SCF sends SIP BYE to IM CN Subsystem. 6. IM CN Subsystem sends SIP BYE to UE. 7. UE sends SIP 200 OK to IM CN Subsystem. 8. IM CN Subsystem sends SIP 200 OK to SCF. + +**Figure 33c: HTTP/SIP adapter-initiated IMS based session teardown for PSS download** + +Here the case of the SCF-initiated teardown procedure is described. The following steps are carried out: + +- 1) The HTTP/SIP adapter sends the HTTP POST to the HTTP server. +- 2) The HTTP server sends the HTTP 200 OK to the HTTP/SIP adapter. +- 3) The HTTP/SIP adapter sends the SIP BYE message to the SCF. +- 4) The SCF sends the SIP 200 OK message to the HTTP/SIP adapter. +- 5) The SCF sends the SIP BYE message to the IM CN Subsystem. +- 6) The IM CN Subsystem forwards the SIP BYE message to the UE. +- 7) The UE sends a SIP 200 OK message to the IM CN Subsystem. +- 8) The IM CN subsystem forwards the SIP 200 OK message to the SCF. + +## 15.7.2 Procedures at the UE + +### 15.7.2.1 UE-initiated PSS download session teardown + +To teardown the PSS download session, the UE shall send a SIP BYE message to the SCF. + +### 15.7.2.2 Network-initiated PSS download session teardown + +Upon receipt of the SIP BYE message, the UE shall the SIP 200 OK message to the SCF. The UE proceeds to release the associated resources held for the PSS session. + +## 15.7.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in [6]. + +## 15.7.4 Procedures at the SCF + +### 15.7.4.1 UE-initiated PSS download session teardown + +Upon receipt of a SIP BYE message the SCF shall forward it to the HTTP/SIP adapter. + +### 15.7.4.2 SCF-initiated PSS download session teardown + +The SCF initiates the PSS download session teardown by sending a SIP BYE message to the HTTP/SIP adapter. Upon receipt of the SIP 200 OK from the HTTP/SIP adapter, the SCF shall send a SIP BYE message to the UE. + +### 15.7.4.3 HTTP/SIP adapter-initiated PSS download session teardown + +Upon receipt of the SIP BYE message received from the HTTP/SIP adapter, the SCF sends the SIP 200 OK message to the HTTP/SIP adapter. Then the SCF forwards the SIP BYE message to the UE. + +## 15.7.5 Procedures at the HTTP/SIP adapter + +### 15.7.5.1 UE-initiated PSS download session teardown + +Upon receipt of a SIP BYE message from the SCF the HTTP/SIP adapter shall send a HTTP POST message to the HTTP Server. + +Upon receipt of a HTTP 200 OK message from the HTTP server, the HTTP adapter shall send a SIP 200 OK message to the SCF. + +### 15.7.5.2 SCF-initiated PSS download session teardown + +Upon receipt of the SIP BYE message, the HTTP/SIP adapter sends the HTTP POST message to the HTTP server. Upon receipt of the HTTP 200 OK message from the HTTP server, the HTTP/SIP adapter sends the SIP 200 OK to the SCF. + +### 15.7.5.3 HTTP/SIP adapter-initiated PSS download session teardown + +The HTTP/SIP adapter sends the HTTP POST to the HTTP server. Upon receipt of the HTTP 200 OK, the HTTP/SIP adapter sends the SIP BYE message to the SCF. + +## 15.7.6 Procedures at the HTTP server + +Upon receipt of a HTTP POST from the HTTP/SIP adapter, the HTTP server shall stop all on-going data transmissions and send a HTTP 200 OK message to the HTTP/SIP adapter. + +--- + +# 16 Inter UE Session Transfer + +## 16.0 Introduction + +Inter UE Session transfer (IUT) is used for the transfer or replication of an ongoing PSS session from a transferor UE (UE-1) to a transferee UE (UE-2). IUT includes the transfer of the session control as well as the media flows. + +UE-1 and UE-2 are under the same user subscription and are served by the same SCF. + +Inter UE Session transfer follows the general Inter UE session transfer procedures as defined in [40] and [41]. + +NOTE 1: Functionality of SCC AS [40] for Inter UE transfer can be implemented by the SCF. + +In the push mode, the session transfer is initiated by UE-1. In the pull mode, the session transfer is initiated by UE-2. + +## 16.1 Push mode + +UE-1 is involved in an IMS session with the PSS server. The information flow in Figure 34 shows the transfer of the session from UE-1 to UE-2. The grey boxes refer to the session transfer procedures as defined in clause 15 of [41]. + +![Sequence diagram for Inter UE session transfer (push mode) involving UE-1, UE-2, IM CN Subsystem, SCC, SCF, and PSS adapter/server.](c07e21a8d65991db04263322f859c94f_img.jpg) + +``` + +sequenceDiagram + participant UE-1 + participant UE-2 + participant IM CN Subsystem + participant SCC + participant SCF + participant PSS adapter/server + + Note left of UE-1: Error: + Note right of SCF: Error: Reference source not found + + UE-1-->>SCF: 1. IMS Service Control + UE-1->>PSS adapter/server: 2. Media path between UE-1 and PSS server + Note over UE-1, SCF: 3. Bookmark creation + UE-1->>IM CN Subsystem: 4. SIP REFER + IM CN Subsystem->>SCC: 5. SIP REFER + Note over SCC, SCF: 6. REFER request authorization + SCC->>IM CN Subsystem: 7. SIP REFER + IM CN Subsystem->>UE-2: 8. SIP REFER + UE-2->>IM CN Subsystem: 9. SIP 202 REFER + IM CN Subsystem->>SCC: 10. SIP 202 REFER + SCC->>IM CN Subsystem: 11. SIP 202 REFER + IM CN Subsystem->>UE-1: 12. SIP 202 REFER + Note over UE-2, PSS adapter/server: 13. PSS session establishment between UE-2 and PSS server using bookmark + UE-2-->>SCF: 14a. IMS Service Control + UE-2->>PSS adapter/server: 14b. Media path between UE-2 and PSS server + UE-2->>IM CN Subsystem: 15. SIP NOTIFY (SIP 200) + IM CN Subsystem->>SCC: 16. SIP NOTIFY (SIP 200) + SCC->>IM CN Subsystem: 17. SIP NOTIFY (SIP 200) + IM CN Subsystem->>UE-1: 18. SIP NOTIFY (SIP 200) + UE-1->>IM CN Subsystem: 19. SIP 200 NOTIFY + IM CN Subsystem->>SCC: 20. SIP 200 NOTIFY + SCC->>IM CN Subsystem: 21. SIP 200 NOTIFY + IM CN Subsystem->>UE-2: 22. SIP 200 NOTIFY + Note over UE-1, PSS adapter/server: 23. PSS session teardown between UE-1 and PSS server (in case of session transfer) + +``` + +Sequence diagram for Inter UE session transfer (push mode) involving UE-1, UE-2, IM CN Subsystem, SCC, SCF, and PSS adapter/server. + +**Figure 34: Inter UE session transfer (push mode)** + +Note: This sequence is simplified and does not e.g. show session progress messages + +1.-2. UE-1 is in a IMS controlled PSS session with PSS server receiving a media stream. + +3. UE-1 may initiate nBookmark procedure according to clause 12.1. + +NOTE: When a media session is replicated from UE-1 to UE-2, it may be needed that the media presentation on the two UEs is synchronized for good user quality of experience. In order to obtain synchronized playout with UE-2, UE-1 may include "suggestedPresentationOffset" in the bookmark. "suggestedPresentationOffset" specifies an offset in time from the bookmark created time to the bookmark presentation time at UE1. + +4.-5. SIP REFER request initiating the inter UE transfer to UE-2 is sent from UE-1 to SCC + +The SIP REFER request shall follow the procedures in [41] section 15. + +Additionally, the Refer-To header shall be extended by a To header field which includes the original content identifier copied from the Request URI of the original SIP INVITE request initiated from the transferor. + +Further a body header that contains the SDP body to be included in the PSS session initiation request initiated from the transferee UE. The SDP body shall contain the same number of media lines as the SDP used in the original PSS session from the transferor. Each media line shall indicate the same media type as its corresponding media component in the SDP used in the original session by the transferor UE. + +The body of the REFER request shall include the bookmark as defined in Annex J. + +If step 3 is carried out, the bookmark may be not present. In this case, an identifier of the stored bookmark is included. + +NOTE: Before initiation of IUT, UE 1 may discover UE-2, e.g. by presence service, which is out of scope of TS 26.237. + +6. The SCC authorizes the request and if authorization is passed successfully, the SCC forwards the SIP REFER request further. + +7.-8. SIP REFER request (SCC to UE-2). + +9.-12. SIP 202 response to the SIP REFER request (UE-2 to UE-1). + +13. PSS session initiation using the bookmark according to clause 12.2.2. + +NOTE: In order to obtain synchronized media playout with UE-1, when the media session is replicated on UE-2, at time $T$ (in the wall-clock time), UE-2 may present the media unit with an offset equal to $T - \text{bookmarkcreated time} + \text{bookmark offset} - \text{suggestedPresentationOffset}$ from the beginning of the program. + +14. UE-2 is in an IMS controlled PSS session with PSS server. + +The media path is now established between UE-2 and PSS server and the IMS service control between UE-2 and SCC AS. + +15.-18. SIP NOTIFY request (UE-2 to UE-1 over intermediate IM CN subsystem entities and SCC). + +The UE-2 generates the SIP NOTIFY request carrying the message/sipfrag body and sends it towards UE-1. + +19.-22. SIP 200 OK response to the SIP NOTIFY request (UE-1 to UE-2 over intermediate IM CN subsystem entities and SCC). + +23. In case of session transfer, a PSS session teardown between UE-1 and PSS server according to clause 8.2.6.1.1 is executed. In case of session replication, no PSS session teardown between UE-1 and PSS server is executed. The streaming session between UE-1 and PSS server should be still ongoing. + +## 16.2 Pull mode + +UE-1 is involved in an IMS session with the PSS server. The information flow in Figure X shows the transfer of the session from UE-1 to UE-2. The grey boxes refer to the session transfer procedures as defined in sub-clause 27.2 of [41]. + +![Sequence diagram for Inter UE session transfer (pull mode).](49fe8fe978c0f7e73112d231feb377eb_img.jpg) + +The sequence diagram illustrates the interaction between UE-1, UE-2, IM CN Subsystem, SCC, SCF, and PSS adapter/server for an inter-UE session transfer in pull mode. The process is divided into three main phases: + +- Initial Session (UE-1):** UE-1 receives an IMS Service Control (1) and establishes a media path with the PSS server (2). +- Session Discovery and Transfer Request:** UE-2 discovers UE-1's sessions (3) and sends a SIP REFER request (4) to the IM CN Subsystem. The IM CN Subsystem forwards it to the SCC (5), which then forwards it to the SCF (6). The SCF forwards it back to the IM CN Subsystem (7), which then forwards it to UE-1 (8). UE-1 responds with a SIP 202 REFER (9), which is forwarded by the IM CN Subsystem (10) and SCC (11) to UE-2. +- Bookmark Creation:** A 'Bookmark creation' block (12) occurs. UE-1 sends a SIP MESSAGE (13) to the IM CN Subsystem, which is forwarded to the SCC (14) and then to the SCF (15). The SCF responds with a SIP MESSAGE (16) to the IM CN Subsystem, which is forwarded to UE-2 (17). UE-2 responds with a SIP 200 MESSAGE (18), which is forwarded by the SCC (19) and IM CN Subsystem (20) to UE-1. +- PSS Session Establishment (UE-2):** A 'PSS session establishment between UE-2 and PSS server using bookmark' block (21) occurs. UE-2 sends an IMS Service Control (22) and establishes a media path with the PSS server (23). UE-1 sends a SIP NOTIFY (24) to the IM CN Subsystem, which is forwarded to the SCC (25) and then to the SCF (26). The SCF responds with a SIP NOTIFY (27) to the IM CN Subsystem, which is forwarded to UE-2 (28). UE-2 responds with a SIP 200 NOTIFY (29), which is forwarded by the SCC (30) and IM CN Subsystem (31) to UE-1. +- PSS Session Teardown (UE-1):** A 'PSS session teardown between UE-1 and PSS server (in case of session transfer)' block (32) occurs. + +Sequence diagram for Inter UE session transfer (pull mode). + +**Figure 35: Inter UE session transfer (pull mode).** + +NOTE: This sequence is simplified and does not e.g. show session progress messages + +1.-2. UE-1 is in a IMS controlled PSS session with PSS server receiving a media stream. + +3. UE-2 discovers the sessions of UE-1 as defined in clause 21 of [41]. + +4.-7. SIP REFER request (UE-2 to UE-1) + +The UE-2 sends SIP REFER request to UE-1 to request a bookmark. + +8.-11. SIP 202 (Accepted) response for the SIP REFER request (UE-1 to UE-2) + +12. UE-1 may initiate nBookmark procedure according to clause 12.1. + +NOTE: When a media session is replicated from UE-1 to UE-2, it may be needed that the media presentation on the two UEs is synchronized for good user quality of experience. In order to obtain synchronized playout with UE-2, UE-1 may include "suggestedPresentationOffset" in the bookmark. "suggestedPresentationOffset" specifies an offset in time from the bookmark created time to the bookmark presentation time at UE1. + +13.-16. SIP MESSAGE request (UE-1 to UE-2) + +Based on the received SIP REFER request, the UE-1 generates a SIP MESSAGE request. + +The body of the MESSAGE request shall include the bookmark as defined in Annex J. + +If step 3 is carried out, the bookmark may be not present. In this case, an identifier of the stored bookmark is included. + +17.-20. SIP (200) OK response to SIP MESSAGE request (UE-2 to UE-1) + +21. PSS session initiation using the bookmark according to clause 12.2.2. The timestamp information in the bookmark may be ignored in case of live session initiation. + +NOTE: In order to obtain synchronized media playout with UE-1, when the media session is replicated on UE-2, at time $T$ (in the wall-clock time), UE-2 may present the media unit with an offset equal to $T - \text{bookmarkcreated time} + \text{bookmark offset} - \text{suggestedPresentationOffset}$ from the beginning of the program. + +22.-23. UE-2 is in a IMS controlled PSS session with PSS server receiving a media stream. + +24.-27. SIP NOTIFY request (UE-1 to UE-2) + +The UE-1 informs the UE-2 that the action triggered by SIP REFER request was successfully completed. + +28.-31. SIP 200 (OK) response to SIP NOTIFY request (UE-2 to UE-1) + +32. In case of session transfer, a PSS session teardown between UE-1 and PSS server according to clause 8.2.6.1.1 is executed. In case of session replication, no PSS session teardown between UE-1 and PSS server is executed. The streaming session between UE-1 and PSS server should be still ongoing. + +--- + +## 17 Parental Control Service + +Parental Control provides parents the method to help protect their children and set restrictions while consuming PSS/MBMS user services. During PSS/MBMS Session initialization, Preventive Parental Control is executed either based on the user's (child's) profile and the minimum allowed age for the content, as specified in section 17.1. The parents can also temporarily block or allow a program for his/her child, as specified in section 17.2, referred as Interactive Parental Control. + +The user's profile contains the user's age and the parents' parental control policy. The parental control policy includes allowed program list (white list) and forbidden program list (black list). The minimum allowed age for the content is the minimum age of the user who is allowed to watch the said content. The minimum allowed age is signalled in the service selection information by various content rating schemas. + +### 17.1 Preventive Parental Control + +#### 17.1.1 Parental Control during PSS Session initialization + +##### 17.1.1.1 Procedure at UE + +The UE SHALL support the procedure specified in sub-clause 8.2.3.2. + +Upon receiving a 403 response from SCF, the UE may issue an SIP request to get the program allowed by his/her parents, as specified in sub-clause 17.2.2. + +### 17.1.1.2 Procedure at SCF + +The SCF SHALL support the procedure specified in sub-clause 8.2.3.4, with the following additions: + +After checking the rights of the requested PSS service, the SCF shall further check the parental control information of the requester, by comparing the user's profile and the minimum allowed age of the request program: + +- If the minimum allowed age is lower or equal to the child's age and the program is not in the list of forbidden programs, then the SCF shall continue the PSS session initialization as specified in sub-clause 8.2.3.4; +- If the minimum allowed age is higher than the child's age but the program is in the list of allowed programs, then the SCF shall continue the PSS session initialization as specified in sub-clause 8.2.3.4; +- If the minimum allowed age is higher than the child's age and the program is not in the list of allowed programs then the SCF shall respond the UE with a 403 error code; +- If the program is in the list of forbidden programs then the SCF shall respond the UE with a 403 error code. + +### 17.1.1.3 Procedure at PSS Adapter + +The PSS Adapter shall support the procedure specified in sub-clause 8.2.3.5. + +## 17.1.2 Parental Control during MBMS Session initialization + +### 17.1.2.1 Procedure at UE + +The UE shall support the procedure specified in sub-clause 8.3.3.2. + +Upon receiving a 403 response from SCF, the UE may issue an SIP request to get the program allowed by his/her parents, as specified in sub-clause 17.2.2. + +### 17.1.2.2 Procedure at SCF + +The SCF shall support the procedure specified in sub-clause 8.3.3.4, with the following additions: + +After performing service authorization procedures to check the service rights of requested MBMS service, the SCF shall further check the parental control information of the requester, by comparing the user's profile and the minimum allowed age of the request program: + +- If the minimum allowed age is lower or equal to the child's age and the program is not in the list of forbidden programs, then the SCF shall continue the MBMS session initialization as specified in sub-clause 8.3.3.4; +- If the minimum allowed age is higher than the child's age but the program is in the list of allowed programs, then the SCF shall continue the MBMS session initialization as specified in sub-clause 8.3.3.4; +- If the minimum allowed age is higher than the child's age and the program is not in the list of allowed programs then the SCF shall respond the UE with a 403 error code; +- If the program is in the list of forbidden programs then the SCF shall respond the UE with a 403 error code. + +## 17.2 Interactive Parental Control service + +### 17.2.1 Blocking + +#### 17.2.1.1 General Description + +Following is a general call flow for blocking the child from a program: + +![Sequence diagram for Interactive Parental Control Service--Blocking. Lifelines: Parent UE, Child UE, IM-CN Subsystem, SCF, PSS adapter/PSS Server, BM-SC-UPF. The sequence shows: 1. Parent UE retrieves information about content watching by Child UE; 2. Parent UE sends a SIP MESSAGE (Parent Control Block Request) to SCF; 3. SCF responds with 200 OK; 4. SCF validates the request and updates user profile; 5. SCF initiates PSS/MBMS streaming session teardown.](f61d0925551545b5938b3a4d1bbf63c3_img.jpg) + +``` + +sequenceDiagram + participant Parent UE + participant Child UE + participant IM-CN Subsystem + participant SCF + participant PSS adapter/PSS Server + participant BM-SC-UPF + + Note over Parent UE, SCF: 1. Parent UE retrieves information about content watching by Child UE + Parent UE->>SCF: 2. SIP MESSAGE (Parent Control Block Request) + SCF-->>Parent UE: 3. 200 OK + Note right of SCF: 4. Validate the request and update user profile + Note over SCF, BM-SC-UPF: 5. SCF initiated PSS/MBMS streaming session teardown + +``` + +Sequence diagram for Interactive Parental Control Service--Blocking. Lifelines: Parent UE, Child UE, IM-CN Subsystem, SCF, PSS adapter/PSS Server, BM-SC-UPF. The sequence shows: 1. Parent UE retrieves information about content watching by Child UE; 2. Parent UE sends a SIP MESSAGE (Parent Control Block Request) to SCF; 3. SCF responds with 200 OK; 4. SCF validates the request and updates user profile; 5. SCF initiates PSS/MBMS streaming session teardown. + +**Figure 36: Interactive Parental Control Service--Blocking** + +- 1 The Parent UE retrieves information about the content which is being watched by Child UE. This is achieved by the procedure defined in section 11, Blending of Presence and PSS/MBMS user services. +- 2 When the parent identifies that the watched content is not suitable for the child, the Parent UE issue a SIP MESSAGE to SCF, including necessary information (content identity, identities of parent and child). +- 3 The SCF feedback with 200 OK. +- 4 The SCF validates the parental control request. If the request is valid, the SCF then update the controlled use's profile +- 5 If the request is valid, the SCF initiates the PSS/MBMS streaming session teardown procedure. + +### 17.2.1.2 Procedure at Parent UE + +When the parent wants to block the program the child is watching, the UE of the parent shall issue a SIP MESSAGE request for Parental Control. The content of the parental control request is: + +- The request-URI shall be set to the well-known PSI for parental control service; +- The From header shall be set to the public user identity of the parent; +- The To header shall be set to the public user identity of the child; +- The content-type shall be set to “application/3gpp-ims-pss-mbms-parental-control+xml”; +- The message body shall include a XML document conforming to the schema defined in Annex L, wherein the PCBlockRequest shall be presented with the following parameters: + - ChildUserID: the public user identity of the child, whom will be blocked. + - PatentUserID: the public user identity of the parent, who initiates the blocking. + - ProgramID: the identifier of the content being blocked by the parent. + +### 17.2.1.3 Procedure at SCF + +Upon receipt of a SIP MESSAGE request for Parental Control from the UE via the IM-CN Subsystem, the SCF shall identify the Content-Type associated with the MESSAGE request to determine that it is a Parental Control request. + +Following that the SCF shall extract the parental control information and check whether the parent has the rights to perform Parental Control on the child. + +If the parent has the rights to perform Parental Control on the child, the SCF shall update the child's profile with adding a forbidden program. Following that, the SCF initiates the PSS streaming teardown procedure as specified in section 8.2.6.1 or MBMS streaming teardown procedure as specified in sub-clause 8.3.5. + +## 17.2.2 Allowing + +### 17.2.2.1 Allowing in PSS Session Initialization + +#### 17.2.2.1.1 General Description + +Following is a general call flow for allowing a PSS user service requested by the child: + +![Sequence diagram for Interactive Parental Control Service—Allowing a PSS user service. Lifelines: Parent UE, Child UE, IM CN Subsystem, SCF, PSS adapter, PSS Server. The sequence starts with the Child UE sending a SIP INVITE (Parental Control Allowing Request) to the SCF. The SCF responds with '2. Validate the request'. The SCF then sends a message to the Parent UE. The Parent UE responds with '5. Update user profile' to the SCF. Finally, the SCF sends a response back to the Child UE.](bbddeb46a8bee133d49003273fcfc8dd_img.jpg) + +``` + +sequenceDiagram + participant Child UE + participant SCF + participant Parent UE + Note right of SCF: 1. SIP INVITE (Parental Control Allowing Request) + Child UE->>SCF: 1. SIP INVITE (Parental Control Allowing Request) + Note right of SCF: 2. Validate the request + SCF->>Parent UE: 2. Validate the request + Note right of Parent UE: 5. Update user profile + Parent UE->>SCF: 5. Update user profile + Note right of SCF: + SCF->>Child UE: + +``` + +Sequence diagram for Interactive Parental Control Service—Allowing a PSS user service. Lifelines: Parent UE, Child UE, IM CN Subsystem, SCF, PSS adapter, PSS Server. The sequence starts with the Child UE sending a SIP INVITE (Parental Control Allowing Request) to the SCF. The SCF responds with '2. Validate the request'. The SCF then sends a message to the Parent UE. The Parent UE responds with '5. Update user profile' to the SCF. Finally, the SCF sends a response back to the Child UE. + +**Figure 37: Interactive Parental Control Service—Allowing a PSS user service** + +0 (Optional) the Child UE initiates a PSS session and is refused with 403 error. + +1 The Child UE performs PSS session initialization with Parental Control Allowing Request, to request the Parent UE to allow him watching the program. + +2 Upon receiving a PSS session initialization request as well as a Parental Control Allowing Request, the SCF shall validate the request. + +3~4 The SCF send a Parental Control Allowing Request to the parents and the parent feedback its decision. The parent should make his decision based on service selection information related the program. Notes that this step can be done by either SIP MESSAGE message over IMS, or other means like SMS over mobile network. + +5 Upon receiving the Parental Control Allowing response, the SCF shall update the user's (child's) profile according to the parents' decision. + +6 If the parents decide to allow the child to watch the requested program, the SCF performs PSS session initialization; otherwise the SCF shall reject the session initialization request with a 403 error. + +7 Upon receiving 200 OK, the Parent UE setup the media path between the PSS server accordingly. + +#### 17.2.2.1.2 Procedure at Child UE + +The Child UE shall support the procedure specified in section 8.2.3.2. + +To acquire parents' permission to watch the program, the message body of session initialization request shall also include a XML document as Parental Control Allowing Request. The XML document shall conform to the schema as defined in Annex L, with the following additions: + +- The XML document shall be "application/3gpp-ims-pss-mbms-parental-control+xml" +- In the XML document, the PCAllowingRequest shall be presented with the following parameters: + - ChildUserID: the public user identity of the child, whom will be blocked. + - PatentUserID: the public user identity of the parent, who initiates the blocking. + - ProgramID: the identifier of the content being blocked by the parent. + +#### 17.2.2.1.3 Procedure at Parent UE + +Upon receiving a SIP MESSAGE, the Parent UE shall identify it is a parental control request by the Content Type in the message header and feedback 200 OK response immediately. Following that the Parent UE shall extract the parent control request information. + +To accept the Parent Control Allowing Request, the Parent UE shall not change the XML document and send it back in a SIP MESSAGE message to the SCF. + +To refuse the Parent Control Allowing Request, the Parent UE shall delete the ProgramID in the XML document and send it back in a SIP MESSAGE message to the SCF. + +#### 17.2.2.1.4 Procedure at SCF + +The SCF shall support the procedure specified in section 17.1.1.3, with the following addition: + +If there is a Parent Control Allowing request XML document, the SCF shall extract the parental control information. Following that, the SCF shall forward the request to the Parent UE according to the request and waiting for the response. This can be done either by SIP MESSAGE exchange, or by other means like SMS over mobile network which is out of scope of this specification. + +For the former case, the SCF shall issue a SIP MESSAGE to the Parent UE and waiting for response. The SIP MESSAGE shall be built as following: + +- Request URI shall be set to the well know PSI for parental control service. +- To header shall be set to the public user identity of the parent; +- From header shall be set to the public user identity of the child; +- Content Type shall be set to "application/3gpp-ims-pss-mbms-parental-control+xml" +- The message body shall include the XML document received from the child. + +Upon receiving a SIP MESSAGE, the SCF shall identify it is a parental control request by the Content Type in the message header and feedback 200 OK response immediately. Following that the SCF shall extract the parent control request information and check the rights of the parent and then update the child's profile accordingly. + +After that the SCF shall perform the session initialization and respond the Parent UE as per sub-clause 8.2.3.4. + +## 17.2.2.2 Allowing in MBMS Session Initialization + +### 17.2.2.2.1 General Description + +Following is a general call flow for allowing a MBMS user service requested by the child: + +![Sequence diagram showing the call flow for allowing a MBMS user service. Lifelines: Parent UE, Child UE, IM CN Subsystem, SCF, BM-SC.UPF. The sequence starts with the Child UE sending a SIP INVITE (Parental Control Allowing Request) to the SCF. The SCF responds with '2. Validate the request' to the Child UE. The SCF then sends a message to the Parent UE. The Parent UE responds with '5. Update user profile' to the SCF. Finally, the SCF sends a message to the Child UE.](f2486d5031b55e42b300903a716b0a00_img.jpg) + +``` + +sequenceDiagram + participant Parent UE + participant Child UE + participant IM CN Subsystem + participant SCF + participant BM-SC.UPF + + Note right of SCF: 1. SIP INVITE (Parental Control Allowing Request) (UDP) + Child UE->>SCF: 1. SIP INVITE (Parental Control Allowing Request) (UDP) + Note right of SCF: 2. Validate the request + SCF-->>Child UE: 2. Validate the request + Note right of SCF: 3. Parental Control Allowing Request + SCF-->>Parent UE: 3. Parental Control Allowing Request + Note right of Parent UE: 4. Parental Control Allowing Response + Parent UE-->>SCF: 4. Parental Control Allowing Response + Note right of SCF: 5. Update user profile + SCF-->>Child UE: 5. Update user profile + +``` + +Sequence diagram showing the call flow for allowing a MBMS user service. Lifelines: Parent UE, Child UE, IM CN Subsystem, SCF, BM-SC.UPF. The sequence starts with the Child UE sending a SIP INVITE (Parental Control Allowing Request) to the SCF. The SCF responds with '2. Validate the request' to the Child UE. The SCF then sends a message to the Parent UE. The Parent UE responds with '5. Update user profile' to the SCF. Finally, the SCF sends a message to the Child UE. + +**Figure 38: Interactive Parental Control Service—Allowing a MBMS user service** + +- 0 (Optional) the Child UE initiates a MBMS session and is refused with 403 error. +- 1 The Child UE performs MBMS session initialization with Parental Control Allowing Request, to request the Parent UE to allow him watching the program. +- 2 Upon receiving a PSS session initialization request as well as a Parental Control Allowing Request, the SCF shall validate the request. +- 3~4 The SCF send a Parental Control Allowing Request to the parents and the parent feedback its decision. The parent should make his decision based on service selection information related the program. Notes that this step can be done by either SIP MESSAGE message over IMS, or other means like SMS over mobile network. +- 5 Upon receiving the Parental Control Allowing response, the SCF shall update the user's (child's) profile according to the parents' decision. +- 6 If the parents decide to allow the child to watch the requested program, the SCF performs MBMS session initialization; otherwise the SCF shall reject the session initialization request with a 403 error. +- 7 Upon receiving 200 OK, the Parent UE can start receiving the MBMS Streaming session data when transmitted by the BM-SC.UPF. + +### 17.2.2.2.2 Procedure at Child UE + +The Child UE shall support the procedure specified in sub-clause 8.3.3.2. + +To acquire parents' permission to watch the program, the message body of session initialization request shall also include a XML document as Parental Control Allowing Request. The XML document shall conform to the schema as defined in Annex L, with the following additions: + +- The XML document shall be “application/3gpp-ims-pss-mbms-parental-control+xml” +- In the XML document, the PCAllowingRequest shall be presented with the following parameters: + - ChildUserID: the public user identity of the child, whom will be blocked. + - PatentUserID: the public user identity of the parent, who initiates the blocking. + - ProgramID: the identifier of the content being blocked by the parent. + +#### 17.2.2.2.3 Procedure at Parent UE + +Upon receiving a SIP MESSAGE, the Parent UE shall identify it is a parental control request by the Content Type in the message header and feedback 200 OK response immediately. Following that the Parent UE shall extract the parent control request information. + +To accept the Parent Control Allowing Request, the Parent UE shall not change the XML document and send it back in a SIP MESSAGE message to the SCF. + +To refuse the Parent Control Allowing Request, the Parent UE shall delete the ProgramID in the XML document and send it back in a SIP MESSAGE message to the SCF. + +#### 17.2.2.2.4 Procedure at SCF + +The SCF shall support the procedure specified in section 17.2.1.3, with the following addition: + +If there is a Parent Control Allowing request XML document, the SCF shall extract the parental control information. Following that, the SCF shall forward the request to the Parent UE according to the request and waiting for the response. This can be done either by SIP MESSAGE exchange, or by other means like SMS over mobile network which is out of scope of this specification. + +For the former case, the SCF shall issue a SIP MESSAGE to the Parent UE and waiting for response. The SIP MESSAGE shall be built as following: + +- Request URI shall be set to the well know PSI for parental control service. +- To header shall be set to the public user identity of the parent; +- From header shall be set to the public user identity of the child; +- Content Type shall be set to “application/3gpp-ims-pss-mbms-parental-control+xml” +- The message body shall include the XML document received from the child. + +Upon receiving a SIP MESSAGE, the SCF shall identify it is a parental control request by the Content Type in the message header and feedback 200 OK response immediately. Following that the SCF shall extract the parent control request information and check the rights of the parent and then update the child's profile accordingly. + +After that the SCF shall perform the session initialization and respond the Parent UE as per sub-clause 8.3.3.4. + +## 18 Forced Playout Constraints + +### 18.1 General Description + +![Sequence diagram illustrating Forced Playout Constraints policy delivery and execution. The diagram shows interactions between UE, IM CN Subsystem, SCF, PSS Adapter, and PSS Server. The process involves SIP INVITE, Forced Playout Policy retrieval, SIP 200 OK, SIP INFO (policy), and RTSP messages (R SP DESCRIBE, R SP SDP, R SP SETUP(s), R SP 200 OK(s), R SP PLA (Fastward), R SP 405 Method Not Allowed).](107cbeda15ddd53da92c2f677b441c93_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM_CN as IM CN Subsystem + participant SCF + participant PSS_A as PSS Adapter + participant PSS_S as PSS Server + + Note right of SCF: Forced Playout Policy retrieval + + UE->>IM_CN: SIP INVITE (Request-URI, SDP) + IM_CN->>SCF: SIP INVITE + SCF->>PSS_A: SIP INVITE + PSS_A->>PSS_S: R SP DESCRIBE + PSS_S-->>PSS_A: R SP SDP + PSS_A->>PSS_S: R SP SETUP(s) + PSS_S-->>PSS_A: R SP 200 OK(s) + SCF->>PSS_A: SIP 200 OK + SCF->>PSS_A: SIP INFO (policy) + SCF->>PSS_A: SIP 200 OK + IM_CN->>UE: SIP 200 OK (SDP, Session ID, URI) + IM_CN->>UE: SIP INFO (policy) + IM_CN->>UE: SIP 200 OK + UE->>IM_CN: SIP 200 OK + UE->>SCF: SIP 200 OK + UE->>PSS_A: R SP PLA (Fastward) + UE->>PSS_A: R SP 405 (Method Not Allowed) + +``` + +Sequence diagram illustrating Forced Playout Constraints policy delivery and execution. The diagram shows interactions between UE, IM CN Subsystem, SCF, PSS Adapter, and PSS Server. The process involves SIP INVITE, Forced Playout Policy retrieval, SIP 200 OK, SIP INFO (policy), and RTSP messages (R SP DESCRIBE, R SP SDP, R SP SETUP(s), R SP 200 OK(s), R SP PLA (Fastward), R SP 405 Method Not Allowed). + +**Figure 39: Forced Playout Constraints policy delivery and execution** + +NOTE 1: This sequence is simplified and does not e.g. show session progress messages and the ACK message from the UE in response to the reception of 200 OK. + +NOTE 2: SIP messages between PSS adapter and SCF go through the IM CN Subsystem even if not indicated on the sequences. + +### 18.2 Procedures at the UE + +The UE shall perform PSS session initialization as per procedure defined in sub-clause 8.2.3.2 and playback control as defined in sub-clause 8.2.4.2. + +When receiving a SIP INFO message, within a PSS service, the UE shall identify it contains forced playout constraints policy by checking whether the content-type in the message header. Following that, the UE shall then extract the policy from the SIP message body and store it. + +During the playback of the PSS service, the UE should not issue any RTSP request message when it is not supported as indicated in the policy document. + +### 18.3 Procedures at the IM CN Subsystem + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +### 18.4 Procedures at the SCF + +The SCF shall perform PSS session initialization as per procedure defined in sub-clause 8.2.3.4. + +To support Forced Playout Constraints, the following shall apply: + +- The SCF shall acquire information about the playout constraints policy from the content provider. This information shall include the start and end time of controlled content and a list of RTSP operations that are to be controlled. The SCF then uses this information to generate the Policy. When a user requests to consume the content, the SCF shall check the user's service rights and based upon this shall decide whether to issue the policy or not. +- Once receiving a SIP 200 OK response from PSS Adapter, the SCF shall check whether it has a forced playout constraints policy applicable to the selected content. If yes, the SCF shall save the response and : +- Issue a SIP INFO message contains the policy to the PSS Adapter selected for the session. Upon receiving a SIP 200 OK, the SCF shall forward the saved response to UE; +- Then the SCF shall further issue a SIP INFO message contains the policy to the UE. + +The SIP INFO message SHALL include a XML body to describing the forced playout constraints policy. The XML body shall conform to the XML schema defined in Annex T of TISPAN [24]. The parameters shall be included as follows: + +ContentID: the identifier for a content that SHALL be controlled by the forced playout constraints policy. + +StartTime: the start time that the forced playout constraints SHALL be enforced. + +EndTime: the end time that the forced playout constraints SHALL be enforced. + +RTSPOperation: the RTSP operations that are not permitted. + +## 18.5 Procedures at the PSS Adapter + +The PSS Adapter shall perform PSS session initialization as per procedure defined in sub-clause 8.2.3.5 and playback control as defined in sub-clause 8.2.4.3. + +To support Forced Playout Constraints, when receiving a SIP INFO message ,within a PSS service, the PSS Adapter shall identify it contains forced playout constraints policy by checking whether the content-type in the message header is “application/3gpp-ims-pss-mbms-forced-playout+xml”. Following that, the PSS Adapter shall extract the forced playout constraints policy from the SIP message body and store it for enforcement against the content in the concerned session. + +If the PSS Adapter received any forced playout constraints policy document during session setup, the PSS Adapter shall save the policy. Upon receiving a RTSP request from UE during the playback, the PSS Adapter shall check whether the requested operation is permitted as per the policy. If the requested operation is forbidden by the policy, the PSS Adapter shall disable the request and respond with a RTSP 405(Method Not Allowed) message. + +## 19 3GP-DASH (Dynamic and Adaptive Streaming over HTTP) service + +### 19.1 Session initiation and QoS reservation + +#### 19.1.1 General description + +![Sequence diagram illustrating IMS based session initiation and QoS reservation for 3GP-DASH. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, and HTTP Server. The sequence of messages is: 0. Adaptive HTTP streaming (from HTTP Server to UE), 1. SIP INVITE (from UE to IM CN Subsystem), 2. SIP INVITE (from IM CN Subsystem to SCF), 3. SIP INVITE (from SCF to HTTP/SIP adapter), 4. SIP 200 OK (from HTTP/SIP adapter to SCF), 5. SIP 200 OK (from SCF to IM CN Subsystem), Bearer Update – QoS enforcement (between IM CN Subsystem and SCF), 6. SIP 200 OK (from IM CN Subsystem to UE).](09036266c6dba47efb2613ceaebe2b19_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP Server + + Note over UE, HTTP Server: 0. Adaptive HTTP streaming + UE->>IM CN Subsystem: 1. SIP INVITE + IM CN Subsystem->>SCF: 2. SIP INVITE + SCF->>HTTP/SIP adapter: 3. SIP INVITE + HTTP/SIP adapter->>SCF: 4. SIP 200 OK + SCF->>IM CN Subsystem: 5. SIP 200 OK + Note over IM CN Subsystem, SCF: Bearer Update – QoS enforcement + IM CN Subsystem->>UE: 6. SIP 200 OK + +``` + +Sequence diagram illustrating IMS based session initiation and QoS reservation for 3GP-DASH. The diagram shows five lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, and HTTP Server. The sequence of messages is: 0. Adaptive HTTP streaming (from HTTP Server to UE), 1. SIP INVITE (from UE to IM CN Subsystem), 2. SIP INVITE (from IM CN Subsystem to SCF), 3. SIP INVITE (from SCF to HTTP/SIP adapter), 4. SIP 200 OK (from HTTP/SIP adapter to SCF), 5. SIP 200 OK (from SCF to IM CN Subsystem), Bearer Update – QoS enforcement (between IM CN Subsystem and SCF), 6. SIP 200 OK (from IM CN Subsystem to UE). + +**Figure 40: IMS based session initiation and QoS reservation for 3GP-DASH** + +1. HTTP streaming has started by fetching media segments from the HTTP server after obtaining the MPD +2. The UE initiates the streaming session by sending SIP INVITE to the IM CN subsystem, including an SDP offer. +3. The IM CN subsystem forwards the SIP INVITE message to the SCF. +4. The SCF selects a HTTP/SIP adapter, and forwards the SIP INVITE message to the HTTP/SIP adapter. +5. The HTTP/SIP adapter sends the SIP 200 OK answer to the SCF with the SDP answer. +6. The SCF forwards the SIP 200 OK to the IM CN subsystem. The IM CN subsystem interacts with the PCRF to commit the QoS reservation, and then forwards the SIP 200 OK to the UE +7. The IM CN subsystem forwards the SIP 200 OK to the UE. + +Afterwards, media segments are delivered to the UE using the reserved QoS. + +#### 19.1.2 Procedures at the UE + +The UE initiates the HTTP streaming session by sending SIP INVITE to the IM CN subsystem. The content of the SIP INVITE shall be as follows: + +- The Request URI is related to the session the user wants to activate. The Request-URI shall be composed of a user and domain part as defined as follows: + - The user part contains the content identifier, retrieved from user service description information from SSF + +- The domain part is the Service Provider domain name, obtained from SSF. +- The To header shall contain the same URI as in the Request URI. +- The From header shall indicate the public user identity of the user. + +The content identifier shall be retrieved from service selection information. + +The other headers shall be set according to 24.229 [7]. + +An SDP offer shall be included in the initial INVITE request, in accordance with media capabilities and policies available for the HTTP streaming session and with the parameters received from the SSF during service selection procedure or during the procedure for retrieving missing parameters by SIP OPTIONS or by MPD analysis. + +The SDP media parameters should describe the HTTP streaming session. The differences with the SDP offer defined for RTP streaming is the absence of media line corresponding to the control protocol (RTSP), and the indication of TCP transport and HTTP download method instead of streaming in "m" line. + +The SDP parameters for the HTTP download channel shall be set as follows: + +- a 'm' line for an HTTP download channel of format: *m= * + - The media field shall have a value of "application". + - The port field shall be set to a value of 9, which is the discard port. See RFC 4145 [13] and RFC 4572 [14]. + - The transport field shall be set to TCP or TCP/TLS. The former is used when HTTP runs directly on top of TCP and the latter is used when HTTP runs on top of TLS, which in turn runs on top of TCP. + - The parameter shall be included and shall be set to *3gpp\_http*. + +NOTE: the *3gpp\_http* application format should have a new MIME subtype registered in IANA. + +- An "a=setup" attribute shall be present and set to "active" indicating that the UE will initiate an outgoing TCP connection to the HTTP Server. +- An "a= connection" attribute shall be present and set as "existing". +- A "c" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and IP address of the flow of the related HTTP download channel (ex. *c=IN IP4 *). +- A "b=" line contains the proposed bandwidth. If the user has fetched the bandwidth required for this particular content delivery channel by MPD analysis, the bandwidth attribute at media level shall be set to this value. Otherwise, this attribute shall be set to a pre-configured value; (ex. *b=AS:15000*) + +An example of the SDP offer for IMS-based HTTP streaming is: + +``` +v=0 +o=bob 2890844527 2890844527 IN IP4 192.0.2.2 +s=HTTP Streaming Session +i=A HTTP Streaming session declared within the session description protocol +t=0 0 +m=application 9 TCP 3gpp_http +a=connection:existing +a=setup:active +c= IN IP4 192.0.2.2 +b=AS:15000 +``` + +### 19.1.3 Procedures at the IM CN subsystem + +The IM CN subsystem shall forward the SIP INVITE to the SCF. + +Upon reception of the SIP 200 OK from the SCF, the IM CN subsystem forwards the SIP 200 OK to the UE. + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +QoS reservation is carried out according to clause 9. + +## 19.1.4 Procedures at the SCF + +Upon reception of the SIP INVITE from the UE, the SCF checks the user rights for the requested content, identifies that the request is for HTTP streaming, selects and forwards the SIP request to the HTTP/SIP adapter which is in charge of the HTTP streaming service by changing the "Request-URI" accordingly. + +When receiving a 301 or 302 response from the HTTP/SIP adapter, the SCF shall not forward this message to the UE. + +## 19.1.5 Procedures at the HTTP/SIP adapter + +Upon reception of the HTTP streaming session initiation request, the HTTP/SIP adapter shall examine the content identifier present in the user-part of the To header and the media parameters in the SDP and selects a HTTP Server according to the Request URI. + +The HTTP/SIP adapter may decide to redirect the request to another HTTP/SIP adapter server. In this case the HTTP/SIP adapter shall return a 301 response if the content is not managed by this HTTP/SIP adapter or 302 response for any other reasons (e.g. load balancing). The redirecting HTTP/SIP adapter indicates one or more destination HTTP/SIP adapter addresses in the Contact header. + +The HTTP/SIP adapter returns the SIP 200 OK message to the SCF, including the SDP answer. The SDP answer should describe the HTTP streaming session. The differences with the SDP answer defined for RTP streaming is the absence of media line corresponding to the control protocol (RTSP), the indication of TCP transport and HTTP download method instead of streaming in "m" line. + +If the content that the user has selected cannot be found the HTTP/SIP adapter shall reply with appropriate, SIP error code 404 Not Found response. + +The HTTP/SIP adapter shall construct the SIP 200 OK message as follows: + +- an 'm' line for an HTTP streaming channel of format: `m= ` + - The media field shall have a value of "application". + - The port field shall be set to the value of HTTP Server for the HTTP streaming channel, such as 80. + - The transport field shall be set to TCP or TCP/TLS. The former is used when HTTP runs directly on top of TCP and the latter is used when HTTP runs on top of TLS, which in turn runs on top of TCP. + - The fmt field shall be identical to the one received in the SDP offer. +- a "c" line shall include the network type with the value set to IN, the address type set to IP4 or IP6 and IP address of HTTP server for the flow of the related HTTP download channel (e.g. `c=IN IP4 `). +- The "a=setup" attribute shall be present and set to 'passive' indicating that connection shall be initiated by the other endpoint (UE). +- An "a= connection" attribute shall be present and set as "existing". +- the "b=" line shall contain the proposed bandwidth. Since the content download is unidirectional the bandwidth shall be set to 0. (ex. `b=AS:0`). + +An example of the SDP answer in the SIP 200 OK response is: + +``` +v=0 +o=bob 2890844527 2890844527 IN IP4 192.0.2.1 +s=Download Session +i=A download session declared within the session description protocol +t=0 0 +m=application 80 TCP 3gpp_http +a=connection:existing +a=setup:passive +c=IN IP4 192.0.2.1 +b=AS:0 +``` + +## 19.1.6 Procedures at the HTTP server + +Upon reception of the HTTP GET message received from the UE, the HTTP server shall deliver the requested media segments. + +## 19.2 MPD Update + +### 19.2.1 General description + +A SIP event framework is used in order to inform the UE about a MPD update. This avoids direct polling of the HTTP server by the UE and reduces the signalling overhead. + +![Sequence diagram for MPD Update procedure. Lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, HTTP Server. The sequence shows SIP SUBSCRIBE, SIP 200 OK, MPD update detection, SIP NOTIFY, and SIP 200 OK messages between these components, ending with a 'Continue fetching media segments' phase.](ff3417b75213b8688e6504a21220b430_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP Server + + Note right of HTTP/SIP adapter: 7. MPD update detection + + UE->>IM CN Subsystem: 1. SIP SUBSCRIBE + IM CN Subsystem->>SCF: 2. SIP SUBSCRIBE + SCF->>HTTP/SIP adapter: 3. SIP SUBSCRIBE + HTTP/SIP adapter->>SCF: 4. SIP 200 OK + SCF->>IM CN Subsystem: 5. SIP 200 OK + IM CN Subsystem->>UE: 6. SIP 200 OK + Note right of HTTP/SIP adapter: 7. MPD update detection + HTTP/SIP adapter->>SCF: 8. SIP NOTIFY + SCF->>IM CN Subsystem: 9. SIP NOTIFY + IM CN Subsystem->>UE: 10. SIP NOTIFY + UE->>IM CN Subsystem: 11. SIP 200 OK + IM CN Subsystem->>SCF: 12. SIP 200 OK + SCF->>HTTP/SIP adapter: 13. SIP 200 OK + Note right of HTTP Server: 14. Continue fetching media segments + +``` + +Sequence diagram for MPD Update procedure. Lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, HTTP Server. The sequence shows SIP SUBSCRIBE, SIP 200 OK, MPD update detection, SIP NOTIFY, and SIP 200 OK messages between these components, ending with a 'Continue fetching media segments' phase. + +**Figure 41: MPD Update** + +1. The UE sends a SIP SUBSCRIBE message towards the IM CN subsystem. +2. The IM CN subsystem forwards the request to the SCF. +3. The SCF forwards the request to the HTTP/SIP adapter. +4. The HTTP/SIP adapter sends a SIP 200 OK response to the SCF. +5. The SCF forwards the SIP 200 OK response to the IM CN subsystem. +6. The IM CN subsystem forwards the SIP 200 OK response to the UE. +7. The HTTP/SIP adapter detects an updated MPD e.g by polling towards the HTTP server and recognizing a change of the MPD +8. The HTTP/SIP adapter sends a SIP NOTIFY message including the updated MPD to the SCF. +9. The SCF forwards the SIP NOTIFY message to the IM CN subsystem. +10. The IM CN subsystem forwards the message to the UE. +11. The UE sends a SIP 200 OK to the IM CN subsystem. + +12. The IM CN subsystem forwards the response to the SCF. +13. The SCF forwards the SIP 200 OK to the HTTP/SIP adapter. +14. Adaptive HTTP streaming is continued by fetching media segments as described in the updated MPD. + +## 19.2.2 Procedures at the UE + +### 19.2.2.1 Subscription + +When the UE intends to retrieve MPD Update information from the SDF, it shall generate a SUBSCRIBE request for the "MPD-Update" event package. + +The contents of the SUBSCRIBE request shall be as follows: + +- The value of the Request-URI shall be set to one of following: + - the PSI of the SCF; or + - the public user identity of the end user (when the UE does not know the PSI of the SCF). +- The From and To header shall be set to the public user identity of the user. +- The Event header shall be set to the "MPD-Update" event package. +- The message body shall include the MPD URL. + +A UE that doesn't subscribe for MPD updates may still get new MPD by regular MPD update procedures as specified in TS 26.247. + +### 19.2.2.2 Receiving Notifications + +Upon receipt of a NOTIFY request on the dialog which was generated during subscription, the application within the UE shall extract the MPD contained in the message body. + +In case the UE does not understand the NOTIFY request or detects errors in the MPD, the UE shall return a 400 Bad Request to the NOTIFY request. In addition, the UE should behave in the same way as if erroneous MPD is received directly from the HTTP server. + +Otherwise, the UE shall return a 200 OK response to the NOTIFY request. + +## 19.2.3 Procedures at the IM CN subsystem + +The IM CN subsystem shall forward the SIP SUBSCRIBE to the SCF. + +Upon reception of the SIP 200 OK from the SCF, the IM CN subsystem forwards the SIP 200 OK to the UE. + +The IM CN subsystem shall forward the SIP NOTIFY to the UE. + +Upon reception of the SIP 200 OK from the UE, the IM CN subsystem forwards the SIP 200 OK to the SCF. + +The IM CN Subsystem handles the SIP dialog as defined in 3GPP TS 23.228 [6]. + +## 19.2.4 Procedures at the SCF + +Upon reception of the SIP SUBSCRIBE from the UE, the SCF identifies that the request is for HTTP streaming, selects and forwards the SIP request to the HTTP/SIP adapter which is in charge of the HTTP streaming service by changing the "Request-URI" accordingly. + +When receiving a 301 or 302 response from the HTTP/SIP adapter, the SCF shall not forward this message to the UE. + +## 19.2.5 Procedures at the HTTP/SIP adapter + +When the HTTP/SIP adapter receives a SUBSCRIBE request, it shall examine the parameters specified in the SIP SUBSCRIBE body and extract the MPD URL. + +The HTTP/SIP adapter shall generate a SIP 200 OK in response to the SUBSCRIBE request. + +The HTTP/SIP adapter shall be able to detect an updated MPD at the HTTP server and to download it. The exact procedure for MPD update detection is out of scope of this specification. + +NOTE1: MPD update detection may be done by the following procedures: the HTTP/SIP adapter may send a HTTP GET message to the HTTP server requesting the MPD. Upon reception of the HTTP 200 OK the HTTP/SIP adapter may store the received MPD. The newly received MPD is compared with previously received and stored MPD. In case of a difference between these two MPD files, an MPD update is detected. The HTTP "Connection" header shall be set to "Keep-Alive" to indicate it is a persistent TCP connection. + +NOTE2: In order to avoid the complete download of the MPD at each request HTTP, conditional GET including an If-Modified-Since header field may be used. + +In case of a detected MPD update a SIP NOTIFY message is sent to the SCF. The contents of the NOTIFY request shall be as follows: + +- The Event header shall be set to the "MPD-Update" event package. +- The content type shall be set to "video/vnd.3gpp.mpd". +- The message body shall contain the updated MPD. + +In case of receiving a 400 Bad Request status code after sending the SIP NOTIFY message, the HTTP/SIP adapter shall repeat the MPD update detection procedure. + +## 19.2.6 Procedures at the HTTP server + +Procedures for MPD update detection at the server depend on the selected method. The exact procedure for MPD update detection is out of scope of this specification. + +NOTE: In case of HTTP polling from the HTTP/SIP adapter and upon reception of the HTTP GET received from the HTTP/SIP adapter, the HTTP server delivers in the HTTP response the MPD file corresponding to the URL obtained in the received HTTP GET. The HTTP "Connection" header is set to "Keep-Alive" to indicate it is a persistent TCP connection. + +Upon reception of the HTTP GET message received from the UE, the HTTP server shall deliver the requested media segments. + +## 19.3 Session termination + +### 19.3.1 General description + +#### 19.3.1.1 UE-initiated session termination + +![Sequence diagram for UE-initiated session termination](5a01395925fc88802da68fb5ac0f31ff_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP Server + + Note over UE, HTTP Server: 0. Adaptive HTTP streaming + UE->>IM CN Subsystem: 1. SIP BYE + IM CN Subsystem->>SCF: 2. SIP BYE + SCF->>HTTP/SIP adapter: 3. SIP BYE + HTTP/SIP adapter->>SCF: 4. SIP 200 OK + SCF->>IM CN Subsystem: 5. SIP 200 OK + IM CN Subsystem->>UE: 6. SIP 200 OK +``` + +The diagram illustrates the sequence of messages for UE-initiated session termination. It starts with a broad arrow labeled '0. Adaptive HTTP streaming' spanning from the UE to the HTTP Server. The subsequent steps are: 1. The UE sends a SIP BYE message to the IM CN Subsystem; 2. The IM CN Subsystem forwards the SIP BYE message to the SCF; 3. The SCF sends the SIP BYE message to the HTTP/SIP adapter; 4. The HTTP/SIP adapter sends a SIP 200 OK message to the SCF; 5. The SCF sends the SIP 200 OK message to the IM CN Subsystem; 6. The IM CN Subsystem forwards the SIP 200 OK message to the UE. + +Sequence diagram for UE-initiated session termination + +**Figure 42: UE-initiated session termination** + +Here the case of UE termination is described. The following steps are carried out: + +7. The UE sends a SIP BYE message. +8. The IM CN subsystem forwards the SIP BYE message to the SCF. +9. The SCF sends the SIP BYE message to the HTTP/SIP adapter. +10. The HTTP/SIP adapter sends a SIP 200 OK to the SCF. +11. The SCF sends the SIP 200 OK to the IM CN subsystem. +12. The IM CN subsystem forwards the SIP 200 OK to the UE. + +The UE may stop fetching media segments and close the HTTP connection before the SIP Bye procedure is initiated. The UE shall stop fetching media segments and close the HTTP connection at the latest immediately after step 6. + +### 19.3.1.2 SCF-initiated session termination + +![Sequence diagram for SCF-initiated session termination](a0eb8d30ac11ba97b2733c187b89ff22_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP Server + + Note over UE, HTTP Server: 0. Adaptive HTTP streaming + SCF->>HTTP/SIP adapter: 1. SIP BYE + HTTP/SIP adapter-->>SCF: 2. SIP 200 OK + SCF->>IM CN Subsystem: 3. SIP BYE + IM CN Subsystem->>UE: 4. SIP BYE + UE-->>IM CN Subsystem: 5. SIP 200 OK + IM CN Subsystem-->>SCF: 6. SIP 200 OK +``` + +The diagram illustrates the SCF-initiated session termination procedure. It begins with a wide double-headed arrow labeled '0. Adaptive HTTP streaming' spanning from the UE to the HTTP Server. The sequence of messages is as follows: 1. The SCF sends a SIP BYE message to the HTTP/SIP adapter. 2. The HTTP/SIP adapter responds with a SIP 200 OK message to the SCF. 3. Upon receiving the 200 OK, the SCF sends a SIP BYE message to the IM CN Subsystem. 4. The IM CN Subsystem forwards the SIP BYE message to the UE. 5. The UE responds with a SIP 200 OK message to the IM CN Subsystem. 6. Finally, the IM CN Subsystem forwards the SIP 200 OK message to the SCF. + +Sequence diagram for SCF-initiated session termination + +**Figure 43: SCF-initiated session termination** + +Here the case of the SCF-initiated termination procedure is described. The following steps are carried out: + +1. The SCF sends a SIP BYE to the HTTP/SIP adapter. +2. The HTTP/SIP adapter sends the SIP 200 OK message to the SCF. +3. Upon receipt of the SIP 200 OK, the SCF sends the SIP BYE message to the IM CN subsystem. +4. The IM CN Subsystem forwards the SIP BYE message to the UE. The UE stops fetching media segments and closes the HTTP connection. +5. The UE sends a SIP 200 OK message to the IM CN Subsystem. +6. The IM CN Subsystem forwards the SIP 200 OK to the SCF. + +### 19.3.1.3 HTTP/SIP adapter-initiated session termination + +![Sequence diagram for HTTP/SIP adapter-initiated session termination. Lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, HTTP Server. The sequence starts with '0. Adaptive HTTP streaming' from HTTP Server to UE. Then: 1. SIP BYE from HTTP/SIP adapter to SCF; 2. SIP 200 OK from SCF to HTTP/SIP adapter; 3. SIP BYE from SCF to IM CN Subsystem; 4. SIP BYE from IM CN Subsystem to UE; 5. SIP 200 OK from UE to IM CN Subsystem; 6. SIP 200 OK from IM CN Subsystem to SCF.](c00d3fb4f9d9609639a6e7d7a356afd3_img.jpg) + +``` +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant HTTP/SIP adapter + participant HTTP Server + Note over UE, HTTP Server: 0. Adaptive HTTP streaming + HTTP/SIP adapter->>SCF: 1. SIP BYE + SCF-->>HTTP/SIP adapter: 2. SIP 200 OK + SCF->>IM CN Subsystem: 3. SIP BYE + IM CN Subsystem->>UE: 4. SIP BYE + UE-->>IM CN Subsystem: 5. SIP 200 OK + IM CN Subsystem-->>SCF: 6. SIP 200 OK +``` + +Sequence diagram for HTTP/SIP adapter-initiated session termination. Lifelines: UE, IM CN Subsystem, SCF, HTTP/SIP adapter, HTTP Server. The sequence starts with '0. Adaptive HTTP streaming' from HTTP Server to UE. Then: 1. SIP BYE from HTTP/SIP adapter to SCF; 2. SIP 200 OK from SCF to HTTP/SIP adapter; 3. SIP BYE from SCF to IM CN Subsystem; 4. SIP BYE from IM CN Subsystem to UE; 5. SIP 200 OK from UE to IM CN Subsystem; 6. SIP 200 OK from IM CN Subsystem to SCF. + +**Figure 44: HTTP/SIP adapter-initiated session termination** + +Here the case of the SCF-initiated termination procedure is described. The following steps are carried out: + +1. The HTTP/SIP adapter sends the SIP BYE message to the SCF. +2. The SCF sends the SIP 200 OK message to the HTTP/SIP adapter. +3. The SCF sends the SIP BYE message to the IM CN Subsystem. +4. The IM CN Subsystem forwards the SIP BYE message to the UE. The UE stops fetching media segments and closes the HTTP connection. +5. The UE sends a SIP 200 OK message to the IM CN Subsystem. +6. The IM CN subsystem forwards the SIP 200 OK message to the SCF. + +## 19.3.2 Procedures at the UE + +### 19.3.2.1 UE-initiated session termination + +To terminate the session, the UE shall send a SIP BYE message to the SCF. + +After receiving the SIP 200 OK the UE stops fetching media segments and closes the HTTP connection. + +### 19.3.2.2 Network-initiated session termination + +Upon receipt of the SIP BYE message, the UE shall send the SIP 200 OK message to the SCF. The UE stops fetching media segments and closes the HTTP connection + +## 19.3.3 Procedures at the IM CN Subsystem + +The IM CN subsystem handles the SIP dialog as defined in [6]. + +## 19.3.4 Procedures at the SCF + +### 19.3.4.1 UE-initiated session termination + +Upon receipt of a SIP BYE message the SCF shall forward it to the HTTP/SIP adapter. + +### 19.3.4.2 SCF-initiated session termination + +The SCF initiates the session termination by sending a SIP BYE message to the HTTP/SIP adapter. Upon receipt of the SIP 200 OK from the HTTP/SIP adapter, the SCF shall send a SIP BYE message to the UE. + +### 19.3.4.3 HTTP/SIP adapter-initiated session termination + +Upon receipt of the SIP BYE message received from the HTTP/SIP adapter, the SCF sends the SIP 200 OK message to the HTTP/SIP adapter. Then, the SCF forwards the SIP BYE message to the UE. + +## 19.3.5 Procedures at the HTTP/SIP adapter + +### 19.3.5.1 UE-initiated session termination + +Upon receipt of a SIP BYE message the HTTP/SIP adapter shall send a SIP 200 OK message to the SCF. + +### 19.3.5.2 SCF-initiated session termination + +Upon receipt of the SIP BYE message, the HTTP/SIP adapter shall send a SIP 200 OK to the SCF. + +### 19.3.5.3 HTTP/SIP adapter-initiated session termination + +The HTTP/SIP adapter shall send the SIP BYE message to the SCF. + +## 19.3.6 Procedures at the HTTP server + +The HTTP server shall stop all on-going media segment transmissions if the HTTP connection is closed. + +--- + +# 20 Network PVR + +## 20.1 NPVR Recording procedure + +### 20.1.1 General Description + +Network-PVR (NPVR) is a function for a user to record program(s) in the network side for future accessing and consuming. + +![Sequence diagram for NPVR showing interactions between UE, IM CN Subsystem, SCF, Service Profile, PSS Adapter, and Recording Server. The diagram shows a request from UE to SCF, an error response from SCF to UE, and a subsequent request from SCF to Service Profile. A shaded area indicates a sequence of steps that are not shown in this diagram.](0b998e3ad8f9d104768642612605cb35_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN Subsystem + participant SCF + participant Service Profile + participant PSS Adapter + participant Recording Server + + Note right of SCF: Error: Reference source not found + + UE->>SCF: Request (record live program) + SCF-->>UE: SIP MESSAGE (Request exception) + Note left of UE: Error: + Note right of SCF: 2.1. Update service profile + Note right of SCF: [Shaded area: steps 2-14 omitted] + +``` + +Sequence diagram for NPVR showing interactions between UE, IM CN Subsystem, SCF, Service Profile, PSS Adapter, and Recording Server. The diagram shows a request from UE to SCF, an error response from SCF to UE, and a subsequent request from SCF to Service Profile. A shaded area indicates a sequence of steps that are not shown in this diagram. + +**Figure 45: NPVR** + +The following is a description of the interactions in the flow: + +1. The UE, on behalf of the user, issues a request to record a live program. The program can be either currently broadcasting program (instant recording) or a future program (scheduled recording). The record request includes the relevant information like program identifier, timing information, etc + +2-3. Receiving the record request, the SCF first checks whether the program is recordable and whether the user has the right to record it. If fine, the SCF further checks whether the user has enough storage space. Following that, the SCF creates a context for the record request, and update the user's profile with the record status "record request captured". + +4-5. The SCF responses to the user, notifying the acceptance of the record request. + +6-7. For instant recording, the SCF starts the recording by selecting a proper PSS Adapter, and directing it to set up a delivery channel with a content source to receive content. The PSS service initialization procedure as defined in section 8.2.3 shall be used. + +For scheduled recording, the SCF creates a timer for the request. When the start time comes, the SCF directs and controls the Recording server for recording as the case for instant recording. + +Notes: Upon reception of more than one NPVR request for the same program, the SCF, based on local policy, may issue only one record request to Recording server. In this case, the SCF will update each of the requestor's user profile when recording status changes. + +8. Once the NPVR request is started, the SCF will then update all the requestors' user profile with the recording status "recording started". + +9-12. The PSS Adapter for NPVR setup and starts the recording according NPVR request; The Recording server retrieves the streamed content for live streaming service and records the content properly. + +13-14. When recording completed, the Recording server send RTSP ANNOUNCE message to the PSS Adapter; + +Note: the Recording server may deliver the recorded content to a PSS Server for serving any NPVR retrieve, or store the content in itself and acting as PSS Server later. How to deliver the recorded content to another PSS server is out of scope of the present document. + +15-16. The PSS Adapter send SIP UPDATE to SCF to indicate the ending of NPVR recording; + +17-20. The SCF teardown the SIP session and the PSS Adapter teardowns the RTSP session for NPVR recording. + +21. Once the NPVR request is completed, the SCF will then update all the requestors' user profile with the recording status "recording completed". + +## 20.1.2 Procedures at UE + +When UE initiates the request for NPVR Request, the UE shall issue a SIP MESSAGE according to TS 24.229 [7] with the following additions: + +- The Request-URI shall be composed of a user and domain part as defined as follows: + - o The user part shall be "PSS\_PVR\_" wherein content-id shall be globalContentID of the content to be recorded. + - o The domain part is the Service Provider domain name, obtained from SSF. +- The Content-Type of the message body shall be set to "application/3gpp-ims-pss-mbms-npvr+xml" +- The message body shall include XML document as defined in Annex N. + - o The NPVRRequest shall be present; + - o ProgramID : if present, identifies the content to be recorded; when occurs, shall be globalContentID retrieved from User Service Description + - o ServiceID: identifies live channel to be recorded; it shall be globalServiceID retrieved from User Service Description + - o RecordStartTime: indicates the time to start recording, where "0" or time before now implies instant recording, while other time implies scheduled recording; + - o RecordDuration: indicates the time duration of the recording; + +Upon receiving a SIP MESSAGE, the UE shall identify it as a NPVR response by comparing the content type of the message body with "application/3gpp-ims-pss-mbms-npvr+xml". Following that, the UE shall response with 200 OK response. + +## 20.1.3 Procedures at SCF + +The SCF shall support the procedures specified in [TS124503] as applicable to an AS acting as a terminating SIP UA. + +When receiving any NPVR request, the SCF shall first response with 200 OK, and then examine the request to see: + +- If the user subscribed to the PVR service. +- If the program is allowed to recorded. +- If it is compatible with the user's profile (e.g. parental control level). +- If the new item to be recorded doesn't exceed the user's storage quota, by checking the user's profile. + +The SCF shall then construct a SIP MESSAGE request towards the UE with the NPVR response. The content of the message shall be as follows: + +- The Request-URI shall be set to the IMPU of the user. +- The Content-Type of the message body shall be set to "application/3gpp-ims-pss-mbms-npvr+xml" +- The message body shall include XML document as defined in Annex N. + - o The NPVRResponse shall be present; + +- Result: indicate the status of the NPVR request, i.e. Error or request accepted. + +Following that, the SCF shall create a context for the request, register relevant information and update the user profile for that user, with the status for PVR changing to “Recording Captured”, meaning that a NPVR request is pending execution. + +For instant recording, the SCF starts the recording immediately by selecting a proper Recording Server, and sending a SIP INVITE message to the PSS Adapter to initialize a Recording Session. + +For scheduled recording, the SCF creates a timer for the request. When the start time comes, the SCF starts the recording immediately by selecting a proper Recording Server, and sending a SIP INVITE message to the PSS Adapter to initialize a Recording Session. + +Based on the local policy, the following should apply to avoid duplicated recording: + +- Upon receiving a scheduled recording request, the SCF check whether the same program (identified by ServiceID and ProgramID) has been requested to record. If yes, the SCF shall not issue another NPVR request for the same content. +- Upon receiving an instant recording request, the SCF examines the status of the program. If the same program (identified by ServiceID and ProgramID) is already under recording, the SCF shall not issue another NPVR request for the same content. + +When starting the recording, the SCF shall build the SIP INVITE message as follows: + +- The Request-URI in the INVITE request shall be the IMPU of the selected Recording server +- The To header shall contain the same URI as in the Request-URI. +- The From header shall be set to “PSS\_PVR\_@domain name”, wherein content-id shall be globalContentID of the content to be recorded; + +A NPVR request XML document and an SDP offer shall be included in the request body. The SDP offer shall be done in accordance with the parameters signalled in service selected information. The SDP offer at media level shall include the following elements: + +- The m-line(s) shall be set to the media parameters retrieved via service selection procedures for the requested service. +- The c-line(s) shall be set according to the IP address retrieved via service selection procedures for the requested service. + +Upon receiving the SIP UPDATE message from the PSS Adapter for NPVR, the SCF shall extract the NPVR recording result from the message and update the user profile of all the users who requested to record the content. Following that the SCF shall teardown the session by initiating a SIP BYE to the PSS Adapter. + +## 20.1.4 Procedures at PSS Adapter + +The PSS Adapter for NPVR shall support the following RTSP methods for NPVR session establishment and teardown control: + +- SETUP (PSS Adapter to Recording server). +- RECORD (PSS Adapter to Recording server). +- ANNOUNCE (Recording server to PSS Adapter). +- TEARDOWN (PSS Adapter to Recording server). + +Upon receipt of a SIP INVITE message, the PSS Adapter shall identify it as a NPVR request by the From header, and then performs the following actions: + +- It shall resolve the RTSP URI based on the Request-URI, the SDP parameters and the selected Recording server. +- It shall construct and send the RTSP SETUP message(s) to setup the relevant media streams. +- Return the answer SDP to the SCF in the SIP 200 OK. + +The PSS Adapter shall construct the RTSP SETUP message according to the SIP INVITE as follows: + +- The Request-Line shall be present of format: Request-Line = Method SP Request-URI SP RTSP-Version CRLF: + - Method field is set to SETUP; + - RTSP-Version field to be set of RTSP/1.0. +- The CSeq header field is set to a value allocated by PSS Adapter according to RFC 2326 [25] +- The transport header field: + - the protocol and profile sub-fields together are set to a value of the protocol sub-field of the corresponding "m=" line in the SDP offer, + - the unicast | multicast parameter is set according to the "c=" line. + - The destination parameter is set to a value of the "c=" line in the SDP offer, + - The RTP port value is set to the value of the port sub-field of the corresponding "m=" line in the SDP offer, and the RTCP port value is set to a value of the RTP port value plus 1. + +The PSS Adapter may send multiple RTSP SETUP messages if multiple media delivery channels are carried within the SDP offer. In this case, the pipeline of multiple RTSP SETUP messages may be supported. + +When receiving a RTSP 200 OK response from the Recording server, the PSS Adapter parses the response, constructs a SIP 200 OK response with the final SDP, and sends the SIP 200 OK response to the SCF. + +Following that, the PSS Adapter shall further send RTSP RECORD message to the Recording server to start the recording. In the message the range header shall be set according to the time duration of the NPVR request. + +Upon receiving the RTSP ANNOUNCE with NPVR result, the PSS Adapter shall initiate a SIP UPDATE message to the SCF. The content of the SIP UPDATE message shall be as following: + +- The Request-Line shall be set to "PSS\_PVR\_@domain name", wherein content-id shall be globalContentID of the content to be recorded +- The To header shall contain the same URI as in the Request-URI. +- The From header shall be set to the IMPU of the selected Recording server; +- The body shall contain the XML document received from the Recording server, with necessary information (i.e. ProgramID, ServiceID, etc.) added; + +Upon receiving SIP BYE message from the SCF, the PSS Adapter shall respond with a 200 OK and send a RTSP TEARDOWN message to the Recording server. + +## 20.1.5 Procedures at Recording server + +The Recording server shall conform to RFC 2326 [25]. + +Upon receiving a RTSP SETUP request, the Recording server shall validate the request and setup content delivery channel(s) according to the SDP. + +Upon receiving the RTSP RECORD request, the Recording server shall start to record the media properly according to the time in range header. + +When finishing the recording, the Recording server shall issue a RTSP ANNOUNCE message to the PSS Adapter to report the record result. Within the message body, the Recording server shall include a XML body associated with the appid "urn:3gpp:npvr:2010:IMS-PSS-MBMS". In the XML document, the NPVRResponse shall be present and the parameters shall be set: + +- Result: the result of the recording (i.e. Completed, Error). +- AccessURL: the identifier reference to the recorded content, for UE to request later. + +Upon receiving the RTSP TEARDOWN message, the Recording server shall teardown the PSS Recording Session according to RFC 2326. + +## 20.2 NPVR Retrieving + +### 20.2.1 Procedures at UE + +After the recording is finished, the UE can get the AccessURL as identifier of the recorded content by checking the user profile. + +To consume the recorded content, the UE shall perform PSS session initialization procedure as defined in sub-clause 8.2.3.2, with the following additions: + +- The Request-URI shall be “PSS\_COD\_”, where the content-id shall be set to the AccessURL. + +### 20.2.2 Procedures at SCF + +The SCF shall perform the procedure as defined in sub-clause 8.2.3.3. + +### 20.2.3 Procedures at PSS Adapter + +The PSS adapter shall perform the procedure as defined in sub-clause 8.2.3.4. + +### 20.2.4 Procedures at PSS server + +The PSS server shall perform the procedure as defined in sub-clause 8.2.3.5. + +## 21 Content Referral Service (CRS) + +Content referral service has two different scenarios, namely user initiated content referral service and service provider initiated content referral service. They are specified in sub-clauses 21.1 and 21.2, respectively. + +### 21.1 User Initiated CRS + +#### 21.1.1 General Description + +Content referral service enables a user to recommend a PSS or MBMS user service to another user. + +Following is a general call flow for user initiated content referral service + +![Sequence diagram for user initiated content referral service showing interactions between T r e t U E, I M C N Subsystem, S C F, P S S adapter/ P S S S e r v e r, and I n i t i a t e d U E.](0a957b7cafb28935849ea4c05d6e80a1_img.jpg) + +``` + +sequenceDiagram + participant T r e t U E + participant I M C N Subsystem + participant S C F + participant P S S adapter/ P S S S e r v e r + participant I n i t i a t e d U E + + Note left of T r e t U E: User initiated content referral service + T r e t U E->>I M C N Subsystem: Request + I M C N Subsystem->>S C F: Forward + S C F->>P S S adapter/ P S S S e r v e r: Query + P S S adapter/ P S S S e r v e r-->>I n i t i a t e d U E: Referral Info + I n i t i a t e d U E-->>T r e t U E: Response + +``` + +Sequence diagram for user initiated content referral service showing interactions between T r e t U E, I M C N Subsystem, S C F, P S S adapter/ P S S S e r v e r, and I n i t i a t e d U E. + +Figure 46: User initiated content referral service + +- 1-2 The Initiated UE issues a content referral request through the IM CN Subsystem to the SCF. The request carries the necessary parameters indicating the type of the recommended service, (e.g. PSS, MBMS or HTTP Streaming service), content identifier, identifier of target UE. +- 3 The SCF performs service authorization, to check: + - If the initiated UE is allowed to perform content referral service; + - If the target UE/User accepts content referral service from the initiated UE; + - Following that, the SCF forwards content referral service request through the IM CN Subsystem to the target UE. And the user of target UE may deny the request even if the SCF authorized. +- 4 The target UE sends a proper response to the initiated UE. +- 5 The target UE issues a SIP NOTIFY to the initiated UE through the IM CN Subsystem, indicating the session initialization of the recommended service is about to start. +6. The initiated UE response with 200 OK. +- 7 The target UE initiates the service indicated in the content referral service request, e.g. + - PSS session initiation as per the procedures defined in clause 8.2.3, or + - MBMS session initiation as per the procedures defined in clause 8.3.3 +- 8 The target UE issues a SIP NOTIFY to the initiated UE, indicating the session initialization of the recommended service is done. +9. The initiated UE response with 200 OK. + +## 21.1.2 Procedure at Initiated UE + +When the initiated UE wants to recommend a PSS or MBMS user service to the target UE, the initiated UE shall issue a SIP REFER request to target UE as defined in [43], and the REFER message is routed to SCF. The content of the SIP REFER request shall be as follows: + +- The Request-URI in the REFER request shall be set to the IMPU of the target UE; +- From shall be set to the IMPU of the initiated UE; +- To headers shall be set to the public GRUU or the IMPU of the target UE; +- Refer-To shall include the following parameters: + - the SIP URI shall be set to: + - “PSS\_COD\_@” for CoD service, wherein content-id shall be globalContentID defined in [27]. + - the well known PSI (Public Service Identifier) for live service, i.e. Live Stream@. + - the “method” shall be set to “INVITE”. +- Content-Type: shall be set to “application/3gpp-ims-pss-mbms-bookmark+xml”, if the message body contains a bookmark. +- The message body may contain a bookmark as defined in annex J, to indicate the recommended start time of the recommended service. + +When receives the NOTIFY message, the initiated UE shall send a 200 OK to the target UE. + +## 21.1.3 Procedure at SCF + +Upon receiving a SIP REFER request, the SCF shall check: + +- If the initiated UE is allowed to perform content referral service; + +- If the target UE/User accepts content referral service from the initiated UE, which is set beforehand; + +If the request is authorized, the SCF then forwards the request to the target UE. + +## 21.1.4 Procedure at Target UE + +When receiving a SIP REFER request, the target UE shall check whether or not it is capable of initiating the indicated PSS or MBMS user service, if the target UE is capable of initiating the service, the target UE shall send a 202 message immediately, and the 202 message shall be the same as the received REFER request except the “contact” head field: + +- Contact shall be set to the IMPU of the target UE; + +Then the target UE shall send an immediate NOTIFY message as defined in [43], to initiated UE for informing the status. The NOTIFY message shall be set as follows: + +- From shall be set to the IMPU of the target UE; +- To headers shall be set to IMPU of the initiated UE; +- Content-Type shall be set to “message/sipfrag”; +- Event shall be set to “refer”; +- Subscription-State shall be set to “active”; + +When the target UE have sent the NOTIFY message, it shall initiate the PSS or MBMS service initialization according to the “Refer-To” message header of the REFER. If the REFER request further contains a bookmark, the target UE shall start the consumption of the service at the time point indicated in the bookmark. + +After completion of the service initiation, it shall send another NOTIFY message to initiated UE, and the “Subscription-State” of such NOTIFY message shall be set to “terminated”. + +## 21.2 Service Provider Initiated CRS + +### 21.2.1 General Description + +The service provider initiated CRS service procedures include 3 major steps: + +- 8) CRS event detection. This step is triggered according to service provider's policy or user profile. The events may include new content arrival referral, presence update, request from the UE, channel change report from UE etc. +- 9) CRS information generation for specific user according to the preconfigured content referral policy. The CRS info includes one or more content identifiers (Annex O), identifying the recommended content. The user profile (e.g. user preference, watching habits etc) is used for filtering/sorting of CRS info. +- 10) CRS information delivery to the UE. SCF sends SIP MESSAGE containing the generated CRS information to the UE. + +![Sequence diagram showing the procedure for CRS provided by SCF. The diagram involves three lifelines: UE, IM CN subsystem, and SCF. The sequence of messages is: 1. SCF performs '1 CRS event detection'. 2. SCF performs '2 CRS information generation'. 3. A message '3 Delivery of CRS information.' is sent from the SCF to the UE via the IM CN subsystem.](6e9d059430baba0c363e33749f68b107_img.jpg) + +``` + +sequenceDiagram + participant UE + participant IM CN subsystem + participant SCF + Note right of SCF: 1 CRS event detection + Note right of SCF: 2 CRS information generation + SCF->>UE: 3 Delivery of CRS information. + +``` + +Sequence diagram showing the procedure for CRS provided by SCF. The diagram involves three lifelines: UE, IM CN subsystem, and SCF. The sequence of messages is: 1. SCF performs '1 CRS event detection'. 2. SCF performs '2 CRS information generation'. 3. A message '3 Delivery of CRS information.' is sent from the SCF to the UE via the IM CN subsystem. + +**Figure 47: Procedure for CRS provided by SCF** + +## 21.2.2 Procedure at Initiated UE + +Upon reception of a SIP MESSAGE request, the UE shall identify it as a content referral message by comparing the Content-Type header with "application/3gpp-ims-pss-mbms-contentreferral+xml". Following that, the UE shall parse the XML document according to the schema defined in Annex O, and then take appropriate further action, e.g. initiate a PSS session as defined in sub-clause 8.2.3.2 + +## 21.2.3 Procedure at SCF + +Upon detection of a CRS event for a user, the SCF shall generate a SIP MESSAGE request and send it to the target UE via IM CN Subsystem + +The contents of the above SIP MESSAGE request shall be as follows: + +The Request-URI of the SIP MESSAGE request shall be set to the IMPU of the target UE. + +The From header shall be set to the SIP URI of the SCF. + +The To header shall be set to the IMPU of the target UE. + +The Content-Type header shall be set to "application/3gpp-ims-pss-mbms-contentreferral+xml". + +The message body shall carry an XML document conforming to the XML schema defined in annex Y: + +- ContentIdentifier shall be set to the content identifier related to the referral, if present; +- ReferralSender shall be set to the identifier of the originator who provides the referral, if present; +- ReferralReceiver shall be set to the identifier of target UE, if present. +- ContentReferralInfo shall be set to the information for content referral; + +--- + +## Annex A (normative): 3gpp\_rtsp application + +The 3gpp\_rtsp application defines a set of RTSP parameters. An RTSP parameter is included in "a=fmtp" line of the SDP and is expressed in the form of parameter=value. + +`a=fmtp:3gpp_rtsp =` + +The "version" parameter sets the "version-number" representing the version of RTSP that will be used in the RTSP media stream. The version number shall be "1.0" in this version of the specification. The RTSP version shall be included in all SDP offers and answers. The same version shall be used by all entities. + +`a=fmtp:3gpp_rtsp version=` + +To exchange RTSP header fields within the SIP offer/answer, the RTSP media stream allows for attributes with the following format: + +`a=fmtp:3gpp_rtsp h-=,` + +where "header-name" is the name of the RTSP header field being described and "header-value" is the value of the RTSP header field. The value of the header-name is case insensitive. The value of the header-value is interpreted according to the rules of RTSP. The list of authorized headers in the SIP offer/answer is as follows: + +- Session: this is the RTSP session id as established by the PSS adapter to be used for further RTSP transactions. +- Offset: this is a range value to be used in the first PLAY request by the UE. +- Supported" header filed with the following feature tags (see 3GPP TS 26.234 [8]): + - "3gpp-switch" feature-tag, clause 5.5.4.2. + - "3gpp-switch-req-sdp" feature-tag, clause 5.5.4.3. + - "3gpp-switch-stream" feature-tag, clause 5.5.4.4. +- Require (see 3GPP TS 26.234 [8]). +- Pipelined-Requests (see 3GPP TS 26.234 [8]). +- 3GPP-Adaptation (see 3GPP TS 26.234 [8]). + +UE, PSS Servers and PSS adapters shall support all these headers and feature tags. + +--- + +## Annex B (informative): Examples + +Void (TBD). + +--- + +## Annex C (normative): Void + +--- + +## Annex D (normative): XML Schema for PSS and MBMS commands + +``` + + + + + + + + + + + + + + + + + + + + + + + +``` + +--- + +## Annex E (normative): XML Schemas for the PSS content switch data + +This annex specifies XML schemas for PSS content switch data: + +``` + + + + + + + + + + + + + + + + + + +``` + +## Annex F (normative): XML Schemas for the MBMS content switch data + +This annex specifies XML schemas for MBMS content switch data: + +``` + + + + + + + + + + + + + + + + + + + +``` + +--- + +## Annex G (normative): XML Schema for PSS and MBMS UE Device Capabilities + +This XML Schema defines the UE device capabilities that are signalled by the UE within the body of the SIP SUBSCRIBE request when attaching to the service. Another document is also part of the body to describe PSS Capabilities as defined in TS 26.234. + +``` + + + + + +Defines the capabilities of the UE that is currently associated with the user + + + + + + + + + + + + + + + + + + + Unique Identifier for the UE(eg;Could be MAC address of UE) + + + + + + + + + + + + + + Specifies the type of UE + + + + + + + + + +``` + +--- + +## Annex H (normative): XML Schema for Service Attachment Information + +This annex describes the XML schema for the service attachment information to be returned to UE by SDF. + +``` + + + + + + + XML Body of the SDF SIP Notify Response + + + + + + + + + + + + + + + + + + The version number is incremented when one or more attributes of +the SSF element have changed, so that the receiver knows whether it should update its data or +not. + + + + + + + + + + + + + + + + + + + + + It is recommended that the DomainName complies with the "preferred +name syntax" of RFC1034 clause 3.5. + + + + + + + + + + + + + + + + + + + Extension attribute to define further +data + + + + + + + + +``` + +``` + + + + + + + + + + Extension attribute to define further data + + + + + + + + + + + + + + Segments are used to logically separate Service +Selection information + + + + + + + + + + Specify the type of Service Selection Information +that is delivered by the SSF + + + + + + + + + + + + + + + + + + + + + + + + + + + ISO 639-2 Language code + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + +``` + +--- + +# Annex I (normative): XML Schemas for SIP based MBMS security procedures + +--- + +## I.1 Bootstrapping transaction identifier + +The following specifies XML schema for the bootstrapping transaction identifier to be sent within the body of SIP (re-)INVITE from the UE to the SCF. + +``` + + + + + MBMS Security Registration according to TS 26.237 + + + + + + + + + +``` + +--- + +## I.2 NAF key information + +The following specifies XML schema for the UE and NAF key related information to be sent within the body of HTTP request from the SCF to the BM-SC. + +``` + + + + + SIP based MBMS Security Registration according to TS +26.237 + + + + + + + + + + + + + +``` + +## Annex J (normative): XML Schema for nBookmark + +This section defines the XML schema and its syntax for networked bookmark. + +### J.1 XML Schema + +``` + + + + + nBookmark version 2 + + This Schema contains the Rel 11 extension to the nBookmark schema. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +The following schema is the release 11 extension to the nBookmark schema. The schema file name, as referenced in the main nBookmark schema, is 3gpp-bookmark-2012.xsd. + +``` + + + + + nBookmark2012 + + This Schema is the Rel 11 extension to the nBookmark schema. + + + + + + + + + + + + + +``` + +The *schemaVersion* schema defines two elements, *schemaVersion* and *delimiter* for compatibility purpose. The value of the *schemaVersion* is used in the main nBookmark schemas above. The value of the *schemaVersion* element and *version* attribute should be set to 2 in this release of the main nBookmark schema and increased by 1 in every future releases where new element(s) or attribute(s) are added. The *delimiter* element is used in the main nBookmark schema above to avoid the schema validation error (due to the Unique Particle Attribution rule). The *delimiter* element shall be set to a value of 0, and the element content shall be ignored by the receiving device. The file name used for this schema is schema-version.xsd, + +When a device receives an instantiation of the nBookmark compliant to this schema, it determines the schema version required to parse the instantiation as follows: + +- If the device supports one or more versions of the nBookmark schema with the schema *version* attribute, then it shall use the schema that has the highest schema *version* attribute value that is equal to or less than the value in the received *schemaVersion* element; + +``` + + + + + + + + + +``` + +## J.2 Syntax + +This section provides the syntax for the above XML schema. + +The following elements SHALL be provisioned by the UE: + +- Creator: Represents the user who creates the bookmark, it shall be in the format of IMPU. +- Created: Represents the time when the bookmark is created. +- ProgramId: represents the id of the bookmarked program, which shall be globalContentID retrieved from User Service Description. +- ProgramType: represents the type of delivery for the selected program. It can be "pss" or "mbms". +- Offset: Represents the bookmark time, in the format of an offset from the beginning of the program. +- Comment: Represents any comment chosen by the user. +- Tag: Represents any categorization chosen by the user + +- Rank: Represents the user favorite rating for the bookmark +- Sharing: If set, the bookmark can be shared with others. + +The following elements MAY be provisioned by the UE: + +- suggestedPresentationOffset: the offset in time from the bookmark created time to the bookmark presentation time at UE1. + +The following elements SHALL be provisioned by the SCF: + +- Retrieval count: SHALL be set to 0 and incremented by the service provider when the bookmark is retrieved. +- Expires: Represents the expire time of current bookmark; +- Id: Represents the identifier of current bookmark. + +--- + +## Annex K (normative): XML Schema for Content Report Configuration + +The Content Reporting Configuration Info-package shall contain an XML document complies with the following schema. + +``` + + + + Indicates configuration information of content report +function. + + + + + + + + + +``` + +## Annex L (normative): XML Schema for Parental Control Service + +This clause defines the XML schema and its syntax for networked bookmark. + +``` + + + + + + + + command for parental control associated with the parent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +## Annex M (normative): PSS&MBMS User Profile Extension + +This section defines the XML schema extension for parental control service. + +``` + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +## Annex N (normative): XML Schema for Network PVR + +This annex describes the XML schema for the NPVR request sends by UE to the SCF. + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + +``` + +--- + +## Annex O (normative): XML Schema for Service Provider Initiated Content Referral Service (CRS) + +``` + + + + + + + + + + + + + + + + + + + + + + + +``` + +--- + +## Annex P (informative): File Naming convention for XML schemas + +This section defines the file naming convention for XML schemas. + +Convention: + +The convention used for file name is "SchemaName.xsd", where SchemaName is the name of the last part of the targetNamespace of the schema as shown within the schema transforming ":" into "-" e.g. "3gpp:bookmark:2009:IMS-PSS-MBMS" becomes "3gpp-bookmark-2009-IMS-PSS-MBMS". + +File names: + +Therefore file names used in the present specification are: + +- "org-etsi-ngn-params-xml-ns-PssMbmscommand.xsd" for the XML schema defined in Annex D for PSS and MBMS commands +- "org-etsi-ngn-params-xml-ns-PssContentSwitchData.xsd" for the XML schema defined in Annex E for PSS Content Switch data +- "org-etsi-ngn-params-xml-ns-MbmsContentSwitchData.xsd" for the XML schema defined in Annex F for MBMS Content Switch data +- "3GPP-metadata-2008-IMS-PSS-MBMS-UECap.xsd" for the XML schema defined in Annex G for PSS and MBMS UE Device Capabilities +- "3GPP-metadata-2005-MBMS-bootstrappingTransactionIdentifier.xsd" for the XML schema defined in Annex I.1 for Service Attachment Information +- "3GPP-metadata-2005-MBMS-nafKeyInfo.xsd" for the XML schema defined in Annex I.2 for Service Attachment Information +- "3gpp-bookmark-2009-IMS-PSS-MBMS.xsd" for the XML schema defined in Annex J on network bookmark + +--- + +## Annex Q (normative): Content Reporting Configuration Info Package + +This annex contains the necessary information for the registration of Content Reporting Configuration Info Package into IANA. + +--- + +### Q.1 Overall Description + +During service consumption (e.g. with a PSS/MBMS session), the centre server, e.g. Server Control Function, may request to re-config the content report behaviours. The configuration does not require user intervention + +The Content Reporting Configuration Info Package is used to transport the necessary configuration parameters regarding the content reporting function. + +The Content Reporting Configuration Info Package is defined for any multimedia application that using content reporting. Any application, where sending content reporting configuration information, using the SIP INFO method is required, can use the Content Reporting Configuration Info Package. + +--- + +### Q.2 Applicability + +The Info Package mechanism for transporting content reporting configuration information has been chosen as an optional feature. The mechanism also allows content reporting configuration information to be sent inside an existing dialog, using the same signalling path as other SIP messages within the dialog, rather than having to establish a separate dialog. + +--- + +### Q.3 Info Package Name + +The name of the Info Package is: **ContentReportConfig**. + +--- + +### Q.4 Info Package Parameters + +No parameters are defined for the **Content Reporting Configuration** Info Package. + +--- + +### Q.5 SIP Option Tags + +No SIP option tags are defined for the **Content Reporting Configuration** Info Package. + +--- + +### Q.6 INFO Message Body Parts + +#### Q.6.1 General + +Configuration information of Content Reporting function on a device is sent as part of the message body of the SIP INFO request. This subclause defines the information and syntax associated with the message body part used for transporting the information. + +#### Q.6.2 SIP Content-Type header field value + +The value of the SIP Content-Type header field associated with the **Content Reporting Configuration** Info Package message body is: + +application/3gpp-ims-pss-mbms-contentReportConfig+xml” + +## Q.6.3 SIP Content-Disposition header field value + +The value of the SIP Content-Disposition header field associated with the **Content Reporting Configuration** Info Package message body is: Info-Package. + +## Q.6.4 Message body syntax + +The syntax of the **Content Reporting Configuration** Info Package message body is based on the rules defined in Annex K. + +--- + +## Q.7 Info Package Usage Restrictions + +No usage restrictions are defined for the **Content Reporting Configuration** Info Package. + +--- + +## Q.8 Rate of INFO Requests + +No maximum rate or minimum rate is defined for sending INFO requests associated with the **Content Reporting Configuration** Info Package. + +--- + +## Q.9 Info Package Security Considerations + +No additional security mechanism is defined for the **Content Reporting Configuration** Info Package. + +The security of the **Content Reporting Configuration** Info Package is based on the generic security mechanism provided for the underlying SIP signalling. + +--- + +## Q.10 Implementation Details and Examples + +None + +## Annex R (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|-----------------------------------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2008-12 | 42 | SP-080675 | | | Presented for approval at TSG SA#42 | 1.0.0 | 2.0.0 | +| 2008-12 | 42 | | | | Approved at TSG SA#42 | 2.0.0 | 8.0.0 | +| 2009-03 | 43 | SP-090007 | 0001 | 2 | Corrections on layout of structure, references, numbering of figures of TS 26.237 | 8.0.0 | 8.1.0 | +| 2009-03 | 43 | SP-090007 | 0002 | 1 | Improvement of general descriptions of TS 26.237 | 8.0.0 | 8.1.0 | +| 2009-03 | 43 | SP-090007 | 0003 | 1 | Security procedures of IMS based MBMS user service | 8.0.0 | 8.1.0 | +| 2009-03 | 43 | SP-090007 | 0004 | 2 | Corrections and clarifications to policy and charging control | 8.0.0 | 8.1.0 | +| 2009-03 | 43 | SP-090007 | 0005 | 2 | Corrections and clarifications to IMS based PSS and MBMS User Service; Protocols | 8.0.0 | 8.1.0 | +| 2009-03 | 43 | SP-090007 | 0006 | 2 | Network-initiated PSS streaming session teardown | 8.0.0 | 8.1.0 | +| 2009-03 | | | | | Tidy up title | 8.1.0 | 8.1.1 | +| 2009-06 | 44 | SP-090250 | 0008 | 1 | Selection of MBMS security option | 8.1.1 | 8.2.0 | +| 2009-06 | 44 | SP-090250 | 0009 | | Corrections and clarifications to SIP based MBMS security procedures | 8.1.1 | 8.2.0 | +| 2009-06 | 44 | SP-090250 | 0010 | | Corrections and clarifications to security related clauses | 8.1.1 | 8.2.0 | +| 2009-09 | 45 | SP-090563 | 0014 | | Corrections and clarifications to security procedures | 8.2.0 | 8.3.0 | +| 2009-09 | 45 | SP-090570 | 0013 | | Blending of presence and PSS/MBMS user services | 8.3.0 | 9.0.0 | +| 2009-09 | 45 | SP-090570 | 0016 | 1 | IMS Based UGC Service | 8.3.0 | 9.0.0 | +| 2009-09 | 45 | SP-090570 | 0017 | | Networked Bookmark Service | 8.3.0 | 9.0.0 | +| 2009-09 | 45 | SP-090570 | 0019 | 2 | Service Selection Information Update | 8.3.0 | 9.0.0 | +| 2009-09 | 45 | SP-090570 | 0020 | 2 | Clarification on Content Identifier in Session Initialization Procedure | 8.3.0 | 9.0.0 | +| 2009-12 | 46 | SP-090707 | 0021 | 1 | IMS based MBMS download service | 9.0.0 | 9.1.0 | +| 2009-12 | 46 | SP-090707 | 0022 | 1 | Inter UE Transfer | 9.0.0 | 9.1.0 | +| 2009-12 | 46 | SP-090701 | 0023 | 2 | Clarification on IMS based PSS streaming | 9.0.0 | 9.1.0 | +| 2009-12 | 46 | SP-090707 | 0025 | 3 | SIP Info for content switching | 9.0.0 | 9.1.0 | +| 2009-12 | 46 | SP-090707 | 0027 | 1 | Session set-up for IMS based download unicast service | 9.0.0 | 9.1.0 | +| 2009-12 | 46 | SP-090707 | 0028 | 1 | Architecture for IMS based download unicast service | 9.0.0 | 9.1.0 | +| 2009-12 | 46 | SP-090707 | 0031 | | XML schema and syntax for nBookmark service | 9.0.0 | 9.1.0 | +| 2010-03 | 47 | SP-100022 | 0032 | | Corrections to Inter UE Session Transfer | 9.1.0 | 9.2.0 | +| 2010-06 | 48 | SP-100299 | 0035 | | Corrections to Introduction | 9.2.0 | 9.3.0 | +| 2010-06 | 48 | SP-100299 | 0036 | 2 | Corrections to SIP messaging diagrams and descriptions | 9.2.0 | 9.3.0 | +| 2010-06 | 48 | SP-100299 | 0037 | 2 | Modification on IMS based PSS download session initiation | 9.2.0 | 9.3.0 | +| 2010-06 | 48 | SP-100299 | 0038 | 1 | IMS based PSS download session termination | 9.2.0 | 9.3.0 | +| 2010-09 | 49 | SP-100463 | 0039 | | Corrections to SDP attributes in UE-initiated MBMS session | 9.3.0 | 9.4.0 | +| 2010-09 | 49 | SP-100463 | 0042 | | Removal of timer modification | 9.3.0 | 9.4.0 | +| 2010-09 | 49 | SP-100463 | 0043 | | Clarifications for MBMS to PSS switching procedure | 9.3.0 | 9.4.0 | +| 2010-09 | 49 | SP-100461 | 0045 | 2 | Correction on User Service Discovery | 9.3.0 | 9.4.0 | +| 2010-09 | 49 | SP-100469 | 0041 | 3 | Modification of "Procedure for providing missing parameters" procedure | 9.4.0 | 10.0.0 | +| 2011-03 | 51 | SP-110046 | 0046 | 4 | Content Report Configuration | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0047 | | Replication for Inter-UE-Session transfer in Push Mode | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0048 | 2 | Inter-UE-Session transfer in Pull Mode | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0050 | 3 | Parental Control Service | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0051 | 1 | Forced Playout Constraints | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0052 | 3 | IMS based HTTP Streaming | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110038 | 0053 | 2 | Modification of XML schema for nBookmark | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0055 | 1 | Network Personal Video Recording service | 10.0.0 | 10.1.0 | +| 2011-03 | 51 | SP-110046 | 0056 | 1 | Content Referral Service | 10.0.0 | 10.1.0 | +| 2011-06 | 52 | SP-110303 | 0058 | 1 | Definition of MIME type for bookmarking | 10.1.0 | 10.2.0 | +| 2011-06 | 52 | SP-110307 | 0059 | | File naming convention for XML schemas | 10.1.0 | 10.2.0 | +| 2011-09 | 53 | SP-110547 | 0062 | | On Resolving IETF dependencies | 10.2.0 | 10.3.0 | +| 2011-11 | 54 | SP-110788 | 0065 | | On Resolving IETF dependencies | 10.3.0 | 10.4.0 | +| 2011-11 | 54 | SP-110796 | 0066 | 1 | Registration of Content Reporting Configuration Info Package | 10.3.0 | 10.4.0 | +| 2012-06 | 56 | SP-120222 | 0067 | | Corrections on Content Report Info Package | 10.4.0 | 10.5.0 | +| 2012-06 | 56 | SP-120224 | 0068 | 2 | Media Presentation Synchronization in MBMS | 10.5.0 | 11.0.0 | +| 2012-06 | 56 | SP-120224 | 0069 | 3 | Media Presentation Synchronization in Inter-UE Session Replication | 10.5.0 | 11.0.0 | +| 2013-06 | 60 | SP-130182 | 0074 | 1 | Clarification on File Repair Procedure in IMS-based MBMS Download Service | 11.0.0 | 11.1.0 | +| 2013-09 | 61 | SP-130345 | 0077 | 1 | Corrections on SDP Attributes | 11.1.0 | 11.2.0 | +| 2013-12 | 62 | SP-130568 | 0082 | 1 | Correction to references | 11.2.0 | 11.3.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26246/raw.md b/marked/Rel-11/26_series/26246/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..0d1f64e95904ec1b2502c7bd8f722fb4ba111800 --- /dev/null +++ b/marked/Rel-11/26_series/26246/raw.md @@ -0,0 +1,443 @@ + + + + + + +# Contents + +| | | +|-------------------------------------------------------------------------------------------------|-----------| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions and abbreviations ..... | 6 | +| 3.1 Definitions..... | 6 | +| 3.2 Abbreviations ..... | 6 | +| 4 3GPP SMIL Language Profile Outline ..... | 6 | +| 5 Document Conformance ..... | 7 | +| 6 User Agent Conformance..... | 7 | +| 7 3GPP SMIL Language Profile definition..... | 8 | +| 7.1 Content Control Modules..... | 8 | +| 7.2 Layout Module ..... | 8 | +| 7.3 Linking Module..... | 8 | +| 7.4 Media Object Modules..... | 8 | +| 7.5 Metainformation Module ..... | 9 | +| 7.6 Structure Module..... | 9 | +| 7.7 Timing and Synchronization modules..... | 9 | +| 7.8 Transition Effects Module..... | 10 | +| 8 Content Model..... | 10 | +| Annex A (informative): SMIL authoring guidelines..... | 12 | +| A.1 General..... | 12 | +| A.2 BasicLinking ..... | 12 | +| A.3 BasicLayout ..... | 12 | +| A.4 EventTiming..... | 13 | +| A.5 MetaInformation ..... | 13 | +| A.6 XML entities ..... | 13 | +| A.7 XHTML Mobile Profile ..... | 13 | +| Annex B (normative): Additional specification on the systemComponent Test Attribute..... | 15 | +| B.1 General ..... | 15 | +| B.2 Definition of Attribute Encoding ..... | 15 | +| B.3 Behaviour of a 3GPP SMIL Player ..... | 15 | +| Annex C (informative): Change history..... | 17 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +The 3GPP transparent end-to-end packet-switched streaming service (PSS) specification consists of five 3GPP TSs: 3GPP TS 22.233 [1], 3GPP TS 26.233 [2], 3GPP TS 26.234 [3], 3GPP TS 26.244 [4], 3GPP TS 26.245 [5], and the present document. + +The TS 22.233 contains the service requirements for the PSS. The TS 26.233 provides an overview of the PSS. The TS 26.234 provides the details of protocol and codecs used by the PSS. The TS 26.244 defines the 3GPP file format (3GP) used by the PPS and MMS services. TS 26.245 defines the Timed Text format used by the PSS. + +The TS 26.244, TS 26.245, and Ts 26.246 (present document) start with Release 6. Earlier releases of the 3GPP file format, the Timed text format, and the 3GPP SMIL Language Profile can be found in TS 26.234. + +# --- 1 Scope + +The present document includes the specification of the 3GPP SMIL Language Profile. The 3GPP SMIL Language Profile is also referred to as "3GPP PSS SMIL Language Profile" [3] and also just "3GPP SMIL". + +The 3GPP SMIL Language Profile is based on SMIL 2.0 Basic [7] and SMIL Scalability Framework. It is a clean subset of SMIL 2.0 Full profile [7], and a clear superset of SMIL 2.0 Basic [7]. + +The 3GPP SMIL Language Profile is used by the PSS [2][3] and MMS [6] services. + +The 3GPP SMIL Language Profile is in no way restricted to be used with only these services, but can also be used for other services. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] 3GPP TS 22.233: "Transparent End-to-End Packet-switched Streaming Service; Service aspects; Stage 1". +- [2] 3GPP TS 26.233: "Transparent end-to-end Packet-switched Streaming Service (PSS); General description". +- [3] 3GPP TS 26.234: "Transparent end-to-end Packet-switched Streaming Service (PSS); Protocols and codecs". +- [4] 3GPP TS 26.244: "Transparent end-to-end Packet-switched Streaming Service (PSS); 3GPP file format (3GP)". +- [5] 3GPP TS 26.245: "Transparent end-to-end Packet-switched Streaming Service (PSS); Timed-text format". +- [6] 3GPP TS 26.140: "Multimedia Messaging Service (MMS); Media formats and codecs". +- [7] W3C Recommendation: "Synchronized Multimedia Integration Language (SMIL 2.0)-[Second Edition]", , January 2005. +- [8] W3C Recommendation: "Cascading Style Sheets, level 2, CSS2 Specification, , 12.05.1998 + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the following terms and definitions apply: + +**continuous media:** media with an inherent notion of time. In the present document speech, audio, video and timed text + +**discrete media:** media that itself does not contain an element of time. In the present document all media not defined as continuous media + +**PSS client:** client for the 3GPP packet switched streaming service based on the IETF RTSP/SDP and/or HTTP standards, with possible additional 3GPP requirements according to the present document + +**PSS server:** server for the 3GPP packet switched streaming service based on the IETF RTSP/SDP and/or HTTP standards, with possible additional 3GPP requirements according to the present document + +**scene description:** description of the spatial layout and temporal behaviour of a presentation. It can also contain hyperlinks + +## 3.2 Abbreviations + +For the purposes of the present document, the abbreviations given in 3GPP TR 21.905 [3] and the following apply. + +| | | +|--------|-------------------------------------------------| +| HTML | Hyper Text Markup Language | +| MIME | Multipurpose Internet Mail Extensions | +| MMS | Multimedia Messaging Service | +| PSS | Packet-switched Streaming Service | +| SMIL | Synchronised Multimedia Integration Language | +| UCS-2 | Universal Character Set (the two octet form) | +| UTF-8 | Unicode Transformation Format (the 8-bit form) | +| UTF-16 | Unicode Transformation Format (the 16-bit form) | +| W3C | WWW Consortium | +| XHTML | eXtensible Hyper Text Markup Language | +| XML | eXtensible Markup Language | + +# --- 4 3GPP SMIL Language Profile Outline + +3GPP SMIL is a markup language based on SMIL Basic [7] and SMIL Scalability Framework. + +3GPP SMIL consists of the modules required by SMIL Basic Profile (and SMIL 2.0 Host Language Conformance) and additional MediaAccessibility, MediaDescription, MediaClipping, MetaInformation, PrefetchControl, EventTiming and BasicTransitions modules. All of the following modules are included: + +- SMIL 2.0 Content Control Modules -- BasicContentControl, SkipContentControl and PrefetchControl +- SMIL 2.0 Layout Module -- BasicLayout +- SMIL 2.0 Linking Module -- BasicLinking, LinkingAttributes +- SMIL 2.0 Media Object Modules -- BasicMedia, MediaClipping, MediaParameter, MediaAccessibility and MediaDescription +- SMIL 2.0 Metainformation Module -- Metainformation +- SMIL 2.0 Structure Module -- Structure +- SMIL 2.0 Timing and Synchronization Modules -- BasicInlineTiming, MinMaxTiming, BasicTimeContainers, RepeatTiming and EventTiming +- SMIL 2.0 Transition Effects Module -- BasicTransitions + +# --- 5 Document Conformance + +A conforming 3GPP SMIL document shall be a conforming SMIL 2.0 document. + +All 3GPP SMIL documents use SMIL 2.0 namespace. + +``` + +``` + +3GPP SMIL documents may declare requirements using systemRequired attribute: + +EXAMPLE 1: `` + +- Namespace URI identifies the version of the 3GPP SMIL profile defined in Release 4 of [3]. +- Namespace URI identifies the version of the 3GPP SMIL profile defined in Release 5 of [3]. +- Namespace URI identifies the version of the 3GPP SMIL profile defined in Release 6 in the present document. + +Authors may use these URIs to indicate requirement for exact 3GPP SMIL semantics for a document or a subpart of a document: + +EXAMPLE 2: `` + +The content authors should generally not include the PSS requirement in the document unless the SMIL document relies on PSS specific semantics that are not part of the W3C SMIL. The reason for this is that SMIL players that are not conforming 3GPP PSS user agents may not recognize the PSS URI and thus refuse to play the document. + +# 6 User Agent Conformance + +A conforming 3GPP SMIL user agent shall be a conforming SMIL Basic User Agent. + +A conforming user agent shall implement the semantics 3GPP SMIL as described in clauses 7 and 8 (including subclauses). + +A conforming user agent shall recognise + +- the URIs of all included SMIL 2.0 modules; +- the URI as referring to all modules and semantics of the version of the 3GPP SMIL profile described in Release 6 in the present document; +- the URI as referring to all modules and semantics of the version of the 3GPP SMIL profile described in Release 5 of document [3]; +- the URI as referring to all modules and semantics of the 3GPP SMIL profile defined in Release 4 of document [3]. + +NOTE: The difference between release 4 and release 5 is that the BasicTransitions module has been added in release 5. Releases 4 and 5 are defined in [3]. + +NOTE: The difference between release 5 and release 6 is that the MediaParameter module and additional specification on the ContentControl module systemComponent test attribute have been added in release 6. Release 5 is defined in [3]. + +# 7 3GPP SMIL Language Profile definition + +3GPP SMIL is based on SMIL 2.0 Basic language profile [7]. This chapter defines the content model and integration semantics of the included modules where they differ from those defined by SMIL Basic. + +## 7.1 Content Control Modules + +3GPP SMIL includes the content control functionality of the BasicContentControl, SkipContentControl and PrefetchControl modules of SMIL 2.0. PrefetchControl is not part of SMIL Basic and is an additional module in this profile. + +All BasicContentControl attributes listed in the module specification shall be supported. Annex B extends the SMIL 2.0 BasicContentControl specification [7] by additional definitions on the **systemComponent** test attribute. + +NOTE: The SMIL specification [7] defines that all functionality of PrefetchControl module is optional. This mean that even although PrefetchControl is mandatory user agents may implement semantics of PrefetchControl module only partially or not to implement them at all. + +PrefetchControl module adds the **prefetch** element to the content model of SMIL Basic **body**, **switch**, **par** and **seq** elements. The **prefetch** element has the attributes defined by the PrefetchControl module (**mediaSize**, **mediaTime** and **bandwidth**), the **src** attribute, the BasicContentControl attributes and the **skip-content** attribute. + +## 7.2 Layout Module + +3GPP SMIL includes the BasicLayout module of SMIL 2.0 for spatial layout. The module is part of SMIL Basic. + +Default values of the width and height attributes for root-layout shall be the dimensions of the device display area. + +## 7.3 Linking Module + +3GPP SMIL includes the SMIL 2.0 BasicLinking and LinkingAttributes modules for providing hyperlinks between documents and document fragments. The BasicLinking module is from SMIL Basic. + +When linking to destinations outside the current document, implementations may ignore values "play" and "pause" of the 'sourcePlaystate' attribute and values "new" and "pause" of the 'show' attribute, instead using the semantics of values "stop" and "replace" respectively. When the values of 'sourcePlaystate' and 'show' are ignored the player may also ignore the 'sourceLevel' attribute since it is of no use then + +## 7.4 Media Object Modules + +3GPP SMIL includes the media elements from the SMIL 2.0 BasicMedia module and attributes from the MediaAccessibility, MediaDescription and MediaClipping modules. MediaAccessibility, MediaDescription and MediaClipping modules are additions in this profile to the SMIL Basic. + +MediaClipping module adds to the profile the ability to address sub-clips of continuous media. MediaClipping module adds '**clipBegin**' and '**clipEnd**' (and for compatibility '**clip-begin**' and '**clip-end**') attributes to all media elements. + +MediaAccessibility module provides basic accessibility support for media elements. New attributes '**alt**', '**longdesc**' and '**readIndex**' are added to all media elements by this module. MediaDescription module is included by the MediaAccessibility module and adds '**abstract**', '**author**' and '**copyright**' attributes to media elements. + +MediaParameter module allows passing additional parameters to the rendering of a media object. This specification extends the SMIL 2.0 specification [7] by defining some values for the '**name**' and '**value**' attributes of MediaParameter module and the expected behaviour of a 3GPP SMIL player when these are used: + +A 3GPP SMIL player should render the content as specified whenever one of the following name value pairs are encoded as a parameter to a media object of one of the listed MIME types: + +NOTE: The behaviour of the 3GPP SMIL player is undefined for all other cases. + +| MIME type of the media object | value of the 'name' attribute | value of the 'value' attribute | Intended rendering of the media content. | +|------------------------------------------------------------------------------|---------------------------------|-------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| application/text,
application/xhtml+xml,
application/vnd.wap.xhtml+xml | color
or
foreground-color | Any legal value for the CSS2 color attribute [8] (eg. "#ff0000", "red") | The text document is rendered with the given (default) color.

Note: Attribute name="foreground-color" is included for compatibility. | +| application/text,
application/xhtml+xml,
application/vnd.wap.xhtml+xml | font-size
or | Any legal value for the CSS2 font-size | The text document is rendered with the given (default) text size. The size values are interpreted as in CSS2 [8], | + +| | | | | +|--|----------|---------------------------------------|----------------------------------------------------------------| +| | textsize | attribute [8] (e.g. "medium", "12pt") | Note: Attribute name="fontsize" is included for compatibility. | +|--|----------|---------------------------------------|----------------------------------------------------------------| + +## 7.5 Metainformation Module + +The MetaInformation module of SMIL 2.0 is included to the profile. This module is addition in this profile to the SMIL Basic and provides a way to include descriptive information about the document content into the document. + +This module adds **meta** and **metadata** elements to the content model of SMIL Basic **head** element. + +## 7.6 Structure Module + +The Structure module defines the top-level structure of the document. It is included by SMIL Basic. + +## 7.7 Timing and Synchronization modules + +The timing modules included in the 3GPP SMIL are BasicInlineTiming, MinMaxTiming, BasicTimeContainers, RepeatTiming and EventTiming. The EventTiming module is an addition in this profile to the SMIL Basic. + +For 'begin' and 'end' attributes either single offset-value or single event-value shall be allowed. Offsets shall not be supported with event-values. + +Event timing attributes that reference invalid IDs (for example elements that have been removed by the content control) shall be treated as being indefinite. + +Supported event names and semantics shall be as defined by the SMIL 2.0 Language Profile. All user agents shall be able to raise the following event types: + +- activateEvent; +- beginEvent; +- endEvent. + +The following SMIL 2.0 Language event types should be supported: + +- focusInEvent; +- focusOutEvent; +- inBoundsEvent; +- outOfBoundsEvent; +- repeatEvent. + +User agents shall ignore unknown event types and not treat them as errors. + +Events do not bubble and shall be delivered to the associated media or timed elements only. + +When using delivery mechanisms such as streaming, the setup time, connection time and buffering time shall be excluded from the computation of the simple duration. + +## 7.8 Transition Effects Module + +3GPP SMIL profile includes the SMIL 2.0 BasicTransitions module to provide a framework for describing transitions between media elements. + +NOTE: The SMIL specification [7] defines that all functionality of BasicTransitions module is optional: "Transitions are hints to the presentation. Implementations must be able to ignore transitions if they so desire and still play the media of the presentation". This mean that even although the BasicTransitions module is mandatory user agents may implement semantics of the BasicTransitions module only partially or not to implement them at all. Content authors should use transitions in their SMIL presentation where this appears useful. User agents that fully support the semantics of the Basic Transitions module will render the presentation with the specified transitions. All other user agents will leave out the transitions but present the media content correctly. + +User agents that implement the semantics of this module should implement at least the following transition effects described in SMIL 2.0 specification [7]: + +- barWipe; +- irisWipe; +- clockWipe; +- snakeWipe; +- pushWipe; +- slideWipe; +- fade; + +A user agent should implement the default subtype of these transition effects. + +A user agent that implements the semantics of this module shall at least support transition effects for non-animated image media elements. For purposes of the Transition Effects modules, two media elements are considered overlapping when they occupy the same region. + +BasicTransitions module adds attributes 'transIn' and 'transOut' to the media elements of the Media Objects modules, and value "transition" to the set of legal values for the 'fill' attribute of the media elements. It also adds transition element to the content model of the head element. + +# --- 8 Content Model + +This table shows the full content model and attributes of the 3GPP SMIL profile. The attribute collections used are defined by SMIL Basic ([7], SMIL Host Language Conformance requirements, chapter 2.4). Changes to SMIL Basic are shown in **bold**. + +**Table 1: Content model for the 3GPP SMIL profile** + +| Element | | | +|-----------------------------------------------------|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| | Elements | Attributes | +| smil | head, body | COMMON-ATTRS, CONTCTRL-ATTRS, xmlns | +| head | layout, switch, meta, metadata, transition | COMMON-ATTRS | +| body | TIMING-ELMS, MEDIA-ELMS, switch, a, prefetch | COMMON-ATTRS | +| layout | root-layout, region | COMMON-ATTRS, CONTCTRL-ATTRS, type | +| root-layout | EMPTY | COMMON-ATTRS, backgroundColor, height, width, skip-content | +| region | EMPTY | COMMON-ATTRS, backgroundColor, bottom, fit, height, left, right, showBackground, top, width, z-index, skip-content, regionName | +| ref, animation, audio, img, video, text, textstream | area, param | COMMON-ATTRS, CONTCTRL-ATTRS, TIMING-ATTRS, repeat, region, MEDIA-ATTRS, clipBegin(clip-begin), clipEnd(clip-end), alt, longDesc, readIndex, abstract, author, copyright, transIn, transOut | +| param | EMPTY | name, value | +| a | MEDIA-ELMS | COMMON-ATTRS, LINKING-ATTRS | +| area | EMPTY | COMMON-ATTRS, LINKING-ATTRS, TIMING-ATTRS, repeat, shape, coords, nohref | +| par, seq | TIMING-ELMS, MEDIA-ELMS, switch, a, prefetch | COMMON-ATTRS, CONTCTRL-ATTRS, TIMING-ATTRS, repeat | +| switch | TIMING-ELMS, MEDIA-ELMS, layout, a, prefetch | COMMON-ATTRS, CONTCTRL-ATTRS | +| prefetch | EMPTY | COMMON-ATTRS, CONTCTRL-ATTRS, mediaSize, mediaTime, bandwidth, src, skip-content | +| meta | EMPTY | COMMON-ATTRS, content, name, skip-content | +| metadata | EMPTY | COMMON-ATTRS, skip-content | +| transition | EMPTY | COMMON-ATTRS, CONTCTRL-ATTRS, type, subtype, startProgress, endProgress, direction, fadeColor, skip-content, dur | + +# --- Annex A (informative): SMIL authoring guidelines + +## A.1 General + +This is an informative annex for SMIL presentation authors. Authors can expect that PSS clients can handle the SMIL module collection defined in this document, with the restrictions defined in this Annex. When creating SMIL documents the author is recommended to consider that terminals may have small displays and simple input devices. The media types and their encoding included in the presentation should be restricted to what is described in clause 7 of the present document. Considering that many mobile devices may have limited software and hardware capabilities, the number of media to be played simultaneous should be limited. For example, many devices will not be able to handle more than one video sequence at the time. + +## --- A.2 BasicLinking + +The Linking Modules define elements and attributes for navigational hyperlinking, either through user interaction or through temporal events. The BasicLinking module defines the "a" and "area" elements for basic linking: + +- a Similar to the "a" element in HTML it provides a link from a media object through the href attribute (which contains the URI of the link's destination). The "a" element includes a number of attributes for defining the behaviour of the presentation when the link is followed. +- area Whereas the a element only allows a link to be associated with a complete media object, the area element allows links to be associated with spatial and/or temporal portions of a media object. + +The area element may be useful for enabling services that rely on interactivity where the display size is not big enough to allow the display of links alongside a media (e.g. QCIF video) window. Instead, the user could, for example, click on a watermark logo displayed in the video window to visit the company website. + +Even if the area element may be useful some mobile terminals will not be able to handle area elements that include multiple selectable regions within an area element. One reason for this could be that the terminals do not have the appropriate user interface. Such area elements should therefore be avoided. Instead it is recommended that the "a" element be used. If the "area" element is used, the SMIL presentation should also include alternative links to navigate through the presentation; i.e. the author should not create presentations that rely on that the player can handle "area" elements. + +## --- A.3 BasicLayout + +When defining the layout of a SMIL presentation, a content author needs to be aware that the targeted devices might have diverse properties that effect how the content can be rendered. The different sizes of the display area that can be used to render content on the targeted devices should be considered for defining the layout of the SMIL presentation. The root-layout window might represent the entire display or only parts of it. + +Content authors are encouraged to create SMIL presentations that will work well with different resolutions of the rendering area. As mentioned in the SMIL2 recommendation content authors should use SMIL ContentControl functionality for defining multiple layouts for their SMIL presentation that are tailored to the specific needs of the whole range of targeted devices. Furthermore, authors should include a default layout (i.e. a layout determined by the SMIL player) that will be used when none of the author-defined layouts can be used. + +Using relative position and size attributes in the definition of a region is also helpful for making SMIL presentations more portable across different display sizes; these features should also be used. + +A 3GPP SMIL player should use the layout definition of a SMIL presentation for presenting the content whenever possible. When the SMIL player fails to use the layout information defined by the author it is free to present the content using a layout it determines by itself. + +The "fit" attribute defines how different media should be fitted into their respective display regions. + +The rendering and layout of some objects on a small display might be difficult and all mobile devices may not support features such as scroll bars. Therefore "fit=scroll" should not be used except for text content. + +Due to hardware restrictions in mobile devices, operations such that scaling of a video sequence, or even images, may be very difficult to achieve. According to the SMIL 2.0 specification SMIL players may in these situations clip the content instead. To be sure of that the presentation is displayed as the author intended, video content should be encoded in a size suitable for the targeted terminals and it is recommended to use "fit=hidden". + +## --- A.4 EventTiming + +The two attributes "endEvent" and "repeatEvent" in the EventTiming module may cause problems for a mobile SMIL player. The end of a media element triggers the "endEvent". In the same way the "repeatEvent" occurs when the second and subsequent iterations of a repeated element begin playback. Both these events rely on that the SMIL player receives information about that the media element has ended. One example could be when the end of a video sequence initiates the event. If the player has not received explicit information about the duration of the video sequence, e.g. by the "dur" attribute in SMIL or by some external source as the "a=range" field in SDP. The player will have to rely on the RTCP BYE message to decide when the video sequence ends. If the RTCP BYE message is lost, the player will have problems initiate the event. For these reasons is recommended that the "endEvent" and "repeatEvent" attributes are used with care, and if used the player should be provided with some additional information about the duration of the media element that triggers the event. This additional information could e.g. be the "dur" attribute in SMIL or the "a=range" field in SDP. + +The "inBoundsEvent" and "outOfBoundsEvent" attributes assume that the terminal has a pointer device for moving the focus to within a window (i.e. clicking within a window). Not all terminals will support this functionality since they do not have the appropriate user interface. Hence care should be taken in using these particular event triggers. + +## --- A.5 MetaInformation + +Authors are encouraged to make use of meta data whenever providing such information to the mobile terminal appears to be useful. However, they should keep in mind that some mobile terminals will parse but not process the meta data. + +Furthermore, authors should keep in mind that excessive use of meta data will substantially increase the file size of the SMIL presentation that needs to be transferred to the mobile terminal. This may result in longer set-up times. + +## --- A.6 XML entities + +Entities are a mechanism to insert XML fragments inside an XML document. Entities can be internal, essentially a macro expansion, or external. Use of XML entities in SMIL presentations is not recommended, as many current XML parsers do not fully support them. + +## --- A.7 XHTML Mobile Profile + +When rendering texts in a SMIL presentation, authors are able to use XHTML Mobile Profile [47] that contains thirteen modules. However, some of the modules include non-text information. When referring to an XHTML Mobile Profile document from a SMIL document, authors should use only the required XHTML Host Language modules : Structure Module, Text Module, Hypertext Module and List Module. The use of the Image Module, in particular, should not be used. Images and other non-text contents should be included in the SMIL document. + +**NOTE:** An XHTML file including a module which is not part of the XHTML Host Language modules may not be shown as intended. Also, an XHTML file which uses elements or attributes from the required XHTML Host Language modules and which uses elements or attributes that are not included in XHTML Basic Profile [28], may not render correctly on legacy handsets which implement only XHTML Basic. These are: + +- The start attribute on the 'ol' element in the List module +- The value attribute on the 'li' element in the List module +- The 'b' element in the Presentation module +- The 'big' element in the Presentation module + +- The 'hr' element in the Presentation module +- The 'i' element in the Presentation module + - The 'small' element in the Presentation module + +# --- Annex B (normative): Additional specification on the systemComponent Test Attribute + +## B.1 General + +This annex includes additional normative specification on the encoding of the SMIL 2.0 BasicContentControl Module **systemComponent** test attribute value. The purpose is to allow a SMIL presentation to test if a 3GPP SMIL player supports a media type. + +## B.2 Definition of Attribute Encoding + +To test support for a certain media type the value of the **systemComponent** attribute must be encoded as a URI as follows: + +``` +systemComponentAttrValue --> "ContentType:" mimeMediaTypeName "/" +mimeSubTypeName options? + +options --> "?" parameters +``` + +where + +- "ContentType:" is a static pre-fix that must always be encoded, +- '*mimeMediaTypeName*' and '*mimeSubtypeName*' are a MIME type and subtype. These two must be encoded and must be separated by a dash ( "/" ), and +- encoding '*options*' is optional. +- '*parameters*' stands for any parameter to the MIME type that can optionally be encoded. When encoded, parameters must be separated from the MIME type and sub-type names by a question mark ( "?" ). + +For all content formats mandated by [3] the '*mime-media-type-name*' and '*mime-subtype-name*' must be encoded as defined in section 5.4 of [3]. For all other content types established MIME types must be used. + +NOTE: This specification intentionally does not define a format for parameters. + +## B.3 Behaviour of a 3GPP SMIL Player + +For any **systemComponent** test attribute value that is prefixed with the string 'ContentType:' a 3GPP SMIL player is required to evaluate the **systemComponent** test attribute based on '*mimeMediaTypeName*' and '*mimeSubtypeName*' as follows. + +- evaluation of the test attribute returns true whenever the 3GPP SMIL player supports rendering media content of this MIME type, +- in all other cases the evaluation returns false. + +A 3GPP SMIL player must be able to ignore any encoded parameters for performing this evaluation. A 3GPP SMIL player is allowed but not required to also include parameters into the evaluation. + +NOTE: The specification on parameters makes a 3GPP SMIL player forward compatible with any future version of the specification that will possibly define how to encode MIME type parameters and how to evaluate the systemComponent test attribute when parameters are included into its value. + +NOTE: This specification intentionally leaves it open how those systemComponent test attribute values evaluate that are not prefixed with the string "ContentType:". Again, this makes a 3GPP SMIL player forward compatible with any future version of the specification that will possible define other URI schemes for the systemComponent attribute value. + +# --- Annex C (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2004-06 | 24 | SP-040345 | | | Approved at 3GPP TSG SA#24 | 2.0.0 | 6.0.0 | +| 2004-09 | 33 | SP-060596 | 0001 | 2 | Fix to the SMIL timing modules and to the references | 6.0.0 | 6.1.0 | +| 2007-06 | 36 | | | | Version for Release 7 | 6.1.0 | 7.0.0 | +| 2008-12 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 2009-12 | 46 | | | | Version for Release 9 | 8.0.0 | 9.0.0 | +| 2011-03 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 2012-09 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | +| | | | | | | | | +| | | | | | | | | +| | | | | | | | | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26247/1a827b10290f33d4fec04d0e8ef7a897_img.jpg b/marked/Rel-11/26_series/26247/1a827b10290f33d4fec04d0e8ef7a897_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4ce4e3a1d91945e0ee9775df90b36ed5b5414e6e --- /dev/null +++ b/marked/Rel-11/26_series/26247/1a827b10290f33d4fec04d0e8ef7a897_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cbd034a3bf9d2605c47d86e958e179f71831fcbb27dd8e1450d4a7097cfd9fb +size 50940 diff --git a/marked/Rel-11/26_series/26247/4636adff5682a064f0ae5f13a1d464a6_img.jpg b/marked/Rel-11/26_series/26247/4636adff5682a064f0ae5f13a1d464a6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5154c4973c35537ef13fc76bfde024c8274b3586 --- /dev/null +++ b/marked/Rel-11/26_series/26247/4636adff5682a064f0ae5f13a1d464a6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95341b3b8bcc027af2eddc5dbe816ca78e1c2d489551fb01aa0e11a2ad85458c +size 20644 diff --git a/marked/Rel-11/26_series/26247/5a9282ac54ca7bc50f1d2ab6cfb376ba_img.jpg b/marked/Rel-11/26_series/26247/5a9282ac54ca7bc50f1d2ab6cfb376ba_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d964a5a40d6958a63471a97b58fc4ad923e6a46e --- /dev/null +++ b/marked/Rel-11/26_series/26247/5a9282ac54ca7bc50f1d2ab6cfb376ba_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bce81ecc92e8390a7fe49cc96084683803a3a67ee2bf1826d455f2f700c4a3c +size 19516 diff --git a/marked/Rel-11/26_series/26247/81a4cbf0b3c4cbc065efdf8f800dadde_img.jpg b/marked/Rel-11/26_series/26247/81a4cbf0b3c4cbc065efdf8f800dadde_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3f9d24756d4f637db615c809cc16b1515b0dbc81 --- /dev/null +++ b/marked/Rel-11/26_series/26247/81a4cbf0b3c4cbc065efdf8f800dadde_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:436b62bb1c35045d6a8e1c87152ee048896ef8d38ea2a501d22132e325e966e5 +size 128546 diff --git a/marked/Rel-11/26_series/26247/896f6ec457b6252d4af32a634299218c_img.jpg b/marked/Rel-11/26_series/26247/896f6ec457b6252d4af32a634299218c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..93d747d1d26519ba3ddf0dd7fb56f597f0f73603 --- /dev/null +++ b/marked/Rel-11/26_series/26247/896f6ec457b6252d4af32a634299218c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57f0164a09b0b6c3ff1c5200ffa1581457dacd04b51d45638c87ea9cd25f22e6 +size 34869 diff --git a/marked/Rel-11/26_series/26247/d17f75945bbb3feb84a153ecfedb9b81_img.jpg b/marked/Rel-11/26_series/26247/d17f75945bbb3feb84a153ecfedb9b81_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0bfc034bbc543aae4346464ece08df228f46f48d --- /dev/null +++ b/marked/Rel-11/26_series/26247/d17f75945bbb3feb84a153ecfedb9b81_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc4abe5d6b49807cba15d570a510c981306ce4b66edf5e4b46b25f374f25002e +size 20976 diff --git a/marked/Rel-11/26_series/26247/f57a881fcbcaf494a7dedc4f61224991_img.jpg b/marked/Rel-11/26_series/26247/f57a881fcbcaf494a7dedc4f61224991_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7912f324072d28d51c6f6da0b1cf5112df902530 --- /dev/null +++ b/marked/Rel-11/26_series/26247/f57a881fcbcaf494a7dedc4f61224991_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:012798f552c72bddb3210cbd5cb83f4df3101d013c5f3f4e3e084096af812434 +size 24476 diff --git a/marked/Rel-11/26_series/26247/raw.md b/marked/Rel-11/26_series/26247/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..fd4c6c089f793f6db9e5d6a80edeec04f1c3dd18 --- /dev/null +++ b/marked/Rel-11/26_series/26247/raw.md @@ -0,0 +1,4561 @@ + + + + +Error! No +text of + +Error! No text of specified style in +document. + +# Contents + +| | | +|----------------------------------------------------------------------------|----| +| Foreword ..... | 7 | +| Introduction ..... | 7 | +| 1 Scope..... | 8 | +| 2 References..... | 8 | +| 3 Definitions, abbreviations and conventions ..... | 10 | +| 3.1 Definitions..... | 10 | +| 3.2 Abbreviations ..... | 11 | +| 3.3 Conventions..... | 12 | +| 4 Overview..... | 12 | +| 5 System Description ..... | 13 | +| 5.1 Overview ..... | 13 | +| 5.2 Service Access..... | 14 | +| 5.3 Protocols..... | 14 | +| 6 Progressive Download over HTTP ..... | 15 | +| 6.1 General ..... | 15 | +| 6.2 Progressive Download..... | 15 | +| 6.3 3GPP File Format Profiles ..... | 15 | +| 7 3GPP Dynamic Adaptive Streaming over HTTP ..... | 15 | +| 7.1 System Description ..... | 15 | +| 7.2 3GP-DASH Client Model ..... | 16 | +| 7.3 3GP-DASH Profiles ..... | 17 | +| 7.3.1 General ..... | 17 | +| 7.3.2 3GPP Adaptive HTTP Streaming (Release-9 AHS) ..... | 18 | +| 7.3.3 3GP-DASH Release-10 Profile ..... | 18 | +| 7.3.3.1 Introduction..... | 18 | +| 7.3.4 3GP-DASH Release 11 multiview stereoscopic 3D video profile..... | 18 | +| 7.3.5 3GP-DASH Release 11 frame-packed stereoscopic 3D video profile ..... | 19 | +| 7.3.6 Media Codecs ..... | 19 | +| 7.3.7 Content Protection ..... | 19 | +| 8 DASH - Media Presentation ..... | 19 | +| 8.1 Introduction ..... | 19 | +| 8.2 Media Presentation Description ..... | 22 | +| 8.2.1 General ..... | 22 | +| 8.2.2 Schema and 3GPP Extension ..... | 22 | +| 8.2.3 (void) ..... | 23 | +| 8.2.4 (void) ..... | 23 | +| 8.3 MPD Assembly ..... | 23 | +| 8.3.1 Introduction ..... | 23 | +| 8.3.2 Syntax and semantics ..... | 24 | +| 8.3.3 Processing..... | 24 | +| 8.4 Hierarchical Data Model ..... | 25 | +| 8.4.1 General ..... | 25 | +| 8.4.2 Period..... | 28 | +| 8.4.3 Adaptation Sets and Representations ..... | 30 | +| 8.4.3.1 Overview..... | 30 | +| 8.4.3.2 Common Attributes and Elements..... | 30 | +| 8.4.3.3 Adaptation Set..... | 33 | +| 8.4.3.4 Representation ..... | 38 | +| 8.4.3.5 Sub-Representation..... | 41 | +| 8.4.3.6 Content Component ..... | 42 | +| 8.4.4 Segments and Segment Information..... | 43 | +| 8.4.4.1 General..... | 43 | +| 8.4.4.2 Segment Information Description..... | 44 | + +| | | | +|-----------|------------------------------------------------|----| +| 8.4.4.2.1 | Segment base information..... | 44 | +| 8.4.4.2.2 | Segment list..... | 47 | +| 8.4.4.2.3 | Segment template ..... | 49 | +| 8.4.4.3 | Segment Information ..... | 49 | +| 8.4.4.3.1 | Overview ..... | 49 | +| 8.4.4.3.2 | Initialization Segment Information ..... | 50 | +| 8.4.4.3.3 | Media Segment Information..... | 50 | +| 8.4.4.4 | Template-based Segment URL Construction ..... | 51 | +| 8.5 | MPD Update..... | 52 | +| 8.5.1 | General ..... | 52 | +| 8.5.2 | Media Presentation Description Delta..... | 53 | +| 8.6 | Additional Media Presentation Information..... | 54 | +| 8.6.1 | Introduction ..... | 54 | +| 8.6.2 | Program Information ..... | 54 | +| 8.6.3 | Descriptors..... | 55 | +| 8.6.3.1 | General..... | 55 | +| 8.6.3.2 | Content Protection ..... | 56 | +| 8.6.3.3 | Role..... | 57 | +| 8.6.3.4 | Rating..... | 57 | +| 8.6.3.5 | Viewpoint..... | 57 | +| 8.6.3.6 | Accessibility..... | 57 | +| 8.6.3.7 | Audio channel configuration ..... | 57 | +| 8.6.3.8 | Frame packing..... | 57 | +| 8.6.3.9 | Essential Property Descriptor ..... | 58 | +| 8.6.3.10 | Supplemental Property Descriptor..... | 58 | +| 8.7 | Base URL Processing..... | 58 | +| 8.7.1 | General ..... | 58 | +| 8.7.2 | Reference resolution..... | 59 | +| 8.7.3 | Alternative base URLs ..... | 59 | +| 9 | DASH - Usage of 3GPP File Format..... | 60 | +| 9.1 | Introduction ..... | 60 | +| 9.2 | Segment Types and Formats ..... | 60 | +| 9.2.1 | Introduction ..... | 60 | +| 9.2.2 | Initialization Segment..... | 60 | +| 9.2.3 | Media Segment..... | 60 | +| 9.2.3.1 | General..... | 60 | +| 9.2.3.2 | Subsegments and Segment Index ..... | 61 | +| 9.2.3.3 | Subsegment Index..... | 62 | +| 9.2.3.4 | 3GP-DASH Media Segment Format ..... | 62 | +| 9.2.4 | Self-Initializing Media Segment..... | 62 | +| 9.2.5 | Media Stream and Segment Properties..... | 62 | +| 9.2.5.1 | Media Stream Access Points..... | 62 | +| 9.2.5.2 | Non-overlapping Segments and Subsegments..... | 63 | +| 9.2.5.3 | Bitstream concatenation..... | 63 | +| 9.3 | Usage on Server and Client..... | 63 | +| 9.4 | Segment Properties with MPD constraints..... | 64 | +| 9.4.1 | General ..... | 64 | +| 9.4.1.1 | Introduction..... | 64 | +| 9.4.1.2 | Media Presentation Timeline..... | 64 | +| 9.4.1.3 | Segment Index ..... | 65 | +| 9.4.2 | Segment Alignment ..... | 65 | +| 9.4.3 | Bitstream Switching ..... | 65 | +| 9.4.4 | Sub-Representation..... | 65 | +| 10 | QoE for Progressive Download and DASH..... | 66 | +| 10.1 | General ..... | 66 | +| 10.2 | QoE Metric Definitions..... | 66 | +| 10.2.1 | Introduction ..... | 66 | +| 10.2.2 | HTTP Request/Response Transactions ..... | 66 | +| 10.2.3 | Representation Switch Events ..... | 67 | +| 10.2.4 | Average Throughput..... | 68 | + +| | | | +|-------------------------------|----------------------------------------------------------|------------| +| 10.2.5 | Initial Playout Delay ..... | 68 | +| 10.2.6 | Buffer Level..... | 69 | +| 10.2.7 | Play List..... | 69 | +| 10.2.8 | MPD Information ..... | 71 | +| 10.3 | Quality Metrics for Progressive Download..... | 71 | +| 10.4 | Quality Metrics for DASH ..... | 71 | +| 10.5 | Quality Reporting Scheme for DASH..... | 72 | +| 10.6 | Quality Reporting Protocol ..... | 74 | +| 10.6.1 | General ..... | 74 | +| 10.6.2 | Report Format..... | 74 | +| 10.6.3 | Reporting Protocols ..... | 77 | +| Annex A (informative): | Example DASH Client Behaviour ..... | 79 | +| A.1 | Introduction..... | 79 | +| A.2 | Overview..... | 79 | +| A.3 | Segment List Generation..... | 80 | +| A.3.1 | General ..... | 80 | +| A.3.2 | Template-based Generation of Media Segment List..... | 81 | +| A.3.3 | Playlist-based Generation of Media Segment List..... | 81 | +| A.3.4 | Media Segment List Restrictions ..... | 81 | +| A.4 | Seeking..... | 82 | +| A.5 | Support for Trick Modes..... | 82 | +| A.6 | Switching Representations..... | 83 | +| A.7 | Reaction to Error Codes..... | 83 | +| A.8 | Encoder Clock Drift Control..... | 83 | +| Annex B (normative): | Media Presentation Description Schema ..... | 85 | +| B.1 | Introduction..... | 85 | +| B.2 | Main Schema..... | 85 | +| B.3 | 3GPP Extension Schema..... | 89 | +| Annex C (normative): | Descriptor Scheme Definitions..... | 91 | +| C.1 | Introduction..... | 91 | +| C.2 | Role Descriptor Scheme..... | 91 | +| C.3 | Frame Packing Descriptor Scheme ..... | 92 | +| Annex D (informative): | MPD Examples ..... | 93 | +| D.1 | On-Demand Service..... | 93 | +| D.2 | Live Service ..... | 93 | +| D.3 | MPD Assembly ..... | 95 | +| D.4 | MPD Deltas..... | 96 | +| Annex E (normative): | Void..... | 100 | +| Annex F (normative): | OMA DM QoE Management Object..... | 101 | +| Annex G (normative): | File format extensions for 3GPP DASH support..... | 105 | +| G.1 | Introduction..... | 105 | +| G.2 | Level Assignment Box..... | 105 | +| G.2.1 | Definition ..... | 105 | + +| | | | +|-------------------------------|------------------------------------------------------------------------|------------| +| G.2.2 | Syntax..... | 105 | +| G.2.3 | Semantics ..... | 106 | +| G.3 | Subsegment Index Box ..... | 106 | +| G.3.1 | Definition ..... | 106 | +| G.3.2 | Syntax..... | 107 | +| G.3.3 | Semantics ..... | 107 | +| G.4 | Temporal level sample grouping..... | 107 | +| G.4.1 | Definition ..... | 107 | +| G.4.2 | Syntax..... | 107 | +| G.4.3 | Semantics ..... | 107 | +| G.5 | Producer reference box ..... | 108 | +| G.5.1 | Definition ..... | 108 | +| G.5.2 | Syntax..... | 108 | +| G.5.3 | Semantics ..... | 108 | +| G.6 | Stream Access Points ..... | 108 | +| G.6.1 | Introduction ..... | 108 | +| G.6.2 | SAP properties..... | 109 | +| G.6.3 | SAP types ..... | 109 | +| Annex H (normative): | MIME Type Registration for MPD ..... | 111 | +| H.1 | MPD MIME Type ..... | 111 | +| H.1.1 | Introduction ..... | 111 | +| H.1.2 | Void..... | 111 | +| H.1.3 | Void..... | 111 | +| H.2 | MPD Delta MIME Type ..... | 111 | +| H.2.1 | Introduction ..... | 111 | +| H.2.2 | MIME Type and Subtype..... | 111 | +| Annex I (informative): | Signalling of DASH AVP values for QoS handling in the PCC ..... | 113 | +| Annex J (normative): | MIME Type Registration for QoE Reports..... | 115 | +| J.1 | Introduction..... | 115 | +| J.2 | MIME Type and Subtype..... | 115 | +| Annex K (informative): | Change history..... | 117 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +The 3GPP transparent end-to-end packet-switched streaming service (PSS) specification consists of seven 3GPP TSs: 3GPP TS 22.233 [1], 3GPP TS 26.233 [2], 3GPP TS 26.234 [3], 3GPP TS 26.244 [4], 3GPP TS 26.245 [5], 3GPP TS 26.246 [6], and the present document. + +The TS 22.233 contains the service requirements for the PSS. The TS 26.233 provides an overview of the PSS. The TS 26.234 provides the details of the protocols and codecs used by the PSS. The TS 26.244 defines the 3GPP file format (3GP) used by the PSS and MMS services. The TS 26.245 defines the Timed text format used by the PSS and MMS services. The TS 26.246 defines the 3GPP SMIL language profile. The present document defines Progressive Download and Dynamic Adaptive Streaming over HTTP. + +The TS 26.244, TS 26.245 and TS 26.246 start with Release 6. Earlier releases of the 3GPP file format, the Timed text format and the 3GPP SMIL language profile can be found in TS 26.234. + +The TS 26.247 starts with Release 10. Earlier releases of Progressive Download and Dynamic Adaptive Streaming over HTTP can be found in TS 26.234. + +# --- Introduction + +Progressive Download and Dynamic Adaptive Streaming over HTTP (3GP-DASH) collects a set of technologies how progressive download and adaptive streaming of continuous media may be carried out exclusively over HTTP. + +# 1 Scope + +The present document specifies Progressive Download and Dynamic Adaptive Streaming over HTTP (3GP-DASH). This specification is part of Packet-switched Streaming Service (PSS). HTTP-based progressive download and dynamic adaptive streaming are separated from TS 26.234 to differentiate from RTP-based streaming that is maintained in TS 26.234. HTTP-based progressive download and dynamic adaptive streaming may be deployed independently from RTP-based PSS, for example by using standard HTTP/1.1 servers for hosting data formatted as defined in the present document. + +# 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. + - For a specific reference, subsequent revisions do not apply. + - For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. +- [1] 3GPP TS 22.233: "Transparent End-to-End Packet-switched Streaming Service; Stage 1". +- [2] 3GPP TS 26.233: "Transparent end-to-end Packet-switched Streaming service (PSS); General description". +- [3] 3GPP TS 26.234: "Transparent end-to-end packet switched streaming service (PSS); Protocols and codecs". +- [4] 3GPP TS 26.244: "Transparent end-to-end packet switched streaming service (PSS); 3GPP file format (3GP)". +- [5] 3GPP TS 26.245: "Transparent end-to-end packet switched streaming service (PSS); Timed text format". +- [6] 3GPP TS 26.246: "Transparent end-to-end packet switched streaming service (PSS); 3GPP SMIL Language Profile". +- [7] 3GPP TR 21.905: "Vocabulary for 3GPP Specifications". +- [8] IETF STD 0007: "Transmission Control Protocol", Postel J., September 1981. +- [9] IETF RFC 2616: "Hypertext Transfer Protocol – HTTP/1.1", Fielding R. et al., June 1999. +- [10] Open Mobile Alliance, Service and Content Protection for Mobile Broadcast Services, Approved Version 1.0, February 2009. +- [11] ISO/IEC 14496-12:2012 | 15444-12:2012 "Information technology - Coding of audio-visual objects - Part 12: ISO base media file format" | "Information technology - JPEG 2000 image coding system - Part 12: ISO base media file format". +- [12] IETF RFC 2818: "HTTP Over TLS", E. Rescorla, May 2000. +- [13] IETF RFC 5646: "Tags for Identifying Languages", A. Phillips, M. Davis, September 2009. +- [14] (void) +- [15] Open Mobile Alliance: "DRM Content Format V 2.0". +- [16] Open Mobile Alliance: "DRM Content Format V 2.1". + +- [17] IETF RFC 3986: "Uniform Resource Identifiers (URI): Generic Syntax", Berners-Lee T., Fielding R. and Masinter L., January 2005. +- [18] IETF RFC 1952: "GZIP file format specification" version 4.3, P. Deutsch, May 1996. +- [19] IETF RFC 1738: "Uniform Resource Locators (URL)", December 1994. +- [20] W3C XLINK: "XML Linking Language (XLink)" Version 1.1, W3C Recommendation 06, May 2010. +- [21] IETF RFC 3406: "Uniform Resource Names (URN) Namespace Definition Mechanisms", October 2002. +- [22] OMA-ERELD-DM-V1\_2-20070209-A: "Enabler Release Definition for OMA Device +Management, Approved Version 1.2" +- [23] 3GPP TS 33.310: "Network Domain Security (NDS); Authentication Framework (AF)". +- [24] IETF RFC 2045: "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies". +- [25] IETF RFC 2231: " MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations". +- [26] IETF RFC 6381: " The 'Codecs' and 'Profiles' Parameters for "Bucket" Media Types," August 2011. +- [27] Void. +- [28] IEEE 1003.1-2008, IEEE Standard for Information Technology - Portable Operating System Interface (POSIX), Base Specifications, Issue 7 +- [29] IETF RFC 4337, "MIME Type Registration for MPEG-4," March 2006 +- [30] IETF RFC 3023, "XML Media Types," January 2001. +- [31] 3GPP TS 23.203: "Policy and charging control architecture". +- [32] 3GPP TS 29.213: "Policy and Charging Control signalling flows and Quality of Service (QoS) parameter mapping". +- [33] 3GPP TS 29.214: "Policy and Charging Control over Rx reference point". +- [34] ISO/IEC 23009-1:2012/Cor 1:2013 " Information technology -- Dynamic adaptive streaming over HTTP (DASH) -- Part 1: Media presentation description and segment formats". +- [35] ITU-T Recommendation H.264 (01/2012): "Advanced video coding for generic audiovisual services" | ISO/IEC 14496-10:2010: "Information technology – Coding of audio-visual objects – Part 10: Advanced Video Coding". +- [36] 3GPP TR 26.946: "Multimedia Broadcast/Multicast Service (MBMS); User service guidelines". +- [37] IETF RFC 3629: "UTF-8, a transformation format of ISO 10646," November 2003. +- [38] IETF RFC 4288: "Media Type Specifications and Registration Procedures," December 2005. +- [39] IETF RFC 4648: "The Base16, Base32, and Base64 Data Encodings," October 2006. + +# --- 3 Definitions, abbreviations and conventions + +## 3.1 Definitions + +For the purposes of the present document, the terms and definitions given in TR 21.905 [7] and the following apply. A term defined in the present document takes precedence over the definition of the same term, if any, in TR 21.905 [7]. + +**access unit:** unit of a media stream with an assigned Media Presentation time. + +**accessibility:** the degree to which a media content or certain media content components are available to as many people as possible. + +**Adaptation Set:** a set of interchangeable encoded versions of one or several media content components. + +**availableSegment:** Segment which is accessible at its assigned HTTP-URL, possibly restricted by a byte range, i.e. the request with an HTTP GET results in a reply of the Segment and a 2xx OK status code. + +**continuous media:** media with an inherent notion of time. In the present document speech, audio, video, timed text and timed graphics. + +**DASH metric:** a metric identified by key and defined in this part of the specification. + +**earliest presentation time:** the smallest presentation time of any access unit of a Media Segment or Subsegment for a media stream. + +**frame-packed stereoscopic 3D video:** a video consisting of two views in which both views were packed into a single stream before compression. + +**group:** collection of Representations that are expected to not being presented jointly. + +**HTTP-URL:** a URI with a fixed scheme of “http” or https. + +**Initialization Segment:** Segment containing metadata that is necessary to present the media streams encapsulated in Media Segments. + +**media content:** one media content period or a contiguous sequence of media content periods. + +**media content component:** one continuous component of the media content with an assigned media component type that can be encoded individually into a media stream. + +**media content component type:** a single type of media content such as audio, video, or text. + +**media content period:** set of media content components that have a common timeline as well as relationships on how they may be presented. + +**Media Presentation:** collection of data that establishes a bounded or unbounded presentation of media content. + +**Media Presentation Description (MPD):** formalized description for a Media Presentation for the purpose of providing a streaming service. + +**Media Presentation timeline:** concatenation of the timeline of all Periods which itself is common to all Representations in the Period. + +**Media Segment:** Segment that complies with media format in use and enables playback when combined with zero or more preceding Segments, and an Initialization Segment (if any). + +**media stream:** encoded version of a media content component. + +**Media Subsegment:** Subsegment that only contains media data but no Segment Index. + +**MPD start time:** approximate presentation start time of a Media Segment signalled in MPD. + +**MPD duration:** approximate presentation duration of a Media Segment signalled in MPD. + +**multiview stereoscopic 3D video:** a video consisting of two views packed into a single stream during compression. + +**Period:** interval of the Media Presentation, where a contiguous sequence of all Periods constitutes the Media Presentation. + +**presentation time:** a time associated to an access unit that maps it to the Media Presentation timeline. + +**remote element:** one or more elements that are not fully contained in the MPD document but is referenced in the MPD with an HTTP-URL + +**Representation:** collection and encapsulation of one or more media streams in a delivery format and associated with descriptive metadata. + +**Segment:** smallest addressable unit in an MPD with a defined format. + +**Segment availability end time:** the time instant in wall-clock time at which a Segment ceases to be an available Segment. + +**Segment availability start time:** the time instant in wall-clock time at which a Segment becomes an available Segment. + +**Segment Index:** a compact index of the time range to byte range mapping within a Media Segment separately from the MPD. + +**stereoscopic 3D video:** a video bitstream consisting of two views. + +**Stream Access Point (SAP):** position in a Representation enabling playback of a media stream to be started using only the information contained in Representation data starting from that position onwards (preceded by initializing data in the Initialization Segment, if any). + +**Sub-Representation:** part of a Representation described in the MPD that is present in the entire Period. + +**Subsegment:** smallest unit within Media Segments that is indexed by a Segment Index. + +**valid Segment URL:** an HTTP-URL that is promised to reference a Segment during its Segment availability period. + +**wall-clock time:** time as stated by UTC (Universal Co-ordinated Time). + +## 3.2 Abbreviations + +For the purposes of the present document, the abbreviations given in TR 21.905 [7] and the following apply. + +An abbreviation defined in the present document takes precedence over the definition of the same abbreviation, if any, in TR 21.905 [7]. + +| | | +|-----------|------------------------------------------------| +| 3GP | 3GPP file format | +| 3GP-DASH | 3GPP Dynamic Adaptive Streaming over HTTP | +| AHS | Adaptive HTTP Streaming | +| AVC | Advanced Video Coding | +| DM | Device Management | +| DRM | Digital Rights Management | +| HSD | HTTP Streaming and Download | +| HTML | Hypertext Markup Language | +| HTTP | Hypertext Transfer Protocol | +| HTTPS | Hypertext Transfer Protocol Secure | +| IDR | Instantaneous Decoding Refresh | +| MPD | Media Presentation Description | +| MPEG-2 TS | Moving Picture Experts Group Transport Stream | +| MIME | Multipurpose Internet Mail Extensions | +| OMA | Open Mobile Alliance | +| PDCF | Packetized DRM Content Format | +| PSS | Packet-switched Streaming Service | +| QoE | Quality-of-Experience | +| RFC | Request For Comments | +| RTP | Real-time Transport Protocol | +| SAP | Stream Access Point | +| SMIL | Synchronised Multimedia Integration Language | +| TLS | Transport Layer Security | +| URI | Uniform Resource Identifier | +| URL | Uniform Resource Locator | +| URN | Uniform Resource Name | +| UTC | Universal Time Coordinated | +| UTF-8 | Unicode Transformation Format (the 8-bit form) | +| UUID | Universally Unique Identifier | +| W3C | WWW Consortium | + +| | | +|------|-----------------------------------------------| +| XML | eXtensible Markup Language | +| XSLT | eXtensible Stylesheet Language Transformation | + +## 3.3 Conventions + +The following naming conventions apply in this specification: + +- Elements in an XML-document are identified by an upper-case first letter and in bold face as **Element**. To express that an element **Element1** is contained in another element **Element2**, we may write **Element2.Element1**. If an element is constructed of two or more combined words, camel-casing is typically used, e.g. **ImportantElement**. Elements are present exactly once, or the minimum and maximum occurrence is defined by ... . +- Attributes in an XML-document are identified by a lower-case first letter as well as they are preceded by a '@'-sign, e.g. @attribute. To point to a specific attribute @attribute contained in an element **Element**, we may write **Element@attribute**. If an attribute is constructed of two or more combined words, camel-casing is typically used after the first word, e.g. @veryImportantAttribute. Attributes are assigned a status in the XML as mandatory (M), optional (O), optional with default value (OD) and conditionally mandatory (CM). +- Namespace qualification of elements and attributes is used as per XML standards, in the form of **namespace:Element** or @namespace:attribute. The fully qualified namespace will be provided in the schema fragment associated with the declaration. This specification extends the namespace of DASH, by documenting the element name in the semantic table with an extension namespace prefix. +- Variables defined in the context of the present document are specifically highlighted with *italics*, e.g. *InternalVariable*. +- Structures that are defined as part of the hierarchical data model are identified by an upper-case first letter, e.g. Media Presentation, Period, Group, Adaptation Set, Representation, Segment, etc. + +# --- 4 Overview + +The present document specifies Progressive Download and Dynamic Adaptive Streaming over HTTP (3GP-DASH) for continuous media. The features are separated from the umbrella specification TS 26.234 [3] to differentiate from RTP-based streaming that is specified and maintained in TS 26.234. Services relying exclusively on these features may be deployed independently from RTP-based PSS servers, for example by using standard HTTP/1.1 servers for hosting the services. + +The specification covers the following aspects: + +- System Description: describes the relationship to the PSS architecture and refines the architecture, interfaces and protocols that are defined in this specification. +- Progressive Download over HTTP. +- 3GPP Dynamic Adaptive Streaming over HTTP (3G-DASH) provides an overview of the architecture, the formats and the models that build the basis for 3GP-DASH. Also, 3GP-DASH Profiles provides an identifier and refers to a set of specific restrictions in this or other specifications. +- DASH - Media Presentation describes the data model of a Media Presentation. It also provides an overview on elements and attributes that may be used to describe components and properties of a media presentation in a Media Presentation Description (MPD). +- DASH - Usage of the 3GP file format defines how segments can be formed based on the 3GP file format. +- Quality-of-Experience for Progressive Download and 3GP-DASH. +- Normative annexes for MPD schema (Annex B), Descriptor Scheme Definitions (Annex C), OMA DM QoE Management Object (Annex F), File format extensions for 3GPP DASH support (Annex G) and MIME Type Registration for MPD (Annex H). + +- Informative annexes for Client Behaviour (Annex A), MPD Examples (Annex D), and Mapping MPD structure and semantics to SMIL (Annex E). + +# 5 System Description + +## 5.1 Overview + +Progressive Download and Dynamic Adaptive Streaming over HTTP (3GP-DASH) enables to provide services to deliver continuous media content over Hypertext Transfer Protocol (HTTP) in a sense that all resources that compose the service are accessible through HTTP-URLs and the HTTP/1.1 protocol as specified in RFC 2616 [9] may be used to deliver the metadata and media data composing the service. This enables that standard HTTP servers and standard HTTP caches can be used for hosting and distributing continuous media content. Figure 1 shows the architecture for services using progressive download and Figure 2 shows the architecture for services using 3GP-DASH. + +The present document deals with the specification of interfaces between the Client and the Server. Specifically, it defines the formats that may be delivered exclusively over the HTTP interface to enable progressive download and streaming services. + +![Figure 1: Architecture for Progressive Download over HTTP](4636adff5682a064f0ae5f13a1d464a6_img.jpg) + +``` +graph LR; A[Content Preparation] --> B[Progressive Download Server]; B <--> |HTTP/1.1| C[Progressive Download Client]; +``` + +The diagram illustrates the architecture for Progressive Download over HTTP. It consists of three main components: 'Content Preparation', 'Progressive Download Server', and 'Progressive Download Client'. An arrow points from 'Content Preparation' to 'Progressive Download Server'. A double-headed arrow, labeled 'HTTP/1.1', connects 'Progressive Download Server' and 'Progressive Download Client'. + +Figure 1: Architecture for Progressive Download over HTTP + +**Figure 1: Architecture for Progressive Download over HTTP** + +Services using the features described in this specification may be deployed within PSS as specified in TS 26.233 [2] and TS 26.234 [3]. In this case the Progressive Download/3GP-DASH Server may be a sub-function of the PSS server and the Progressive Download/3GP-DASH client may be a sub-function of the PSS client. + +![Figure 2: Architecture for 3GP-DASH](5a9282ac54ca7bc50f1d2ab6cfb376ba_img.jpg) + +``` +graph LR; A[Content Preparation] --> B[3GP-DASH Server]; B <--> |HTTP/1.1| C[3GP-DASH Client]; +``` + +The diagram illustrates the architecture for 3GP-DASH. It consists of three main components: 'Content Preparation', '3GP-DASH Server', and '3GP-DASH Client'. An arrow points from 'Content Preparation' to '3GP-DASH Server'. A double-headed arrow, labeled 'HTTP/1.1', connects '3GP-DASH Server' and '3GP-DASH Client'. + +Figure 2: Architecture for 3GP-DASH + +**Figure 2: Architecture for 3GP-DASH** + +Services using the features defined in this specification may also be deployed independent of the PSS servers and clients. In this case the Progressive Download/3GP-DASH client shall support the formats and codecs according to this specification. + +Access to services based on the features defined in the present document is introduced in clause 5.2. + +The protocol support for services using the features defined in this specification is provided in clause 5.3. + +Clients supporting progressive download-based services shall support the features and formats as specified in clause 6 of this specification. + +Clients supporting 3GP-DASH shall support the features and formats as specified in clause 7 of this specification. + +Clients supporting QoE Metrics and Reporting shall support the features as specified in clause 10 of this specification. + +## 5.2 Service Access + +Service access refers to the method by which a Client initially accesses the service. Service access for services based in the specification can be achieved e.g. by a Media Presentation Description or a URL to the media file. + +The service access URL can be made available to a client in many different ways. Clients supporting services based on the features in this specification shall be able to access services that are provided through an HTTP-URL. However, it is out of the scope of this specification to mandate any specific mechanism. A preferred way may be to embed URLs for service establishment within HTML pages. + +## 5.3 Protocols + +Progressive Download and 3GP-DASH clients shall comply with a *client* as specified in RFC 2616 [9]. The resource hosting the 3GP files and DASH Segments shall comply with a *server* as specified in RFC 2616 [9]. + +Progressive Download and 3GP-DASH clients should use the HTTP GET method or the HTTP partial GET method, as specified in RFC 2616 [9], clause 9.3, to access media offered at HTTP-URLs. + +Figure 3 shows a protocol stack for services in the context of this specification. 3GP Files in progressive download as well as Segments based on the 3GPP File Format shall be accessible through HTTP. + +![](d17f75945bbb3feb84a153ecfedb9b81_img.jpg) + +| | | +|----------------------------------------|--------------------------------------| +| Video
Audio
Speech
Timed Text | Media
Presentation
Description | +| 3GP File Format | | +| HTTP | | +| TCP | | +| IP | | + +**Figure 3: Overview of the protocols stack** + +Transport security in Progressive Download and Dynamic Adaptive Streaming over HTTP (3GP-DASH) is achieved using the HTTPS (Hypertext Transfer Protocol Secure) specified in RFC 2818 [12] and TLS as specified in TLS profile of Annex E in TS 33.310 [23]. In case secure delivery is desired, HTTPS should be used to authenticate the server and to ensure secure transport of the content from server to client. + +NOTE 1: The use of HTTPS for delivering Media Segments may inhibit caching at proxies and add overhead at the server and the client. + +NOTE 2: In the case of MBMS download delivery of 3GP-DASH content, one way of supporting the delivery of a subset of the nominally requested content by the DASH client which indicates explicit willingness to accept such incomplete content, and based on a specific UE implementation architecture, is described in clause 7.2.A in TR 26.946 [36]. + +# 6 Progressive Download over HTTP + +## 6.1 General + +As an alternative to conventional streaming, a client may download, typically through HTTP, a media file that encapsulates continuous media and may play the media from the local storage. A PSS client shall support progressive download and playout of 3GP files [4] as specified in the remainder of this clause. + +The media file encapsulating the continuous media is accessed directly by issuing one or more HTTP GET or partial GET requests to the referenced media file. An example of a valid URL is [http://example.com/morning\\_news.3gp](http://example.com/morning_news.3gp). + +## 6.2 Progressive Download + +Progressive download uses normal HTTP download using HTTP GET or partial GET requests. The differences between regular download and Progressive Download are that 1) the content may be authored as progressively downloadable, and 2) the terminal recognises that the content is suitable for progressive download. + +A client downloading continuous media may decide to start playout of the encapsulated media data before the download of the media file is completed. + +## 6.3 3GPP File Format Profiles + +The following profiles of the 3GPP file format in TS 26.244 [4] shall be supported by clients supporting Progressive Download over HTTP: + +- Basic profile, and +- Progressive-download profile. + +# --- 7 3GPP Dynamic Adaptive Streaming over HTTP + +## 7.1 System Description + +The 3GPP Dynamic Adaptive Streaming over HTTP (3GP-DASH) specified in this specification provides streaming services over HTTP. For this it specifies XML and binary formats that enable delivering content from standard HTTP servers to an HTTP-Streaming client and enables caching content by standard HTTP caches. + +The specification for 3GP-DASH primarily defines two formats: + +- 1) The Media Presentation Description (MPD) describes a *Media Presentation*, i.e. a bounded or unbounded presentation of media content. In particular, it defines formats to announce resource identifiers for *Segments* and to provide the context for these identified resources within a Media Presentation. For 3GP-DASH, the resource identifiers are exclusively HTTP-URLs possibly combined with a byte range. +- 2) The Segment formats specify the formats of the entity body of the HTTP response to an HTTP GET request or an HTTP partial GET request with the indicated byte range through HTTP/1.1 as defined in RFC 2616 [9] to a resource identified in the MPD. Segments typically contain efficiently coded media data and metadata according to or aligned with common media formats.. + +The MPD provides sufficient information for a client to provide a streaming service to the user by accessing the Segments through the protocol specified in the scheme of the defined resources, in the context of this specification exclusively HTTP/1.1. Such a client is referred to as a 3GP-DASH client in the remainder of the present document. However, this specification does not provide a normative definition for such a client. An informative client model to illustrate the formats defined in this specification is provided in section 7.2. An informative example client behaviour description is provided in Annex A of this specification. + +Figure 7-1 shows an architecture in which the formats defined in this specification are typically used. Boxes with solid lines indicate devices that are mentioned in this specification as they host or process the formats defined in this specification whereas dashed boxes are conceptual or transparent. This specification deals with the definition of formats that are accessible on the interface to the 3GP-DASH client, indicated by the solid lines. Any other formats or interfaces are not in scope of this specification. In the considered deployment scenario, it is assumed that the 3GP-DASH client has access to an MPD. The MPD provides sufficient information for the 3GP-DASH client to provide a streaming service to the user by requesting Segments from an HTTP server and demultiplexing, decoding and rendering the included media streams. + +![Figure 7-1: System Architecture for 3GP-DASH. The diagram shows three main components: 3GP-DASH Content Preparation, 3GP-DASH Segment Delivery Function (HTTP Server), and 3GP-DASH Client. The Content Preparation and Delivery Function are connected by a dashed double-headed arrow. The Delivery Function and Client are connected by a solid double-headed arrow labeled '3GP-DASH Segments'. Above the Delivery Function is a dashed box labeled 'MPD Delivery Function', which is connected to the Content Preparation by a dashed arrow. Above the Client is a dashed box labeled 'MPD', which is connected to the Client by a dashed arrow. A dashed box labeled 'HTTP Cache' is positioned between the Delivery Function and the Client, with a dashed arrow pointing from the Delivery Function to it.](1a827b10290f33d4fec04d0e8ef7a897_img.jpg) + +Figure 7-1: System Architecture for 3GP-DASH. The diagram shows three main components: 3GP-DASH Content Preparation, 3GP-DASH Segment Delivery Function (HTTP Server), and 3GP-DASH Client. The Content Preparation and Delivery Function are connected by a dashed double-headed arrow. The Delivery Function and Client are connected by a solid double-headed arrow labeled '3GP-DASH Segments'. Above the Delivery Function is a dashed box labeled 'MPD Delivery Function', which is connected to the Content Preparation by a dashed arrow. Above the Client is a dashed box labeled 'MPD', which is connected to the Client by a dashed arrow. A dashed box labeled 'HTTP Cache' is positioned between the Delivery Function and the Client, with a dashed arrow pointing from the Delivery Function to it. + +Figure 7-1: System Architecture for 3GP-DASH + +The normative aspects of 3GP-DASH formats are defined by + +- the profiles defined in clause 7.3. +- the DASH Media Presentation as defined in clause 8. +- the usage of the 3GPP file format for DASH as defined in clause 9. + +The clauses mentioned above may refer to normative aspects in clause 10 on Quality-of-Experience as well as to normative Annexes B, C, E, G, and H. + +## 7.2 3GP-DASH Client Model + +The design of the formats defined in this specification is based on the informative client model as shown in Figure 7-2. The figure illustrates the logical components of a conceptual 3GP-DASH client model. In this figure the 3GP-DASH Access Engine receives the Media Presentation Description (MPD), constructs and issues requests and receives Segments or parts of Segments. In the context of this standard, the output of the DASH Access Engine consists of media in container formats according to the ISO/IEC 14496-12 ISO Base Media File Format [11] and specifically the 3GP file format [4]. In addition, timing information is provided that maps the internal timing of the media to the time line of the Media Presentation. + +![Figure 7-2: 3GP-DASH client Model. The diagram shows a flow from left to right. On the left, two inputs labeled 'MPD' (dashed arrow) and 'Segment data' (solid arrow) point into a box labeled '3GP-DASH access engine'. An arrow labeled '3GP file format + timing' points from this box to another box labeled 'Media engine'. An arrow points from the 'Media engine' box to the text 'Media output'.](f57a881fcbcaf494a7dedc4f61224991_img.jpg) + +Figure 7-2: 3GP-DASH client Model. The diagram shows a flow from left to right. On the left, two inputs labeled 'MPD' (dashed arrow) and 'Segment data' (solid arrow) point into a box labeled '3GP-DASH access engine'. An arrow labeled '3GP file format + timing' points from this box to another box labeled 'Media engine'. An arrow points from the 'Media engine' box to the text 'Media output'. + +Figure 7-2: 3GP-DASH client Model + +## 7.3 3GP-DASH Profiles + +### 7.3.1 General + +Profiles of 3GP-DASH are defined so as to enable interoperability and the signaling of the use of features etc. A profile refers to a set of specific restrictions. Those restrictions might be on features of the MPD as defined in clause 8 of this + +specification, Segment formats as for example defined in clause 9 of this specification, usage of the network, codec(s) used, content protection formats, or on quantitative measures such as bit-rates, segment lengths, screen size, and so on. Profiles defined in this specification define restrictions on features of this specification, but may additionally impose restrictions on other aspects of media delivery. + +**NOTE** A profile can also be understood as permission for 3GP-DASH clients that only implement the features required by the profile to process the Media Presentation. However, as 3GP-DASH client operation is not specified normatively, it is also unspecified how a 3GP-DASH client conforms to a particular profile. Hence, profiles merely specify restrictions on MPD and Segments rather than DASH client behaviour. + +A profile has an identifier, which is a URI. The profiles with which a Media Presentation complies are indicated in the **MPD@profiles** attribute. This element is a comma-separated list of profile identifiers. Profile identifiers defined in this specification are URNs conforming to RFC 3406 [21]. URLs may also be used. When a URL is used, it should also contain a month-date in the form mm yyyy; the assignment of the URL must have been authorized by the owner of the domain name in that URL on or very close to that date, to avoid problems when domain names change ownership. + +An MPD is conforming when it satisfies the following: + +1. The MPD is valid in terms the schema defined in Annex B. +2. The MPD conforms to the normative requirements defined in this specification. +3. The MPD conforms to each of the profiles indicated in the **MPD@profiles** attribute as specified below. + +When *ProfA* is included in the **MPD@profiles** attribute, the MPD is modified into a profile-specific MPD for profile conformance checking using the following ordered steps: + +1. The **MPD@profiles** attribute of the profile-specific MPD contains only *ProfA*. +2. An **AdaptationSet** element for which @profiles does not or is not inferred to include *ProfA* is removed from the profile-specific MPD. +3. A **Representation** element for which @profiles does not or is not inferred to include *ProfA* is removed from the profile-specific MPD. +4. All elements or attributes that are either (i) in this specification and explicitly excluded by *ProfA*, or (ii) in an extension namespace and not explicitly included by *ProfA*, are removed from the profile-specific MPD. +5. All elements and attributes that “may be ignored” according to the specification of *ProfA* are removed from the profile-specific MPD, + +An MPD is conforming to profile *ProfA* when it satisfies the following: + +1. *ProfA* is included in the **MPD@profiles** attribute. +2. The profile-specific MPD for *ProfA* is valid in terms the schema defined in Annex B. +3. The profile-specific MPD for *ProfA* conforms to the normative semantics defined in this specification. +4. The profile-specific MPD for *ProfA* conforms to the restrictions specified for *ProfA*. + +A Media Presentation is conforming to profile *ProfA* when it satisfies the following: + +1. The MPD of the Media Presentation is conforming to profile *ProfA* as specified above. +2. There is at least one Representation in each Period in the profile-specific MPD for *ProfA*. +3. The Segments of the Representations of the profile-specific MPD for *ProfA* conform to the restrictions specified for *ProfA*. + +**NOTE** In other words, each MPD contains at least one Representation in each Period, which fulfils the requirements of a profile listed in **MPD@profiles**. There may be stricter rules on the occurrence of Representations in the specified profiles. For example, it can be required that there is at least one Representation for each media type that contains or is inferred to have the profile identifier of a specific profile. + +### 7.3.2 3GPP Adaptive HTTP Streaming (Release-9 AHS) + +Release-9 Adaptive HTTP Streaming as defined in TS 26.234 [3] Release-9, clause 12 is not a profile of this specification. Rel-9 AHS uses a different namespace "urn:3GPP:ns:PSS:AdaptiveHTTPStreamingMPD:2009" and a different MIME type signalling "application/3gpp-ahs+xml" for the MPD. However, a Media Presentation may be defined such that segments complying with the segment formats in TS 26.234 [3] Release-9, clause 12, also comply with segment formats for this specification. + +### 7.3.3 3GP-DASH Release-10 Profile + +#### 7.3.3.1 Introduction + +The 3GP-DASH Release-10 profile is identified by the URN "urn:3GPP:PSS:profile:DASH10". + +This profile includes all features defined in the Release-10 version of this specification in clauses 7.3.6 (media codecs), 7.3.7 (content protection), 8 (Media Presentation Description), 9 (File Format) and 10 (QoE). The @mimeType attribute of each Representation shall be provided according to RFC4377. Additional parameters may be added according to RFC6381 [26]. + +### 7.3.4 3GP-DASH Release 11 multiview stereoscopic 3D video profile + +The 3GP-DASH Release 11 multiview stereoscopic 3D video profile is identified by the URN "urn:3GPP:PSS:profile:DASH11:MS3D". + +The @mimeType attribute of each Representation shall be provided according to RFC4377. Additional parameters may be added according to RFC6381 [26]. + +This profile includes all features defined in clauses 7.3.7, 8, 9 and 10. + +Clients that support 3GP-DASH Release 11 multiview stereoscopic 3D video profile shall support multiview stereoscopic 3D video as specified in clause 7.4 of TS 26.234 [3]. For any other particular continuous media type, the corresponding media decoders are specified in TS 26.234 [3], clause 7.2 for speech, 7.3 for audio, 7.4 for video, 7.9 for timed text and 7.11 for timed graphics. Additionally, the following constraints apply for multiview stereoscopic 3D video bitstreams, if present in a media presentation: + +The DASH multiple views scheme as defined in 5.8.5.6 of ISO/IEC 23009-1 [34] shall be used in the MPD. + +One of the following shall be true: + +- The base view of the stereoscopic multiview bitstream shall be a complementary representation and the non-base view of the bitstream shall be a dependent representation. The @dependencyId attribute as specified in 5.3.5.2 of ISO/IEC 23009-1 [34] shall be used to indicate the complementary and dependent representations. +- The base view and the non-base view of the stereoscopic multiview bitstream shall reside in the same representation. The SubRepresentation element shall be used for the representation, and the base view and the non-base view shall form separate sub-representations. The @level and @dependencyLevel attributes within the SubRepresentation element shall be used. The Level Assignment box shall be used. For each leaf segment index, that is, each Segment Index box that indexes only subsegments but not other Segment index boxes, there shall be exactly one Subsegment Index box. + +### 7.3.5 3GP-DASH Release 11 frame-packed stereoscopic 3D video profile + +The 3GP-DASH Release 11 frame-packed stereoscopic 3D video profile is identified by the URN "urn:3GPP:PSS:profile:DASH11:FPS3D". + +The @mimeType attribute of each Representation shall be provided according to RFC4377. Additional parameters may be added according to RFC6381 [26]. + +This profile includes all features defined in clauses 7.3.7, 8, 9 and 10. + +Clients that support 3GP-DASH Release 11 frame-packed stereoscopic 3D video profile shall support frame-packed stereoscopic 3D video as specified in clause 7.4 of TS 26.234 [3]. For any other particular continuous media type, the corresponding media decoders are specified in TS 26.234 [3], clause 7.2 for speech, 7.3 for audio, 7.4 for video, 7.9 for timed text and 7.11 for timed graphics. Additionally, the following constraints apply for frame-packed stereoscopic 3D video bitstreams, if present in a media presentation: + +The FramePacking element as defined in clause 8.4.3.2 shall be used in the MPD. + +### 7.3.6 Media Codecs + +For 3GP-DASH clients supporting a particular continuous media type, media decoders are specified in TS 26.234 [3], clause 7.2 for speech, 7.3 for audio, 7.4 for video, 7.9 for timed text and 7.11 for timed graphics. + +### 7.3.7 Content Protection + +3GP-DASH clients content protection may support OMA DRM 2.0 [15] or OMA DRM 2.1 [16]. Other content protection schemes may be supported. The ContentProtection element in the MPD should be used to convey content protection information. + +When using OMA DRM V2.0 or OMA DRM V2.1 scheme for content protection, the non-streamable Packetized DRM Content Format (PDCF) shall be used. An OMA-DRM encrypted Representation shall include the brand “opf2”. OMA-DRM [15] [16] defines the procedures for acquiring the Rights Object from the Rights Issuer to decrypt PDCF protected content. The scheme is identified by a **ContentProtection@schemeIdUri** set to "urn:mpeg:dash:mp4protection" and the **ContentProtection@value** shall include the version number; it starts with "odkm", which is the scheme\_type contained in the Scheme Type Box of the PDCF file, followed by a ":" and the scheme\_version from the Scheme Type Box of the PDCF file, encoded as up to 8 hexadecimal digits, where the leading ‘0’s may be omitted. For example, for OMA DRM2.0 the value could be "odkm:200". + +# --- 8 DASH - Media Presentation + +## 8.1 Introduction + +A Media Presentation is a structured collection of data that is accessible to a 3GP-DASH client to provide a streaming service to the user. + +3GP-DASH is intended to support a media-streaming model for delivery of media content in which control of the delivery lies exclusively with the client. Clients may request data using the HTTP protocol from standard web servers that have no 3GP-DASH-specific capabilities. Consequently, this standard focuses not on client or server procedures but on the data formats used to provide a DASH Media Presentation. + +The collection of encoded and deliverable versions of media content and the appropriate description of these form a Media Presentation. Media content is composed of a single or multiple contiguous media content **periods** in time. Each media content period is composed of one or multiple **media content components**, for example audio components in various languages and a video component. Each media content component has an assigned **media content component type**, for example audio or video. + +Each media content component may have several encoded versions, referred to as **media streams**. Each media stream inherits the properties of the media content, the media content period, the media content component from which it was encoded and in addition it gets assigned the properties of the encoding process such as sub-sampling, codec parameters, encoding bitrate, etc. This describing metadata is relevant for static and dynamic selection of media content components and media streams. + +![Figure 8.1: 3GP-DASH High-Level Data Model. This hierarchical diagram shows the structure of a Media Presentation Description (MPD). At the top is a box labeled 'Media Presentation Description (MPD)'. Inside it is a box labeled 'Period'. Within 'Period' is a box labeled 'Adaptation Set'. Inside 'Adaptation Set' is a box labeled 'Representation'. This 'Representation' box contains a table with two columns labeled 'Sub-Representation'. Each 'Sub-Representation' column contains a 'Segment' box, which in turn contains a 'Sub-Segment' box. Dotted lines indicate that there are multiple 'Sub-Segments' and 'Segments' within a 'Sub-Representation', and multiple 'Sub-Representations' within a 'Representation'. Below the first 'Representation' box is another dotted line, followed by another 'Representation' box. Below that is another dotted line, followed by another 'Adaptation Set' box. Below that is another dotted line, followed by another 'Period' box at the bottom of the hierarchy.](81a4cbf0b3c4cbc065efdf8f800dadde_img.jpg) + +Figure 8.1: 3GP-DASH High-Level Data Model. This hierarchical diagram shows the structure of a Media Presentation Description (MPD). At the top is a box labeled 'Media Presentation Description (MPD)'. Inside it is a box labeled 'Period'. Within 'Period' is a box labeled 'Adaptation Set'. Inside 'Adaptation Set' is a box labeled 'Representation'. This 'Representation' box contains a table with two columns labeled 'Sub-Representation'. Each 'Sub-Representation' column contains a 'Segment' box, which in turn contains a 'Sub-Segment' box. Dotted lines indicate that there are multiple 'Sub-Segments' and 'Segments' within a 'Sub-Representation', and multiple 'Sub-Representations' within a 'Representation'. Below the first 'Representation' box is another dotted line, followed by another 'Representation' box. Below that is another dotted line, followed by another 'Adaptation Set' box. Below that is another dotted line, followed by another 'Period' box at the bottom of the hierarchy. + +Figure 8.1: 3GP-DASH High-Level Data Model + +DASH is based on a hierarchical data model aligned with the presentation in Figure 8.1. A DASH Media Presentation is described by a **Media Presentation Description** (see clause 8.4.1) document. This describes the sequence of **Periods** (see clause 8.4.2) in time that make up the Media Presentation. A Period typically represents a media content period during which a consistent set of encoded versions of the media content is available i.e. the set of available bitrates, languages, captions, subtitles etc. does not change during a Period. + +Within a Period, material is arranged into **Adaptation Sets** (see clause 8.4.3.3). An Adaptation Set represents a set of interchangeable encoded versions of one or several media content components. For example there may be one Adaptation Set for the main video component and a separate one for the main audio component. If there is other material available, for example captions or audio descriptions, then these may each have a separate Adaptation Set. Material may also be provided in multiplexed form, in which case interchangeable versions of the *multiplex* may be described as a single Adaptation Set, for example an Adaptation Set containing both the main audio and main video for a Period. Each of the multiplexed components may be described individually by a media content component description. + +An Adaptation Set contains a set of **Representations** (see clause 8.4.3.4). A Representation describes a *deliverable encoded version* of one or several media content components. A Representation includes one or more media streams (one for each media content component in the multiplex). Any single Representation within an Adaptation Set is sufficient to render the contained media content components. Typically, clients may switch from Representation to Representation within an Adaptation Set in order to adapt to network conditions or other factors. Clients may also ignore Representations that rely on codecs or other rendering technologies they do not support or that are otherwise unsuitable. + +Within a Representation, the content may be divided in time into **Segments** (see clause 8.4.4 and clause 9). A URL is provided for each Segment meaning that a Segment is the largest unit of data that can be retrieved with a single HTTP request. + +NOTE: This is not strictly true, since the MPD may also include a byte range with the URL, meaning that the Segment is contained in the byte range of some larger resource. An intelligent client could in principle construct a single request for multiple Segments, but this would not be the typical case. + +DASH defines different timelines. One of the key features in DASH is that encoded versions of different media content components share a common timeline. The presentation time of access unit within the media content is mapped to the global common presentation timeline for synchronization of different media components and to enable seamless switching of different coded versions of the same media components. This timeline is referred as Media Presentation timeline. The Media Segments themselves contain accurate Media Presentation timing information enabling synchronization of components and seamless switching. + +A second timeline is used to signal to clients the availability time of Segments at the specified HTTP-URLs. These times are referred to as **Segment availability times** and are provided in wall-clock time. Clients typically compare the wall-clock time to Segment availability times before accessing the Segments at the specified HTTP-URLs. For On-Demand services with a static MPD, the availability times of all Segments are identical. For live services when the MPD is updated, the availability times of Segments depend on the position of the Segment in the Media Presentation timeline. + +Segments are assigned a duration, which is the duration of the media contained in the Segment when presented at normal speed. Typically all Segments in a Representation have the same or roughly similar duration. However Segment duration may differ from Representation to Representation. A DASH presentation can be constructed with relative short Segments (for example a few seconds), or longer Segments including a single Segment for the whole Representation. + +Short Segments are usually required in the case of live content, where there are restrictions on end-to-end latency. The duration of a Segment is typically a lower bound on the end-to-end latency. DASH does not support the possibility for Segments to be extended over time: a Segment is a complete and discrete unit that must be made available in its entirety. + +Segments may be further subdivided into **Subsegments** each of which contains a whole number of complete access units. In formats defined in this specification, a Subsegment contains a whole number of complete movie fragments. A Segment may be divided into Subsegments described by a compact **Segment index**, which provides the presentation time range in the Representation and corresponding byte range in the Segment occupied by each Subsegment. Clients may download this index in advance and then issue requests for individual Subsegments. + +Clients may switch from Representation to Representation within an Adaptation Set at any time in the media content. However, switching at arbitrary positions may be complicated because of coding dependencies within Representations and other factors. It is also desirable to avoid download of 'overlapping' data i.e. media for the same time period from multiple Representations. Usually, switching is simplest at a Stream Access Point in the new stream. In order to formalize requirements related to switching DASH defines a codec-independent concept of Stream Access Points and identifies various types of Stream Access Points. + +Segmentation and Subsegmentation may be performed in ways that make switching simpler. For example, in the very simplest cases each Segment or Subsegment begins with a Stream Access Point and the boundaries of Segments or Subsegments are aligned across the Representations of an Adaptation Set. In this case, switching Representation involves playing to the end of a (Sub)Segment of one Representation and then playing from the beginning of the next (Sub)Segment of the new Representation. The Media Presentation Description and Segment Index provide various indications, which describe properties of the Representations that may make switching simpler. + +For On-Demand services, the Media Presentation Description is a static document describing the various aspects of the Media Presentation. All Segments of the Media Presentation are available on the server once any Segment is available. For live services, however, Segments become available with time as the content is produced. The Media Presentation Description may be updated regularly to reflect changes in the presentation over time, for example Segment URLs for new Segments may be added to the MPD and those for old, no longer available Segments may be removed. However, if Segment URLs are described using a template, this updating may not be necessary except for some redundancy/failover cases. + +In summary a Media Presentation is described in a Media Presentation Description (MPD) including any possible updates of the MPD. The MPD is defined in clause 8.2 and the update mechanisms in 8.5. Assembly of a fragmented MPD is defined in 8.3. The data model that constitutes a Media Presentation is defined in 8.4 and some additional elements in the MPD that describe the content are provided in 8.6. + +## 8.2 Media Presentation Description + +### 8.2.1 General + +The Media Presentation Description (MPD) is a document that contains metadata required by a 3GP-DASH client to construct appropriate HTTP-URLs to access Segments and to provide the streaming service to the user. + +NOTE: actual playback of the media streams included in the Representations is not controlled by the MPD information. Playback is controlled by the media engine operating on the media streams contained in the Representations in the usual way. + +The format of URLs in the MPD and the process to generate HTTP GET and partial GET requests from URLs provided in the MPD is defined in 8.7. + +The MPD is an XML-document that is formatted according to the XML schema provided in clause 8.2.2. + +The MIME type of the MPD shall be “application/dash+xml” as defined in Annex H.1. + +The encoding of the MPD shall be UTF-8 as defined in IETF RFC 3629 [37]. All data provided in extension namespaces shall be UTF-8 as defined in IETF RFC 3629 [37]. If binary data needs to be added, it shall be included in Base64 as described in IETF RFC 4648 [39] within a UTF-8 encoded element with a proper name space or identifier, such that an XML parser knows how to process or ignore it. + +MPDs may be updated as specified in clause 8.5. Updates may also be done using MPD delta files as defined in clause 8.5.2. The MIME type of an MPD delta file shall be “application/dashdelta” as defined in Annex H.2. + +The delivery of the MPD is not in scope of this specification. If the MPD is delivered over HTTP, then the MPD may be transfer encoded for transport, as described in [18] using the generic GZip algorithm RFC 1952 [18]. 3GP-DASH clients shall support GZip content decoding of the MPD when delivered over HTTP (GZIP RFC 1952 [18], clause 9). + +### 8.2.2 Schema and 3GPP Extension + +The overview of the XML schema of the MPD is provided in below. Specific types, elements and attributes are introduced in the remainder of this clause. The complete MPD schema is provided in Annex B of this specification. In case of any inconsistencies the schema in Annex B takes precedence over the XML-syntax snippets provided in this clause. For the normative schema refer to the schema in Annex B. + +The main schema is provided in Table 8-1 with the namespace “urn:mpeg:dash:schema:mpd:2011”. The 3GPP extension namespace is provided in Table 8-2 with namespace “urn:3GPP:ns:DASH:MPD-ext:2011”. An extension schema for 3GPP in the context of the specification is referred to as “3gpp-2011.xsd”. Elements and attributes in the extension namespace are preceded with “x3gpp:” throughout this document. + +The MPD shall be authored such that, after unrecognized XML attributes or elements are removed, the result is a valid XML document formatted according to the XML schema provided in Annex B and that complies with this specification. Namespaces may be used to extend functionalities. Therefore, all extended elements and attributes added to a **Representation** in particular shall be such that they can be safely ignored by 3GP-DASH clients. + +NOTE 1: Based on this if DASH clients remove all XML attributes and elements from the MPD in the DASH namespace (urn:mpeg:dash:schema:mpd:2011) and in other namespaces that are not in the XML schema documented in Annex B, the MPD results in a valid XML document which complies with this specification. The DASH client can use such a resulting MPD for presentation of a conforming Media Presentation. + +Example for valid MPDs are provided in Annex D. + +**Table 8-1: Overview of XML schema of the MPD** + +``` + + + + Media Presentation Description + + + + + + + + ... + + +``` + +**Table 8-2: Overview of XML schema for 3GPP MPD extensions** + +``` + + + + + Extensions to Media Presentation Description for 3GPP + + + ... + + +``` + +### 8.2.3 (void) + +### 8.2.4 (void) + +## 8.3 MPD Assembly + +### 8.3.1 Introduction + +This clause defines a mechanism for referencing a remote DASH element from within a local MPD. A subset of W3C XLINK [20] simple links is defined consisting of: + +- restricted syntax and semantics in clause 8.3.2, and +- the processing model in clause 8.3.3. + +### 8.3.2 Syntax and semantics + +Table 8-3 provides the XLINK attributes that are used in this specification and shall be supported accordingly. + +**Table 8-3: XLINK attributes used in this specification** + +| Attribute | Comments and Usage | +|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| @xlink:type | Identifies the type of W3C XLINK being used.
In the context of specification, all references shall be W3C XLINK simple links. As the attribute @xlink:type is optional with fixed setting @xlink:type="simple". | +| @xlink:href | Identifies the remote DASH Element by URI as defines in IETF RFC 3986 [17].
In the context of this specification, URI shall exclusively be HTTP-URLs. | +| @xlink:show | Defines the desired behaviour of a remote DASH element once dereferenced from within a MPD as defined in W3C XLINK.
In the context of this specification the attribute @xlink:show is optional with fixed setting @xlink:show="embed".
NOTE: In W3C XLINK, the behaviour of conforming XLink applications when embedding XML-based ending resources, such as a remote DASH element, is not defined. Thus, the actual behaviour for this standard is defined in clause 8.3.3. | + +| Attribute | Comments and Usage | +|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| @xlink:actuate |

Defines the desired timing of dereferencing a remote DASH-Element from within a MPD as defined in W3C XLINK. The following attribute values are allowed in this standard:

1) onLoad: an application should dereference the remote DASH element immediately on loading the MPD.

2) onRequest (default): formally, an application should dereference the remote DASH-element only on a post-loading event triggered for the purpose of dereferencing. In the context of this specification, the application dereferences the link only for those resources it needs (or anticipates it probably will need). Examples include de-referencing a link in a Period element when the play-time is expected to enter that period, de-referencing a representation group link when it appears to contain representations that will be needed, and so on.

| + +The restricted schema for XLINK in the context of the standard is referred to as "xlink.xsd" in any schema in this standard and defined in Table 8-4. + +**Table 8-4: XML Schema for XLINK attributes used in this specification** + +``` + + + + + + + + + + + + + + + + + + + + + + +``` + +### 8.3.3 Processing + +The following rules apply to the processing of URI references within `@xlink:href`: + +- 1) URI references to remote elements that cannot be resolved shall be treated as invalid references and invalidate the MPD. +- 2) Only a single element type shall be included in a remote element. However, multiple elements of the same type may be included in a remote element unless explicitly restricted. If multiple root elements are obtained from the remote element, the elements shall be returned in the appropriate order and the first element shall replace the element within the MPD, using the rules defined above. All other elements shall be inserted immediately after this element in the order in which they are declared. +- 3) URI references to remote elements that are inappropriate targets for the given reference shall be treated as invalid references (see list below for the appropriate targets) references and invalidate the MPD. +- 4) URI references that directly or indirectly reference themselves are treated as invalid circular references and invalidate the MPD. +- 5) If a URI reference is relative then reference resolution as defined in 8.7.4 shall apply. + +The remote elements referenced from within an MPD (referred to as appropriate targets) shall be embedded into the MPD by applying the following rules: + +- 1) Attributes and elements obtained from the remote element shall be added to the element of the MPD that contains `@xlink:href` and shall be merged with the ones already present in the MPD. If the same attributes are present in both MPD and remote element, the attribute values should be the same. If they are not identical, then the value of the attribute of the MPD takes precedence over the value of the attribute in the remote DASH element. +- 2) The remote DASH element referenced by the `@xlink:href` shall conform to the type definition of the element in the MPD that contains `@xlink:href`. +- 3) All XLINK attributes shall be removed after dereferencing is completed. +- 4) Only a single element type shall be included in a remote DASH element. However, multiple elements of the same type may be included in a remote element unless explicitly restricted. +- 5) All resources in the remote element referenced by `@xlink:href` shall have an availability end time as specified by **MPD**@availabilityEndTime. + +## 8.4 Hierarchical Data Model + +### 8.4.1 General + +A Media Presentation is described in the **MPD** element that is contained in an MPD document formatted as defined in clause 8.2. + +A Media Presentation consists of: + +- A sequence of one or more Periods described in 8.4.2. +- Each Period contains one or more Adaptation Sets that itself contains one or more Representations as described in clause 8.4.3. Clause 8.4.3 also defines media content components and Sub-Representations. +- Each Representation consists of one or more Segments. Segment Information is introduced in clause 8.4.4. Segments contain media data and/or metadata to access, decode and present the included media content. + +The summary of the semantics of the attributes and elements within an **MPD** element are provided in Table 8-5. The XML-syntax of the **MPD** element is provided in Table 8-6. + +**Table 8-5: Semantics of MPD element** + +| Element or Attribute Name | Use | Description | +|---------------------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| MPD | | The root element that carries the Media Presentation Description for a Media Presentation. | +| @id | O | specifies an identifier for the Media Presentation. It is recommended to use an identifier that is unique within the scope in which the Media Presentation is published.

If not specified, no MPD-internal identifier is provided. However, for example the URL to the MPD may be used as an identifier for the Media Presentation. | +| @profiles | M | specifies a list of Media Presentation profiles as described in section 7.3.

The contents of this attribute shall conform to either the pro-simple or pro-fancy productions of RFC6381, Section 4.5, without the enclosing DQUOTE characters, i.e. including only the unencodedv or encodedv elements respectively. As profile identifier the URI defined for the conforming Media Presentation profiles as described in 7.3 shall be used. | +| @type | OD
default:
static | specifies whether the Media Presentation Description may be updated ( @type="dynamic" ) or not ( @type="static" ). | + +| Element or Attribute Name | Use | Description | +|-----------------------------|------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| | | NOTE Static MPDs are typically used for On-Demand services, whereas dynamic MPDs are used for live services. | +| @availabilityStartTime | CM
Must be present for type="dynamic" | For @type="dynamic" this attribute shall be present. In this case it specifies the anchor for the computation of the segment availability start time for any Segment in the Media Presentation.
For @type="static", if present, it specifies the Segment availability start time for all Segments referred to in this MPD. If not present, all Segments described in the MPD shall be become available at the time the MPD becomes available. | +| @availabilityEndTime | O | specifies the latest Segment availability end time for any Segment in the Media Presentation. When not present, the value is unknown. | +| @mediaPresentationDuration | CM
Must be present for @type='static' | specifies the duration of the entire Media Presentation. If the attribute is not present, the duration of the Media Presentation is unknown. In this case the attribute MPD@minimumUpdatePeriod shall be present. This attribute shall be present when the attribute MPD@minimumUpdatePeriod is not present. | +| @minimumUpdatePeriod | O | If this attribute is present, it specifies the smallest period between potential changes to the MPD. This can be useful to control the frequency at which a client checks for updates.
If this attribute is not present it indicates that the MPD does not change.
If MPD@type is 'static', @minimumUpdatePeriod shall not be present.

Details on the use of the value of this attribute are specified in 8.5. | +| @minBufferTime | M | specifies a common duration used in the definition of the Representation data rate (see @bandwidth attribute in 8.4.3.4). | +| @timeShiftBufferDepth | O | specifies the duration of the smallest time shifting buffer for any Representation in the MPD that is guaranteed to be available for a Media Presentation with type 'dynamic'. When not present, the value is infinite. This value of the attribute is undefined if the @type attribute is equal to 'static'. | +| @suggestedPresentationDelay | O | when @type is 'dynamic', it specifies a fixed delay offset in time from the presentation time of each access unit that is suggested to be used for presentation of each access unit. For more details refer to 9.4.1.2. When not specified, then no value is provided and the client is expected to choose a suitable value.

when @type is 'static' the value of the attribute is undefined and may be ignored. | +| @maxSegmentDuration | O | specifies the maximum duration of any Segment in any Representation in the Media Presentation, i.e. documented in this MPD and any future update of the MPD. If not present, then the maximum Segment duration shall be the maximum duration of any Segment documented in this MPD. | +| @maxSubsegmentDuration | O | specifies the maximum duration of any Media Subsegment in any Representation in the Media Presentation. If not present, the same value as for the maximum Segment duration is implied. | +| ProgramInformation | 0 ... N | specifies descriptive information about the program. For more details refer to the description in clause 8.6.2. | +| BaseURL | 0 ... N | specifies a Base URL that can be used for reference resolution and alternative URL selection. For more details refer to the description in clause 8.7. | + +| Element or Attribute Name | Use | Description | +|---------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| x3gpp:DeltaSupport | 0 ... 1 | If present, this element specifies that MPD delta files are supported by the server. For more details refer to the description in clause 8.5.2. | +| Location | 0 ... N | specifies an absolute URL where the MPD is available. | +| Period | 1 ... N | specifies a Period. For more details refer to the description in clause 8.4.2. | +| Metrics | 0 ... N | specifies information about the requested QoE metrics. For more details refer to clause 10.3.
At most one Metrics element shall be present in the MPD.
NOTE: The schema allows more than one Metrics element for potential future extensions. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +Elements are **bold**; attributes are non-bold and preceded with an @ + +Table 8-6: Syntax of MPD element + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +### 8.4.2 Period + +A Media Presentation consists of one or more Periods. A Period is defined by **Period** element in the **MPD** element. + +The type of the Period, either a regular Period or an Early Available Period, as well as the *PeriodStart* time of a regular Period is determined as follows: + +- If the attribute @start is present in the **Period**, then the Period is a regular Period and the *PeriodStart* is equal to the value of this attribute. +- If the @start attribute is absent, but the previous **Period** element contains a @duration attribute then this new Period is also a regular Period. The start time of the new Period *PeriodStart* is the sum of the start time of the previous Period *PeriodStart* and the value of the attribute @duration of the previous Period. + +- If (i) `@start` attribute is absent, and (ii) the **Period** element is the first in the MPD, and (iii) the **MPD@type** is 'static', then the *PeriodStart* time shall be set to zero. +- If (i) `@start` attribute is absent, and (ii) the previous **Period** element does not contain a `@duration` attribute or the **Period** element is the first in the MPD, and (iii) the **MPD@type** is 'dynamic', then this Period is an Early Available Period (see below for details). + +For any regular Period the following holds: *PeriodStart* reflects the actual time that should elapse after playing the media of all prior Periods in this Media Presentation relative to the *PeriodStart* time of the first Period in the Media Presentation. The Period extends until the *PeriodStart* of the next Period, or until the end of the Media Presentation in the case of the last Period. More specifically, the difference between the *PeriodStart* time of a Period and either the *PeriodStart* time of the following Period, if this is not the last Period, or the value of the **MPD@mediaPresentationDuration** if this is the last one, is the presentation duration in Media Presentation time of the media content represented by the Representations in this Period. + +Early Available Periods may be used to advertise initialization of other non-media data before the media data itself is available. **Period** elements documenting early available Periods shall not occur before any **Period** element documenting a regular Period. For Early Available Periods, any resources that are announced in such a **Period** element shall be available. Such a **Period** element shall not contain URLs to Media Segments. The data contained in such a **Period** element does not represent a Period in the Media Presentation. Only when the *PeriodStart* time becomes known through an update of the MPD, such a **Period** element represents a regular Period. However, an update of the MPD may even remove a **Period** element representing an Early Available Period in later updates of the MPD as long as no *PeriodStart* time is associated with the Period. + +The attributes and elements contained in the **Period** element are provided in Table 8-7 along with their semantics. The XML syntax or the **Period** element is provided in Table 8-8. + +**Table 8-7: Semantics of Period Element** + +| Element or Attribute Name | Use | Description | +|----------------------------------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Period | | specifies the information for a single Period. | +| @xlink:href | O | specifies a reference to a remote element that contains one or multiple elements of type Period | +| @xlink:actuate | O
default:
onRequest | specifies the processing instructions, which can be either "onLoad" or "onRequest".
This attribute must not be present if the @xlink:href attribute is not present | +| @id | CM
if
"MPD@type=dynamic" | specifies a unique identifier for this Period within the Media Presentation. The identifier shall be unique within the scope of the Media Presentation.

If the MPD@type is equal to "dynamic", then this attribute shall be present and the @id of the Period shall not change in case an MPD is updated.

If not present, no identifier for the Period is provided. | +| @start | O | if present, specifies the PeriodStart time of the Period.
The PeriodStart time is used as an anchor to determine the MPD start time of each Media Segment as well as to determine the presentation time of each access unit in the Media Presentation timeline.

If not present, refer to the details above in this clause. | +| @duration | O | if present, specifies the duration of the Period to determine the PeriodStart time of the next Period.

If not present, refer to the details above in this clause. | +| @bitstreamSwitching | OD
Default:
false | When set to 'true', this is equivalent as if the AdaptationSet@bitstreamSwitching for each Adaptation Set contained in this Period is set to 'true'. In this case, the AdaptationSet@bitstreamSwitching attribute shall not be set to 'false' for any Adaptation Set in this Period. | + +| Element or Attribute Name | Use | Description | +|---------------------------|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BaseURL | 0..N | specifies a base URL that can be used for reference resolution and alternative URL selection. For more details refer to the description in clause 8.7. | +| SegmentBase | 0..1 | specifies default Segment Base information. Information in this element is overridden by information in AdaptationSet.SegmentBase and Representation.SegmentBase , if present.

For more details see clause 8.4.4. | +| SegmentList | 0..1 | specifies default Segment List information.

Information in this element may be overridden by information in AdaptationSet.SegmentList and Representation.SegmentList , if present.

For more details see clause 8.4.4. | +| SegmentTemplate | 0..1 | specifies default Segment Template information.

Information in this element may be overridden by information in AdaptationSet.SegmentTemplate and Representation.SegmentTemplate , if present.

For more details see clause 8.4.4. | +| AdaptationSet | 0..N | specifies an Adaptation Set.

At least one Adaptation Set shall be present in each Period unless the value of the @duration attribute of the Period is set to zero. Note that the actual element may be present only in a remote element if xlink is in use.

For more details see clause 8.4.3.3. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +Note that the conditions only holds without using xlink:href. If linking is used, then all attributes are "optional" and +Elements are **bold**; attributes are non-bold and preceded with an @. + +Table 8-8: Syntax of Period Element + +``` + + + + + + + + + + + + + + + + + + + + +``` + +### 8.4.3 Adaptation Sets and Representations + +#### 8.4.3.1 Overview + +Periods are further subdivided as follows: + +- Each Period contains one or more groups. Groups consist of Adaptation Sets as described in clause 8.4.3.3. + +- In case an Adaptation Set contains multiple media content components, then each media content component is described individually as defined in clause 8.4.3.6. +- Each Adaptation Set contains one or more Representations as described in clause 8.4.3.4. +- A Representation may contain one or more Sub-Representations as described in clause 8.4.3.5. +- Adaptation Sets, Representations and Sub-Representations share common attributes and elements that are described in clause 8.4.3.2. + +#### 8.4.3.2 Common Attributes and Elements + +The elements **AdaptationSet**, **Representation** and **SubRepresentation** have assigned common attributes and elements. + +The attributes and elements listed in Table 6 may be present in all three elements. The semantics of these attributes are provided in Table 8-9. The XML-syntax is provided in Table 8-10. + +The 'Use' column in Table 8-9 shall be interpreted that an attribute marked with 'M' shall be available for a Representation, i.e. it shall either be present in the **Representation** element, or if not, it shall be in the containing **AdaptationSet** element. An attribute marked with 'O' may be absent in both. + +**Table 8-9: Common Adaptation Set, Representation and Sub-Representation and Attributes and Elements** + +| Element or Attribute Name | Use | Description | +|---------------------------------------|-----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Common attributes and elements | | | +| @profiles | O |

specifies the profiles which the associated Representation(s) conform to the list of Media Presentation profiles as described in 7.3. The value shall be a subset of the respective value in any higher level of the document hierarchy (Representation, Adaptation Set, MPD).

If not present, the value is inferred to be the same as in the next higher level of the document hierarchy. For example, if the value is not present for a Representation, then @profiles at the Adaptation Set level is valid for the Representation.

The same syntax as defined in 8.4.1 shall be used.

| +| @width | O |

Specifies the horizontal visual presentation size of the video media type in pixel.

If not present on any level, the value is unknown.

| +| @height | O |

Specifies the vertical visual presentation size of the video media type in pixel.

If not present on any level, the value is unknown.

| +| @frameRate | O |

specifies the output frame rate of the video media type in the Representation. If the frame rate is varying, the value is the average frame over the entire duration of the Representation.

The value is coded as a string, either containing two integers separated by a "/", ("F/D"), or a single integer "F". The frame rate is the division F/D, or F, respectively, per second (i.e. the default value of D is "1").

If not present on any level, the value is unknown.

| +| @audioSamplingRate | O |

Either a single decimal integer value specifying the sampling rate or a whitespace separated pair of decimal integer values specifying the minimum and maximum sampling rate of the audio media component type. The values are in samples per second.

If not present on any level, the value is unknown.

| + +| Element or Attribute Name | Use | Description | +|---------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| @mimeType | M | specifies the MIME type of the concatenation of the Initialization Segment, if present, and all consecutive Media Segments in the Representation. | +| @codecs | M | specifies the codecs parameter specifying the media types. The codec parameters shall also include the profile and level information where applicable.
The contents of this attribute shall conform to either the simple-list or fancy-list productions of RFC6381 [26] clause 3.2, without the enclosing DQUOTE characters. The codec identifier for the media format, mapped into the name space for codecs as specified in RFC6381 [26], clause 3.3 shall be used. | +| @maximumSAPPeriod | O | when present, specifies the maximum SAP interval in seconds of all contained media streams, where the SAP interval is the maximum time interval between the T SAP of any two successive SAPs of types 1 to 3 inclusive of one media stream in the associated Representations.

If not present on any level, the value is unknown. | +| @startWithSAP | O | when present and greater than 0, specifies that in the associated Representations, each Media Segment starts with a SAP of type less than or equal to the value of this attribute value in each media stream.

A Media Segment starts with a SAP in a media stream if the stream contains a SAP in that Media Segment, I SAU is the index of the first access unit that follows I SAP and I SAP is contained in the Media Segment.

If not present on any level, the value is unknown. | +| @maxPlayoutRate | O | Specifies the maximum playout rate as a multiple of the regular playout rate, which is supported with the same decoder profile and level requirements as the normal playout rate.

If not present on any level, the value is 1. | +| @codingDependency | O | When present and 'true', for all contained media streams, specifies that there is at least one access unit that depends on one or more other access units for decoding. When present and 'false', for any media type, there is no access unit that depends on any other access unit for decoding (e.g. for video all the pictures are intra coded). When not present, there may or may not be coding dependency between access units. | +| FramePacking | 0 ... N | specifies frame-packing arrangement information of the video media component type.
When no FramePacking element is provided for a video component, frame-packing shall not be used for the video media component.
For details see 8.6.3.1 and 8.6.3.8. | +| AudioChannelConfiguration | 0 ... N | specifies the audio channel configuration of the audio media component type.

For details see clause 8.6.3.1 and 8.6.3.7. | +| ContentProtection | 0 ... N | specifies information about the use of content protection for the associated Representations.
For details, refer to clause 8.6.3.1 and 8.6.3.2. | +| EssentialProperty | 0 ... N | specifies information about the containing element that is considered essential by the Media Presentation author for processing the containing element.
For details see clause 8.6.3.9. | +| SupplementalProperty | 0 ... N | specifies supplemental information about the containing element that may be used by the DASH client optimizing the processing.
For details see clause 8.6.3.10. | + +| Element or Attribute Name | Use | Description | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|-------------| +| Legend:
For attributes: M=Mandatory, O=Optional.
For elements: .. (N=unbounded)
Elements are bold ; attributes are non-bold and preceded with an @. | | | + +**Table 8-10: XML-Syntax of Common Group and Representation and Attributes and Elements** + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +#### 8.4.3.3 Adaptation Set + +An Adaptation Set is described by an **AdaptationSet** element. **AdaptationSet** elements are contained in a **Period** element. An Adaptation Set contains alternate Representations, i.e. only one Representation within an Adaptation Set is expected to be presented at a time. All Representations contained in one Adaptation Set represent the same media content components and therefore contain media streams that are considered to be perceptually equivalent. + +Representations are arranged into Adaptation Sets according to their to the media content component properties of the media content components present in the Representations, namely + +- o the language as described by the @**lang** attribute, +- o the media component type described by the @**contentType** attribute, +- o the role property as described by the **Role** elements, +- o the accessibility property as described by the **Accessibility** elements, + +- the viewpoint property as described by the **ViewPoint** elements, +- the rating property as described by the **Rating** elements. + +Representations shall appear in the same Adaptation Set if and only if they have identical values for all of these media content component properties for each media content component. + +The values for the elements **Role**, **Accessibility**, **ViewPoint** and **Rating** are typically not provided within this specification. However, a number of simple schemes are defined in Annex C. + +If there exist multiple media content components then the properties of each media content component shall be described by a separate **ContentComponent** element as defined in 8.4.3.6. The **ContentComponent** element shares common elements and attributes with the **AdaptationSet** element. Default values or values applicable to all media content components may be provided directly in the **AdaptationSet** element. Attributes present in the **AdaptationSet** shall not be repeated in the **ContentComponent** element. + +The **AdaptationSet** element may contain default values for elements and attributes associated to the contained Representations. Any of the common attributes defined in clause 8.4.3.2 shall only be present either in the **AdaptationSet** element or in the **Representation** element, but not in both. + +The **AdaptationSet** element also supports the description of ranges for the `@bandwidth`, `@width`, `@height` and `@frameRate` attributes associated to the contained Representations, which provide a summary of all values for all the Representations within this Adaptation Set. The Representations associated with an **AdaptationSet** element shall not contain values outside the ranges documented for that Adaptation Set. + +Adaptation Sets may be further arranged into groups using the `@group` attribute. The semantics of this grouping is that the media content within one Period is represented by: + +- 1) either one Representation from group 0, if present, +- 2) or the combination of at most one Representation from each non-zero group. + +If the **AdaptationSet**`@group` attribute is not present then all Representations in this Adaptation Set are assigned to a non-zero group specific to this Adaptation Set. + +The semantics of the attributes and elements within an **AdaptationSet** element are provided in Table 8-11. The XML-syntax of the **AdaptationSet** element is provided in Table 8-12. + +**Table 8-11: Semantics of AdaptationSet element** + +| Element or Attribute Name | Use | Description | +|---------------------------------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| AdaptationSet | | Adaptation Set description | +| @xlink:href | O | specifies reference to a remote element that shall contain exactly one element of type AdaptationSet | +| @xlink:actuate | OD
default:
"onRequest" | specifies the processing instructions, which can be either "onLoad" or "onRequest". | +| @id | O | specifies unique identifier for this Adaptation Set within the Period. The attribute shall be unique in the scope of the containing Period.

The attribute shall not be present in a remote element.

If not present, no identifier for the Adaptation Set is specified. | +| @group | O | specifies an identifier for the group that is unique in the scope of the containing Period.

For details refer to the description above in this clause. | +| CommonAttributesElements | - | specifies the common attributes and elements (attributes and elements from base type RepresentationBaseType ) For details see clause 8.4.3.2. | + +| Element or Attribute Name | Use | Description | +|---------------------------|-----|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| @lang | O |

Declares the language code(s) for this Adaptation Set. The syntax and semantics according to IETF RFC 5646 [13] shall be used.

If not present, the language code may be defined for each media component or it may be unknown.

| +| @contentType | O |

specifies the media content component type for this Adaptation Set. A value of the top-level Content-type 'type' value as defined in RFC 4288 [38], section 4 shall be taken.

If not present, the media content component type may be defined for each media component or it may be unknown.

| +| @minBandwidth | O |

specifies minimum bandwidth value in all Representations in this Adaptation Set. This value has the same units as the @bandwidth attribute.

| +| @maxBandwidth | O |

specifies maximum bandwidth value in all Representations in this Adaptation Set. This value has the same units as the @bandwidth attribute.

| +| @minWidth | O |

specifies minimum width value in all Representations in this Adaptation Set. This value has the same units as the @width attribute.

If not present, the value is unknown.

| +| @maxWidth | O |

specifies maximum width value in all Representations in this Adaptation Set. This value has the same units as the @width attribute.

If not present, the value is unknown.

| +| @minHeight | O |

specifies minimum height value in all Representations in this Adaptation Set. This value has the same units as the @height attribute.

If not present, the value is unknown.

| +| @maxHeight | O |

specifies maximum height value in all Representations in this Adaptation Set. This value has the same units as the @height attribute.

If not present, the value is unknown.

| +| @minFrameRate | O |

specifies minimum frame rate value in all Representations in this Adaptation Set. This value is encoded in the same format as the @frameRate attribute.

If not present, the value is unknown.

| +| @maxFrameRate | O |

specifies maximum frame rate value in all Representations in this Adaptation Set. This value is encoded in the same format as the @frameRate attribute.

If not present, the value is unknown.

| +| @segmentAlignment | O |

when not set to 'false', this specifies that for any two Representations, X and Y, within the same Adaptation Set, the m-th Segment of X and the n-th Segment of Y

| + +| Element or Attribute Name | Use | Description | +|---------------------------|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| | | are non-overlapping (as defined in section 9.2.5.2) whenever $m$ is not equal to $n$ .

For Adaptation Sets containing Representations with multiple media content components, this attribute value shall be either 'true' or 'false'.

For Adaptation Sets containing Representations with a single media content component, when two AdaptationSet elements within a Period share the same integer value for this attribute, then for any two Representations, X and Y, within the union of the two Adaptation Sets, the $m$ -th Segment of X and the $n$ -th Segment of Y are non-overlapping (as defined in 9.2.5.2) whenever $m$ is not equal to $n$ . | +| @bitStreamSwitching | O | When this flag is set to 'true', the following applies:
  • All Representations in the Adaptation Set shall have the same number M of Media Segments;
  • Let R_1, R_2, \dots, R_N be all the Representations within the Adaptation Set.
  • Let
    • S_{i,j}, for j > 0, be the j^{\text{th}} Media Segment in the i^{\text{th}} Representation (i.e., R_i), and
    • S_{i,0} be the Initialization Segment in the i^{\text{th}} Representation
  • The sequence of S_{i(1),0}, S_{i(1),1}, S_{i(2),2}, \dots, S_{i(k),k}, \dots, S_{i(M),M}, wherein any i(k) for all k values in the range of 1 to M, respectively, is an integer value in the range of 1 to N, results in a "conforming Segment sequence" as defined in section 9.2.5.3 with the media format as specified in the @mimeType attribute.
| +| @subsegmentAlignment | OD

default:
false | If the @subsegmentAlignment for an Adaptation Set is set to other than 'false', all following conditions shall be satisfied:
  • Each Media Segment shall be indexed (i.e. it contains a Segment index)
  • For any two Representations, X and Y, within the same Adaptation Set, the m-th Subsegment of X and the n-th Subsegment of Y are non-overlapping (as defined in section 9.2.5.2) whenever m is not equal to n.
For Adaptation Sets containing Representations with a single media content component, when two AdaptationSet elements within a Period share the same integer value for this attribute, then for any two Representations, X and Y, within the union of the two Adaptation Sets, the $m$ -th Subsegment of X and the $n$ -th Subsegment of Y are non-overlapping (as defined in section 9.2.5.2) whenever $m$ is not equal to $n$ . | +| @subsegmentStartsWithSAP | OD

default:
0 | when greater than 0, specifies that each Subsegment with SAP_type greater than 0 starts with a SAP of type less than or equal to the value of @subsegmentStartsWithSAP. A Subsegment starts with SAP when the Subsegment contains a SAP, and for | + +| Element or Attribute Name | Use | Description | +|---------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| | | the first SAP, IsAU is the index of the first access unit that follows IsAP , and IsAP is contained in the Subsegment.
The semantics of @subsegmentStartsWithSAP equal to 0 are unspecified. | +| Accessibility | 0 ... N | specifies information about accessibility scheme
For more details refer to section 8.6.3.1 and 8.6.3.6. | +| Role | 0 ... N | specifies information on role annotation scheme
For more details refer to section 8.6.3.1 and 8.6.3.3. | +| Rating | 0 ... N | specifies information on rating scheme.
For more details refer to section 8.6.3.1 and 8.6.3.4. | +| Viewpoint | 0 ... N | specifies information on viewpoint annotation scheme.
For more details refer to section 8.6.3.1 and 8.6.3.5. | +| ContentComponent | 0...N | specifies the properties of one media content component contained in this Adaptation Set.
For more details refer to section 8.4.3.6. | +| BaseURL | 0...N | specifies a base URL that can be used for reference resolution and alternative URL selection. For more details refer to the description in section 8.7. | +| SegmentBase | 0...1 | specifies default Segment Base information.
Information in this element is overridden by information in the Representation.SegmentBase , if present.
For more details see section 8.4.4. | +| SegmentList | 0...1 | specifies default Segment List information.
Information in this element is overridden by information in the Representation.SegmentList , if present.
For more details see section 8.4.4. | +| SegmentTemplate | 0...1 | specifies default Segment Template information.
Information in this element is overridden by information in the Representation.SegmentTemplate , if present.
For more details see section 8.4.4. | +| Representation | 0 ... N | specifies a Representation.
At least one Representation element shall be present in each Adaptation Set. The actual element may however be part of a remote element.
See subclause 8.4.3.4. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory, F=Fixed. +For elements: ... (N=unbounded) +Note that the conditions only holds without using *xlink:href*. If linking is used, then all attributes are "optional" and +Elements are **bold**; attributes are non-bold and preceded with an @, List of elements and attributes is in *italics bold* + +**Table 8-12: XML-Syntax of AdaptationSet element** + +``` + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +#### 8.4.3.4 Representation + +Representations are described by the **Representation** element. **Representation** elements are contained in an **AdaptationSet** element. + +A Representation is one of the alternative choices of the complete set or subset of media content components comprising the media content during the defined Period. + +A Representation starts at the start of the Period *PeriodStart* and continues to the end of the Period, i.e. the start of the next Period or the end of the Media Presentation. + +Each Representation includes one or more media streams, where each media stream is an encoded version of one media content component. + +A Representation consists of one or more Segments. + +Each Representation either shall contain an Initialization Segment or each Media Segment in the Representation shall be self-initializing, i.e. the Media Segment itself conforms to the media type as specified in the *@mimeType* attribute for this Representation. + +The concatenation of the Initialization Segment, if present, and all consecutive Media Segments in one Representation shall represent a conforming Segment sequence as defined in section 9.2.5.3 conforming to the media type as specified in the *@mimeType* attribute for this Representation. + +If a Representation is offered in a Media Presentation with **MPD@type='dynamic'**, it is recommended that means to compensate drift be included. For more details refer to Annex A.8. + +The semantics of the attributes and elements within a Representation are provided in Table 8-13. The XML-syntax of the **Representation** element is provided in Table 8-14. + +**Table 8-13: Semantics of Representation element** + +| Element or Attribute Name | Use | Description | +|---------------------------|-----|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Representation | | This element contains a description of a Representation. | +| @id | M |

specifies an identifier for this Representation. The identifier shall be unique within a Period unless the Representation is functionally identically to another Representation in the same Period.

The identifier shall not contain whitespace characters.

If used in the template-based URL construction as defined in section 8.4.4.4, the string shall only contain characters that are permitted within an HTTP-URL according to RFC 3986 [17].

| +| @bandwidth | M |

Consider a hypothetical constant bitrate channel of bandwidth with the value of this attribute in bits per second (bps). Then, if the Representation is continuously delivered at this bitrate, starting at any SAP that is indicated either by @startWithSAP or by any Segment Index box, a client can be assured of having enough data for continuous playout providing playout begins after @minBufferTime * @bandwidth bits have been received (i.e. at time @minBufferTime after the first bit is received).

| +| @qualityRanking | O |

specifies a quality ranking of the Representation relative to other Representations in the Adaptation Set. Lower values represent higher quality content. If not present then the ranking is undefined.

| +| @mediaStreamStructureId | O |

The attribute may be present for Representations containing video and its semantics are unspecified for any other type of Representations.

If present, the attribute @mediaStreamStructureId specifies a whitespace-separated list of media stream structure identifier values. If media streams share the same media stream structure identifier value, the media streams shall have the following characteristics:

  • The media streams have the same number of Stream Access Points of type 1 to 3.
  • The values of TSAP, TDEC, TEPT, and TPTF of the i-th SAP of type 1 to 3 in one media stream are identical to the values of TSAP, TDEC, TEPT, and TPTF, respectively, of the i-th SAP of type 1 to 3 in the other media streams for any value of i from 1 to the number of SAPs of type 1 to 3 in any of the media streams.
  • A media stream formed by concatenating the media stream of a first Representation until lSAU (exclusive) of the i-th SAP of type 1 to 3 and the media stream of a second Representation (having the same media stream structure identifier value as for the first Representation) starting from the lSAU (inclusive) of the i-th SAP of type 1 to 3 conforms to the specification in which the media stream format is specified for any value of i from 1
| + +| | | | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| | |

to the number of SAPs of type 1 to 3 in either media stream. Furthermore, the decoded pictures have an acceptable quality regardless of type of the Stream Access Point access unit used.

All media stream structure identifier values for one Adaptation Set shall differ from those of another Adaptation Set.

If not present, then for this Representation no similarities to other Representations are known.

Note: Indicating multiple media stream structure identifier values for a Representation can be useful in cases where switching between Representations A and B as well as between Representations B and C is allowed at non-IDR intra pictures, but switching between Representations A and C would cause too severe a degradation in the quality of the leading pictures and is hence not allowed. To indicate these permissions and restrictions, Representation A would contain @mediaStreamStructureId equal to "1", Representation B would contain @mediaStreamStructureId equal to "1 2", and Representation C would contain @mediaStreamStructureId equal to "2"

| +| CommonAttributesElements | - | Common Attributes and Elements (attributes and elements from base type RepresentationBaseType ), for more details see clause 8.4.3.2. | +| BaseURL | 0...N | specifies a Base URL that can be used for reference resolution and alternative URL selection. For more details refer to the description in section 8.7. | +| SubRepresentation | 0 ... N | specifies information about a sub-representation that is embedded in the containing Representation. For more details see clause 8.4.3.5. | +| SegmentBase | 0...1 | specifies default Segment Base information.
For more details see 8.4.4. | +| SegmentList | 0 ... 1 | specifies the Segment List information.
For more details see 8.4.4. | +| SegmentTemplate | 0 ... 1 | specifies the Segment Template information.
For more details see 8.4.4. | +| Legend:
For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory.
For elements: ... (N=unbounded)
Elements are bold ; attributes are non-bold and preceded with an @, List of elements and attributes is in italics bold referring to those taken from the base type that has been extended by this type. | | | + +**Table 8-14: XML-Syntax of Representation element** + +``` + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + +``` + +#### 8.4.3.5 Sub-Representation + +Sub-Representations are embedded in regular Representations and are described by the **SubRepresentation** element. **SubRepresentation** elements are contained in a **Representation** element. + +The **SubRepresentation** element describes properties of one or several media content components that are embedded in the Representation. It may for example describe the exact properties of an embedded audio component (language, codec, etc.), an embedded sub-title (language) or it may describe some embedded lower quality video layer (e.g. some lower frame rate, etc.). + +Sub-Representations and Representation share some common attributes and elements. + +In case the `@level` attribute is present in the **SubRepresentation** element, + +- Sub-Representations provide the ability for accessing a lower quality version of the Representation in which they are contained. In this case, Sub-Representations for example allow extracting the audio track in a multiplexed Representation or may allow for efficient fast-forward or rewind operations if provided with lower frame rate. +- the Initialization Segment and/or the Media Segments shall provide sufficient information such that the data can be easily accessed through HTTP partial GET requests. The details on providing such information shall be defined by the media format in use. For media formats defined in this specification, the Subsegment Index as defined in section 9.2.3.3 shall be used. + +If the `@level` attribute is absent, then the **SubRepresentation** element is solely used as a more detailed descriptor for media streams that are embedded in the Representation. + +The semantics of the attributes and elements within a Sub-Representation are provided in Table 8-15. The XML-syntax of the Sub-Representation element is provided in Table 8-16. + +Table 8-15: Semantics of SubRepresentation element + +| Element or Attribute Name | Use | Description | +|---------------------------------|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| SubRepresentation | | This element specifies a Sub-Representation. | +| @level | O | Specifies the sub-representation level. If @level attribute is present a Subsegment Index as defined in section 9.2.3.3 shall be available for each Media Segment in the containing Representation.

If not present, then the SubRepresentation element is solely used to provide a more detailed description for media streams that are embedded in the Representation. | +| @dependencyLevel | O | specifies the set of Sub-Representations within this Representation that this Sub-Representation depends on in the decoding and/or presentation process as a whitespace-separated list of @level values.

If not present, the Sub-Representation can be decoded and presented independently of any other Sub-Representation. | +| @bandwidth | CM
Must be present if @level is present | Identical to the @bandwidth definition in Representation, but applied to this Sub-Representation. This attribute shall be present in case the @level attribute is present. | +| @contentComponent | O | if present, specifies the set of all media content components that are contained in this Sub-Representation as a whitespace-separated list of values of ContentComponent @id values.

if not present, the Sub-Representation is not assigned to a media content component. | +| CommonAttributesElements | - | Common Adaptation Set, Representation and Sub-Representation attributes and elements (attributes and elements from base type RepresentationBaseType ), for details see clause 8.3.4.2. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +**Elements are bold**; attributes are non-bold and preceded with an @, List of elements and attributes is in *italics bold* referring to those taken from the base type that has been extended by this type. + +Table 8-16: XML-Syntax of SubRepresentation element + +``` + + + + + + + + + + + + + + + + + + +``` + +#### 8.4.3.6 Content Component + +Each Adaptation Set contains one or more media content components. The properties of each media content component are described by a **ContentComponent** element or may be described directly on the **AdaptationSet** element if + +only one media content component is present in the Adaptation Set. **ContentComponent** elements are contained in an **AdaptationSet** element. + +The semantics of the attributes and elements within a **ContentComponent** element are provided in Table 8-17. The XML syntax of the **ContentComponent** element is provided in Table 8-18. + +**Table 8-17 — Semantics of ContentComponent element** + +| Element or Attribute Name | Use | Description | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------| +| ContentComponent | | description of a content component | +| @id | O | specifies an identifier for this media component. The attribute shall be unique in the scope of the containing Adaptation Set. | +| @lang | O | same semantics as in Table 8-11 for @lang attribute | +| @contentType | O | same semantics as in Table 8-11 for @contentType attribute | +| Accessibility | 0 ... N | same semantics as in Table 8-11 for Accessibility element | +| Role | 0 ... N | same semantics as in Table 8-11 for Role element | +| Rating | 0 ... N | same semantics as in Table 8-11 for Rating element | +| Viewpoint | 0 ... N | same semantics as in Table 8-11 for ViewPoint element | +| Legend:
For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory, F=Fixed.
For elements: ... (N=unbounded)
Elements are bold ; attributes are non-bold and preceded with an @, List of elements and attributes is in italics bold referring to those taken from the base type that has been extended by this type. | | | + +**Table 8-18 — XML-Syntax of ContentComponent element** + +``` + + + + + + + + + + + + + + +``` + +### 8.4.4 Segments and Segment Information + +#### 8.4.4.1 General + +A Segment is the smallest addressable unit described by an MPD and has a defined format. Segment formats are defined in section 9. This clause defines the MPD information for Segments. + +Specifically, a Segment shall referenced by an HTTP-URL included in the MPD, where an HTTP-URL is defined as an according to RFC 3986 [17], Clause 4.3, with a fixed scheme of “http:” or “https:”, possibly restricted by a byte range if a range attribute is provided together with the URL. The byte range shall be expressed as a byte-range-spec as defined in RFC 2616 [9], Clause 14.35.1. It is restricted to a single expression identifying a contiguous range of bytes. + +Each Segment referenced through an HTTP-URL in the MPD is associated with a Segment availability interval, i.e. a time window in wall-clock time at which the Segments can be accessed via the HTTP-URL. The Segment availability interval window is described by a Segment availability start time and a Segment availability end time. + +Representations are assigned *Segment Information* through the presence of the elements **BaseURL**, **SegmentBase**, **SegmentTemplate** and/or **SegmentList**. The *Segment Information* provides information on the location, availability and properties of all Segments contained in one Representation. Specifically, information on the presence and location of Initialization, Media, Index and Bitstream Switching Segments is provided. + +The elements **SegmentBase**, **SegmentTemplate** and **SegmentList** may be present in the **Representation** element itself. In addition, to express default values, they may be present in the **Period** and **AdaptationSet** element. At each level at most one of the three, **SegmentBase**, **SegmentTemplate** and **SegmentList** shall be present. Further, if **SegmentTemplate** or **SegmentList** are present on one level of the hierarchy, then the other one shall not be present on any lower hierarchy level. + +**SegmentBase**, **SegmentTemplate** and **SegmentList** shall inherit attributes and elements from the same element on a higher level. If the same attribute or element is present on both levels, the one on the lower level shall take precedence over the one on the higher level. + +Several mechanisms are available to specify the *Segment Information*. Specifically, each Representation shall have assigned exactly one of the following choices to determine the *Segment Information*, either by direct presence in the **Representation** element or by inheritance from the higher levels: + +- one **SegmentList** element - for syntax and semantics refer to section 8.4.4.2.3. +- one **SegmentTemplate** element - for syntax and semantics refer to section 8.4.4.2.4. +- one or more **BaseURL** elements, at most one **SegmentBase** element, and no **SegmentTemplate** or **SegmentList** element. The **SegmentBase** element is defined in section 8.4.4.2.2. + +All three elements **SegmentBase**, **SegmentTemplate** and **SegmentList** share common elements based on the **SegmentBase** element. Furthermore, **SegmentTemplate** and **SegmentList** share common attributes and elements. The common information is defined in section 8.4.4.2.2. + +The derivation and details of Initialization and Media Segment information based on the above information is provided in section 8.4.4.3. + +#### 8.4.4.2 Segment Information Description + +##### 8.4.4.2.1 Segment base information + +The **SegmentBase** element contains information that is sufficient if only a single Media Segment is provided per Representation and the Media Segment URL is included in the **BaseURL** element. + +In case multiple Media Segments are present, either a **SegmentList** or a **SegmentTemplate** is used that share the multiple Segment base information as provided in Table 8-20. + +If the Representation contains more than one Media Segment, then the attribute `@duration` shall be present. Segments described by the Segment base information are referenced by an HTTP-URL conforming to the type `URLType` as defined in Table 8-21. + +The semantics of the attributes and elements for the **SegmentBase** element and the Segment base information are provided in Table 8-19 and the multiple Segment base information in Table 8-20. The XML syntax of the Segment Base Information is provided in Table 8-22. + +**Table 8-19 — Semantics of **SegmentBase** element and *Segment Base Information* type** + +| Element or Attribute Name | Use | Description | +|-----------------------------------------------------------|-----|-------------------------------------------------------------------------------------------------------------------------------------------------| +| SegmentBase

Segment Base Information | | specifies Segment base element. This element also specifies the type for the Segment base information that is the base type for other elements. | +| @timescale | O | specifies the timescale in units per second to be used for the derivation of different real-time duration values in the Segment Information. | + +| | | | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| | |

If not present on any level, it shall be set to 1.

NOTE This may be any frequency but typically is the media clock frequency of one of the media streams (or a positive integer multiple thereof).

| +| @presentationTimeOffset | O |

specifies the presentation time offset of the Representation relative to the start of the Period.

The value of the presentation time offset in seconds is the division of the value of this attribute and the value of the @timescale attribute.

If not present on any level, the value of the presentation time offset is 0.

| +| @timeShiftBufferDepth | O |

specifies the duration of the time shifting buffer for this Representation that is guaranteed to be available for a Media Presentation with type 'dynamic'. When not present, the value of the @timeShiftBufferDepth on MPD level applies. If present, this value shall be not smaller than the value on MPD level. This value of the attribute is undefined if the type attribute is equal to 'static'.

NOTE: When operating in a time-shift buffer on a Representation with value larger than the time-shift buffer signalled on MPD level, not all Representations may be available for switching.

| +| @indexRange | O |

specifies the byte range that contains the Segment Index in all Media Segments of the Representation.

The byte range shall be expressed and formatted as a byte-range-spec as defined in RFC 2616 [9], Clause 14.35.1. It is restricted to a single expression identifying a contiguous range of bytes.

If not present the value is unknown.

| +| @indexRangeExact | OD
default:
"false" |

when set to 'true' specifies that for all Segments in the Representation, the data outside the prefix defined by @indexRange contains the data needed to access all access units of all media streams syntactically and semantically.

This attribute shall not be present if @indexRange is absent.

| +| Initialization | 0 ... 1 |

specifies the URL including a possible byte range for the Initialization Segment.

For the type definition refer to Table 8-21.

| +|

Legend:

For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory.
For elements: <minOccurs>...<maxOccurs> (N=unbounded)
Elements are bold; attributes are non-bold and preceded with an @. List of elements and attributes is in italics bold referring to those taken from the base type that has been extended by this type.

| | | + +**Table 8-20 — Semantics of MultipleSegmentBaseInformation type** + +| Element or Attribute Name | Use | Description | +|---------------------------|-----|-------------| +|---------------------------|-----|-------------| + +| | | | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| MultipleSegmentBaseInformation | | specifies multiple Segment base information. | +| @duration | O |

If present, specifies the constant approximate Segment duration.

All Segments within this Representation element have the same duration unless it is the last Segment within the Period, which could be significantly shorter.

The value of the duration in seconds is the division of the value of this attribute and the value of the @timescale attribute associated to the containing Representation.

For more details refer to clause 8.4.4.4.3.

| +| @startNumber | O |

specifies the start number. The interpretation of the @startNumber depends on the segment addressing method.

For more details refer to clause 8.4.4.4.3.

| +| Segment Base Information | | specifies Segment base information. | +|

Legend:

For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory.
For elements: <minOccurs>...<maxOccurs> (N=unbounded)
Elements are bold; attributes are non-bold and preceded with an @. List of elements and attributes is in italics bold referring to those taken from the base type that has been extended by this type.

| | | + +**Table 8-21 — Semantics of elements of type URLType** + +| Element or Attribute Name | Use | Description | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Element of type URLType | | defines an HTTP-URL | +| @sourceURL | O |

specifies the source URL part and shall be formatted either as an <absolute-URI> according to RFC 3986, Clause 4.3, with a fixed scheme of "http" or "https" or as a <relative-ref> according to RFC 3986, Clause 4.2.

If not present, then any BaseURL element is mapped to the @sourceURL attribute and the range attribute shall be present.

| +| @range | O |

specifies the byte range restricting the above HTTP-URL.

The byte range shall be expressed and formatted as a byte-range-spec as defined in RFC 2616, Clause 14.35.1. It is restricted to a single expression identifying a contiguous range of bytes.

If not present, the element refers to the entire resource referenced in the @sourceURL attribute.

| +|

Legend:

For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory.
For elements: <minOccurs>...<maxOccurs> (N=unbounded)
Elements are bold; attributes are non-bold and preceded with an @. List of elements and attributes is in italics bold referring to those taken from the base type that has been extended by this type.

| | | + +Table 8-22 — XML-Syntax of Segment Base Information + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +##### 8.4.4.2.2 Segment list + +The Segment list is defined by a **SegmentList** element. A **SegmentList** element itself contains a list of **SegmentURL** elements for a consecutive list of Segment URLs. Each Segment URL may contain the Media Segment URL and possibly a byte range. The **SegmentURL** element may also contain an Index Segment. + +The semantics of the attributes and elements for the Segment list are provided in Table 8-23. The XML syntax of the Segment list is provided in Table 8-24. + +Table 8-23 — Semantics of **SegmentList** element + +| Element or Attribute Name | Use | Description | +|---------------------------------------|-------------------------------|---------------------------------------------------------------------------------------------------------------| +| SegmentList | | specifies Segment information. | +| @xlink:href | O | specifies a reference to a remote element that contains one or multiple elements of type SegmentList . | +| @xlink:actuate | OD
default:
"onRequest" | specifies the processing set, can be either "onLoad" or "onRequest" | +| MultipleSegmentBaseInformation | | Multiple Segment base information as defined in Table 8-20. | +| SegmentURL | 0 ... N | specifies a Media Segment URL and a possibly present Index Segment URL | + +| | | | +|-------------|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| @media | O | in combination with the @mediaRange attribute specifies the HTTP-URL for the Media Segment.

It shall be formatted as an according to RFC 3986, Clause 4.3, with a fixed scheme of "http" or "https" or as a according to RFC 3986, Clause 4.2.

If not present, then any BaseURL element is mapped to the @media attribute and the range attribute shall be present. | +| @mediaRange | O | specifies the byte range within the resource identified by the @media corresponding to the Media Segment.

The byte range shall be expressed and formatted as a byte-range-spec as defined in RFC 2616, Clause 14.35.1. It is restricted to a single expression identifying a contiguous range of bytes.

If not present, the Media Segment is the entire resource referenced by the @media attribute. | +| @indexRange | O | specifies the byte range of the Segment Index in Media Segment.

The byte range shall be expressed and formatted as a byte-range-spec as defined in RFC 2616, Clause 14.35.1. It is restricted to a single expression identifying a contiguous range of bytes.

If not present, then no Index Segment information is provided for this Media Segment. | + +Legend: +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +Note that the conditions only holds without using @xlink:href. If linking is used, then all attributes are "optional" and +Elements are **bold**; attributes are non-bold and preceded with an @. List of elements and attributes is in *italics bold* referring to those taken from the base type that has been extended by this type. + +**Table 8-24 — XML-Syntax of SegmentList element** + +``` + + + + + + + + + + + + + + + + + + + + + + + +``` + +##### 8.4.4.2.3 Segment template + +The Segment template is defined by the **SegmentTemplate** element. In this case, specific identifiers that are substituted by dynamic values assigned to Segments, to create a list of Segments. The substitution rules are provided in section 8.4.4.4. + +The semantics of the attributes and elements for the Segment list are provided in Table 8-25. The XML syntax of the Segment Information is provided in Table 8-26. + +**Table 8-25 — Semantics of SegmentTemplate element** + +| Element or Attribute Name | Use | Description | +|----------------------------------------------|-----|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| SegmentTemplate | | specifies Segment template information. | +| MultipleSegmentBaseInformation | | Provides the Multiple Segment base information as defined in Table 8-20. | +| @media | O | specifies the template to create the Media Segment List.

For more details refer to clause 8.4.4.3.3. | +| @initialization | O | specifies the template to create the Initialization Segment. The \$Number\$ identifier shall not be included.

For more details refer to clause 8.4.4.3.2. | + +Legend: + +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) + +Elements are **bold**; attributes are non-bold and preceded with an @. List of elements and attributes is in *italics bold* referring to those taken from the base type that has been extended by this type. + +**Table 8-26 — XML-Syntax of SegmentTemplate element** + +``` + + + + + + + + + +``` + +#### 8.4.4.3 Segment Information + +##### 8.4.4.3.1 Overview + +The *Segment Information* provides the following information: + +- the presence or absence of Initialization Segment information +- the HTTP-URL and possibly a byte range for each accessible Segment in each Representation, +- all valid Segment URLs declared by the containing MPD +- for services with **MPD@type='dynamic'**, the Segment availability start time and Segment availability end time of each Segment,, +- the approximate Media Presentation start time of a Media Segment in the Media Presentation timeline within the Period, + +The derivation of Initialization and Media Segment Information is provided in subclause 8.4.4.3.2 and 8.4.4.3.3, respectively. Reference resolution as defined in section 8.7.2 and base URL selection as defined in section 8.7.3 using **BaseURL** elements as defined in section 8.7.1 shall be applied to any URLs. + +##### 8.4.4.3.2 Initialization Segment Information + +Each Representation has assigned at most one Initialization Segment. + +The presence of an Initialization Segment is indicated by the presence of **SegmentBase.Initialization**, **SegmentList.Initialization**, the **SegmentTemplate.Initialization** element or the **SegmentTemplate@initialization** attribute that may contain URL and byte range information or URL construction rules for the Initialization Segment. + +If neither **Initialization** element nor **SegmentTemplate@initialization** are present for a Representation then each Media Segment within the Representation shall be self-initializing. + +For services with **MPD@type='dynamic'**, the Segment availability start time of the Initialization Segment is the sum of the value of the **MPD@availabilityStartTime** and *PeriodStart* time and the Segment availability end time of the Initialization Segment is the largest Segment availability end time of any Media Segment in this Representation. For Segment availability for media Segments refer to clause 8.4.4.3.3. + +The data structures retrieved from the Initialization URL are defined in section 9.2.2. + +##### 8.4.4.3.3 Media Segment Information + +Each Representation has assigned a list of consecutive Media Segments. Each entry in the list of a media Segment has assigned the following parameters: + +- a valid Media Segment URL and possibly a byte range. +- the number of the Media Segment in the Representation. +- the MPD start time of the Media Segment in the Representation providing an approximate presentation start time of the Segment +- MPD duration of the Media Segment providing an approximate presentation duration of the Segment + +These parameters are specified by the **SegmentTemplate** or **SegmentList** elements. To obtain at least one entry in the list of Media Segments, one of the following shall apply: + +- if a **SegmentTemplate** element is present the Template-based Segment URL construction in section 8.4.4.4 shall be applied with the number of the Media Segment in the Media Segment list. The URL of the media segment at position *k* is determined by replacing the **\$Number\$** identifier by (*k*-1) plus the value of the **SegmentTemplate@startNumber** attribute, if present, or is 1. +- if a **SegmentList** element is present it contains a list of **SegmentURL** elements for a consecutive list of Media Segment URLs. The first number in the list within this Period is determined by the value of the **SegmentList@startNumber** attribute, if present, or is 1 in case this attribute is not present. +- none of the above: In this case only a single Media Segment shall be present with the URL provided by a **BaseURL** element and the **SegmentBase** element may be present. + +The MPD start time is relative to the start of the Representation provided by the MPD. The MPD start time and the MPD duration are approximate and do not reflect the exact Media Presentation time. For more details on the relation of MPD start times and Media Presentation time refer to section 9.4.1.2. + +For the derivation of the MPD start time and duration of each Media Segment, the *Index* of the Media Segment and the following information are used + +- If the **@duration** attribute is not present, then the Representation shall contain exactly one Media Segment. The MPD start time is 0 and the MPD duration is obtained in the same way as for the last Media Segment in the Representation (see below for more details). + +- If `@duration` attribute is present, then the MPD start time of the Media Segment is determined as $(Number - Number_{Start})$ times the value of the duration of the attribute `@duration` with $Number_{Start}$ the value of the `@startNumber` attribute. The MPD duration of the Media Segment is the value of the attribute `@duration` except for the duration of the last Media Segment (see below for more details). +- To determine the duration of the only or the last Media Segment of any Representation in a Period, the MPD shall include sufficient information to determine the duration of the containing Period. For example, the `MPD@mediaPresentationDuration`, or add `Period@duration`, or next `Period@start` may be present. + +For services with `MPD@type='dynamic'`, the Segment availability start time of a Media Segment is the sum of the value of the `MPD@availabilityStartTime`, the *PeriodStart* time of the containing Period as defined in section 8.4.2, the MPD start time and the MPD duration of the Media Segment in the Representation. The Segment availability end time of a Media Segment is the sum of the Segment availability start time, the MPD duration of the Media Segment and the value of the attribute `@timeShiftBufferDepth` for this Representation. + +NOTE: By adding the MPD duration of the segment to the segment availability start time of the segment, the segment availability start time of the first segment of each Period depends on the segment duration. This enables to provide segments in Representations with shorter MPD duration earlier, for example to reduce latency for certain Representations. The MPD shall include URL information for all Segments with an availability start time less than both the end of the presentation and the sum of the latest time at which this version of the MPD is available on the server and the `MPD@minimumUpdatePeriod`. + +The data structures retrieved from the URL referring to a Media Segment are defined in section 9.2.3. + +#### 8.4.4.4 Template-based Segment URL Construction + +The `SegmentTemplate@media` attribute and the `SegmentTemplate@index` each contain a string that may contain one or more of the identifiers as listed in Table 8-27. + +In each URL, the identifiers from Table 8-27 shall be replaced by the substitution parameter defined in Table 17. Identifier matching is case-sensitive. If the URL contains unescaped `$` symbols which do not enclose a valid identifier then the result of URL formation is undefined. In this case it is expected that the DASH Client ignores the entire containing **Representation** element and the processing of the MPD continues as if this **Representation** element was not present. The format of the identifier is also specified in Table 8-27. + +Each identifier may be suffixed, within the enclosing `'$'` characters, with an additional format tag aligned with the `printf` format tag as defined in IEEE 1003.1-2008 [s] following this prototype: + +`%0[width]d` + +The `width` parameter is an unsigned integer that provides the minimum number of characters to be printed. If the value to be printed is shorter than this number, the result shall be padded with zeros. The value is not truncated even if the result is larger. + +The Media Presentation shall be authored such that the application of the substitution process results in valid Segment URLs. + +Strings outside identifiers shall only contain characters that permit to form a valid HTTP-URL according to RFC 3986 [17]. + +**Table 8-27: Identifiers for Segment Templates** + +| \$<Identifier>\$ | Substitution parameter | Format | +|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| +| \$\$ | Is an escape sequence, i.e. "\$\$" is replaced with a single "\$" | not applicable | +| \$RepresentationID\$ | This identifier is substituted by the attribute Representation@id of the containing Representation . | The format tag shall not be present. | +| \$Number\$ | This identifier is substituted by the Number of the corresponding Segment. | The format tag may be present.
If no format tag is present, a default format tag with width=1 shall be used. | + +## 8.5 MPD Update + +### 8.5.1 General + +If the **MPD@type** is set to 'dynamic', the MPD may be updated during the Media Presentation. Updates typically extend the accessible Segment list for each Representation, introduce a new Period, update Segment locations or terminate the Media Presentation. + +In this case the MPD shall be made accessible at all locations specified in any present **MPD.Location** element or, if none is present, at the same location as the initial MPD. If the client fetches the MPD using HTTP, the client should use conditional GET methods as specified in RFC 2616 [9], clause 9.3 to reduce unnecessary network usage in the downlink. + +When the MPD is updated + +- the value of **MPD@id**, if present, shall be the same in the original and the updated MPD; +- the values of any **Period@id** attributes shall be the same in the original and the updated MPD, unless the containing **Period** element has been removed. +- the values of any **AdaptationSet@id** attributes shall be the same in the original and the updated MPD unless the containing **Period** element has been removed. +- any Representation with the same **@id** and within the same Period as a Representation appearing in the previous MPD shall provide functionally equivalent attributes and elements, and shall provide functionally identical Segments with the same indices in the corresponding Representation in the new MPD. +- the value of **MPD@availabilityStartTime** shall be the same in the original and the updated MPD. + +If the attribute **MPD@minimumUpdatePeriod** is not present, no update to the MPD is expected, the attribute **MPD@mediaPresentationDuration** shall be present and the MPD shall remain valid until the Media Presentation end time. + +If the attribute **MPD@minimumUpdatePeriod** is present, updates to the MPD are expected and restricted in a sense that at the location where the MPD is available at a certain time, the MPD is also valid for the duration of the value of the **MPD@minimumUpdatePeriod** attribute. Specifically the following shall hold: . + +If the *i*-th version of the MPD is the last version of MPD till the end of the Media Presentation, let *Texp(i)* be the Media Presentation end time. Otherwise, let *Texp(i)* be the sum of the value of **MPD@minimumUpdatePeriod** and the wall-clock time at which the *i*-th version of the MPD is updated (and replaced with the *(i+1)*-th version). The *i*-th MPD shall remain valid until *Texp(i)* in the following sense: + +- all Segments with availability start time less than *Texp(i)* shall be available at their availability start times at the location advertised in the *i*-th MPD. +- all Representations have a Segment with an availability start time, *Tavail*, which is less than *Texp(i)* and with duration not less than (*Texp(i)* - *Tavail*). The actual duration of this Segment is not known by the client until this Segment or the next update of MPD is fetched and this duration may be less than the normal Segment duration if it is the last Segment of the Representation in this Period. + +###### NOTE: + +- 1) the actual duration of this Segment is not known at the client until this Segment or the updated MPD is fetched and this Segment duration may be less than the previous Segment duration if it is the last Segment in the Period. +- 2) The clients may not know *Texp(i)*, but they can each calculate a lower bound on *Texp(i)* by adding **MPD@minimumUpdatePeriod** to the wall-clock time at which they request the MPD. +- 3) The second condition above ensures that sufficient media is contained in each Representation to present up to media presentation time *Texp(i)* for a client that begins playing each Segment at the earliest possible time (its availability start time). + +- 4) The result of the MPD validity requirement is that all items a client expects to be able to retrieve (both Segments and MPD elements) are guaranteed to be available for retrieval during the periods that the client can expect them to be accessible. +- 5) An MPD may contain no Period element or only an early available Period may be provided. In this case, updates to the MPD are expected in order to provide the start time of the first Period, which coincides with the start of the actual Media Presentation. + +### 8.5.2 Media Presentation Description Delta + +If the **x3gpp:DeltaSupport** element is present in the **MPD** element, the content provider indicates that MPD delta files, as defined in this clause, are supported on the server. The URI of the MPD delta is provided in **x3gpp:DeltaSupport @sourceURL**. The **x3gpp:DeltaSupport @availabilityDuration** element, if present, indicates that the MPD delta file referenced by the URI is available for at least the value of the **@availabilityDuration** attribute (after this time, the server may redirect the client to the full MPD). If **x3gpp:DeltaSupport @availabilityDuration** is not present, then no information is conveyed about the availability of the MPD delta. If a client request for an MPD delta file results in an error, the client should request a full MPD. + +The semantics of the attributes within the **x3gpp:DeltaSupport** element are provided in Table 8-28. The XML-syntax of **x3gpp:DeltaSupport** element is provided in Table 8-29. + +**Table 8-28: Semantics of x3gpp:DeltaSupport element** + +| Element or Attribute Name | Use | Description | +|---------------------------|-----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| x3gpp:DeltaSupport | | If present, this element indicates that MPD delta files are supported by the server. | +| @sourceURL | M | The source string providing the URL of the MPD delta. The URL may be relative to any BaseURL on MPD level and reference resolution according to clause 8.2.3 shall be applied. | +| @availabilityDuration | O | When provided, indicates the duration that the server guarantees the availability of the MPD delta file referenced in @sourceURL after the MPD has been updated. After that the client may be redirected to the full MPD. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +Elements are **bold**; attributes are non-bold and preceded with an @. + +**Table 8-29: XML-Syntax of x3gpp:DeltaSupport element** + +``` + + + + + + + + + +``` + +An MPD delta is a text file that shall include the delta between the MPD that references it and the latest provided MPD. Note that the value of **@sourceURL** in successive MPDs is necessarily different because it is impossible for the delta between two different MPDs and the most recent MPD to be the same. + +The output format consists of one or more structures, each corresponding to a change. The changes are in decreasing line number order. The structure format looks like: + +``` +change-command +to-file-line +to-file-line... +. +``` + +There are three types of change commands `change-command`. Each consists of a line number or comma-separated range of lines in the first file and a single character indicating the kind of change to make. All line numbers are the original line numbers in the file. The types of change commands and the instructions are provided in Table 8-30. + +**Table 8-30: Change commands and the instructions for delta MPD files** + +| Change command | Instruction | Example | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| +| la | Add text from the second file after line l in the first file. | '8a' means to add the following lines after line 8 of file 1 | +| rc | Replace the lines in range r in the first file with the following lines. Like a combined add and delete, but more compact. | '5, 7c' means change lines 5–7 of file 1 to read as the text file 2. | +| rd | Delete the lines in range r from the first file. | '5, 7d' means delete lines 5–7 of file 1. | +| NOTE: This is the format supported by the GNU diff utilities, see http://www.gnu.org/software/diffutils/manual/#Detailed-ed | | | + +Regardless of the presence of a **x3gpp:DeltaSupport** element, the full MPD shall always be available to clients for regular MPD updates as defined in clause 8.5.1. MPD Delta related procedures are optional at the client. + +## 8.6 Additional Media Presentation Information + +### 8.6.1 Introduction + +The MPD, Periods, Adaptation Sets, Representations and Sub-Representations may have assigned descriptors for describing the content or other elements in the MPD. This clause specifies this descriptive information. + +### 8.6.2 Program Information + +Descriptive information on the program may be provided for each period within the **ProgramInformation** element. + +When multiple **ProgramInformation** elements are present, the `@lang` attribute shall be present and each element shall describe the Media Presentation sufficiently in the language defined by the value of the `@lang` attribute. + +For each language, the program information may specify title, source of the program, copyright information and a URL to more information. + +The semantics of the attributes within the **ProgramInformation** element are provided in Table 8-31. The XML-syntax of **ProgramInformation** element is provided in Table 8-32. + +**Table 8-31: Semantics of ProgramInformation element** + +| Element or Attribute Name | Use | Description | +|----------------------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ProgramInformation | | specifies descriptive information about the program | +| @lang | O | Declares the language code(s) for this Program Information. The syntax and semantics according to IETF RFC 5646 [13] shall be applied.
If not present the value is unknown. | +| @moreInformationURL | O | If specified, this attribute contains an absolute URL which provides more information about the Media Presentation in this Period.
If not present the value is unknown. | +| Title | 0...1 | specifies a title for the Media Presentation | +| Source | 0...1 | specifies information about the original source (for example content provider) of the Media Presentation. | +| Copyright | 0...1 | specifies a copyright statement for the Media Presentation. | + +#### **Legend:** + +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. + +For elements: ... (N=unbounded) + +Elements are **bold**; attributes are non-bold and preceded with an @. + +**Table 8-32: XML-Syntax of ProgramInformation element** + +``` + + + + + + + + + + + + +``` + +### 8.6.3 Descriptors + +#### 8.6.3.1 General + +The MPD may contain descriptors that are all in the same format as defined in this clause. The elements of type **DescriptorType** provide a flexible mechanism for DASH content authors to annotate and extend the **MPD**, **Period**, **AdaptationSet** and **Representation** elements. + +The descriptor elements are all structured in the same way, namely they contain a `@schemeIdUri` attribute to identify the scheme and an optional attribute `@value` and an optional attribute `@id`. The `@schemeIdUri` provides a URI to identify the scheme. The semantics of this element is specific to the scheme employed. The scheme may be a URN or a URL. + +The MPD does not provide any specific information on how to use these elements. It is up to the application that employs DASH formats to instantiate the description elements with appropriate scheme information. Some specific schemes are defined in Annex C. + +DASH applications that use one of these elements must first define a Scheme Identifier in the form of a URI and must then define the value space for the element when that Scheme Identifier is used. The Scheme Identifier appears in the `@schemeIdUri` attribute. + +In the case that a simple set of enumerated values are required, a text string may be defined for each value and this string must be included in the `@value` attribute. If structured data is required then any extension element or attribute may be defined, but in a separate namespace. + +The `@id` value may be used to refer to a unique descriptor or to a group of descriptors. In the latter case, descriptors with identical values for the attribute `@id` shall be synonymous, i.e. the processing of one of the descriptors with an identical value for `@id` is sufficient. + +Two elements of type **DescriptorType** are *equivalent*, if the element name, the `@schemeIdUri` and the `@value` are equivalent. If the `@schemeIdUri` is a URN, then equivalence refers to lexical equivalence as defined in clause 5 of RFC 2141. If the `@schemeIdUri` is a URI, then equivalence refers to equality on a character-for-character basis as defined in clause 6.2.1 of RFC 3986 [17]. For the `@value` XML-string matching shall be used for determining equivalence. If the `@value` attribute is not present, equivalence is determined by the equivalence for `@schemeIdUri` only. The `@id` attribute may be ignored for equivalence determination. + +The semantics of the attributes within a Generic Descriptor element are provided in Table 8-33. The XML-syntax of a Generic Descriptor element is provided in Table 8-34. The specific descriptors follow these syntax and semantics. + +**Table 8-33: Semantics of generic Descriptor element** + +| Element or Attribute Name | Use | Description | +|---------------------------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Element of type DescriptorType | | This element provides information about the use of description. | +| @schemeIdUri | M | Provides a URI to identify the scheme. The definition of this element is specific to the scheme employed for content description. The URI may be a URN or a URL. The @schemeIdUri may be a URN or URL. When a URL is used, it should also contain a month-date in the form mm/yyyy; the assignment of the URL must have been authorized by the owner of the domain name in that URL on or very close to that date, to avoid problems when domain names change ownership | +| @value | O | This attribute provides the value for the descriptor element. The value space and semantics must be defined by the owners of the scheme identified in the @schemeIdUri attribute. | +| @id | O | specifies an identifier for the descriptor. Descriptors with identical values for this attribute shall be synonymous, i.e. the processing of one of the descriptors with an identical value is sufficient. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +Elements are **bold**; attributes are non-bold and preceded with an @. + +**Table 8-34: XML-Syntax of generic Descriptor element** + +``` + + + + + + + + + + + + +``` + +#### 8.6.3.2 Content Protection + +For the element **ContentProtection** the `@schemeIdUri` attribute is used to identify the content protection schemes employed. This attribute should provide sufficient information, possibly in conjunction with the `@value` and/or extension attributes and elements, such as the DRM system(s), encryption algorithm(s), and key distribution scheme(s) employed, to enable a client to determine whether it can possibly play the protected content. The **ContentProtection** element can be extended in a separate namespace to provide information specific to the content protection scheme (e.g. particular key management systems or encryption methods). Scheme-specific information can also be provided in the Initialization Segment(s) using the appropriate file format primitives instead of, or in addition to, the **ContentProtection** element. The client may have to receive and analyze the protected content (typically only the Initialization Segment, if present), before it can determine whether it has already acquired a license and/or key for accessing the protected content, or to determine from where it can acquire a missing license and/or key, in case this information is not available from the **ContentProtection** element. + +When the **ContentProtection** element is not present the content shall neither be encrypted nor content protected. + +When multiple **ContentProtection** elements are present, each element shall describe a content protection scheme that is sufficient to access and present the Representation. + +#### 8.6.3.3 Role + +For the element **Role** the `@schemeIdUri` attribute is used to identify the role scheme employed to identify the role of the media component. Roles define and describe characteristics and/or structural functions of media components. + +One Adaptation Set or one media content component may have assigned multiple roles even within the same scheme. This specification defines a role scheme in Annex C.2. + +#### 8.6.3.4 Rating + +For the element **Rating** the `@schemeIdUri` attribute is used to identify the rating scheme employed. + +Ratings specifies that content is suitable for presentation to audiences for which that rating is known to be appropriate, or for unrestricted audiences. + +NOTE: An audience with a rating restriction is intended to not be presented content that has associated ratings, unless at least one scheme is recognized as indicating that the content is appropriate to that audience. + +#### 8.6.3.5 Viewpoint + +For the element **Viewpoint** the `@schemeIdUri` attribute is used to identify the viewpoint scheme employed. + +Adaptation Sets containing non-equivalent **Viewpoint** contain different media content components. The **Viewpoint** elements may equally be applied to media content types that are not video. . + +Adaptation Sets with equivalent **Viewpoint** element values are intended to be presented together. This handling should be applied equally for recognised and unrecognised `@schemeIdUri` values. + +#### 8.6.3.6 Accessibility + +For the element **Accessibility** the `@schemeIdUri` attribute is used to identify the accessibility scheme employed. Accessibility is a general term used to describe the degree to which the DASH Media Presentation is available to as many people as possible. + +NOTE **Accessibility** elements fulfil a very similar purpose with respect to media content components as for **Role** elements, but are specifically intended for accessibility. + +One Adaptation Set or one media content component may have assigned multiple accessibility purposes even within the same scheme. + +This specification does not define a specific accessibility scheme, but the simple role scheme in may be used to express a minimum amount of accessibility information. + +#### 8.6.3.7 Audio channel configuration + +For the element **AudioChannelConfiguration** the `@schemeIdUri` attribute is used to identify the audio channel configuration scheme employed. + +Multiple **AudioChannelConfiguration** elements may be present indicating that the Representation supports multiple audio channel configurations. For example, it may describe a Representation that includes MPEG Surround audio supporting stereo and multichannel. + +NOTE if the scheme or the value for this descriptor is not recognized the DASH client is expected to ignore the descriptor. + +#### 8.6.3.8 Frame packing + +For the element **FramePacking** the `@schemeIdUri` attribute is used to identify the frame packing configuration scheme employed. + +Multiple **FramePacking** elements may be present. If so, each element shall contain sufficient information to select or reject the described Representations or Sub-Representations. + +This specification defines a frame packing scheme in Annex C.3. + +NOTE: If the scheme or the value for all **FramePacking** elements is not recognized, the 3GP-DASH client is expected to ignore the described Representations or Sub-Representations. + +#### 8.6.3.9 Essential Property Descriptor + +For the element **EssentialProperty** the Media Presentation author expresses that the successful processing of the descriptor is essential to properly use the information in the parent element that contains this descriptor unless the element shares the same @id with another **EssentialProperty** element. + +If **EssentialProperty** elements share the same @id, then processing one of the **EssentialProperty** elements with the same value for @id is sufficient. At least one **EssentialProperty** element of each distinct @id value is expected to be processed. + +NOTE if the scheme or the value for this descriptor is not recognized the DASH client is expected to ignore the parent element that contains the descriptor. + +Multiple **EssentialProperty** elements with the same value for @id and with different values for @id may be present. + +#### 8.6.3.10 Supplemental Property Descriptor + +For the element **SupplementalProperty** the Media Presentation author expresses that the descriptor contains supplemental information that may be used by the DASH client for optimized processing. + +NOTE if the scheme or the value for this descriptor is not recognized the DASH client is expected to ignore the descriptor. + +Multiple **SupplementalProperty** elements may be present. + +## 8.7 Base URL Processing + +### 8.7.1 General + +The **BaseURL** element may be used to specify one or more common locations for Segments and other resources. Reference resolution as defined in 8.7.2 shall be applied to each URL in the MPD. Handling of multiple alternative base URLs is addressed in 8.7.3. + +The semantics of the attributes and elements for the Base URL are provided in Table 8-35. The XML syntax of the Base URL is provided in Table 8-36. + +**Table 8-35 — Semantics of BaseURL element** + +| Element or Attribute Name | Use | Description | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BaseURL | | A URL that can be used as Base URL. The content of this element is a URI string as described in 8.7.2. | +| @serviceLocation | O | This attribute specifies a relationship between BaseURLs such that BaseURL elements with the same @serviceLocation value are likely to have their URLs resolve to services at a common network location, for example a common Content Delivery Network.

If not present, no relationship to any other Base URL is known. | +| Legend:
For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory.
For elements: ... (N=unbounded)
Elements are bold ; attributes are non- bold and preceded with an @. | | | + +**Table 8-36 — XML-Syntax of BaseURL element** + +``` + + + + + + + + +``` + +``` + + + + +``` + +### 8.7.2 Reference resolution + +URLs at each level of the MPD are resolved according to RFC3986 with respect to the **BaseURL** element specified at that level of the document or the level above in the case of resolving base URLs themselves (the document “base URI” as defined in RFC 3986 [17], Section 5.1 is considered to be the level above the MPD level). If only relative URLs are specified and the document base URI cannot be established according to RFC3986 [17] then the MPD should not be interpreted. URL resolution applies to all URLs found in MPD documents. + +In addition to the document level (the level above the MPD level), base URL information may be present on the following levels: + +- On MPD level in **MPD.BaseURL** element. For details refer to section 8.4.1. +- On Period level in **Period.BaseURL** element. For details refer to section 8.4.2. +- On Adaptation Set level in **AdaptationSet.BaseURL** element. For details refer to section 8.4.3.3. +- On Representation level in **Representation.BaseURL**. For details refer to section 8.4.3.4. + +### 8.7.3 Alternative base URLs + +If alternative base URLs are provided through the **BaseURL** element at any level, identical Segments shall be accessible at multiple locations. In the absence of other criteria, the DASH Client may use the first **BaseURL** element as “base URI”. The DASH Client may use base URLs provided in the **BaseURL** element as “base URI” and may implement any suitable algorithm to determine which URLs it uses for requests. + +# 9 DASH - Usage of 3GPP File Format + +## 9.1 Introduction + +3GPP Dynamic Adaptive Streaming over HTTP uses many elements of fragmented 3GP files to define the Segment formats. This provides Segments according to the requirements defined in clause 8.4.4.1 and enables reuse of existing content, easy encoding and recording, etc. This clause introduces how to use the 3GPP file format as specified in TS 26.244 [4] for DASH Segment formats. + +## 9.2 Segment Types and Formats + +### 9.2.1 Introduction + +3GP-DASH defines a Segment format that is used in the delivery of media data over HTTP. A Segment shall contain one or more boxes in accordance with the boxed structure of the ISO-base media file format [11]. + +For 3GP-DASH the following applies: + +- In all cases for which a Representation contains more than one Media Segment, the following applies: + - The Initialization Segment as defined in clause 9.2.2 shall be present. The Initialization Segment shall be available for the 3GP-DASH client before any Media Segment is processed within the Representation. + - Media Segments shall not be self-initializing. The Media Segment format is defined in clause 9.2.3. +- In case a Representation contains only a single Media Segment, then either one of the following two options is used: + - 1) An Initialization Segment as defined in clause 9.2.2 and one Media Segment as defined in clause 9.2.3. + - 2) One Self-Initializing Media Segment as defined in clause 9.2.4. + +### 9.2.2 Initialization Segment + +The Initialization Segment is conformant with the 3GPP file format, adaptive streaming profile and shall carry “3gh9” as compatibility brand. + +The Initialization Segment consists of the “ftyp” box, the “moov” box, and optionally the “pdin” box. The “moov” box shall not contain any samples (i.e. the entry\_count in the “stts”, “stsc”, and “stco” boxes shall be set to 0) and is then very small in size. This reduces the start-up time significantly as the Initialization Segment needs to be downloaded before any Media Segment can be processed. + +The “mvex” box shall be contained in the “moov” box to indicate that the client has to expect movie fragments. The “mvex” box also sets default values for the tracks and samples of the following movie fragments. + +The Initialization Segment provides the client with the metadata that describes the media content. The client uses the information in the “moov” box to identify the available media components and their characteristics. + +The Initialization Segment shall not contain any “moof” or “mdat” boxes. + +### 9.2.3 Media Segment + +#### 9.2.3.1 General + +A Media Segment contains and encapsulates media streams that are either described within this Media Segment or described by the Initialization Segment of this Representation or both. + +In addition, a Media Segment + +1. shall contain a number of complete access units. +2. should contain at least one Stream Access Point (SAP) for each contained media stream. +3. should provide information on how to access the Media Presentation within this Segment, e.g. exact presentation time and an index. There is no requirement that a Media Segment starts with a SAP, but it is possible to signal in the MPD that all media streams in a Segments within a Representation start with a SAP. +4. if it is the first Media Segment in the Representation, it shall contain only media streams that start with a SAP of type 1 or 2. +5. shall contain sufficient information to time-accurately present each contained media component in the Representation without accessing any previous Media Segment in this Representation provided that the Media Segment contains a SAP for each media stream. The time-accuracy enables a client to seamlessly switch Representations and jointly present multiple Representations. +6. may be divided into Subsegments by a Segment Index as defined in 9.2.3.2. +7. shall specify all Media Presentation times relative to the start of the Period and compensated with the value of the @presentationTimeOffset. The presentation time in Media Segments shall be accurate to ensure accurate alignment of all Representations in one Period. For more details refer to 9.4.1.1. + +#### 9.2.3.2 Subsegments and Segment Index + +Media Segments may contain multiple Subsegments. Each Subsegment shall contain a number of complete access units. There may also be media-format-specific restrictions on Subsegment boundaries. If a Segment is divided into multiple Subsegments this division is described by a compact Segment index, which provides the presentation time range in the Representation and corresponding byte range in the Segment occupied by each Subsegment for one or more media streams. Clients may download this index in advance and then issue requests for individual Subsegments. + +In addition, the Segment Index provides timing and stream access information. This includes the earliest presentation time of access units in each Subsegment of an indexed media stream and the presentation time of the first SAP, if present. + +If a Segment Index is present for at least one media stream, then for any media stream for which no Segment Index is present, referred to as non-indexed stream, the following applies: + +- every access unit of the non-indexed streams shall be a SAP of type 1. +- for each Subsegment, every non-indexed stream must contain exactly one access unit within the Subsegment with presentation time less than or equal to the earliest presentation time of the Subsegment + +When multiple media streams are indexed in a single index file, the corresponding Segment Index for different media streams should index the same number of Subsegments. + +If no Segment Index is provided for a Media Segment, then the Media Segment constitutes one Subsegment. + +A Subsegment may itself be further subdivided using further Segment Index boxes. If a Subsegment only contains media data but no Segment Index, it is referred to as Media Subsegment. + +1) The Segment Index may contain additional Subsegment indexing information for accessing different levels of Subsegments in a Media Subsegment. For more details refer to clause 9.2.3.3. + +A generic mechanism for indexing of Media Segments is provided by the Segment Index ('sidx') box in TS26.244 [4]. In this case, + +- the earliest presentation time of a Subsegment is documented in the `earliest_presentation_time` field. +- the byte range is document by the `first_offset` field and the `reference_size` field. If two Segment Index boxes document the same byte range, then the value of their `first_offset` field and their `reference_size` field shall be identical. + +#### 9.2.3.3 Subsegment Index + +Media Subsegments may be indexed further to enable accessing different levels of Subsegments in a Media Subsegment. This Subsegment Index may also be provided in separate Index Segments together with the Segment Index. + +A generic syntax and semantic for Subsegment indexing is provided by the Subsegment Index ('ssix') in Annex G.3. + +#### 9.2.3.4 3GP-DASH Media Segment Format + +A Media Segment conforming to the Media Segment Format for 3GP DASH shall carry '3gmA' as a compatible brand and is defined as follows: + +- Each Media Segment may contain an 'styp' box. +- If the Media Segment is the last media Segment in the Representation, the 'styp' box may carry 'lmsg' as a compatible brand. +- Each Media Segment shall contain one or more whole self-contained movie fragments. A whole, self-contained movie fragment is a movie fragment ('moof') box and a media data ('mdat') box that contains all the media samples that do not use external data references referenced by the track runs in the movie fragment box. +- Each 'moof' box shall contain at least one track fragment. +- The 'moof' boxes shall use movie-fragment relative addressing and the flag 'default-base-is-moof' shall also be set. Absolute byte-offsets shall not be used. In a movie fragment, the durations by which each track extends should be as close to equal as practical. In particular, as movie fragments are accumulated, the track durations should remain close to each other and there should be no 'drift'. +- Each 'traf' box shall contain a 'tfdt' box. +- The track fragment adjustment box 'tfad' as defined in 3GPP TS26.244 [4] may also be present to maintain compatibility with earlier releases of this specification; care should be taken that the alignment established by the 'tfdt' and the time-shifting implied by the 'tfad' not be both applied, which would result in a double correction. +- Each Media Segment may contain one or more 'sidx' boxes. If present, the first 'sidx' box shall be placed before any 'moof' box and the subsegment documented by the first Segment Index ('sidx') box shall be the entire Segment, i.e. the entire Segment shall be document by the first Segment Index ('sidx') box. + +- A media Segment may contain a Subsegment Index box ('ssix'). If present it shall follow immediately after the 'sidx' box that documents the same subsegment. This immediately preceding 'sidx' shall only index subsegments. +- Further rules on media Segments in combination with certain MPD attributes are provided in clause 9.4. + +### 9.2.4 Self-Initializing Media Segment + +A Self-Initializing Media Segment conforms to the concatenation of an Initialization Segment as defined in 9.2.2 and a Media Segment as defined in 9.2.3. + +### 9.2.5 Media Stream and Segment Properties + +#### 9.2.5.1 Media Stream Access Points + +To be able to access a Representation, each of the media streams that are contained in the Representation requires Media Stream Access Points (SAPs). Annex G.6 defines different types of SAPs that provide a relationship between the position where a stream can be accessed, a SAP, relative to the start of a Segment or Subsegment, its presentation time and the presentation times and position of other access unit in the stream. + +A SAP is a position in a Representation that enables playback of a media stream to be started using only the information contained in Representation data starting from that position onwards (preceded by initializing data in the Initialization Segment, if any). + +For each SAP the properties, $I_{SAP}$ , $T_{SAP}$ , $I_{SAU}$ , $T_{DEC}$ , $T_{EPT}$ , and $T_{PTF}$ are identified and defined in Annex G.6.2. + +In particular, $T_{SAP}$ is defined to be earliest presentation time of any access unit of the media stream such that all access units of the media stream with presentation time greater than or equal to $T_{SAP}$ can be correctly decoded using data in the Representation starting at byte position $I_{SAP}$ and no data before $I_{SAP}$ . + +#### 9.2.5.2 Non-overlapping Segments and Subsegments + +Segments and Subsegments represent units for which the client has an exact map on how to access and download the unit using HTTP GET or HTTP partial GET methods. + +Segments (respectively Subsegments) are typically generated by segmenting encoded media streams into appropriate units. If the generation of Segments (respectively Subsegments) adheres to certain rules, then the sequential decoding and presentation of Media Segments (respectively Subsegments) results in a correct presentation of all contained media streams. To define such rules the notion of "non-overlapping" Segments (respectively Subsegments) is defined as follows. + +Let + +- $T_E(S,i)$ be the earliest presentation time of any access unit in stream $i$ of a Segment or Subsegment $S$ , +- $T_L(S,i)$ be the latest presentation time of any access unit in stream $i$ of a Segment or Subsegment $S$ . + +Then two Segments (respectively Subsegments), $A$ and $B$ , which may or may not be of different Representations, are *non-overlapping* if $T_L(A,i) < T_E(B,i)$ for all media streams $i$ in $A$ and $B$ or if $T_L(B,i) < T_E(A,i)$ for all streams $i$ in $A$ and $B$ where $i$ refers to the same media component. + +The property of "non-overlapping" Segments (respectively Subsegments) is used to define the terms Segment alignment and Subsegment alignment. + +#### 9.2.5.3 Bitstream concatenation + +A sequence of Segments (respectively Subsegments) is a "conforming Segment (respectively Subsegment) sequence" if the concatenation of all Segments (respectively Subsegments) in the sequence of Segments (respectively Subsegments) results in a bitstream that conforms to the media formats in use (including container and codecs). + +NOTE This implies that a player conforming to the media format can play the resulting bitstream. + +## 9.3 Usage on Server and Client + +3GP-DASH uses 3GP files according to the 3GP Adaptive-Streaming profile as specified in TS 26.244 [4]. Content may be prepared as 3GP files according to the 3GP Adaptive-Streaming profile. Initialization Segments and Media Segments may be generated by segmenting such 3GP files. Segment Index 'sidx' boxes may be pre-contained in 3GP files or may be generated during the segmentation process. Clients may store a concatenation of a received Initialization Segment and a sequence of Media Segments from the same Representation to create a compliant 3GP file according to the Adaptive Streaming profile without accessing any media samples. + +NOTE: As specified in TS 26.244, the MPD may be linked or embedded in the 'meta' box of the 'moov' box. This enables clients to access the MPD from a 3GP file that was made available from other means than 3GP-DASH (e.g. progressive download). + +## 9.4 Segment Properties with MPD constraints + +### 9.4.1 General + +#### 9.4.1.1 Introduction + +The content, especially the Segments across Representations at the same media time may have been prepared in a joint or at least coordinated manner. To expose these properties to the client, certain flags in the MPD can be set to true to indicate such coordinated content preparation. Clients consuming 3GP-DASH formatted media presentations may benefit from properly authored content when switching between or presenting Representations. + +#### 9.4.1.2 Media Presentation Timeline + +One of the key features in DASH is that encoded versions of different media components share a common timeline. The presentation time of access unit within the media content is mapped to the global common presentation timeline for synchronization of different media components and to enable seamless switching of different coded versions of the same media components. + +The presentation times within each Period are relative to the *PeriodStart* time of the Period minus the value of the `@presentationTimeOffset`, $T_0$ , of the containing Representation. This means for an access unit with a presentation time $T_p$ signalled in the media stream, the Media Presentation time relative to the *PeriodStart* is $T_M = T_p - T_0$ . + +Media Segments should not contain any presentation time $T_p$ that is smaller than the value of the `@presentationTimeOffset`, $T_0$ . However, if this is the case, then presentation of the Media Segment is expected to only take place for presentation times greater than or equal to $T_0$ . + +The MPD start times as defined in 8.4.4.3.3 shall provide an approximation of the Media Presentation time $T_M$ within the Period. Specifically, the MPD start time shall be drift-free relative to the presentation time $T_p$ signalled in the media stream, i.e. the accuracy of the offset of the MPD start time relative to the presentation time does not depend on the position of the Segment in the Representation. + +NOTE: At the start of a new Period, the playout procedure of the media content components may need to be adjusted at the end of the preceding Period to match the *PeriodStart* time of the new Period as there may be small overlaps or gaps with a Representation at the end of the preceding Period. Overlaps (respectively gaps) may result from Media Segments with actual presentation duration of the media stream longer (respectively shorter) than indicated by the Period duration. Also in the beginning of a Period if the earliest presentation time $T_p$ of any access unit of a Representation is larger than 0 then the playout procedures need to be adjusted accordingly. + +For the case when `MPD@type` is "dynamic" and the attribute `MPD@suggestedPresentationDelay` is present, then the sum of value of the the `MPD@availabilityStartTime`, the *PeriodStart* value, the presentation time within the Period of an access unit, $T_M$ , and the value of the the attribute `MPD@suggestedPresentationDelay` provides a mapping of the presentation time of each access unit to the wall-clock time, for example to express synchronization with a content internal time or for other reasons to enable synchronization of presentation to the wall-clock. + +For the Segment formats as defined in section 9.2.3.4, the presentation time $T_p$ internal in the media that maps the media to the Media Presentation timeline shall be relative to the movie timeline, i.e. they are composition times after the application of any edit list for the track. + +It is recommended that the `@timescale` attribute in the MPD matches the `timescale` field in the Media Header Box of a present track. If the Segment Index ('`sidx`') box is present, then it is further recommended that the track for which the Segment Index ('`sidx`') box that appears first in the Media Segment is the track defining the value of the `@timescale` attribute. + +#### 9.4.1.3 Segment Index + +If a Segment Index is present in a Media Segment of one Representation within an Adaptation Set, then the following shall hold: + +- the order of Segment Index boxes for multiple media streams induces an ordering on the media content components equal to the order in which a Segment Index box for a media stream for each component first appears. This ordering shall be the same for all Segments of all Representations of an Adaptation Set. As a consequence, if there is a Segment Index for a media content component in one Segment there shall be a Segment Index for that media component in all Segments in this Adaptation Set. +- non-indexed media streams in all Representations of an Adaptation Set shall have the same access unit duration. + +### 9.4.2 Segment Alignment + +No additional requirements beyond those stated in section 8.4.3.3 are defined. + +### 9.4.3 Bitstream Switching + +If the `@bitstreamSwitching` is set to 'true' for a set of Representations within an Adaptation Set, the conditions stated in section 8.4.3.3 shall be satisfied. + +As a consequence of `@bitstreamSwitching` being set to 'true', the following conditions are satisfied: + +- The track IDs for the same media content component are identical for each Representation in each Adaptation Set. +- The conditions required for setting the `@segmentAlignment` attribute to a value other than 'false' for the Adaptation Set are fulfilled. +- The conditions required for setting (i) the `@startWithSAP` attribute to 2 for the Adaptation Set, or (ii) the conditions required for all Representations within the Adaptation Set to share the same value of `@mediaStreamStructureId` and setting the `@startWithSAP` attribute to 3 for the Adaptation Set, are fulfilled. + +### 9.4.4 Sub-Representation + +If a **SubRepresentation** element is present in a Representation in the MPD and the **SubRepresentation@level** is present, then the media Segments in this Representation shall include a Segment Index ('`sidx`') box and the Initialization Segment shall contain the Level Assignment ('`leva`') box. + +The attribute `@level` specifies the level to which the described Sub-Representation is associated in the Subsegment Index. Level $n$ corresponds to the $n$ -th level in the Subsegment Index. The information in Representation, Sub-Representation and in the Level Assignment ('`leva`') box contains information on the assignment of media data to levels. + +Media data should be ordered such that each higher value for `@level` provides an enhancement compared to any lower value of `@level`. + +For temporal level assignment, the sample grouping 'tele' as defined in clause G.4, shall be used. + +# 10 QoE for Progressive Download and DASH + +## 10.1 General + +A progressive download or 3GP-DASH client supporting Quality of Experience (QoE) shall report QoE metrics according to the QoE configuration. QoE reporting is optional, but if a 3GP-DASH client reports DASH metrics, it shall report all requested metrics. + +The quality metrics are defined in subclause 10.2. + +The quality metrics applicable for progressive download are specified in section 10.3. In this case the activation and configuration of QoE reporting framework is achieved by a corresponding OMA DM QoE Management Object as specified in Annex F. + +The quality metrics for DASH are specified in section 10.4. In this case, QoE reporting may be triggered using the MPD ( i.e. when the **Metrics** element is present in the MPD) or using OMA DM QoE Management Object as specified in Annex F. When QoE reporting is triggered via the MPD or OMA DM QoE Management Object, the 3GP-DASH client is expected to collect quality metrics according to the QoE configuration. When using the MPD, the Quality Reporting scheme as defined in section 10.5 may be used. + +The quality metric reporting protocol is defined in subclause 10.6. This protocol shall be used when QoE reporting is triggered via the MPD or OMA DM QoE Management Object. + +## 10.2 QoE Metric Definitions + +### 10.2.1 Introduction + +This section provides the general QoE metric definitions and measurement framework. + +The semantics are defined using an abstract syntax. Section 10.6 provides a mapping to an XML schema. Items in this abstract syntax have one of the following primitive types (`Integer`, `Real`, `Boolean`, `Enum`, `String`) or one of the following compound types: + +- `Objects`: an unordered sequence of (`key`, `value`) pairs, where the key always has string type and is unique within the sequence. +- `List`: a ordered list of items. +- `Set`: an unordered set of items. + +Additionally, there are two kinds of timestamp defined, i.e. *real time* (wall-clock time) and *media time*. + +### 10.2.2 HTTP Request/Response Transactions + +Table 25 contains the metric defining the List of HTTP Request/Response Transactions. + +**Table 25: List of HTTP Request/Response Transactions** + +| Key | Type | Description | +|--------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| HttpList | List | List of HTTP request/response transactions | +| Entry | Object | An entry for a single HTTP request/response | +| tcpid | Integer | Identifier of the TCP connection on which the HTTP request was sent. | +| type | Enum | This is an optional parameter and should not be included in HTTP request/response transactions for progressive download.
The type of the request:
- MPD
- MPD delta file
- XLink expansion
- Initialization Segment
- Index Segment
- Media Segment | +| url | String | The original URL (before any redirects or failures) | +| actualurl | String | The actual URL requested, if different from above | +| range | String | The contents of the byte-range-spec part of the HTTP Range header. | +| trequest | Real Time | The real time at which the request was sent. | +| tresponse | Real Time | The real time at which the first byte of the response was received. | +| responsecode | Integer | The HTTP response code. | +| interval | Integer | The duration of the throughput trace intervals (ms), for successful requests only. | +| Trace | List | Throughput trace, for successful requests only. | +| Entry | Object | A single throughput measurement entry. | +| s | Real Time | Measurement period start. | +| d | Integer | Measurement period duration (ms). | +| b | List | List of integers counting the bytes received in each trace interval within the measurement period. | + +###### **NOTE:** + +- 1) Information additional to that specified in the `type` may be returned, for example if a client makes a request for a initialization information from a self-initializing Media Segment then index information may also be received. +- 2) All entries for a given object will have the same `url` and `range` and so can easily be correlated. If there were redirects or failures there will be one entry for each redirect/failure. The redirect-to URL or alternative URL (where multiple have been provided in the MPD) will appear as the `actualurl` of the next entry with the same `url` value. +- 3) The periods reported in `Entry` should be those periods where the client was actively reading from the TCP connections (i.e. they should not include periods where the TCP connection is idle due to zero receive window). + +The end of the last measurement period reported in the `Trace` shall be the time at which the last byte of the response was received. + +The `interval` and `Trace` shall be absent for redirect and failure records. + +The key `HttpList (n, type)` where `n` is a positive integer is defined for an `HttpList` with an `interval` of `n` ms and `type` is one of `MPD`, `MPDDeltaFile`, `XLinkExpansion`, `InitializationSegment`, `MediaSegment`, or `IndexSegment`. If `type` is not present, all HTTP transactions are requested to be collected. If `type` is present, it specifies that the HTTP transactions concerning a resource equal to `type` are requested to be collected. Multiple keys `HttpList (n, type)` with different values of `n` and `type` may be present for a single `@metrics` attribute value. + +An HTTP transaction that is not finished within a QoE metric collection period shall not be included in the reported metrics. + +### 10.2.3 Representation Switch Events + +Table 26 defines the metric to report a list of representation switch events. + +**Table 26: List of Representation Switch Events** + +| Key | | Type | Description | +|---------------|-----|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| +| RepSwitchList | | List | List of representation switch events (a switch event is the time at which the first HTTP request for a new representation, that is later presented, is sent) | +| Entry | | Object | A representation switch event. | +| | t | Real Time | Time of the switch event. | +| | mt | Media Time | The media time of the earliest media sample (out of all media components) played out from the "to" representation. | +| | to | String | Value of Representation@id identifying the switch-to representation. | +| | Lto | Integer | If present, value of SubRepresentation@level within Representation identifying the switch-to level of the Representation | + +### 10.2.4 Average Throughput + +This metric in Table 27 indicates the average throughput that is observed by the client during the measurement interval. + +**Table 27: Average Throughput** + +| Key | | Type | Description | +|---------------|----------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| AvgThroughput | | Object | Average throughput that is observed by the client during the measurement interval | +| | numbytes | Integer | The total number of the content bytes, i.e. the total number of bytes in the body of the HTTP responses, received during the measurement interval. | +| | activitytime | Integer | The activity time during the measurement interval in milliseconds. The activity time during the measurement interval is the time during which at least one GET request is still not completed (i.e. excluding inactivity time during the measurement interval). | +| | t | Real Time | The real time of the start of the measurement interval | +| | duration | Integer | The time in milliseconds of the measurement interval | +| | accessbearer | String | Access bearer for the TCP connection for which the average throughput is reported | +| | inactivitytype | Enum | Type of the inactivity, if known and consistent throughout the reporting period:
User request (e.g. pause)
Client measure to control the buffer
Error case | + +If the client requests the media Segments from the server separately over multiple non-competing parallel TCP connections established over separate access network bearers named as *accessbearer*, then the average throughput values should be reported as a list of events with average throughput for each access network and associated access network bearer information reported separately, following the same guidelines as described above. + +### 10.2.5 Initial Playout Delay + +This metric in Table 28 signals the initial playout delay at the start of the streaming of the presentation. + +**Table 28: Initial Playout Delay** + +| Key | Type | Description | +|---------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| InitialPlayoutDelay | Integer | The initial playout delay is measured as the time in milliseconds from the fetch of the first media Segment (or sub-segment) and the time at which media is retrieved from the client buffer. | + +### 10.2.6 Buffer Level + +Table 29 defines the metric to report a list of buffer level status events. + +**Table 29: List of Buffer Level** + +| Key | | Type | Description | +|-------------|-------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BufferLevel | | List | List of buffer occupancy level measurements during playout at normal speed. | +| | Entry | Object | One buffer level measurement. | +| | t | Real Time | Time of the measurement of the buffer level. | +| | level | Integer | Level of the buffer in milliseconds. Indicates the playout duration for which media data of all active media components is available starting from the current playout time. | + +The key is `BufferLevel (n)` , where *n* is a positive integer is defined to refer to the metric in which the buffer level is recorded every *n* ms. + +### 10.2.7 Play List + +Decoded samples are generally rendered in presentation time sequence, each at or close to its specified presentation time. A compact representation of the information flow can thus be constructed from a list of time periods during which samples of a single representation were continuously rendered, such that each was presented at its specified presentation time to some specific level of accuracy (e.g. +/-10 ms). + +Such a sequence of periods of continuous delivery is started by a user action that requests playout to begin at a specified media time (this could be a “play”, “seek” or “resume” action) and continues until playout stops either due to a user action, the end of the content, or a permanent failure. + +Table 30 defines the play list event metric. + +**Table 30: Play List** + +| Key | | Type | Description | +|-------------------|--|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| PlayList | | List | A list of playback periods. A playback period is the time interval between a user action and whichever occurs soonest of the next user action, the end of playback or a failure that stops playback. | +| Entry | | Object | A record of a single playback period. | +| start | | Real Time | Timestamp of the user action that starts the playback period. | +| mstart | | Media Time | The presentation time at which playout was requested by the user action. | +| starttype | | Enum | Type of user action which triggered playout
- New playout request (e.g. initial playout or seeking)
- Resume from pause
- Other user request (e.g. user-requested quality change)
- Start of a metrics collection period (hence earlier entries in the play list not collected) | +| Trace | | List | List of periods of continuous rendering of decoded samples. | +| Traceentry | | Objects | Single entry in the list. | +| representationid | | String | The value of Representation@id from which the samples were taken.
This is an optional parameter and should not be reported in case of progressive download. | +| subreplevel | | Integer | If not present, this metric concerns the Representation as a whole. If present, subreplevel indicates the greatest value of any SubRepresentation@level being rendered.
This is an optional parameter and should not be reported in case of progressive download. | +| start | | Real Time | The time at which the first sample was rendered. | +| sstart | | Media Time | The presentation time of the first sample rendered. | +| duration | | Integer | The duration of the continuously presented samples (which is the same in real time and media time).
“Continuously presented” means that the media clock continued to advance at the playout speed throughout the interval. | +| playbackspeed | | Real | The playback speed relative to normal playback speed (i.e. normal forward playback speed is 1.0). | +| stopreason | | Enum | The reason why continuous presentation of this representation was stopped. Either:
- representation switch (not relevant in case of progressive download)
- rebuffering
- user request
- end of period
- end of content
- end of a metrics collection period
- failure
- other | +| stopreasonother | | String | The stopreasonother attribute shall be included only if stopreason attribute is included and has the enum value other . In this release of the specification, the sender of this string shall set its value to one of the following:
- switch from unicast to broadcast
- switch from broadcast to unicast
The receiver of this attribute shall ignore this attribute if its string is set to different value than the values listed above. | + +NOTE: The trace may include entries for different representations that overlap in time, because multiple representations are being rendered simultaneously, for example one audio and one video representation. + +### 10.2.8 MPD Information + +This metric can be used to report Representation information from the MPD, so that reporting servers without direct access to the MPD can understand the used media characteristics. + +The metric is reported whenever the client sends any other quality metrics report containing references to a Representation which MPD information has still not been reported. + +Table 31 defines the MPD information for quality reporting. + +**Table 31: MPD Information for Quality Reporting** + +| Key | Type | Description | +|------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| MPDInformation | Object | | +| representationid | String | Value of Representation @id for the representation addressed by the QoE metrics report. | +| subreplevel | Integer | If present, value of SubRepresentation @level for the subrepresentation addressed by the QoE metrics report. If not present, the QoE metrics report concerns the representation as a whole. | +| Mpdinfo | RepresentationType | Provides the MPD information for the representation or subrepresentation identified by representationid and subreplevel, if present. The following attributes and elements shall be present within mpdinfo if they are present for the identified representation or subrepresentation and their values shall be identical to those presented in the MPD: @bandwidth, @qualityRanking, @width, @height, @mimeTypes, and @codecs. | + +## 10.3 Quality Metrics for Progressive Download + +The following metrics shall be supported by progressive download clients supporting the QoE reporting feature: + +- List of HTTP Request/Response Transactions (Section 10.2.2), +- Average Throughput (Section 10.2.4), +- Initial Playout Delay (Section 10.2.5), +- Buffer Level (Section 10.2.6), +- Play List (Section 10.2.7). + +## 10.4 Quality Metrics for DASH + +The following metrics shall be supported by 3GP-DASH clients supporting the QoE reporting feature: + +- List of HTTP Request/Response Transactions (Section 10.2.2), +- List of Representation Switch Events (Section 10.2.3), +- Average Throughput (Section 10.2.4), +- Initial Playout Delay (Section 10.2.5), +- Buffer Level (Section 10.2.6), +- Play List (Section 10.2.7), and +- MPD Information (Section 10.2.8). + +The @metrics attribute contains a list of quality metric keys listing all metrics that the DASH shall collect and report. + +The semantics of the attributes within the **Metrics** element are provided in Table 32. The XML-syntax of a **Metrics** element is provided in Table 33. + +**Table 32: Semantics of Metrics element** + +| Element or Attribute Name | Use | Description | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Metrics | | DASH metric element | +| @metrics | M | This attribute lists all quality metrics (as a list of quality metric keys as defined in section 10.2, separated by a whitespace) that the client shall report. Certain keys allow specifying a measurement interval or period over which a single value of the metric is derived and potentially also other parameters controlling the collection of the metrics. The parameters, if any, are included in parenthesis after the key and their semantics are specified in clause 10.2 with the metric definition itself. | +| Range | 0..N | When specified, it indicates the time period during which quality metric collection is requested. When not present, quality metric collection is requested for the whole duration of the content. | +| @starttime | O | When specified, it indicates the start time of the quality metric collection operation. When not present, quality metric collection is requested from the beginning of content consumption. For services with MPD @type "Live", the start time of quality metric collection can be obtained in wallclock time by adding the value of this attribute indicated in media time to the value of the MPD @availabilityStartTime attribute. For services with MPD @type "OnDemand", the start time is indicated in media time and is relative to the PeriodStart time of the first period in this MPD . | +| @duration | O | When specified, it indicates the duration of the quality metric collection interval. The value of this attribute is expressed in media time. | +| Reporting | 1...N | Descriptor that provides information about the requested Quality Reporting method and formats. See clause 10.6 for the 3GP-DASH quality reporting schemes. | +| Legend:
For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory.
For elements: ... (N=unbounded)
Elements are bold ; attributes are non-bold and preceded with an @. | | | + +**Table 33: XML-Syntax of Metrics element** + +``` + + + + + + + + + + + + + + + + + + + + + +``` + +## 10.5 Quality Reporting Scheme for DASH + +This section specifies a 3GP-DASH quality reporting scheme. + +The quality reporting scheme is signaled using in the **Reporting** element in the **Metrics** element. The URN to be used for the **Reporting**@schemeIdUri shall be "urn:3GPP:ns:PSS:DASH:QM10". + +The reporting scheme shall use the quality reporting protocol defined in section 10.6. + +The semantics and XML syntax of the scheme information for the 3GP-DASH quality reporting scheme are specified in Table 34 and Table 35, respectively. + +**Table 34: Semantics of Quality Reporting Scheme Information** + +| Element or Attribute Name | Use | Description | +|---------------------------|-----|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| @apn | O | This attribute gives the access point that should be used for sending the QoE reports. | +| @format | O | This field gives the requested format for the reports. Possible formats are: "uncompressed" and "gzip". | +| @samplepercentage | O | Percentage of the clients that should report QoE. The client uses a random number generator with the given percentage to find out if the client should report or not. | +| @reportingserver | M | The reporting server URL to which the reports will be sent. | +| @reportinginterval | O | Indicates the time(s) reports should be sent. If not present, then the client should send a report after the streaming session has ended. If present, @reportingInterval=n indicates that the client should send a report every n-th second provided that new metrics information has become available since the previous report. | + +**Legend:** +For attributes: M=Mandatory, O=Optional, OD=Optional with Default Value, CM=Conditionally Mandatory. +For elements: ... (N=unbounded) +Elements are **bold**; attributes are non-bold and preceded with an @ + +**Table 35: Syntax of Quality Reporting Scheme Information** + +``` + + + + + 3GPP DASH Quality Reporting + + This Schema defines the quality reporting scheme information for 3GPP DASH. + + + + + + + + + + + + + + + + + + + + + +``` + +## 10.6 Quality Reporting Protocol + +### 10.6.1 General + +The quality reporting protocol consists of: + +- The XML-based report format defined in section 10.6.2 +- The reporting protocol defined in section 10.6.3 + +The MIME type of an XML-formatted QoE report shall be “application/3gpdash-qoe-report+xml” as defined in Annex J. + +### 10.6.2 Report Format + +The QoE report is formatted as an XML document that complies with the following XML schema: + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + +``` + +### 10.6.3 Reporting Protocols + +If a specific metrics server has been configured, the client shall send QoE reports using the HTTP (RFC 2616) [9] POST request carrying XML formatted metadata in its body. + +An example QoE reporting based on HTTP POST request signalling is shown below: + +``` + +POST http://www.exampleserver.com HTTP/1.1 +Host: 192.68.1.1 +User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0) +Content-Type: text/xml; charset=utf-8 +Content-Length: 4408 + + + + + + + + + + + + + + + + + + + + + 10000 + + + + + + + + + + + + + + + + + +``` + +``` + + +``` + +# Annex A (informative): Example DASH Client Behaviour + +## A.1 Introduction + +The information on client behaviour is purely informative and does not imply any normative procedures on DASH client implementations. + +## A.2 Overview + +A 3GP-DASH client is guided by the information provided in the MPD. This example assumes that the **MPD@type** is 'dynamic'. The behaviour in case **MPD@type** being 'static' is basically a subset of the description here. + +The description in this Annex assumes that the client has access to the MPD at time *FetchTime*, at its initial location if no **MPD.Location** element is present, or at a location specified in any present **MPD.Location** element. *FetchTime* is defined at the client as the time at which the server processes the request for the MPD, but should take into account delay due to MPD delivery and processing. The fetch is considered successful either if the client obtains an updated MPD or the client verifies that the MPD has not been updated since the previous fetching. + +The following example client behaviour is expected to provide a continuous streaming service to the user: + +- 1) The client parses the MPD, selects a set of Adaptation Sets suitable for its environment based on information provided in each of the **AdaptationSet** elements. The selection of Adaptation Sets may also take into account information provided by the **AdaptationSet@group** attribute. +- 2) Within each Adaptation Set the client selects one specific Representation, typically based on the value of the **@bandwidth** attribute, but also taking into account client decoding and rendering capabilities. Then it creates a list of accessible Segments for each Representation for the actual client-local time *NOW* measured in wall-clock time taking into account the procedures introduced in clause A.3. +- 3) The client accesses the content by requesting Segments or byte ranges of Segments. The client requests the Media Segments of the selected Representations by using the generated Segment list. +- 4) The client buffers media of for at least value of **@minBufferTime** attribute duration before starting the presentation. Then, once identified a Stream Access Point (SAP) for each of the media streams in the different Representations, it starts rendering (in wall-clock-time) of this SAP not before **MPD@availabilityStartTime** + *PeriodStart* + *TSAP* and not after **MPD@availabilityStartTime** + *PeriodStart* + *TSAP* + **@timeShiftBufferDepth** provided the observed throughput remains at or above the sum of the **@bandwidth** attributes of the selected Representations (if not, longer buffering may be needed). For services with **MPD@type**='dynamic', rendering the SAP at the sum of *PeriodStart* + *TSAP* and the value of **MPD@suggestedPresentationDelay** is recommended, especially if synchronized play-out with other devices adhering to the same rule is desired. +- 5) Once the presentation has started, the client continues consuming the media content by continuously requesting Media Segments or parts of Media Segments. The client may switch Representations taking into account updated MPD information and/or updated information from its environment, e.g. change of observed throughout. With any request for a Media Segment containing a Stream Access Point, the client may switch to a different Representation. Seamless switching can be achieved as the different Representations are time-aligned. Advantageous switching points are announced in the MPD and/or in the Segment Index, if provided. +- 6) With the wall-clock time *NOW* advancing, the client consumes the available Segments. As *NOW* advances the client possibly expands the list of available Segments for each Representation according to the procedures specified in clause A.3. If the following conditions are both true, an updated MPD should be fetched: + - a) if the attribute **MPD@minimumUpdatePeriod** is present and + - b) the current playback time gets within a threshold (typically described by at least the sum of the value of the **@minBufferTime** attribute and the value of the **@duration** attribute on Representation level) of the media described in the MPD for any consuming or to be consumed Representation. + +- 7) If the clauses in 6) are true, the client should fetch a new MPD and update fetch time *FetchTime*. Once received the client now takes into account the possibly updated MPD and the new *FetchTime* in the generation of the accessible Segment Lists. + +In the following a brief overview on Segment list generation, seeking, support for trick modes and switching Representations are provided. + +## A.3 Segment List Generation + +### A.3.1 General + +Assume that the 3GP-DASH client has access to an MPD. This clause describes how a client may generate a Segment list for one Representation as shown in Table A.1 from an MPD obtained at *FetchTime* at a specific client-local time *NOW*. In this description, the term *NOW* is used to refer to “the current value of the clock at the reference client when performing the construction of an MPD Instance from an MPD”. A client that is not synchronised with a DASH server, which is in turn is expected to be synchronised to UTC, may experience issues in accessing Segments as the Segment availability times provided by the server and the local time *NOW* may not be synchronized. Therefore, 3GP-DASH clients are expected to synchronize their clocks to a globally accurate time standard. + +**Table A.1: Segment List** + +| Parameter Name | Cardinality | Description | +|------------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| Segments | 1 | Provides the Segment URL list. | +| InitializationSegment | 0, 1 | Describes the Initialization Segment. If not present each Media Segment is self-initializing. | +| URL | 1 | The URL where to access the Initialization Segment (the client would restrict the URL with a byte range if one is provided in the MPD). | +| MediaSegment | 1 ... N | Describes the accessible Media Segments. | +| startTime | 1 | The MPD start time of the Media Segment in the Period relative to the start time of Period. | +| duration | 1 | The MPD duration for the Segment | +| URL | 1 | The URL where to access the Media Segment possibly combined with a byte range. | + +According to 8.4.4 there exist three different ways to describe and generate a Segment List. This description focusses on the first two where either a **SegmentList** element or a **SegmentTemplate** element is present. The case with a single Media Segment using **BaseURL** element and **SegmentBase** element is considered straightforward. + +Segments are available at its assigned URL if at wall-clock time *NOW* the Segment availability start time is smaller than or equal to *NOW* and the Segment availability end time is larger than or equal to *NOW*. + +Furthermore, assume that for a Representation in a Period, the Segment list is indexed with $i=1, \dots, N$ . + +Assume that for an MPD with fetch time *FetchTime* + +- the Period start time is provided as *PeriodStart* according to clause 8.4.2 for any Period in the MPD. +- the Period end time referred as *PeriodEnd* is determined as follows: For any Period in the MPD except for the last one, the *PeriodEnd* is obtained as the value of the *PeriodStart* of the next Period. For the last Period in the MPD: + - if the **MPD@minimumUpdatePeriod** attribute is not present, then *PeriodEnd* is defined as the end time of the Media Presentation, i.e. **MPD@availabilityStartTime** + **MPD@mediaPresentationDuration**. + - if the **MPD@minimumUpdatePeriod** attribute is present, then *PeriodEnd* is defined as the smaller value of *FetchTime* + **MPD@minimumUpdatePeriod** and **MPD@availabilityStartTime** + **MPD@mediaPresentationDuration**. + +The following applies for the MPD times: + +- the regular duration $d$ is obtained as $d = @duration/@timescale$ , + +- the MPD start time $\text{MediaSegment}[i].\text{startTime}$ is obtained as $(i-1)*d$ , +- the MPD duration $\text{MediaSegment}[i].\text{duration}$ is obtained as $d$ unless this Segment is the last Segment in this Period, then the $\text{MediaSegment}[i].\text{duration}$ is obtained as $\text{PeriodEnd} - \text{MediaSegment}.\text{StartTime}[i]$ . + +If the `@duration` is not provided, then + +- $N=1$ , +- $\text{MediaSegment}.\text{startTime}[1] = 0$ , +- $\text{MediaSegment}.\text{duration}[1] = \text{PeriodEnd} - \text{PeriodStart}$ , + +If the Representation contains or inherits a **SegmentList** element, providing a set of explicit URL(s) for Media Segments, then all $N$ Segment URLs are provided. + +### A.3.2 Template-based Generation of Media Segment List + +If the Representation contains or inherits a **SegmentTemplate** element, then the URL of the Media Segment $i$ , $\text{MediaSegment}.\text{URL}[i]$ , is obtained by replacing the `$Number$` identifier by $i + \text{@startNumber}$ in the **SegmentTemplate@media** string. + +### A.3.3 Playlist-based Generation of Media Segment List + +If the Representation contains or inherits a **SegmentList** element, providing a set of explicit URL(s) for Media Segments, then all $N$ Segment URLs are provided. + +### A.3.4 Media Segment List Restrictions + +The Media Segment List is restricted to a list of accessible Media Segments, which may be a subset of the Media Segments of the complete Media Presentation. The construction is governed by the current value of the clock at the client *NOW* which is greater than or equal to the *FetchTime* of the MPD. + +Segments may only be accessed during their Segment availability times. Generally, Segments are only available for any time *NOW* between `@availabilityStartTime` and `@availabilityEndTime`. For times *NOW* outside this window, no Segments are available. + +In addition, for services with **MPD@type='dynamic'**, the Segment availability start time $T_{\text{avail}}[i]$ for a Segment $i$ in a specific Period is determined as **MPD@availabilityStartTime** + *PeriodStart* + $\text{MediaSegment}[i].\text{startTime}$ + $\text{MediaSegment}[i].\text{duration}$ and the Segment availability end time is determined as **MPD@availabilityStartTime** + *PeriodStart* + $\text{MediaSegment}[i].\text{startTime}$ + `@timeshiftBufferDepth` + $2*\text{MediaSegment}[i].\text{duration}$ . + +In case of MPD updates, assume the variable *CheckTime* associated to an the MPD with *FetchTime* is defined as the sum of the fetch time of this operating MPD and the value of the attribute **MPD@minimumUpdatePeriod**, i.e. $\text{CheckTime} = \text{FetchTime} + \text{MPD}@\text{minimumUpdatePeriod}$ . The *CheckTime* is defined on the MPD-documented media time axis; when the client's playback time reaches $\text{CheckTime} - \text{MPD}@\text{minBufferTime}$ it should fetch a new MPD. + +Therefore, based on an MPD that was fetched at fetch time *FetchTime* and has associated a check time *CheckTime*, the largest index $i_{\max}$ that is accessible at time *NOW* for the last Period in the MPD is $i_{\max} = \max_i \{ T_{\text{avail}}[i] \leq \min(\text{CheckTime}, \text{NOW}) \}$ . + +## A.4 Seeking + +Assume that a client attempts to seek to a specific Media Presentation time $T_M$ in a Representation relative to the *PeriodStart* time. According to 9.4.1.2, the presentation times within each Period are relative to the *PeriodStart* time of the Period minus the value of the `@presentationTimeOffset`, $T_o$ , of the containing Representation. + +Based on the MPD, the client has access to the MPD start time and Media Segment URL of each Segment in the Representation. The Segment number of the Segment most likely to contain media samples for Media Presentation time + +$T_M$ is obtained as the maximum Segment index $i^*$ , for which the MPD start time $\text{MediaSegment}[i].\text{startTime}$ is smaller or equal to $T_M$ and the start of the retrieved Segment is always available. + +Note that timing information in the MPD may be approximate due to issues related to placement of Stream Access Points, alignment of media tracks and media timing drift. As a result, the Segment identified by the procedure above may begin at a time slightly after $t_p$ and the media data for presentation time $T_M$ may be in the previous Media Segment. In case of seeking, either the seek time may be updated to equal the first sample time of the retrieved file, or the preceeding file may be retrieved instead. However, note that during continuous playout, including cases where there is a switch between alternative versions, the media data for the time between $T_M$ and the start of the retrieved Segment is always available. + +For accurate seeking to a presentation time $T_M$ , the 3GP-DASH Client needs to access Stream Access Points (SAPs). To determine the SAPs in a Media Segment in case of 3GP-DASH, the client may, for example, use the information in the Segment Index if present to locate the Stream Access Points and the corresponding presentation time in the Media Presentation. In the case that a Segment is a 3GPP movie fragment, it is also possible for the client to use information within the 'moof' and 'mdat' boxes, for example, to locate SAPs and obtain the necessary presentation time from the information in the movie fragment and the Segment start time derived from the MPD. If no SAP with presentation time before the requested presentation time $T_M$ is available, the client may either access the previous Segment or may just use the first representation access point as the seek result. When Media Segments start with a SAP, these procedures are simplified. + +Also note that not necessarily all information of the Media Segment needs to be downloaded to access the presentation time $T_M$ . The client may for example initially request the Segment Index from the beginning of the Media Segment using byte range requests. By use of the Segment Index, Segment timing can be mapped to byte ranges of the Segment. By continuously using HTTP partial GET requests, only the relevant parts of the Media Segment may be accessed for improved user experience and low start-up delays. + +## --- A.5 Support for Trick Modes + +The client may pause or stop a Media Presentation. In this case client simply stops requesting Media Segments or parts thereof. To resume, the client sends requests to Media Segments, starting with the next fragment after the last requested fragment. + +If a specific **Representation** or **SubRepresentation** element includes the `@maxPlayoutRate` attribute, then this Representation or Sub-representation may be used for the fast-forward trick mode. The client may play the Representation or Sub-Representation with any speed up to the regular speed times the specified `@maxPlayoutRate` attribute with the same decoder profile and level requirements as the normal playout rate. If a specific **Representation** or **SubRepresentation** element includes the `@codingDependency` attribute with value set to 'false', then this Representation or Sub-representation may be used for both fast-forward and fast-rewind trick modes. + +Sub-Representations in combination with Index Segments and Subsegment Index boxes may be used for efficient trick mode implementation. Given a Sub-Representation with the desired `@maxPlayoutRate`, ranges corresponding to `SubRepresentation@level` all level values from `SubRepresentation@dependencyLevel` may be extracted via byte ranges constructed from the information in Subsegment Index Box. These ranges can be used to construct more compact HTTP GET requests. + +The client may use multiple Representations to support trick mode behaviour. + +## --- A.6 Switching Representations + +Based on updated information during an ongoing Media Presentation, a client may decide to switch Representations. Switching to a "new" Representation is equivalent to tuning in or seeking to the new Representation from the time point where the "old" Representation has been presented. Once switching is desired, the client should seek to a SAP in the "new" Representation at a desired presentation time $T_M$ later than and close to the current presentation time. Presenting the "old" Representation up to the SAP in the "new" Representation enables seamless switching. + +If `@segmentAlignment` is set true and the `@startWithSAP` is set to 1, 2 or 3 (and in the latter case the `Representation@mediaStreamStructureId` is identical for the two Representations), then the client may switch at any Segment boundary by just concatenating Segments with consecutive indices from different Representations. No overlap downloading and decoding is required. + +The same can be achieved on Subsegment level with `@subsegmentAlignment` set true and `@subsegmentStartWithSAP` the same values and conditions as above. + +## --- A.7 Reaction to Error Codes + +The HTTP Streaming client provides a streaming service to the user by issuing HTTP requests for Segments at appropriate times. The HTTP Streaming client may also update the MPD by using HTTP requests. In regular operation mode, the server typically responds to such requests with status code 200 OK (for regular GET) or status code 206 Partial Content (for partial GET) and the entity corresponding to the requested resource. Other Successful 2xx or Redirection 3xx status codes may be returned. + +HTTP requests may result in a Client Error 4xx or Server Error 5xx status code. Some guidelines are provided in this clause as to how an HTTP client may react to such error codes. + +If the HTTP Client receives an HTTP client or server error (i.e. messages with 4xx or 5xx error code), the client should respond appropriately to the error code. + +If the HTTP Client receives a repeated HTTP error for the request of an MPD, the appropriate response may involve terminating the streaming service. + +If the HTTP Client receives an HTTP client error (i.e. messages with 4xx error code) for the request of an Initialization Segment, the Period containing the Initialization Segment may not be available anymore or may not be available yet. In this case the client should check if the precision of the time synchronization to a globally accurate time standard is sufficiently accurate. In case of repeated errors, the client should check for an update of the MPD. + +If the HTTP Client receives an HTTP client error (i.e. messages with 4xx error code) for the request of a Media Segment, the requested Media Segment may not be available anymore or may not be available yet. In this case the client should check if the precision of the time synchronization to a globally accurate time standard is sufficiently accurate. In case of repeated errors, the client should check for an update of the MPD. + +Upon receiving server errors (i.e. messages with 5xx error code), the client should check for an update of the MPD. The client may also check for alternative representations that are hosted on a different server. + +## --- A.8 Encoder Clock Drift Control + +Non-alignment between the end of a Representation in one Period and the start time of the next Period may be caused by encoder clock inaccuracy. The client should align the media presentation time at each Period start. In addition, significant deviations of the start time of Segments to the media time should be detected and drift-compensating measures may be applied even before the start of the next period is reached. + +Over a longer operation time, a difference in clock accuracy of the encoder and decoder may cause the playback to lag behind real-time or to interrupt temporarily due to the client trying to access data faster than real-time. Clients may avoid these anomalies by using the Producer Reference Time boxes as defined in clause G.5 as follows. The pace $r1$ of the encoder clock in relation to the UTC is recovered from Producer Reference Time boxes. If the relative pace $r1$ is less than 1, equal to 1, or greater than 1, the encoder clock runs more slowly than the UTC, at an identical pace compared to the UTC, or faster than the UTC, respectively. The pace $r2$ of the receiver playout clock in relation to UTC is created by accessing a UTC source. A timescale multiplication factor $c$ is equal to $r1/r2$ . A presentation time on a timeline of the receiver playout clock is derived for each sample or access unit by multiplying the composition time of the sample (as indicated by the file format structures) or the presentation time of the access unit (as indicated by the respective Program Elementary Stream header) by the timescale multiplication factor $c$ . + +# Annex B (normative): Media Presentation Description Schema + +## B.1 Introduction + +The main schema is provided in Annex B.2 in Table B-1. The main schema refers to the extension schema in Annex B.3 and in section 8.3. + +## B.2 Main Schema + +**Table B-1: XML schema of the MPD** + +``` + + + + + + + + Media Presentation Description + + This Schema defines the Media Presentation Description. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +## B.3 3GPP Extension Schema + +Table B-2: XML schema of the 3GPP Extensions for MPD + +``` + + + + +``` + +``` + + Extensions to Media Presentation Description for 3GPP + + + + + + + + + + + + + + + +``` + +# Annex C (normative): Descriptor Scheme Definitions + +## C.1 Introduction + +This annex defines descriptors that are defined in this specification. In particular the following descriptors are defined + +- Role descriptor scheme in clause C.2. +- Frame packing descriptor scheme in clause C.3. + +## C.2 Role Descriptor Scheme + +The URN "urn:mpeg:dash:role:2011" is defined to identify the role scheme defined in Table C.1. Note that **Role@value** shall be assigned to Adaptation Sets that contain a media component type to which this role is associated. + +**Table C.1 — Role@value attribute for scheme with a value "urn:mpeg:dash:role:2011"** + +| Role@value | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| caption | captions (see note 3 below) | +| subtitle | subtitles (see note 3 below) | +| main | main media component(s) which is/are intended for presentation if no other information is provided | +| alternate | media content component(s) that is/are an alternative to (a) main media content component(s) of the same media component type (see note 2 below) | +| supplementary | media content component that is supplementary to a media content component of a different media component type (see Note 1 below) | +| commentary | media content component with commentary (e.g. director's commentary) (typically audio) | +| dub | media content component which is presented in a different language from the original (e.g. dubbed audio, translated captions) | +| NOTES

1) A normal audio/video program labels both the primary audio and video as "main". However, when the two media component types are not equally important, for example (a) video providing a pleasant visual experience to accompany a music track that is the primary content or (b) ambient audio accompanying a video showing a live scene such as a sports event, that is the primary content, the accompanying media may be assigned a "supplementary" role.

2) alternate media content components should carry other descriptors to indicate in what way it differs from the main media content components (e.g. a Viewpoint descriptor or a Role descriptor), especially when multiple alternate media content components including multiple supplementary media content components are available.

3) open ("burned in") captions or subtitles would be marked as media type component "video" only, but having a descriptor saying "caption" or "subtitle"; | | + +## --- C.3 Frame Packing Descriptor Scheme + +The frame packing description scheme is signalled in **FramePacking** elements. For Representations or Sub-Representations that contain a video component that conforms to ISO/IEC 14496-10 [35], the URN for **FramePacking**@schemeIdUri shall be + +`urn:mpeg:dash:14496:10:frame_packing_arrangement_type:2011`, that is defined to indicate the frame-packing arrangement as defined by Table D-8 of ISO/IEC 14496-10 [35] ('Definition of frame\_packing\_arrangement\_type') to be contained in **FramePacking** elements. The @value shall be the 'Value' column as specified in Table D-8 of [35] and shall be interpreted according to the 'Interpretation' column in the same table. A 3GP-DASH client supporting stereoscopic 3D video should recognize and support frame packing arrangement types given by values 3 and 4 for the @value attribute, corresponding to Side-by-Side and Top-and-Bottom frame packing formats, respectively. + +# Annex D (informative): MPD Examples + +## D.1 On-Demand Service + +Table D.1 provides an example MPD for an On-Demand service. + +**Table D.1: Example MPD for an On-Demand Service** + +``` + + + + Example + + http://www.example.com + + + + + + rep1 + + + + + + + + + rep2 + + + + + + + + + + + + + + + + + + + +``` + +## D.2 Live Service + +Table D.2 provides an example MPD for a live service. + +Table D.2: Example MPD for a Live Service + +``` + + + + + Example 3: 3GPP SA4 Meeting in Vancouver as Live Broadcast + 3GPP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + +``` + +## D.3 MPD Assembly + +Table D.3 provides an example MPD with reference to external Period element as provided in Table D.4. An equivalent MPD to the one in Table D.3 after dereferencing with the **Period** element in Table D.4 is shown in Table D.2. + +**Table D.3: Example MPD with reference to external Period element** + +``` + + + + + Example 3: 3GPP SA4 Meeting in Vancouver as Live Broadcast + 3GPP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +``` + + + + + + + + + + + + +``` + +**Table D.4: External Period** + +``` + + + + + + + + + + + + +``` + +## D.4 MPD Deltas + +In the following MPD example, the content is 30 minutes in duration. There are 3 Periods, each of 10 minutes duration. Each Period has 3 Representations and each Representation is contained within one 3gp file. Each Representation has audio encoded with Low Complexity-AAC. One Representation of each Period (p1rep1.3gp, p2rep1.3gp, and p3rep1.3gp) has video resolution 320x240 encoded with H.264 baseline profile level 1.1. Another Representation of each Period (p1rep2.3gp, p2rep2.3gp, and p3rep2.3gp) has resolution 320x240 encoded with H.264 baseline profile level 1.3. Finally, a third representation in each period (p1rep3.3gp, p2rep3.3gp, and p3rep3.3gp) has resolution 480x240 encoded with H.264 baseline profile level 2.1. One Representation of each Period has bandwidth of 239 kbps, a second representation has bandwidth of 478 kbps, and a third representation has bandwidth of 892 kbps. + +Since each representation is contained in one file, the Initialization Segments and the Media Segments for a representation are accessed with byte ranges. Each **SegmentURL** element in the MPD contains a **mediaRange** attribute and the corresponding byte range for the Initialization Segment or Media Segment. For the example each Segment of all representations is 10 seconds in duration. + +Line numbers of the MPD in the example are shown for clarity, although these would not be present in the MPD. + +### EXAMPLE 1 (add) + +The change of adding the **SegmentURL** element for the next Segment to the Representation of the third Period of the MPD in the example with 239K bandwidth can be described as follows. + +``` + +492a +. + +``` + +The **SegmentURL** element is added on a new line after line number 492. + +### EXAMPLE 2 (replace) + +Replacing the line containing the **DeltaSupport** element to correspond to the MPD after the next update can be described as follows. + +``` + +625c + +``` + +### EXAMPLE 3(delete) + +If lines 8 through 10 of the original MPD are deleted and not present in the updated MPD, the delta to express this is: + +8,10d + +Below is what the MPD looks like after approximately 29 minutes and 40 seconds. In this case, the MPD is updated approximately every 10 seconds. + +``` + +1 +2 +14 +15 +16 Example +17 Example +18 Example +19 +20 http://www.example.com +21 +22 +23 +24 +25 +26 plrep1.3gp +27 +28 +29 +30 +31 . +32 . +33 . +88 +89 +90 +91 +92 plrep2.3gp +93 +94 +95 +96 +97 . +98 . +99 . +154 +155 +156 +157 +158 plrep3.3gp +159 +160 +161 +162 +163 . +164 . +165 . +220 +221 + +``` + +``` +222 +223 +224 +225 +226 +227 +228 +229 "p2rep0.3gp" +231 +232 +233 +234 +. +. +. +292 +293 +294 +295 "p2rep1.3gp" +297 +298 +299 +300 +. +. +. +358 +359 +360 +361 +363 +364 +365 +366 +. +. +. +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 "p3rep0.3gp" +435 +436 +437 +438 +. +. +. +492 +493 +494 +495 +497 +498 +499 +500 +. +. +. +556 +557 +``` + +``` + +558 +559 +560 "p3rep2.3gp" +561 +562 +563 +564 + . + . + . +620 +621 +622 +623 +624 +625 +626 + +``` + +Since the value of @sourceURL in the above MPD is “delta1.mpdd”, delta1.mpdd is an empty file at the time of publication of the above MPD. + +The following file is delta1.mpdd after the next MPD update. Notice that clients have access to the new value of @sourceURL referenced by the latest MPD via the delta. + +``` + +625c + +. +620a + +. +556a + +. +492a + +. + +``` + +At the next MPD update, “delta1.mpdd” would contain the cumulative update for 2 MPD updates. + +``` + +625c + +. +620a + + +. +556a + + +. +492a + + +. + +``` + +# --- Annex E (normative): Void + +# Annex F (normative): OMA DM QoE Management Object + +As an alternative to configuring the QoE reporting for each session via MPD, OMA-DM can be used to specify the QoE configuration. If such an OMA-DM QoE configuration has been specified, it shall be evaluated by the client for all subsequent sessions. + +For the OMA-DM QoE configuration the parameters are specified according to the following Managed Object (MO), and represents the same information as specified in section 10.4 and 10.5. Version numbering is included for possible extension of the MO. + +The Management Object Identifier shall be: `urn:oma:mo:ext-3gpp-pss-dash-qoe:1.0`. + +Protocol compatibility: The MO is compatible with OMA Device Management protocol specifications, version 1.2 and upwards, and is defined using the OMA DM Device Description Framework as described in the Enabler Release Definition OMA-ERELD\_DM-V1\_2 [22]. + +The nodes and leaf objects as provided in Figure F.1 shall be contained under the 3GPP\_PSS\_DASH\_QOE node if a client supports the feature described in this clause. + +![Diagram showing the hierarchy of nodes and leaf objects for the OMA DM QoE Management Object. A central node labeled branches out to ten leaf objects: Enabled, Servers, APN, Format, Interval, SamplePercentage, StartTime, Duration, Metrics, and Ext.](896f6ec457b6252d4af32a634299218c_img.jpg) + +``` +graph LR; X[""] --> Enabled; X --> Servers; X --> APN; X --> Format; X --> Interval; X --> SamplePercentage; X --> StartTime; X --> Duration; X --> Metrics; X --> Ext; +``` + +Diagram showing the hierarchy of nodes and leaf objects for the OMA DM QoE Management Object. A central node labeled branches out to ten leaf objects: Enabled, Servers, APN, Format, Interval, SamplePercentage, StartTime, Duration, Metrics, and Ext. + +Figure F.1: Nodes and leaf objects + +Node: `/` + +This interior node specifies the unique object id of a QoE metrics management object. The purpose of this interior node is to group together the parameters of a single object. + +- Occurrence: ZeroOrOne +- Format: node +- Minimum Access Types: Get + +The following interior nodes shall be contained if the client supports the QoE Management Object. + +## **//Enabled** + +This leaf indicates if QoE reporting is requested by the provider. + +- Occurrence: One +- Format: bool +- Minimum Access Types: Get + +## **//Servers** + +This leaf contains a space-separated list of servers to which the QoE reports are transmitted. It is URI addresses, e.g. . In case of multiple servers, the client randomly selects one of the servers from the list, with uniform distribution. + +- Occurrence: One +- Format: chr +- Minimum Access Types: Get +- Values: URI of the servers to receive the QoE report. + +## **//APN** + +This leaf contains the Access Point Name that should be used for establishing the PDP context on which the QoE metric reports will be transmitted. This may be used to ensure that no costs are charged for QoE metrics reporting. If this leaf is not defined then any QoE reporting is done over the default access point. + +- Occurrence: ZeroOrOne +- Format: chr +- Minimum Access Types: Get +- Values: The Access Point Name + +## **//Format** + +This leaf specifies the format of the report. If this leaf is not defined the QoE reports shall be sent uncompressed. + +- Occurrence: ZeroOrOne +- Format: chr +- Minimum Access Types: Get +- Values: “uncompressed”, “gzip” + +## **//Interval** + +This leaf specifies how often QoE reports shall be sent. If this leaf is not defined only one QoE report shall be sent after the complete session. + +- Occurrence: ZeroOrOne +- Format: int +- Minimum Access Types: Get +- Values: seconds + +## **//SamplePercentage** + +This leaf specifies the percentage of sessions for which QoE metrics shall be reported. The client evaluates a random number at start of each session to determine if reporting shall be done for the specific session. If this leaf is not defined QoE reports are sent for every session. + +- Occurrence: ZeroOrOne +- Format: float +- Minimum Access Types: Get +- Values: 0.0-100.0. + +## **//StartTime** + +This leaf specifies when collection of QoE metrics shall start. It is specified in seconds and is relative to the start of the session. If this leaf is not defined, the QoE collection shall be done from the start of the session. + +- Occurrence: ZeroOrOne +- Format: int +- Minimum Access Types: Get +- Values: seconds + +## **//Duration** + +This leaf specifies for how long QoE collection shall be done. It is specified in seconds and is relative to the start time of QoE collection. If this leaf is not defined QoE collection shall be done until the end of the session. + +- Occurrence: ZeroOrOne +- Format: int +- Minimum Access Types: Get +- Values: seconds. + +## **//Metrics** + +This leaf specifies a list of white-space separated metrics which shall be reported, and follows the same syntax as specified for the "@metrics" attribute in Table 32. If this leaf is not defined no QoE reporting shall be done. + +- Occurrence: ZeroOrOne +- Format: chr +- Minimum Access Types: Get +- Values: Metrics as specified in section 10.4. + +## **//Ext** + +The Ext node is an interior node where the vendor specific information can be placed (vendor includes application vendor, device vendor etc.). Usually the vendor extension is identified by vendor specific name under the ext node. The + +tree structure under the vendor identified is not defined and can therefore include one or more un-standardized subtrees. + +- Occurrence: ZeroOrOne +- Format: node +- Minimum Access Types: Get + +# Annex G (normative): File format extensions for 3GPP DASH support + +## G.1 Introduction + +This clause documents extensions to the ISO base media file format [11] for the support of 3GPP DASH. It is expected that these boxes will be integrated in an updated version of ISO/IEC 14496-12 [11]. + +## G.2 Level Assignment Box + +### G.2.1 Definition + +Box Type: `leva' + Container: Movie Extends Box (`mvex') + Mandatory: No + Quantity: Zero or one + +Levels specify subsets of the file. Samples mapped to level n may depend on any samples of levels m, where $m \leq n$ , and shall not depend on any samples of levels p, where $p > n$ . + +Levels cannot be specified for the initial movie. When the Level Assignment box is present, it applies to all movie fragments subsequent to the initial movie. + +For the context of the Level Assignment box, a fraction is defined to consist of one or more Movie Fragment boxes and the associated Media Data boxes, possibly including only an initial part of the last Media Data Box. Within a fraction, data for each level shall appear contiguously. Data for levels within a fraction shall appear in increasing order of level value. All data in a fraction shall be assigned to levels. + +NOTE: In the context of 3G DASH, each subsegment indexed within a Subsegment Index box is a fraction. + +The Level Assignment box provides a mapping from features, such as temporal sub-sequences, to levels. A feature can be specified through a track or a sample grouping of a track. + +The following assignment\_types are defined; assignment\_type values greater than 4 are reserved, while the semantics for the other values are specified as follows. + +- 0: sample groups are used to specify levels, i.e. i.e. samples mapped to different sample group description indexes of a particular sample grouping lie in different levels within the identified track; other tracks are not affected and must have all their data in precisely one level; +- 1: as for assignment\_type 0 except assignment is by a parameterized sample group; +- 2, 3: level assignment is by track (see the Subsegment Index Box for the difference in processing of these levels) + +The sequence of assignment\_types is restricted to be a set of zero or more of type 2 or 3, followed by zero or more of exactly one type. + +### G.2.2 Syntax + +``` +aligned(8) class LevelAssignmentBox extends FullBox('leva', 0, 0) { unsigned int(8) level_count; + for (j=1; j <= level_count; j++) { + unsigned int(32) track_id; + unsigned int(1) padding_flag; + unsigned int(7) assignment_type; + if (assignment_type == 0) { + unsigned int(32) grouping_type; + } else if (assignment_type == 1) { + unsigned int(32) grouping_type; + unsigned int(32) grouping_type_parameter; + } + else if (assignment_type == 2) {} // no further syntax elements needed + else if (assignment_type == 3) {} // no further syntax elements needed + } +} +``` + +} + +### G.2.3 Semantics + +`level_count` specifies the number of levels each fraction is grouped into. `level_count` shall be greater than or equal to 2. + +`track_id` for loop entry `j` specifies the track identifier of the track assigned to level `j`. + +`padding_flag` equal to 1 indicates that a conforming fraction can be formed by concatenating any positive integer number of levels within a fraction and padding the last Media Data box by zero bytes up to the full size that is indicated in the header of the last Media Data box. The semantics of `padding_flag` equal to 0 are unspecified. + +`assignment_type` indicates the mechanism used to specify the assignment to a level. `assignment_type` values greater than 3 are reserved, while the semantics for the other values are specified as follows. + +`grouping_type` and `grouping_type_parameter`, if present, specify the sample grouping used to map sample group description entries in the Sample Group Description box to levels. Level `n` contains the samples that are mapped to the sample group description entry having index `n` in the Sample Group Description box having the same values of `grouping_type` and `grouping_type_parameter`, if present, as those provided in this box. + +## G.3 Subsegment Index Box + +### G.3.1 Definition + +Box Type: ``ssix`` + Container: File + Mandatory: No + Quantity: Zero or more + +The Subsegment Index box (`'ssix'`) provides a mapping from levels (as specified by the Level Assignment box) to byte ranges of the indexed subsegment. In other words, this box provides a compact index for how the data in is ordered according to levels into partial sub-segments. It enables a client to easily access data for partial subsegments by downloading ranges of data in the subsegment. + +Each byte in the subsegment shall be assigned to a level. If the range is not associated with any information in the level assignment, then any level that is not included in the level assignment may be used. Each level shall be assigned to exactly one partial sub-segment, i.e. byte ranges for one level shall be contiguous. + +Samples of a partial subsegment may depend on any samples of preceding partial subsegments in the same subsegment, but not the other way around. For example, each partial subsegment contains samples having an identical temporal level and partial subsegments appear in increasing temporal level order within the subsegment. + +There may be 0 or 1 Subsegment Index boxes per each Segment Index box that does not refer to other Segment Index boxes, i.e. that only indexes subsegments but no segment indexes. A Subsegment Index box, if any, shall be the next box after the associated Segment Index box. A Subsegment Index box documents the subsegment that is indicated in the immediately preceding Segment Index box. + +When a partial segment is accessed in this way, for all `assignment_types` other than 3, the final Media Data box may be incomplete, that is, less data is accessed than the length indication of the Media Data Box indicates is present. The length of the Media Data box may need adjusting, or padding used. The `padding_flag` in the Level Assignment Box indicates whether this missing data can be replaced by zeros. If not, the sample data for samples assigned to levels that are not accessed is not present, and care should be taken not to attempt to process such samples. + +NOTE: `assignment_type` equal to 3 may be used, for example, when audio and video movie fragments (including the respective Media Data boxes) are interleaved. The first level can be specified to contain the audio movie fragments (including the respective Media Data boxes), whereas the second level can be specified to contain both audio and video movie fragments (including all Media Data boxes). + +### G.3.2 Syntax + +``` +aligned(8) class SubsegmentIndexBox extends FullBox('ssix', 0, 0) { + unsigned int(32) subsegment_count; + + for( i=1; i <= subsegment_count; i++) + unsigned int(8) ranges_count; + for ( j=1; j <= ranges_count; j++) { + unsigned int(8) level; + unsigned int(24) accumulated_level_size; + } +} +``` + +### G.3.3 Semantics + +`subsegment_count` is a positive integer specifying the number of subsegments for which partial subsegment information is specified in this box. `subsegment_count` shall be equal `reference_count` (i.e. the number of movie fragment references) in the immediately preceding Segment Index box. + +`ranges_count` specifies the number of partial subsegment levels the media data is grouped into. This value shall be greater than or equal to 2. + +`range_size` indicates the size of the partial subsegment. + +`level` specifies the level to which this partial subsegment is assigned to. + +## G.4 Temporal level sample grouping + +### G.4.1 Definition + +Many video codecs support temporal scalability where it is possible to extract one or more subsets of frames that can be independently decoded. A simple case is the extraction of I frames for a bitstream with a regular I-frame interval, e.g. IPPPIPPP..., where every 4th picture is an I frame. Also subsets of these I frames can be extracted for even lower frame rates. More elaborate situations with several temporal levels can be constructed using hierarchical B or P frames. + +The Temporal Level sample grouping ('tele') provides a codec-independent sample grouping that can be used to group samples (access units) in a track (and potential track fragments) according to temporal level, where samples of one temporal level have no coding dependencies on samples of higher temporal levels. The temporal level equals the sample group description index (taking values 1, 2, 3, etc). The bitstream containing only the access units of from the first temporal level to a higher temporal level remains conforming to the coding standard. + +A grouping according to temporal level facilitates easy extraction of temporal subsequences, for instance using the Subsegment Index box in clause G.3. + +### G.4.2 Syntax + +``` +class TemporalLevelEntry() extends SampleGroupDescriptionEntry('tele') +{ + bit(1) level_independently_decodable; + bit(7) reserved=0; +} +``` + +### G.4.3 Semantics + +The temporal level of samples in a sample group equals to the sample group description index. + +`level_independently_decodable` is a flag. 1 indicates that all samples of this level have no coding dependencies on samples of other levels. 0 indicates that no information is provided. + +## G.5 Producer reference box + +### G.5.1 Definition + +Box Type: `prft` + Container: File + Mandatory: No + Quantity: Zero or more + +The producer reference time box supplies relative wall-clock times at which movie fragments, or files containing movie fragments (such as segments) were produced. When these files are both produced and consumed in real time, this can provide clients with information to enable them to synchronize consumption with the production and thus avoid buffer overflow or underflow. + +This box is related to the next movie fragment box that follows it in bitstream order. It must follow any segment type or segment index box (if any) in the segment, and occur before the following movie fragment box (to which it refers). If a segment file contains any producer reference time boxes, then the first of them shall occur before the first movie fragment box in that segment. + +The box contains a time value measured on a clock which increments at the same rate as a UTC-synchronized NTP clock, using NTP format. This is associated with a media time for one of the tracks in the movie fragment. That media time should be in the range of times in that track in the associated movie fragment. + +### G.5.2 Syntax + +``` +aligned(8) class ProducerReferenceTimeBox extends FullBox('srtf', version, 0) { + unsigned int(32) reference_track_ID; + unsigned int(64) ntp_timestamp; + if (version==0) + { + unsigned int(32) media_time; + } else + { + unsigned int(64) media_time; + } +} +``` + +### G.5.3 Semantics + +`reference_track_ID` provides the `track_ID` for the reference track. + +`ntp_timestamp` indicates a UTC time in NTP format corresponding to `decoding_time`. + +`media_time` corresponds to the same time as `ntp_timestamp`, but in the time units used for the reference track, and is measured on this media clock as the media is produced. Note that in most cases this timestamp will not be equal to the timestamp of the first sample of the adjacent segment of the reference track, but it is recommended it be in the range of the segment containing this producer reference time box. + +## G.6 Stream Access Points + +### G.6.1 Introduction + +This Annex defines a Stream Access Point (SAP) and specifies six types of SAPs. + +A Stream Access Point (SAP) enables random access into a container of media stream(s). A container may contain more than one media stream, each being an encoded version of continuous media of certain media type. A SAP is a position in a container enabling playback of an identified media stream to be started using only (a) the information contained in the container starting from that position onwards, and (b) possible initialization data from other part(s) of the container, or externally available. Derived specifications should specify if initialization data is needed to access the container at a SAP, and how the initialization data can be accessed. + +### G.6.2 SAP properties + +For each SAP the properties, $I_{\text{SAP}}$ , $T_{\text{SAP}}$ , $I_{\text{SAU}}$ , $T_{\text{DEC}}$ , $T_{\text{EPT}}$ , and $T_{\text{PTF}}$ are identified and defined as: + +- $T_{\text{SAP}}$ is the earliest presentation time of any access unit of the media stream such that all access units of the media stream with presentation time greater than or equal to $T_{\text{SAP}}$ can be correctly decoded using data in the Bitstream starting at $I_{\text{SAP}}$ and no data before $I_{\text{SAP}}$ . +- $I_{\text{SAP}}$ is the greatest position in the Bitstream such that all access units of the media stream with presentation time greater than or equal to $T_{\text{SAP}}$ can be correctly decoded using Bitstream data starting at $I_{\text{SAP}}$ and no data before $I_{\text{SAP}}$ . +- $I_{\text{SAU}}$ is the starting position in the Bitstream of the latest access unit in decoding order within the media stream such that all access units of the media stream with presentation time greater than or equal to $T_{\text{SAP}}$ can be correctly decoded using this latest access unit and access units following in decoding order and no access units earlier in decoding order. + +NOTE $I_{\text{SAU}}$ is always greater than or equal to $I_{\text{SAP}}$ . + +- $T_{\text{DEC}}$ is the earliest presentation time of any access unit of the media stream that can be correctly decoded using data in the Bitstream starting at $I_{\text{SAU}}$ and no data before $I_{\text{SAU}}$ . +- $T_{\text{EPT}}$ is the earliest presentation time of any access unit of the media stream starting at $I_{\text{SAU}}$ in the Bitstream. +- $T_{\text{PTF}}$ is the presentation time of the first access unit of the media stream in decoding order in the Bitstream starting at $I_{\text{SAU}}$ . + +### G.6.3 SAP types + +Six types of SAPs are defined with properties as follows: + +- Type 1: $T_{\text{EPT}} = T_{\text{DEC}} = T_{\text{SAP}} = T_{\text{PTF}}$ +- Type 2: $T_{\text{EPT}} = T_{\text{DEC}} = T_{\text{SAP}} < T_{\text{PTF}}$ +- Type 3: $T_{\text{EPT}} < T_{\text{DEC}} = T_{\text{SAP}} \leq T_{\text{PTF}}$ +- Type 4: $T_{\text{EPT}} \leq T_{\text{PTF}} < T_{\text{DEC}} = T_{\text{SAP}}$ +- Type 5: $T_{\text{EPT}} = T_{\text{DEC}} < T_{\text{SAP}}$ +- Type 6: $T_{\text{EPT}} < T_{\text{DEC}} < T_{\text{SAP}}$ + +NOTE The type of SAP is dependent only on which Access Units are correctly decodable and their arrangement in presentation order. The types informally correspond with some common terms: + +- Type 1 corresponds to what is known in some coding schemes as a “Closed GoP random access point” (in which all access units, in decoding order, starting from $I_{\text{SAP}}$ can be correctly decoded, resulting in a continuous time sequence of correctly decoded access units with no gaps) and in addition the access unit in decoding order is also the first access unit in presentation order. +- Type 2 corresponds to what is known in some coding schemes as a “Closed GoP random access point”, for which the first access unit in decoding order in the media stream starting from $I_{\text{SAU}}$ is not the first access unit in presentation order. +- Type 3 corresponds to what is known in some coding schemes as an “Open GoP random access point”, in which there are some access units in decoding order following $I_{\text{SAU}}$ that cannot be correctly decoded and have presentation times less than $T_{\text{SAP}}$ . +- Type 4 corresponds to what is known in some coding schemes as an “Gradual Decoding Refresh (GDR) random access point”, in which there are some access units in decoding order starting from and following $I_{\text{SAU}}$ that cannot be correctly decoded and have presentation times less than $T_{\text{SAP}}$ . + +- Type 5 corresponds to the case for which there is at least one access unit in decoding order starting from $I_{\text{SAP}}$ that cannot be correctly decoded and has presentation time greater than $T_{\text{DEC}}$ and where $T_{\text{DEC}}$ is the earliest presentation time of any access unit starting from $I_{\text{SAU}}$ . +- Type 6 corresponds to the case for which there is at least one access unit in decoding order starting from $I_{\text{SAP}}$ that cannot be correctly decoded and has presentation time greater than $T_{\text{DEC}}$ and where $T_{\text{DEC}}$ is not the earliest presentation time of any access unit starting from $I_{\text{SAU}}$ . + +# --- Annex H (normative): MIME Type Registration for MPD + +## H.1 MPD MIME Type + +### H.1.1 Introduction + +The MIME type of the MPD is registered and available at the registry at . For formal registration, refer to ISO/IEC 23009-1 [34], Annex C. + +### H.1.2 Void + +### H.1.3 Void + +## --- H.2 MPD Delta MIME Type + +### H.2.1 Introduction + +This Annex provides the formal MIME type registration for the MPD Delta. It is referenced from the registry at . + +### H.2.2 MIME Type and Subtype + +The MIME Type and Subtype are defined as follows: + +Media Type Name: application +Subtype name: Standards Tree - dashdelta +Required parameters: none +Optional parameters: none +Encoding considerations: 8-bit text +Security considerations: + +A Media Presentation Description (MPD) Delta contains text changes to an MPD. An MPD Delta is used together with a first MPD to construct a second MPD. As such, any security considerations for an MPD may also be applicable to an MPD Delta. A MIME type handler would not launch a service with only an MPD Delta. + +Further to this, as an MPD Delta performs editing operations on an MPD there are risks that deliberately malformed editing operations could cause security issues. + +Interoperability considerations: + +Published specification: 3GPP TS 26.247 + +Applications which use this media type: + +various including but not limited to On-Demand Streaming over the Internet, Live Streaming over the Internet, Internet Video, Internet Radio + +Additional information: + +1. Magic number(s) : none +2. File extension(s) : mpdd +3. Macintosh file type code : none +4. Object Identifiers: none + +Person to contact for further information: + +1. Name : David Furbeck +2. Email : dfurbeck@blackberry.com + +Intended usage : Common + +Author/Change controller : 3GPP TSG SA WG4 + +# --- Annex I (informative): Signalling of DASH AVP values for QoS handling in the PCC + +The PCC architecture is defined in TS 23.203 [31] and provides the Rx reference point, which enables the application layer to authorize a specific usage. In this architecture the DASH HTTP streaming server or any other function in the HTTP streaming path (e.g. an HTTP proxy) can act as Application Function and interact with the PCRF via the Rx reference point for QoS control. It is assumed here that the AF has knowledge of the application type and of the MPD. + +The relevant AVPs are the ones enabling the PCRF to establish bearers with correct characteristics for DASH users. The AVPs are defined in TS 29.214 [33]. The further PCRF mapping from AVP to IP QoS parameter mapping is defined in TS 29.213 [32] + +Table I.1: Example mapping of MPD parameters to Rx AVPs for 3GP-DASH (PSS) + +| AVP | Value | Comment | +|--------------------------------------------|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| AF-Application-Identifier | "DASH" | Allows to signal the DASH based application hence giving the opportunity to enforce application specific policies | +| Max-Requested-Bandwidth-DL (NOTE 1) | B1 |

B1 = sum of all MPD@maxBandwidth (see clause 8.4.3.3) of all media components simultaneously (not mutually exclusive) selectable by the DASH client plus HTTP/TCP/IP overhead and TCP messages for flow control.

If this attribute is not present then
B1 = sum of MPD@bandwidth attributes of all media components of the available media presentation corresponding to representations or subrepresentations with highest bandwidth simultaneously selectable (not mutually exclusive) by the DASH client plus HTTP/TCP/IP overhead and TCP messages for flow control.

Note: the mapping rules to derive the TCP message flow control bandwidth are FFS.

| +| Max-Requested-Bandwidth-UL (NOTE 1) | FFS | For Further Study. If included, should be greater than or equal to Min-Requested-Bandwidth-UL | +| Min-Requested-Bandwidth-DL (NOTE 1) | B2 |

B2 = sum of all MPD@minBandwidth (see clause 8.4.3.3) of all media components simultaneously (not mutually exclusive) selectable by the DASH client plus HTTP/TCP/IP overhead and TCP messages for flow control.

If this attribute is not present then
B2 = sum of MPD@bandwidth attributes of all media components of the available media presentation corresponding to representations or subrepresentations with lowest bandwidth simultaneously (not mutually exclusive) selectable by the DASH client plus HTTP/TCP/IP overhead and TCP messages for flow control.

Note: the mapping rules to derive the TCP message flow control bandwidth are FFS.

| +| Min-Requested-Bandwidth-UL (NOTE 1) | FFS | For Further Study. Enough bitrate to cover TCP and HTTP GET requests. | +| Flow-Description AVP (NOTE 1) | IP addresses and ports | | + +NOTE 1: AVPs provided within the Media-Component-Description AVP, except Flow-Description AVP that is included within the Media-Sub-Component AVP. Omitted AVPs are not relevant for this functionality. + +# Annex J (normative): MIME Type Registration for QoE Reports + +## J.1 Introduction + +This Annex provides the formal MIME-type registration for "application/3gpdash-qoe-report+xml" that identifies XML documents following the schema "urn:3gpp:metadata:2011:HSD:receptionreport" defined in clause 10.6.2. It is referenced from the registry at . + +## J.2 MIME Type and Subtype + +The MIME Type and Subtype are defined as follows: + +Media Type name: application + +Subtype name: Standards Tree - 3gpdash-qoe-report+xml + +Required parameters: + +None + +Optional parameters: + +charset: If a charset parameter is provided its value must be "utf-8". Encoding considerations: 8bit + +The utf-8 charset is always used for this type. + +Security considerations: + +The general XML security issues are addressed in clause 10 of RFC 3023 [83]. + +The QoE report XML document instances contain information about what content, services and files a particular UE has received. The information also has privacy relevance as it reveals what a specific receiver, which usually can be connected to a specific user, has received. + +This media type only contains quality of experience data; there is no defined executable content. + +XML from other vocabularies is allowed in this media type. Such material will have its own security considerations. + +If operating in an insecure environment and required by the content/service provider, elements and attributes of the report may be encrypted to protect their confidentiality. + +If operating in an insecure environment and required by the content/service provider, digital signing and verification procedures may be used to protect data origin authenticity and integrity of the report. + +Thus to prevent manipulation of that information it would need to be integrity protected. + +Interoperability considerations: + +None + +Published specification: + +3GPP TS 26.247 + +Applications which use this media type: + +3GPP DASH based applications + +3GPP progressive download applications + +Additional information: + +None + +Person & email address to contact for further information: + +Ozgur Oyman (ozgur.oyman@intel.com) +3GPP TSG SA WG4 + +Intended usage: COMMON + +Restrictions on usage: + +None + +Author: + +3GPP TSG SA WG4 + +Change controller: + +3GPP TSG SA WG4 + +# Annex K (informative): Change history + +| Change history | | | | | | | | +|----------------|-------|-----------|------|-----|----------------------------------------------------------------------------|--------|--------| +| Date | TSG # | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2011-06 | 52 | SP-110305 | | | Version 10.0.0 approved at TSG SA#52 | | 10.0.0 | +| 2011-11 | 54 | SP-110794 | 0003 | | Alignment with MPEG DASH | 10.0.0 | 10.1.0 | +| 2011-11 | 54 | SP-110794 | 0005 | 3 | QoE Updates for Correction, Clarification and MPEG DASH Alignment | 10.0.0 | 10.1.0 | +| 2011-11 | 54 | SP-110794 | 0006 | 2 | QoS Support for 3GP-DASH Services | 10.0.0 | 10.1.0 | +| 2012-06 | 56 | SP-120221 | 0007 | 3 | Alignment with MPEG DASH | 10.1.0 | 10.2.0 | +| 2012-06 | 56 | SP-120221 | 0010 | 1 | Correction of Table Reference for Change Commands in MPD Deltas | 10.1.0 | 10.2.0 | +| 2012-06 | 56 | SP-120221 | 0012 | 2 | ContentProtection element update to signal version of DRM system | 10.1.0 | 10.2.0 | +| 2012-09 | 57 | SP-120504 | 0009 | 3 | QoE Reporting for DASH over Combined MBMS Download and HTTP-based Delivery | 10.2.0 | 11.0.0 | +| 2012-09 | 57 | SP-120509 | 0014 | 6 | Inclusion of MVC support for DASH | 10.2.0 | 11.0.0 | +| 2012-09 | 57 | SP-120509 | 0015 | 4 | Inclusion of 3D Video Format Information in DASH MPD | 10.2.0 | 11.0.0 | +| 2012-12 | 58 | SP-120761 | 0016 | 7 | Supporting HTTP Partial Response | 11.0.0 | 11.1.0 | +| 2013-03 | 59 | SP-130019 | 0022 | 1 | DASH QoE Reporting Schema bug fix | 11.1.0 | 11.2.0 | +| 2013-03 | 59 | SP-130015 | 0024 | 1 | DASH QoE Reporting Example bug fix | 11.1.0 | 11.2.0 | +| 2013-06 | 60 | SP-130184 | 0026 | 2 | DASH Profiles correction | 11.2.0 | 11.3.0 | +| 2013-06 | 60 | SP-130184 | 0028 | 1 | Correction of Cardinality of DeltaSupport element in Table 8-5 | 11.2.0 | 11.3.0 | +| 2013-06 | 60 | SP-130184 | 0030 | 2 | Correction of MPD Delta MIME type information | 11.2.0 | 11.3.0 | +| 2013-06 | 60 | SP-130184 | 0031 | | General Corrections to DASH | 11.2.0 | 11.3.0 | +| 2013-09 | 61 | SP-130350 | 0037 | | Corrections to DASH | 11.3.0 | 11.4.0 | +| 2013-12 | 62 | SP-130565 | 0040 | 1 | Registration of MIME Type for QoE Reports | 11.4.0 | 11.5.0 | +| 2013-12 | 62 | SP-130566 | 0042 | | Correction on Playlist Metric Attribute | 11.4.0 | 11.5.0 | +| 2013-12 | 62 | SP-130564 | 0046 | 1 | 3GP-DASH MPD Schema Fix | 11.4.0 | 11.5.0 | +| 2013-12 | 62 | SP-130565 | 0049 | | Corrections to MPD Delta example | 11.4.0 | 11.5.0 | +| 2014-03 | 63 | SP-140006 | 0052 | 1 | Corrections to 3GP-DASH | 11.5.0 | 11.6.0 | +| 2014-06 | 64 | SP-140205 | 0057 | 2 | Registration of MIME Type for QoE Reports | 11.6.0 | 11.7.0 | +| 2014-06 | 64 | SP-140205 | 0060 | 2 | Correction of Cardinality of the SegmentList Element | 11.6.0 | 11.7.0 | +| 2014-12 | 66 | SP-140720 | 0066 | 1 | Correction on Registration of MIME Type for QoE Reports | 11.7.0 | 11.8.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26290/08f6ace0c83e7394657fa372b47aec04_img.jpg b/marked/Rel-11/26_series/26290/08f6ace0c83e7394657fa372b47aec04_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2bd94ad4ebf58ba5e331916cdc35717fa410af55 --- /dev/null +++ b/marked/Rel-11/26_series/26290/08f6ace0c83e7394657fa372b47aec04_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52bff4d79e4d73f558d08b496d8f36032c794279e9b38585ef2b8b51c8d305bf +size 89622 diff --git a/marked/Rel-11/26_series/26290/0b3d9fe35da3ee0c88f1420bb9ed7a03_img.jpg b/marked/Rel-11/26_series/26290/0b3d9fe35da3ee0c88f1420bb9ed7a03_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7c070e36950b3f5b51a2d0e0d0cf5bfa1ffa36f4 --- /dev/null +++ b/marked/Rel-11/26_series/26290/0b3d9fe35da3ee0c88f1420bb9ed7a03_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edd070df963b77cc5bfd9c1696d47b69eeaf49d1bf24d15ca239147ad3f547cd +size 112436 diff --git a/marked/Rel-11/26_series/26290/0f6e3cdce0f01d6ccceabcced508bb5b_img.jpg b/marked/Rel-11/26_series/26290/0f6e3cdce0f01d6ccceabcced508bb5b_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f1597e0bdabf1f2ff35dbf141240378cc6cc9716 --- /dev/null +++ b/marked/Rel-11/26_series/26290/0f6e3cdce0f01d6ccceabcced508bb5b_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34541c377a75c9d9bcb1e93dac357a7c46caaf2b4d4e7ec52420342f2ba2552c +size 23728 diff --git a/marked/Rel-11/26_series/26290/1a827b10290f33d4fec04d0e8ef7a897_img.jpg b/marked/Rel-11/26_series/26290/1a827b10290f33d4fec04d0e8ef7a897_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e392ff6e771578f45178ab9bc7d27ffc482e699f --- /dev/null +++ b/marked/Rel-11/26_series/26290/1a827b10290f33d4fec04d0e8ef7a897_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84286a6ccbfdd9549d80ddd73fd2d4c43769980d97ae4145bf23f4e93f568bdb +size 19623 diff --git a/marked/Rel-11/26_series/26290/1dbb1d90b2022a3a765c85929a515cc6_img.jpg b/marked/Rel-11/26_series/26290/1dbb1d90b2022a3a765c85929a515cc6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..82671fea1caa4bb8e75766777535d89fba326ebf --- /dev/null +++ b/marked/Rel-11/26_series/26290/1dbb1d90b2022a3a765c85929a515cc6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5de6c6d0e058e012dc6becf9f090870ff00b1321629b9b81d49950aa60882e06 +size 52915 diff --git a/marked/Rel-11/26_series/26290/212c50c4e3d043c989037a01e13c1a98_img.jpg b/marked/Rel-11/26_series/26290/212c50c4e3d043c989037a01e13c1a98_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..af57299bb52624ec55fcb84c46762c849fb0ff45 --- /dev/null +++ b/marked/Rel-11/26_series/26290/212c50c4e3d043c989037a01e13c1a98_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b256bea8f14bfb12c2e774e8c2c2f8b6c08e003c8347ddd9c90492dd58d19b02 +size 56566 diff --git a/marked/Rel-11/26_series/26290/23aa6984e9910c0a722a7d1844ad1956_img.jpg b/marked/Rel-11/26_series/26290/23aa6984e9910c0a722a7d1844ad1956_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..53eea57195168af9afb7ffa99bf4a1060bcf39d2 --- /dev/null +++ b/marked/Rel-11/26_series/26290/23aa6984e9910c0a722a7d1844ad1956_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f1325b257a6b44b39c4b689d154e78670b9bfef8e7d820517356775fdd939b6 +size 22699 diff --git a/marked/Rel-11/26_series/26290/2ae3eae1bd80a90f192f568ae246a9a6_img.jpg b/marked/Rel-11/26_series/26290/2ae3eae1bd80a90f192f568ae246a9a6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..705da0dce57c9c265056a76aaaddfbe136a2a98f --- /dev/null +++ b/marked/Rel-11/26_series/26290/2ae3eae1bd80a90f192f568ae246a9a6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e4d017cc14916409f0e4b1d5f3abc6fb036b0b03258582a9b5cb2c15d364d5a +size 144228 diff --git a/marked/Rel-11/26_series/26290/2dc649aff45a8a0924db45fc3bd6aabb_img.jpg b/marked/Rel-11/26_series/26290/2dc649aff45a8a0924db45fc3bd6aabb_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..45bd49284065c62bfd79a88f65f386664605659e --- /dev/null +++ b/marked/Rel-11/26_series/26290/2dc649aff45a8a0924db45fc3bd6aabb_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de3a0f9a8733e9a01fbd6a2673b0e38fd10c7d62d7e4383b142a4f91ae78a5e8 +size 24674 diff --git a/marked/Rel-11/26_series/26290/3e2dcee303cecdd31b7f9ec0d8942fed_img.jpg b/marked/Rel-11/26_series/26290/3e2dcee303cecdd31b7f9ec0d8942fed_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8fe2de5526deeb21e8ba96ac6d34656b02ec6793 --- /dev/null +++ b/marked/Rel-11/26_series/26290/3e2dcee303cecdd31b7f9ec0d8942fed_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f220bd4972f9ea731219ceb04b53d98fc355006435df0618fd68f2814cbe180 +size 40361 diff --git a/marked/Rel-11/26_series/26290/50ef8602c7c9edd2da0e2133e772c2a2_img.jpg b/marked/Rel-11/26_series/26290/50ef8602c7c9edd2da0e2133e772c2a2_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9bc8196190c2dc4042e73fdbe37007829d9f9614 --- /dev/null +++ b/marked/Rel-11/26_series/26290/50ef8602c7c9edd2da0e2133e772c2a2_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfe08a92bc6d97a6e2502e39f0c41beaea4da6c89ff7daa63c323791120294f6 +size 82727 diff --git a/marked/Rel-11/26_series/26290/51536f203c07ce20ce119e7e09b11cb6_img.jpg b/marked/Rel-11/26_series/26290/51536f203c07ce20ce119e7e09b11cb6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8540b2b31d412b774e09b250c2bbbdd1c2b88a0f --- /dev/null +++ b/marked/Rel-11/26_series/26290/51536f203c07ce20ce119e7e09b11cb6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23b88e9cf3bc150c829b577bb18bbbd1b6681aba51c150f215deed9c88a9ff03 +size 108317 diff --git a/marked/Rel-11/26_series/26290/5e92d9e8e9ce204e405bff2367f88176_img.jpg b/marked/Rel-11/26_series/26290/5e92d9e8e9ce204e405bff2367f88176_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1cd093be26d08274a6280e0349740f2a3605c2de --- /dev/null +++ b/marked/Rel-11/26_series/26290/5e92d9e8e9ce204e405bff2367f88176_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d4ed76c3727e0679199172ee407488a1865ff69693b1cfa2b3307c1f85d63e2 +size 78130 diff --git a/marked/Rel-11/26_series/26290/61a7f401eb46fe99a71f27bc37493f04_img.jpg b/marked/Rel-11/26_series/26290/61a7f401eb46fe99a71f27bc37493f04_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c8a1394114c6ac8bfdfcdf241617c2ac6e13bdf9 --- /dev/null +++ b/marked/Rel-11/26_series/26290/61a7f401eb46fe99a71f27bc37493f04_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c0aded03453600d069d50334764a8cf859cb4c2ed87a3e7a8dbfb797d7a39ec +size 96437 diff --git a/marked/Rel-11/26_series/26290/6381dcd91bf4636842734ec95bbd75d4_img.jpg b/marked/Rel-11/26_series/26290/6381dcd91bf4636842734ec95bbd75d4_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e6ee3d88730a39200e6975a2191abe8eddb507a8 --- /dev/null +++ b/marked/Rel-11/26_series/26290/6381dcd91bf4636842734ec95bbd75d4_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b328a024b8ca781d000e0420c8dfb4e1931189b5b49557994c7e6c2a8c0d7647 +size 44416 diff --git a/marked/Rel-11/26_series/26290/6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg b/marked/Rel-11/26_series/26290/6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..295c57e4312d28d22710341d0142739ceb305e88 --- /dev/null +++ b/marked/Rel-11/26_series/26290/6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03e8cd05b062d12e5a7c2a1151d1766595d8550137db29b9276e910149d58aef +size 58562 diff --git a/marked/Rel-11/26_series/26290/7156cf400ef0e19f9d06a5d0549834a3_img.jpg b/marked/Rel-11/26_series/26290/7156cf400ef0e19f9d06a5d0549834a3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8680502b29e7daba3ab5e97d0b88c5121e8b61e9 --- /dev/null +++ b/marked/Rel-11/26_series/26290/7156cf400ef0e19f9d06a5d0549834a3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9927e0de5522a06378867a785914c879acef9279bd72e5b973d3b7d87a57d4e1 +size 39670 diff --git a/marked/Rel-11/26_series/26290/7efae06af3af43ffe5d4b956a679cf54_img.jpg b/marked/Rel-11/26_series/26290/7efae06af3af43ffe5d4b956a679cf54_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c8e129bfb0aa27e479939d6b47b9810c5a017df2 --- /dev/null +++ b/marked/Rel-11/26_series/26290/7efae06af3af43ffe5d4b956a679cf54_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38a13a7639b1fae48e44c683029cce63303f10408bcb29713fc94d985f0dbcc8 +size 15290 diff --git a/marked/Rel-11/26_series/26290/8307f6b04df072c9332f9987e034272c_img.jpg b/marked/Rel-11/26_series/26290/8307f6b04df072c9332f9987e034272c_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ef60c59f20f6f51cae60e200d152ea60b9ffdb8 --- /dev/null +++ b/marked/Rel-11/26_series/26290/8307f6b04df072c9332f9987e034272c_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c5c81fe4e4902c34be95aa301a5aa983a0981cea1ed6be7e3e48adf9d1f788a +size 93505 diff --git a/marked/Rel-11/26_series/26290/8d66c9c295023a1380f9986d3663bb1e_img.jpg b/marked/Rel-11/26_series/26290/8d66c9c295023a1380f9986d3663bb1e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9041e37598f52459fa6e8ef880770f13284cebae --- /dev/null +++ b/marked/Rel-11/26_series/26290/8d66c9c295023a1380f9986d3663bb1e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a2d012bd8ee2c25ff18f512d9d20c4f757ce3c838f55a9a510eb72071a9035 +size 114708 diff --git a/marked/Rel-11/26_series/26290/9b6b5924b48bf2fd5f347f88f06f45b3_img.jpg b/marked/Rel-11/26_series/26290/9b6b5924b48bf2fd5f347f88f06f45b3_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f998a73f071c606a7e272de1c45c6de13f65dd8f --- /dev/null +++ b/marked/Rel-11/26_series/26290/9b6b5924b48bf2fd5f347f88f06f45b3_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d867a8f3b184a74f99b792839fa26898c14255eeb878a1a889591f7658f5f2 +size 21535 diff --git a/marked/Rel-11/26_series/26290/9b9262a549828579ab904148450734f6_img.jpg b/marked/Rel-11/26_series/26290/9b9262a549828579ab904148450734f6_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..12fffa7a18c71bf50f2b11f4937bd888c1c4d66b --- /dev/null +++ b/marked/Rel-11/26_series/26290/9b9262a549828579ab904148450734f6_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb70307d6b590f067cdcfb87b726c3321ce43566031033128416ca9b29010602 +size 15472 diff --git a/marked/Rel-11/26_series/26290/9f6dec4d4e9fde40bce018861ef1278e_img.jpg b/marked/Rel-11/26_series/26290/9f6dec4d4e9fde40bce018861ef1278e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dda493074fe7d925de6412bc7a0c21ab5ec04c00 --- /dev/null +++ b/marked/Rel-11/26_series/26290/9f6dec4d4e9fde40bce018861ef1278e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab7ca2003332aac3b9a9bfa089c73b76043296c0f0052eed4f55c29e8c62ef9f +size 46229 diff --git a/marked/Rel-11/26_series/26290/ae0dd5533e0b7fd2db452b5e2fdf8e5b_img.jpg b/marked/Rel-11/26_series/26290/ae0dd5533e0b7fd2db452b5e2fdf8e5b_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..db6422778802411d807007edafc5a4cd936b6804 --- /dev/null +++ b/marked/Rel-11/26_series/26290/ae0dd5533e0b7fd2db452b5e2fdf8e5b_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d66a9cccc4fa87dfee2519a9cc14875ea688f92d381d5e4494f769560864b6bd +size 14807 diff --git a/marked/Rel-11/26_series/26290/aeb2a26a07219661191294dba528067a_img.jpg b/marked/Rel-11/26_series/26290/aeb2a26a07219661191294dba528067a_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7a5bd4ded2d451f59d4a4eab9bacdc5c03ff0c55 --- /dev/null +++ b/marked/Rel-11/26_series/26290/aeb2a26a07219661191294dba528067a_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:747b0488530336afd5f226aa52f1950472083dcb4dcdda7c0780d5ad04e997bd +size 96026 diff --git a/marked/Rel-11/26_series/26290/c78c2eefd86269d1740ab85a916f24f2_img.jpg b/marked/Rel-11/26_series/26290/c78c2eefd86269d1740ab85a916f24f2_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..428b475434623d863e36127bb9ec572af17bf93c --- /dev/null +++ b/marked/Rel-11/26_series/26290/c78c2eefd86269d1740ab85a916f24f2_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55432a8c1150628fbe86f14b7d86c392c089f9bf88d23ed4eeeea5410aadab2f +size 64190 diff --git a/marked/Rel-11/26_series/26290/d344e2567def9141040128932d6aec49_img.jpg b/marked/Rel-11/26_series/26290/d344e2567def9141040128932d6aec49_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..90fa6b16d7731d350072b87c05ad2d649a942de2 --- /dev/null +++ b/marked/Rel-11/26_series/26290/d344e2567def9141040128932d6aec49_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c47060ad84cfbb7198013b3ee07f5f6dfc83d47af9a1bb25721ac3f5f94cbc95 +size 20676 diff --git a/marked/Rel-11/26_series/26290/d7948c38a18636aefecdd95388196460_img.jpg b/marked/Rel-11/26_series/26290/d7948c38a18636aefecdd95388196460_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..095bc1ebe20e8e933a4f30e0d9e40043e6a72584 --- /dev/null +++ b/marked/Rel-11/26_series/26290/d7948c38a18636aefecdd95388196460_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1041f54059e4828485fda4bb0639d3e44e05e9de73ab7adac7dbbe36470cd36e +size 61844 diff --git a/marked/Rel-11/26_series/26290/e97d663314aff9c29bf8971323e6539e_img.jpg b/marked/Rel-11/26_series/26290/e97d663314aff9c29bf8971323e6539e_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..93783a62594ba19e368ffd7da46605e202644b46 --- /dev/null +++ b/marked/Rel-11/26_series/26290/e97d663314aff9c29bf8971323e6539e_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6419111b6c751f21c6fcefbe330ed5f89fe95b3135264acab5979144f3f56bbe +size 54550 diff --git a/marked/Rel-11/26_series/26290/fd3cbb53e991f8209ba17b398f426e13_img.jpg b/marked/Rel-11/26_series/26290/fd3cbb53e991f8209ba17b398f426e13_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..08fd896f7dbb02864bb7a90b19943cc3f88eb84b --- /dev/null +++ b/marked/Rel-11/26_series/26290/fd3cbb53e991f8209ba17b398f426e13_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9f6dc2ae095c30239a082497349f8a895b1ac2da96e0e5ab6a6239a385942a6 +size 19347 diff --git a/marked/Rel-11/26_series/26290/raw.md b/marked/Rel-11/26_series/26290/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..27df8db398912adeb9cf2b1c2142b45637eb592b --- /dev/null +++ b/marked/Rel-11/26_series/26290/raw.md @@ -0,0 +1,3160 @@ + + + + + + +# Contents + +| | | +|------------------------------------------------------------------------|----| +| Foreword ..... | 6 | +| 1 Scope..... | 7 | +| 2 References..... | 7 | +| 3 Definitions and abbreviations ..... | 8 | +| 3.1 Definitions..... | 8 | +| 3.2 Abbreviations ..... | 9 | +| 4 Outline description..... | 9 | +| 4.1 Functional description of audio parts..... | 10 | +| 4.2 Preparation of input samples..... | 10 | +| 4.3 Principles of the extended adaptive multi-rate wideband codec..... | 10 | +| 4.3.1 Encoding and decoding structure ..... | 11 | +| 4.3.2 LP analysis and synthesis in low-frequency band..... | 13 | +| 4.3.3 ACELP and TCX coding..... | 13 | +| 4.3.4 Coding of high-frequency band..... | 13 | +| 4.3.5 Stereo coding..... | 13 | +| 4.3.6 Low complexity operation..... | 13 | +| 4.3.7 Frame erasure concealment..... | 13 | +| 4.3.8 Bit allocation ..... | 14 | +| 5 Functional description of the encoder..... | 16 | +| 5.1 Input signal pre-processing ..... | 16 | +| 5.1.1 High Pass Filtering ..... | 16 | +| 5.1.2 Stereo Signal Downmixing/Bandsplitting..... | 16 | +| 5.2 Principle of the hybrid ACELP/TCX core encoding ..... | 17 | +| 5.2.1 Timing chart of the ACELP and TCX modes ..... | 17 | +| 5.2.2 ACELP/TCX mode combinations and mode encoding..... | 18 | +| 5.2.3 ACELP/TCX closed-loop mode selection..... | 19 | +| 5.2.4 ACELP/TCX open-loop mode selection..... | 20 | +| 5.3 Hybrid ACELP/TCX core encoding description ..... | 24 | +| 5.3.1 Pre-emphasis..... | 24 | +| 5.3.2 LP analysis and interpolation ..... | 24 | +| 5.3.2.1 Windowing and auto-correlation computation ..... | 24 | +| 5.3.2.2 Levinson-Durbin algorithm ..... | 24 | +| 5.3.2.3 LP to ISP conversion ..... | 24 | +| 5.3.2.4 ISP to LP conversion ..... | 24 | +| 5.3.2.5 Quantization of the ISP coefficient..... | 25 | +| 5.3.2.6 Interpolation of the ISPs ..... | 25 | +| 5.3.3 Perceptual weighting ..... | 25 | +| 5.3.4 ACELP Excitation encoder ..... | 25 | +| 5.3.4.1 Open-loop pitch analysis ..... | 25 | +| 5.3.4.2 Impulse response computation..... | 25 | +| 5.3.4.3 Target signal computation ..... | 26 | +| 5.3.4.4 Adaptive codebook ..... | 26 | +| 5.3.4.5 Algebraic codebook ..... | 26 | +| 5.3.4.5.1 Codebook structure ..... | 26 | +| 5.3.4.5.2 Pulse indexing..... | 26 | +| 5.3.4.5.3 Codebook search..... | 26 | +| 5.3.4.6 Quantization of the adaptive and fixed codebook gains ..... | 26 | +| 5.3.5 TCX Excitation encoder..... | 27 | +| 5.3.5.1 TCX encoder block diagram..... | 27 | +| 5.3.5.2 Computation of the target signal for transform coding..... | 30 | +| 5.3.5.3 Zero-input response subtraction..... | 30 | +| 5.3.5.4 Windowing of target signal..... | 31 | +| 5.3.5.5 Transform..... | 32 | +| 5.3.5.6 Spectrum pre-shaping ..... | 32 | +| 5.3.5.7 Split multi-rate lattice VQ..... | 33 | + +| | | | +|------------------------|-----------------------------------------------------------|----| +| 5.3.5.8 | Spectrum de-shaping..... | 38 | +| 5.3.5.9 | Inverse transform ..... | 38 | +| 5.3.5.10 | Gain optimization and quantization ..... | 38 | +| 5.3.5.11 | Windowing for overlap-and-add..... | 39 | +| 5.3.5.12 | Memory update ..... | 39 | +| 5.3.5.13 | Excitation signal computation ..... | 39 | +| 5.4 | Mono Signal High-Band encoding (BWE)..... | 39 | +| 5.5 | Stereo signal encoding ..... | 42 | +| 5.5.1 | Stereo Signal Low-Band Encoding ..... | 42 | +| 5.5.1.1 | Principle ..... | 43 | +| 5.5.1.2 | Signal Windowing ..... | 44 | +| 5.5.1.3 | Pre-echo mode ..... | 44 | +| 5.5.1.4 | Redundancy reduction ..... | 44 | +| 5.5.2 | Stereo Signal Mid-Band Processing..... | 44 | +| 5.5.2.1 | Principle ..... | 44 | +| 5.5.2.2 | Residual computation ..... | 45 | +| 5.5.2.3 | Filter computation, smoothing and quantization ..... | 45 | +| 5.5.2.4 | Channel energy matching ..... | 45 | +| 5.5.3 | Stereo Signal High-Band Processing..... | 46 | +| 5.6 | Packetization ..... | 46 | +| 5.6.1 | Packetization of TCX encoded parameters ..... | 46 | +| 5.6.1.1 | Multiplexing principle for a single binary table ..... | 47 | +| 5.6.1.2 | Multiplexing in case of multiple binary tables ..... | 48 | +| 5.6.2 | Packetization procedure for all parameters ..... | 50 | +| 5.6.3 | TCX gain multiplexing..... | 52 | +| 5.6.4 | Stereo Packetization ..... | 53 | +| 6 | Functional description of the decoder ..... | 53 | +| 6.1 | Mono Signal Low-Band synthesis ..... | 53 | +| 6.1.1 | ACELP mode decoding and signal synthesis ..... | 54 | +| 6.1.2 | TCX mode decoding and signal synthesis..... | 54 | +| 6.1.3 | Post-processing of Mono Low-Band signal ..... | 57 | +| 6.2 | Mono Signal High-Band synthesis..... | 59 | +| 6.3 | Stereo Signal synthesis..... | 62 | +| 6.3.1 | Stereo signal low-band synthesis..... | 63 | +| 6.3.2 | Stereo Signal Mid-Band synthesis..... | 64 | +| 6.3.3 | Stereo Signal High-Band synthesis ..... | 65 | +| 6.3.4 | Stereo output signal generation ..... | 65 | +| 6.4 | Stereo to mono conversion..... | 65 | +| 6.4.1 | Low-Band synthesis ..... | 65 | +| 6.4.2 | High-Band synthesis..... | 65 | +| 6.5 | Bad frame concealment..... | 66 | +| 6.5.1 | Mono..... | 66 | +| 6.5.1.1 | Mode decoding and extrapolation..... | 66 | +| 6.5.1.2 | TCX bad frame concealment ..... | 68 | +| 6.5.1.2.1 | Spectrum de-shaping ..... | 68 | +| 6.5.1.2.2 | Spectrum Extrapolation ..... | 68 | +| 6.5.1.2.3 | Amplitude Extrapolation ..... | 69 | +| 6.5.1.2.4 | Phase Extrapolation..... | 69 | +| 6.5.2 | Stereo ..... | 70 | +| 6.5.2.1 | Low-band ..... | 70 | +| 6.5.2.2 | Mid-band..... | 71 | +| 6.6 | Output signal generation ..... | 71 | +| 7 | Detailed bit allocation of the Extended AMR-WB codec..... | 72 | +| 8 | Storage and Transport Interface formats..... | 78 | +| 8.1 | Available Modes and Bitrates ..... | 78 | +| 8.2 | AMR-WB+ Transport Interface Format ..... | 81 | +| 8.3 | AMR-WB+ File Storage Format..... | 83 | +| Annex A (informative): | Change history..... | 85 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). This document describes the Extended Adaptive Multi-Rate Wideband (AMR-WB+) coder within the 3GPP system. + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +This Telecommunication Standard (TS) describes the detailed mapping from input blocks of monophonic or stereophonic audio samples in 16 bit uniform PCM format to encoded blocks and from encoded blocks to output blocks of reconstructed monophonic or stereophonic audio samples. The coding scheme is an extension of the AMR-WB coding scheme [3] and is referred to as extended AMR-WB or AMR-WB+ codec. It comprises all AMR-WB speech codec modes including VAD/DTX/CNG [2][8][10] as well as extended functionality for encoding general audio signals such as music, speech, mixed, and other signals. + +In the case of discrepancy between the requirements described in the present document and the ANSI-C code computational description of these requirements contained in [4], [5], the description in [4], [5], respectively, will prevail. The ANSI-C code is not described in the present document, see [4], [5] for a description of the floating-point or, respectively, fixed-point ANSI-C code. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. +- For a specific reference, subsequent revisions do not apply. +- For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. + +- [1] GSM 43.050: " Digital cellular telecommunications system (Phase 2); Transmission planning aspects of the speech service in the GSM Public Land Mobile Network (PLMN) system" +- [2] 3GPP TS 26.194: "AMR wideband speech codec; Voice Activity Detection (VAD)". +- [3] 3GPP TS 26.190: " AMR Wideband speech codec; Transcoding functions ". +- [4] 3GPP TS 26.304: "ANSI-C code for the floating point Extended AMR Wideband codec". +- [5] 3GPP TS 26.273: "ANSI-C code for the fixed point Extended AMR Wideband codec". +- [6] M. Xie and J.-P. Adoul, "Embedded algebraic vector quantization (EAVQ) with application to wideband audio coding," IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), Atlanta, GA, U.S.A, vol. 1, pp. 240-243, 1996. +- [7] J.H. Conway and N.J.A. Sloane, "A fast encoding method for lattice codes and quantizers," *IEEE Trans. Inform. Theory*, vol. IT-29, no. 6, pp. 820-824, Nov. 1983 +- [8] 3GPP TS 26.193: "AMR Wideband speech codec; Source controlled rate operation". +- [9] 3GPP TS 26.244: "Transparent end-to-end packet switched streaming service (PSS); 3GPP file format (3GP)" +- [10] 3GPP TS 26.192: "AMR Wideband speech codec; Comfort noise aspects" + +# --- 3 Definitions and abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the following terms and apply. + +**adaptive codebook:** The adaptive codebook contains excitation vectors that are adapted for every subframe. The adaptive codebook is derived from the long-term filter state. The lag value can be viewed as an index into the adaptive codebook. + +**algebraic codebook:** A fixed codebook where algebraic code is used to populate the excitation vectors (innovation vectors). The excitation contains a small number of nonzero pulses with predefined interlaced sets of potential positions. The amplitudes and positions of the pulses of the $k^{\text{th}}$ excitation codevector can be derived from its index $k$ through a rule requiring no or minimal physical storage, in contrast with stochastic codebooks whereby the path from the index to the associated codevector involves look-up tables. + +**anti-sparseness processing:** An adaptive post-processing procedure applied to the fixed codebook vector in order to reduce perceptual artifacts from a sparse fixed codebook vector. + +**closed-loop pitch analysis:** This is the adaptive codebook search, i.e., a process of estimating the pitch (lag) value from the weighted input speech and the long term filter state. In the closed-loop search, the lag is searched using error minimization loop (analysis-by-synthesis). In the adaptive multi-rate wideband codec, closed-loop pitch search is performed for every subframe. + +**direct form coefficients:** One of the formats for storing the short term filter parameters. In the adaptive multi-rate wideband codec, all filters which are used to modify speech samples use direct form coefficients. + +**fixed codebook:** The fixed codebook contains excitation vectors for speech synthesis filters. The contents of the codebook are non-adaptive (i.e., fixed). In the adaptive multi-rate wideband codec, the fixed codebook is implemented using an algebraic codebook. + +**fractional lags:** A set of lag values having sub-sample resolution. In the adaptive multi-rate wideband codec a sub-sample resolution of $\frac{1}{4}^{\text{th}}$ or $\frac{1}{2}^{\text{nd}}$ of a sample is used. + +**super frame:** A time interval equal to 1024 samples (80ms at a 12.8 kHz sampling rate). + +**frame:** A time interval equal to 256 samples (20ms at a 12.8 kHz sampling rate). + +**Immittance Spectral Frequencies:** (see Immittance Spectral Pair) + +**Immittance Spectral Pair:** Transformation of LPC parameters. Immittance Spectral Pairs are obtained by decomposing the inverse filter transfer function $A(z)$ to a set of two transfer functions, one having even symmetry and the other having odd symmetry. The Immittance Spectral Pairs (also called as Immittance Spectral Frequencies) are the roots of these polynomials on the z-unit circle. + +**integer lags:** A set of lag values having whole sample resolution. + +**interpolating filter:** An FIR filter used to produce an estimate of sub-sample resolution samples, given an input sampled with integer sample resolution. In this implementation, the interpolating filter has low pass filter characteristics. Thus the adaptive codebook consists of the low-pass filtered interpolated past excitation. + +**inverse filter:** This filter removes the short term correlation from the speech signal. The filter models an inverse frequency response of the vocal tract. + +**lag:** The long term filter delay. This is typically the true pitch period, or its multiple or sub-multiple. + +**LP analysis window:** For each frame, the short term filter coefficients are computed using the high pass filtered speech samples within the analysis window. In the adaptive multi-rate wideband codec, the length of the analysis window is always 384 samples. For all the modes, a single asymmetric window is used to generate a single set of LP coefficients. The 5 ms look-ahead is used in the analysis. + +**LP coefficients:** Linear Prediction (LP) coefficients (also referred as Linear Predictive Coding (LPC) coefficients) is a generic descriptive term for the short term filter coefficients. + +**open-loop pitch search:** A process of estimating the near optimal lag directly from the weighted speech input. This is done to simplify the pitch analysis and confine the closed-loop pitch search to a small number of lags around the open-loop estimated lags. In the adaptive multi-rate wideband codec, an open-loop pitch search is performed in every other subframe. + +**residual:** The output signal resulting from an inverse filtering operation. + +**short term synthesis filter:** This filter introduces, into the excitation signal, short term correlation which models the impulse response of the vocal tract. + +**perceptual weighting filter:** This filter is employed in the analysis-by-synthesis search of the codebooks. The filter exploits the noise masking properties of the formants (vocal tract resonances) by weighting the error less in regions near the formant frequencies and more in regions away from them. + +**subframe:** A time interval equal to 64 samples (5ms at 12.8 kHz sampling rate). + +**vector quantization:** A method of grouping several parameters into a vector and quantizing them simultaneously. + +**zero input response:** The output of a filter due to past inputs, i.e. due to the present state of the filter, given that an input of zeros is applied. + +**zero state response:** The output of a filter due to the present input, given that no past inputs have been applied, i.e., given that the state information in the filter is all zeroes. + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|------------|-----------------------------------------------| +| TCX | Transform coded excitation | +| ACELP | Algebraic Code Excited Linear Prediction | +| AGC | Adaptive Gain Control | +| AMR | Adaptive Multi-Rate | +| AMR-WB | Adaptive Multi-Rate Wideband | +| AMR-WB+ | Extended Adaptive Multi-Rate Wideband | +| CELP | Code Excited Linear Prediction | +| FIR | Finite Impulse Response | +| ISF | Immittance Spectral Frequency | +| ISP | Immittance Spectral Pair | +| ISPP | Interleaved Single-Pulse Permutation | +| LP | Linear Prediction | +| LPC | Linear Predictive Coding | +| LTP | Long Term Predictor (or Long Term Prediction) | +| MA | Moving Average | +| MRWB-ACELP | Wideband Multi-Rate ACELP | +| S-MSVQ | Split-MultiStage Vector Quantization | +| WB | Wideband | + +# --- 4 Outline description + +This TS is structured as follows: + +Section 4.1 contains a functional description of the audio parts including the A/D and D/A functions. Section 4.2 describes input format for the AMR-WB+ encoder and the output format for the AMR-WB+ decoder. Section 4.3 presents a simplified description of the principles of the AMR-WB codec. In subclause 4.4, the sequence and subjective importance of encoded parameters are given. + +Section 5 presents the functional description of the encoding functions of the AMR-WB+ extension modes, whereas clause 6 describes the decoding procedures for the extension modes. In section 7, the detailed bit allocation of the AMR-WB+ codec extension modes is tabulated. The AMR-WB speech modes are functionally unchanged as well as their bit allocation. Detailed information on them is found in [1]. + +## 4.1 Functional description of audio parts + +The analogue-to-digital and digital-to-analogue conversion will in principle comprise the elements given below. In case of stereo codec operation, the given principles will be applied to the 2 available audio channels. + +- 1) Analogue to uniform digital PCM + +- microphone; +- input level adjustment device; +- input anti-aliasing filter; +- sample-hold device sampling at 16/24/32/48 kHz; +- analogue-to-uniform digital conversion to 16-bit representation. + +The uniform format shall be represented in two's complement. + +### 2) Uniform digital PCM to analogue + +- conversion from 16-bit uniform PCM sampled at 16/24/32/48 kHz to analogue; +- a hold device; +- reconstruction filter including $x/\sin(x)$ correction; +- output level adjustment device; +- earphone or loudspeaker. + +In the terminal equipment, the A/D function may be achieved + +- by direct conversion to 14-bit uniform PCM format; + +For the D/A operation, the inverse operations take place. + +## 4.2 Preparation of input samples + +The encoder is fed with data from one/two input channels comprising of samples with a resolution of 16 bits in a 16-bit word. The decoder outputs data in the same format and number of output channels. Though, mono output of decoded stereo signals is supported. + +## 4.3 Principles of the extended adaptive multi-rate wideband codec + +The AMR-WB+ audio codec contains all the AMR-WB speech codec modes 1-9 and AMR-WB VAD and DTX. AMR-WB+ extends the AMR-WB codec by adding TCX, bandwidth extension, and stereo. + +The AMR-WB+ audio codec processes input frames equal to 2048 samples at an internal sampling frequency $F_s$ . The internal sampling frequency is limited to the range 12800-38400 Hz, see section 8 for more details. The 2048-sample frames are split into two critically sampled equal frequency bands. This results in two superframes of a 1024 samples corresponding to the low frequency (LF) and high frequency (HF) band. Each superframe is divided into four 256-samples frames. + +Sampling at the internal sampling rate is obtained by using a variable sampling conversion scheme, which re-samples the input signal. + +The LF and HF signals are then encoded using two different approaches: the LF is encoded and decoded using the "core" encoder/decoder, based on switched ACELP and transform coded excitation (TCX). In ACELP mode, the standard AMR-WB codec is used. The HF signal is encoded with relatively few bits (16 bits/frame) using a bandwidth extension (BWE) method. + +The basic set of rates are built based on AMR-WB rates in addition to bandwidth extension. The basic set of mono rates are shown in Table 1. + +**Table 1: Basic set of mono rates** + +| Mono rate(incl. BWE)
(bits/frame)
| Corresponding AMR-WB mode | +|----------------------------------------------|----------------------------------| +| 208 | NA | +| 240 | NA | +| 272 | 12.65 | +| 304 | 14.25 | +| 336 | 15.85 | +| 384 | 18.25 | +| 416 | 19.85 | +| 480 | 23.05 | + +Note that in ACELP mode of operation, compared to AMR-WB, the VAD bit is removed, two bits per frame are added for gain prediction, and 2 bits are added for signaling frame encoding type. This adds 3 bits per frame. Note also that 16 bits/frame is always used for bandwidth extension (to encode the HF band). The first two basic mono rates are similar to other rates except that they use a fixed codebook with 20 bits or 28 bits, respectively. + +For stereo coding, the set of stereo extension rates given in Table 2 are used. + +**Table 2: Basic set of stereo rates** + +| Stereo extension rates (incl. BWE)
(Bits/frame)
| | +|------------------------------------------------------------|-----| +| 40 | 104 | +| 48 | 112 | +| 56 | 120 | +| 64 | 128 | +| 72 | 136 | +| 80 | 144 | +| 88 | 152 | +| 96 | 160 | + +Note that the bandwidth extension is applied to both channels which requires additional 16 bits/frame for the stereo extension. + +A certain mode of operation is obtained by choosing a rate from Table 1, in case of mono operation, or by combining a rate from Table 1 with a stereo extension rate from Table 2, in case of stereo operation. The resulting coding bitrate is (mono rate + stereo rate) $F_s / 512$ . + +### Examples: + +- For an internal sampling frequency of 32 kHz by choosing mono rate equal to 384 bits/frame and without stereo, we can obtain a bit-rate equal to 24 kbps and the frame length would be of a 16 ms duration. +- For an internal sampling frequency of 25.6 kHz by choosing mono rate equal to 272 bits/frame and stereo rate equal to 88 bits/frame, we can obtain a bit-rate equal to 18 kbps and the frame length would be of a 20 ms duration. + +**Note.** The documentation of the AMR-WB+ floating-point C-code in [4] contains further information on how to use the executables compiled from this source code to exercise the various possible uses, in the codec, of mono bit rate, stereo bit rate and internal sampling frequency, and the resulting total bit rates. + +### 4.3.1 Encoding and decoding structure + +Figure 1 presents the AMR-WB+ encoder structure. The input signal is separated in two bands. The first band is the low-frequency (LF) signal, which is critically sampled at $F_s/2$ . The second band is the high-frequency (HF) signal, which is also downsampled to obtain a critically sampled signal. The LF and HF signals are then encoded using two different approaches: the LF signal is encoded and decoded using the "core" encoder/decoder, based on switched ACELP and transform coded excitation (TCX). In ACELP mode, the standard AMR-WB codec is used. The HF signal is encoded with relatively few bits using a bandwidth extension (BWE) method. + +The parameters transmitted from encoder to decoder are the mode selection bits, the LF parameters and the HF parameters. The parameters for each 1024-sample super-frame are decomposed into four packets of identical size. + +When the input signal is stereo, the Left and right channels are combined into mono signal for ACELP/TCX encoding, whereas the stereo encoding receives both input channels. + +Figure 2 presents the AMR-WB+ decoder structure. The LF and HF bands are decoded separately after which they are combined in a synthesis filterbank. If the output is restricted to mono only, the stereo parameters are omitted and the decoder operates in mono mode. + +![Figure 1: High-level structure of AMR-WB+ encoder. The diagram shows the flow from input signals (L, R, M) through a preprocessing and analysis filterbank. The filterbank outputs LF signals (L_LF, R_LF) and HF signals (L_HF, R_HF). The LF signals are down-mixed to (M, S) and then encoded by a Stereo encoder. The HF signals are folded in the 0-Fs/4 kHz band and encoded by two HF encoding blocks. The ACELP/TCX encoding block receives the down-mixed LF signals and outputs Mono LF parameters. The Stereo encoding block receives the down-mixed LF signals and outputs Stereo parameters. All encoded parameters (HF parameters, mode, Mono LF parameters, Stereo parameters) are multiplexed by a MUX block. A legend indicates that shaded areas represent Mono operation.](5e92d9e8e9ce204e405bff2367f88176_img.jpg) + +Figure 1: High-level structure of AMR-WB+ encoder. The diagram shows the flow from input signals (L, R, M) through a preprocessing and analysis filterbank. The filterbank outputs LF signals (L\_LF, R\_LF) and HF signals (L\_HF, R\_HF). The LF signals are down-mixed to (M, S) and then encoded by a Stereo encoder. The HF signals are folded in the 0-Fs/4 kHz band and encoded by two HF encoding blocks. The ACELP/TCX encoding block receives the down-mixed LF signals and outputs Mono LF parameters. The Stereo encoding block receives the down-mixed LF signals and outputs Stereo parameters. All encoded parameters (HF parameters, mode, Mono LF parameters, Stereo parameters) are multiplexed by a MUX block. A legend indicates that shaded areas represent Mono operation. + +Figure 1: High-level structure of AMR-WB+ encoder + +![Figure 2: High-level structure of AMR-WB+ decoder. The diagram shows the flow from a DEMUX block to various decoding blocks. The DEMUX outputs HF parameters, mode, Mono LF parameters, and Stereo parameters. The HF parameters are decoded by two HF decoding blocks, which output L_HF and R_HF signals. The mode is passed to the ACELP/TCX decoding block. The Mono LF parameters are decoded by the ACELP/TCX decoding block, which outputs M_HF and M_LF signals. The Stereo parameters are decoded by a Stereo decoding block, which outputs L_LF and R_LF signals. All decoded signals (L_HF, R_HF, M_HF, M_LF, L_LF, R_LF) are combined in a synthesis filterbank and postprocessing block, which outputs the final signals: Output signal L, Output signal R, and Output signal M. A legend indicates that shaded areas represent Mono operation.](c78c2eefd86269d1740ab85a916f24f2_img.jpg) + +Figure 2: High-level structure of AMR-WB+ decoder. The diagram shows the flow from a DEMUX block to various decoding blocks. The DEMUX outputs HF parameters, mode, Mono LF parameters, and Stereo parameters. The HF parameters are decoded by two HF decoding blocks, which output L\_HF and R\_HF signals. The mode is passed to the ACELP/TCX decoding block. The Mono LF parameters are decoded by the ACELP/TCX decoding block, which outputs M\_HF and M\_LF signals. The Stereo parameters are decoded by a Stereo decoding block, which outputs L\_LF and R\_LF signals. All decoded signals (L\_HF, R\_HF, M\_HF, M\_LF, L\_LF, R\_LF) are combined in a synthesis filterbank and postprocessing block, which outputs the final signals: Output signal L, Output signal R, and Output signal M. A legend indicates that shaded areas represent Mono operation. + +Figure 2: High-level structure of AMR-WB+ decoder + +### 4.3.2 LP analysis and synthesis in low-frequency band + +The AMR-WB+ codec applies LP analysis for both the ACELP and TCX modes when encoding the LF signal. The LP coefficients are interpolated linearly at every 64-sample sub-frame. The LP analysis window is a half-cosine of length 384 samples. + +### 4.3.3 ACELP and TCX coding + +To encode the core mono signal (0-Fs/4 kHz band), the AMR-WB+ codec utilises either ACELP or TCX coding for each frame. The coding mode is selected based on closed-loop analysis-by-synthesis method. Only 256-sample frames are considered for ACELP frames (as in AMR-WB), whereas frames of 256, 512 or 1024 samples are possible in TCX mode. + +ACELP encoding and decoding are similar to standard AMR-WB speech codec. The ACELP coding consists of LTP analysis and synthesis and algebraic codebook excitation. The ACELP coding mode is used in AMR-WB operation within AMR-WB+ codec. + +In TCX mode the perceptually weighted signal is processed in the transform domain. The Fourier transformed weighted signal is quantised using split multi-rate lattice quantisation (algebraic VQ). Transform is calculated in 1024, 512 or 256 samples windows. The excitation signal is recovered by inverse filtering the quantised weighted signal through the inverse weighting filter (same weighting filter as in AMR-WB). + +### 4.3.4 Coding of high-frequency band + +Whereas the LF signal (0-Fs/4 kHz band) is encoded using the previously described switched ACELP/TCX encoding approach, the HF signal is encoded using a low-rate parametric bandwidth extension (BWE) approach. Only gains and spectral envelope information are transmitted in the BWE approach used to encode the HF signal. + +The bandwidth extension is done separately for left and right channel in stereo operation. + +### 4.3.5 Stereo coding + +In the case of stereo coding, a similar band decomposition as in the mono case is used. The two channels L and R are decomposed into LF and HF signals. The LF signals of the two channels are down-mixed to form an LF mono signal, (0-Fs/4 kHz band). This mono signal is encoded separately by the core codec. + +The LF part of the two channels is further decomposed into two bands (0-5Fs/128 kHz band) and (5Fs/128 kHz- Fs/4 kHz band). The very low frequency (VLF) band is critically down-sampled, and the side signal is computed. The resulting signal is semi-parametrically encoded in the frequency domain using the algebraic VQ. The frequency domain encoding is performed in closed loop by choosing among 40-, 80- and 160-sample frame lengths. + +The high frequency part of the LF signals (Midband) are parametrically encoded. In the decoder, the parametric model is applied on the mono signal excitation in order to restore the high frequency part of the original LF part of the two channels. + +The HF part of the two channels are encoded by using parametric BWE described below. + +### 4.3.6 Low complexity operation + +In the low complexity operation (use case B) the decision on the usage of ACELP and TCX mode is done in an open-loop manner. This approach introduces computational savings in the encoder. + +### 4.3.7 Frame erasure concealment + +When missing packets occur at the receiver, the decoder applies concealment. The concealment algorithm depends on the mode of the correctly received packets preceding and following the missing packet. Concealment uses either time-domain coefficient extrapolation, as in AMR-WB, or frequency-domain interpolation for some of the TCX modes. + +### 4.3.8 Bit allocation + +The bit allocation for the different parameters in the low-frequency band coding (Core) (0-Fs/4 kHz band) is shown in Tables 3, 4, 5, and 6. Note that there are two mode bits sent in each 256-sample packet. These mode bits are not shown in the bit allocation tables. The bit allocations for the stereo part is shown in Tables 7, 8, and 9. Note that there are also two additional mode bits for the VLF stereo encoder, which are not shown in the bit allocation. The bit allocation for the stereo HF part is by definition that of the bandwidth extension, as presented in Tables 7, 8 and 9. + +Tables 2 and 3 show the total bits per 256-sample packet, including mode bits. + +**Table 3: Bit allocations for ACELP core rates including BWE (per frame)** + +| Parameter | Number of bits | | | | | | | | +|------------------------|----------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------| +| Mode bits | 2 | | | | | | | | +| ISF Parameters | 46 | | | | | | | | +| Mean Energy | 2 | | | | | | | | +| Pitch Lag | 30 | | | | | | | | +| Pitch Filter | $4 \times 1$ | | | | | | | | +| Fixed-codebook Indices | $4 \times 20$ | $4 \times 28$ | $4 \times 36$ | $4 \times 44$ | $4 \times 52$ | $4 \times 64$ | $4 \times 72$ | $4 \times 88$ | +| Codebook Gains | $4 \times 7$ | | | | | | | | +| HF ISF Parameters | 9 | | | | | | | | +| HF gain | 7 | | | | | | | | +| Total in bits | 208 | 240 | 272 | 304 | 336 | 384 | 416 | 480 | + +**Table 4: Bit allocations for 256-sample TCX window (Core)** + +| Parameter | Number of bits | | | | | | | | +|-------------------|----------------|-----|-----|-----|-----|-----|-----|-----| +| Mode bits | 2 | | | | | | | | +| ISF Parameters | 46 | | | | | | | | +| Noise factor | 3 | | | | | | | | +| Global Gain | 7 | | | | | | | | +| Algebraic VQ | 134 | 166 | 198 | 230 | 262 | 310 | 342 | 406 | +| HF ISF Parameters | 9 | | | | | | | | +| HF gain | 7 | | | | | | | | +| Total in bits | 208 | 240 | 272 | 304 | 336 | 384 | 416 | 480 | + +**Table 5: Bit allocations for 512-sample TCX window (Core)** + +| Parameter | Number of bits | | | | | | | | +|--------------------|----------------|-----|-----|-----|-----|-----|-----|-----| +| Mode bits | $2+2$ | | | | | | | | +| ISF Parameters | 46 | | | | | | | | +| Noise factor | 3 | | | | | | | | +| Global Gain | 7 | | | | | | | | +| Gain redundancy | 6 | | | | | | | | +| Algebraic VQ | 318 | 382 | 446 | 510 | 574 | 670 | 734 | 862 | +| HF ISF Parameters | 9 | | | | | | | | +| HF gain | 7 | | | | | | | | +| HF Gain correction | $8 \times 2$ | | | | | | | | +| Total in bits | 416 | 480 | 544 | 608 | 672 | 768 | 832 | 960 | + +**Table 6: Bit allocations for 1024-sample TCX window (Core)** + +| Parameter | Number of bits | | | | | | | | +|--------------------|----------------|-----|------|------|------|------|------|------| +| Mode bits | $2+2+2+2$ | | | | | | | | +| ISF Parameters | 46 | | | | | | | | +| Noise factor | 3 | | | | | | | | +| Global Gain | 7 | | | | | | | | +| Gain redundancy | $3+3+3$ | | | | | | | | +| Algebraic VQ | 695 | 823 | 951 | 1079 | 1207 | 1399 | 1527 | 1783 | +| HF ISF Parameters | 9 | | | | | | | | +| HF gain | 7 | | | | | | | | +| HF Gain correction | $16 \times 3$ | | | | | | | | +| Total in bits | 832 | 960 | 1088 | 1216 | 1344 | 1536 | 1664 | 1920 | + +**Table 7 Bit allocations for stereo encoder for 256-sample window** + +| Parameter | Number of bits | | | | | | | | | | | | | | | | | +|-------------------|----------------|----|----|----|----|----|----|----|-----|-----|-----|-----|-----|-----|-----|-----|--| +| Mode bits | 2 | | | | | | | | | | | | | | | | | +| Global Gain | 7 | | | | | | | | | | | | | | | | | +| Gain | 7 | | | | | | | | | | | | | | | | | +| Unused bits | 1 | | | | | | | | | | | | | | | | | +| Midband | 6 | | | | | | | | 12 | | | | | | | | | +| Algebraic VQ | 1 | 9 | 17 | 25 | 33 | 41 | 49 | 51 | 59 | 67 | 75 | 83 | 91 | 99 | 107 | 115 | | +| HF ISF Parameters | 9 | | | | | | | | | | | | | | | | | +| HF gain | 7 | | | | | | | | | | | | | | | | | +| Total in bits | 40 | 48 | 56 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | | + +**Table 8 Bit allocations for stereo encoder for 512-sample window** + +| Parameter | Number of bits | | | | | | | | | | | | | | | | | +|--------------------|----------------|----|-----|-----|-----|-----|-----|-----|------|-----|-----|-----|-----|-----|-----|-----|--| +| Mode bits | 2+2 | | | | | | | | | | | | | | | | | +| Global Gain | 7 | | | | | | | | | | | | | | | | | +| Gain | 7 | | | | | | | | | | | | | | | | | +| Unused bits | 1+1 | | | | | | | | | | | | | | | | | +| Midband | 6×2 | | | | | | | | 12×2 | | | | | | | | | +| Algebraic VQ | 16 | 32 | 48 | 64 | 80 | 96 | 112 | 116 | 132 | 148 | 164 | 180 | 196 | 212 | 228 | 244 | | +| HF ISF Parameters | 9 | | | | | | | | | | | | | | | | | +| HF gain | 7 | | | | | | | | | | | | | | | | | +| HF Gain correction | 8 × 2 | | | | | | | | | | | | | | | | | +| Total in bits | 80 | 96 | 112 | 128 | 144 | 160 | 176 | 192 | 208 | 224 | 240 | 256 | 272 | 288 | 304 | 320 | | + +**Table 9 Bit allocations for stereo encoder for 1024-sample window** + +| Parameter | Number of bits | | | | | | | | | | | | | | | | | +|--------------------|----------------|-----|-----|-----|-----|-----|-----|-----|------|-----|-----|-----|-----|-----|-----|-----|--| +| Mode bits | 2+2+2+2 | | | | | | | | | | | | | | | | | +| Global Gain | 7 | | | | | | | | | | | | | | | | | +| Gain | 7 | | | | | | | | | | | | | | | | | +| Unused bits | 1+1+1+1 | | | | | | | | | | | | | | | | | +| Midband | 6×4 | | | | | | | | 12×4 | | | | | | | | | +| Algebraic VQ | 46 | 78 | 110 | 142 | 174 | 206 | 238 | 246 | 278 | 310 | 342 | 374 | 406 | 438 | 470 | 502 | | +| HF ISF Parameters | 9 | | | | | | | | | | | | | | | | | +| HF gain | 7 | | | | | | | | | | | | | | | | | +| HF Gain correction | 16 × 3 | | | | | | | | | | | | | | | | | +| Total in bits | 160 | 192 | 224 | 256 | 288 | 320 | 352 | 384 | 416 | 448 | 480 | 512 | 544 | 576 | 608 | 640 | | + +# 5 Functional description of the encoder + +In this clause, the different functions of the encoder extension modes represented in Figure 1 are described. Input signals are understood as internal, i.e. sampled at the internal sampling frequency $F_s$ . + +## 5.1 Input signal pre-processing + +Input signals are pre-processed in order to bring them to the internal sampling frequency of the encoder $F_s$ kHz. The signal is upsampled by a factor $K$ (related to the desired internal sampling frequency), filtered by a low pass filter and then downsampled by a factor 180. This operation is efficiently implemented by a polyphase filter implementation. + +![Block diagram showing the initial signal processing steps: Input signal 180Fs /K kHz is upsampled by K (↑K), then low-pass filtered (LP 1/180), and finally downsampled by 180 (↓180) to produce an output signal at Fs kHz.](7efae06af3af43ffe5d4b956a679cf54_img.jpg) + +Input signal $180F_s /K$ kHz + +Output signal $F_s$ kHz + +Block diagram showing the initial signal processing steps: Input signal 180Fs /K kHz is upsampled by K (↑K), then low-pass filtered (LP 1/180), and finally downsampled by 180 (↓180) to produce an output signal at Fs kHz. + +The resulting signals are further decomposed into two equal critically sampled bands as shown in the following figure: + +![Block diagram showing the decomposition of the input signal into two bands. The input signal is Fs kHz with 2048 samples. It is split into two paths: one through a high-pass filter (HP) followed by a downsampler of 2 (↓2) to produce x_H(n) with 1024 samples; the other through a low-pass filter (LP) followed by a downsampler of 2 (↓2) to produce x_L(n) with 1024 samples.](9b6b5924b48bf2fd5f347f88f06f45b3_img.jpg) + +Input signal $F_s$ kHz +2048 samples + +$x_H(n)$ +1024 samples + +$x_L(n)$ +1024 samples + +Block diagram showing the decomposition of the input signal into two bands. The input signal is Fs kHz with 2048 samples. It is split into two paths: one through a high-pass filter (HP) followed by a downsampler of 2 (↓2) to produce x\_H(n) with 1024 samples; the other through a low-pass filter (LP) followed by a downsampler of 2 (↓2) to produce x\_L(n) with 1024 samples. + +At an internal sampling rate of $F_s$ kHz, the lower band signals are obtained by first low-pass filtering to $F_s/4$ kHz critically downsampling the low-pass filtered signal to $F_s/2$ kHz. The higher band signals are obtained by band-pass filtering the input signals to frequencies above $F_s/4$ kHz, and critically downsampling the high-pass filtered signal to $F_s/2$ kHz sampling frequency. + +### 5.1.1 High Pass Filtering + +The lower band signals are high pass filtered. The high-pass filter serves as a precaution against undesired low frequency components. A high pass filter is used, and it is given by + +$$H_{hl}(z) = \frac{b_0 - b_1 z^{-1} + b_2 z^{-2}}{1 - a_1 z^{-1} + a_2 z^{-2}}.$$ + +where the filter parameters are dependent on the internal sampling rate. + +### 5.1.2 Stereo Signal Downmixing/Bandsplitting + +When the input audio signal is stereo, the lower band mono signal is obtained by downmixing the left and right channels according to the following + +$$x_{ML}(n) = 0.5(x_{LL}(n) + x_{RL}(n))$$ + +where $x_{LL}(n)$ , resp. $x_{RL}(n)$ , is the lower band signal from the left, resp. right, channels. The lower band mono signal is supplied to the core low band encoder for TCX/ACELP encoding. + +For stereo encoding, the obtained downmixed mono signal $x_{ML}(n)$ and the right channel signal $x_{RL}(n)$ are further split into two bands: a critically sampled low frequency band and a residual high frequency band according to the following diagram + +![Block diagram of a signal processing system. An input signal, labeled x_ML(n) or x_RL(n), enters a block labeled '↓5/32'. The output of this block is split: one path goes to a block labeled '↑32/5', and the other path goes to a 'delay' block. The output of the '↑32/5' block is added to the output of the 'delay' block in a summation block labeled '+'. The output of the summation block is labeled x_MMid(n) or x_RMid(n). The output of the '↑32/5' block is also labeled x_MLo(n) or x_RLo(n).](1a827b10290f33d4fec04d0e8ef7a897_img.jpg) + +Block diagram of a signal processing system. An input signal, labeled x\_ML(n) or x\_RL(n), enters a block labeled '↓5/32'. The output of this block is split: one path goes to a block labeled '↑32/5', and the other path goes to a 'delay' block. The output of the '↑32/5' block is added to the output of the 'delay' block in a summation block labeled '+'. The output of the summation block is labeled x\_MMid(n) or x\_RMid(n). The output of the '↑32/5' block is also labeled x\_MLo(n) or x\_RLo(n). + +The critically sampled low band output signals, $x_{MLo}(n)$ and $x_{RLo}(n)$ are fed to the stereo low band encoder, while the signals $x_{MMid}(n)$ and $x_{RMid}(n)$ to the stereo mid band encoder. + +## 5.2 Principle of the hybrid ACELP/TCX core encoding + +The encoding algorithm at the core of the AMR-WB+ codec is based on a hybrid ACELP/TCX model. For every block of input signal, the encoder decides (either in open-loop or closed-loop) which encoding model (ACELP or TCX) is best. The ACELP model is a time-domain, predictive encoder, best suited for speech and transient signals. The AMR-WB encoder is used in ACELP modes. Alternatively, the TCX model is a transform-based encoder, and is more appropriate for typical music samples. Frame lengths of variable sizes are possible in TCX mode, as will be explained in Section 5.2.1. + +In Sections 5.2.1 to 5.2.4, the general principles of the hybrid ACELP/TCX core encoder will be presented. Then Section 5.3 and its subsections will give the details of the ACELP and TCX encoding modes. + +### 5.2.1 Timing chart of the ACELP and TCX modes + +The ACELP/TCX core encoder takes a mono signal as input, at a sampling frequency of $F_s/2$ kHz. This signal is processed in super-frames of 1024 samples in duration. Within each 1024-sample super-frame, several encoding modes are possible, depending on the signal structure. These modes are: 256-sample ACELP, 256-sample TCX, 512-sample TCX and 1024-sample TCX. These encoding modes will be described further, but first we look at the different possible mode combinations, described by a timing chart. + +Figure 4 shows the timing chart of all possible modes within an 1024-sample superframe. As the figure shows, each 256-sample frame within a super-frame can be into one of four possible modes, which we call ACELP, TCX256, TCX512 and TCX1024. When in ACELP mode, the corresponding 256-sample frame is encoded with AMR-WB. In TCX256 mode, the frame is encoded using TCX with a 256-sample support, plus 32 samples of look-ahead used for overlap-and add since TCX is a transform coding approach. The TCX512 mode means that two consecutive 256-sample frames are grouped to be encoded as a single 512-sample block, using TCX with a 512-sample support plus 64 samples look-ahead. Note that the TCX512 mode is only allowed by grouping either the first two 256-sample frames of the super-frame, or the last two 256-sample frames. Finally, the TCX1024 mode indicates that all 256-sample frames within the super-frame are grouped together to be encoded in a single block using TCX with an 1024-sample support plus 128 samples look-ahead. + +![Timing chart of the frame types showing various ACELP and TCX frame durations over a 1024-sample superframe timeline.](8307f6b04df072c9332f9987e034272c_img.jpg) + +The diagram illustrates the timing of different frame types within a 1024-sample superframe. The horizontal axis represents time, with markers for 256, 512, and 1024 samples. Above the timeline, various frame durations are shown in boxes: + + +- ACELP (256 samples) +- TCX (256+32 samples) +- TCX (512+64 samples) +- TCX (1024+128 samples) + + The diagram shows how these frames are positioned and overlap. For example, a 1024-sample TCX frame spans the entire superframe, while a 256-sample ACELP frame occupies the first quarter. Overlaps are indicated by double-headed arrows with labels: 32 samples, 64 samples, 32 samples, 64 samples, and 128 samples. + +Timing chart of the frame types showing various ACELP and TCX frame durations over a 1024-sample superframe timeline. + +Figure 4: Timing chart of the frame types + +### 5.2.2 ACELP/TCX mode combinations and mode encoding + +From Figure 4, there are exactly 26 different ACELP/TCX mode combinations within an 1024-sample superframe. These are shown in Table 10. + +Table 10: Possible mode combinations in an 1024-sample super-frame + +| | | | +|--------------|--------------|--------------| +| (0, 0, 0, 0) | (0, 0, 0, 1) | (2, 2, 0, 0) | +| (1, 0, 0, 0) | (1, 0, 0, 1) | (2, 2, 1, 0) | +| (0, 1, 0, 0) | (0, 1, 0, 1) | (2, 2, 0, 1) | +| (1, 1, 0, 0) | (1, 1, 0, 1) | (2, 2, 1, 1) | +| (0, 0, 1, 0) | (0, 0, 1, 1) | (0, 0, 2, 2) | +| (1, 0, 1, 0) | (1, 0, 1, 1) | (1, 0, 2, 2) | +| (0, 1, 1, 0) | (0, 1, 1, 1) | (0, 1, 2, 2) | +| (1, 1, 1, 0) | (1, 1, 1, 1) | (1, 1, 2, 2) | +| | | (2, 2, 2, 2) | +| | | (3, 3, 3, 3) | + +We interpret each quadruplet of numbers $(m_0, m_1, m_2, m_3)$ in Table 10 as follows: $m_k$ is the mode indication for the $k^{th}$ 256-sample frame in the 1024-sample super-frame, where $m_k$ can take the following values: + +- $m_k = 0$ means the mode for frame $k$ is 256-sample ACELP +- $m_k = 1$ means the mode for frame $k$ is 256-sample TCX +- $m_k = 2$ means the mode for frame $k$ is 512-sample TCX +- $m_k = 3$ means the mode for frame $k$ is 1024-sample TCX + +Obviously, when the first 256-sample frame is in mode "2" (512-sample TCX), the second 256-sample frame must also be in mode 2. Similarly, when the third 256-sample frame is in mode "2" (512-sample TCX), the fourth 256-sample frame must also be in mode 2. And there is only one possible mode configuration including the value "3" (1024-sample TCX), namely all four 256-sample frames are in the same mode ( $m_k = 3$ for $k = 0, 1, 2$ and 3). This rigid frame structure can be exploited to aid in frame erasure concealment. + +As discussed above, the parameters for each 1024-sample super-frame are actually decomposed into four frames of identical size. To increase robustness, the mode bits are actually sent as two bits (the values of $m_k$ ) in each transmitted frame. For example, if the superframe is encoded in a full 1024-sample TCX frame, which is then decomposed into four packets of equal size, then each of these four packets will contain the binary value "11" (mode $m_k = 3$ ) as mode indicator. + +### 5.2.3 ACELP/TCX closed-loop mode selection + +The best mode combination out of the 26 possible combinations of Table 10 is determined in closed-loop. This means that the signal in each 256-sample frame within an 1024-sample super-frame has to be encoded in several modes before selecting the best combination. This closed-loop approach is explained in Figure 5. + +The left portion of Figure 5 (Trials) shows what encoding mode is applied to each 256-sample frame in 11 successive trials. Fr0 to Fr3 refer to Frame 0 to Frame 3 in the super-frame. The trial number (1 to 11) indicates a step in the closed-loop mode-selection process. Note that each 256-sample frame is involved in only four of the 11 encoding trials. When more than 1 frame is involved in a trial (lines 5, 10 and 11 of Figure 5), then TCX of the corresponding length is applied (TCX512 or TCX1024). The right portion of Figure 5 gives an example of mode selection, where the final decision (after Trial 11) is 1024-sample TCX. This would result in sending a value of 3 for the mode in all four packets for this super-frame. Bold numbers in the example at the right of Figure 5 show at what point a mode decision is taken in the intermediate steps of the mode selection process. The final mode decision is only known after Trial 11. + +The mode selection process shown in Figure 5 proceeds as follows. First, in trials 1 and 2, ACELP (AMR-WB) then 256-sample TCX encoding are tried in the first 256-sample frame (Fr0). Then, a mode selection is made for Fr0 between these two modes. The selection criterion is the average segmental SNR between the weighted speech $x_w(n)$ and the synthesized weighted speech $\widehat{x}_w(n)$ . The segmental SNR in subframe $i$ is defined as + +$$segSNR_i = 20 \log_{10} \left( \frac{\sum_{n=0}^{N-1} x_w^2(n)}{\sum_{n=0}^{N-1} (x_w(n) - \widehat{x}_w(n))^2} \right)$$ + +where $N$ is the length of the subframe (equivalent to a 64-sample sub-frame in the encoder). Then, the average segmental SNR is defined as + +$$\overline{segSNR} = \frac{1}{N_{SF}} \sum_{i=0}^{N_{SF}-1} segSNR_i$$ + +where $N_{SF}$ is the number of subframes in the frame. Since a frame can be either 256, 512 or 1024 samples in length, $N_{SF}$ can be either 4, 8 or 16. In the example of Figure 5, we assume that, according to the $\overline{segSNR}$ decision criterion, mode ACELP was retained over TCX. Then, in trials 3 and 4, the same mode comparison is made for Fr1 between ACELP and 256-sample TCX. Here, we assume that 256-sample TCX was better than ACELP, based again on the segmental SNR measure described above. This choice is indicated in bold on line 4 of the example at the right of Figure 5. Then, in trial 5, Fr0 and Fr1 are grouped together to form a 512-sample frame which is encoded using 512-sample TCX. The algorithm now has to choose between 512-sample TCX for the first 2 frames, compared to ACELP in the first frame and TCX256 in the second frame. In this example, on line 5 in bold, the sequence **ACELP-TCX256** was selected over **TCX-512**, according to the segmental SNR criterion. + +| | TRIALS (11) | | | | Example of selection
(in bold = comparison is made) | | | | +|-----------|-------------|---------|---------|---------|--------------------------------------------------------|----------------|----------------|----------------| +| | Fr 0 | Fr 1 | Fr 2 | Fr 3 | Fr 0 | Fr 1 | Fr 2 | Fr 3 | +| 1 | ACELP | | | | ACELP | | | | +| 2 | TCX256 | | | | ACELP | | | | +| 3 | | ACELP | | | ACELP | ACELP | | | +| 4 | | TCX256 | | | ACELP | TCX256 | | | +| 5 | TCX512 | TCX512 | | | ACELP | TCX256 | | | +| 6 | | | ACELP | | ACELP | TCX256 | ACELP | | +| 7 | | | TCX256 | | ACELP | TCX256 | TCX256 | | +| 8 | | | | ACELP | ACELP | TCX256 | TCX256 | ACELP | +| 9 | | | | TCX256 | ACELP | TCX256 | TCX256 | TCX256 | +| 10 | | | TCX512 | TCX512 | ACELP | TCX256 | TCX512 | TCX512 | +| 11 | TCX1024 | TCX1024 | TCX1024 | TCX1024 | TCX1024 | TCX1024 | TCX1024 | TCX1024 | + +Figure 5: Closed-loop selection of ACELP/TCX mode combination + +The same procedure as trials 1 to 5 is then applied to the third and fourth frames (Fr2 and Fr3), in trials 6 to 10. After trial 10, in the example of Figure 5, the four 256-sample frames are classified as: ACELP for F0, then TCX256 for F1, then TCX512 for F2 and F3 grouped together. A last trial (line 11) is then performed where all four 256-sample frames (the whole super-frame) are encoded with 1024-sample TCX. Using the segmental SNR criterion, again with 64-sample segments, this is compared with the signal encoded using the mode selection in trial 10. In this example, the final mode decision is 1024-sample TCX for the whole frame. The mode bits for each 256-sample frame would then be (3, 3, 3, 3) as discussed in Table 10. + +### 5.2.4 ACELP/TCX open-loop mode selection + +The alternative method for ACELP/TCX mode selection is the low complexity open-loop method. The open-loop mode selection is divided into three selection stages: Excitation classification (EC), excitation classification refinement (ECR) and TCX selection (TCXS). The mode selection is done purely open-loop manner in EC and ECR. The usage of TCXS algorithm depends on EC and ECR and it is closed loop TCX mode selection. + +#### 1. stage + +The first stage excitation classification is done before LP analysis. The EC algorithm is based on the frequency content of the input signal using the VAD algorithm filter bank. + +AMR-WB VAD produces signal energy $E(n)$ in the 12 non-uniform bands over the frequency range from 0 to $F_s/4$ kHz for every 256-sample frame. Then energy levels of each band are normalised by dividing the energy level $E(n)$ from each band by the width of that band in Hz producing normalised $E_N(n)$ energy levels of each band where $n$ is the band number from 0 to 11. Index 0 refers to the lowest sub band. + +For each of the 12 bands, the standard deviation of the energy levels is calculated using two windows: a short window $std_{short}(n)$ and a long window $std_{long}(n)$ . The length of the short and long window is 4 and 16 frames, respectively. In these calculations, the 12 energy levels from the current frame together with past 3 or 15 frames are used to derive two $std_{short}$ and $std_{long}$ standard deviation values. The standard deviation calculation is performed only when VAD indicates active signal. + +The relation between lower frequency bands and higher frequency bands are calculated in each frame. The energy of lower frequency bands $LevL$ from 1 to 7 are normalised by dividing it by the length of these bands in Hz. The higher frequency bands 8 to 11 are normalised respectively to create $LevH$ . Note that the lowest band 0 is not used in these calculations because it usually contains so much energy that it will distort the calculations and make the contributions from other bands too small. From these measurements the relation $LPH = LevL / LevH$ is defined. In addition, for each frame a moving average $LPHa$ is calculated using the current and 3 past $LPH$ values. The final measurement of the low + +and high frequency relation **LPHaF** for the current frame is calculated by using weighted sum of the current and 7 past **LPHa** values by setting slightly more weighting for the latest values. + +The average level (**AVL**) in the current frame is calculated by subtracting the estimated level of background noise from each filter bank level after which the filter bank levels are normalised to balance the high frequency bands containing relatively less energy than the lower bands. In addition, total energy of the current frame, **TotEn**, is derived from all the filter banks subtracted by background noise estimate of the each filter bank. Total energy of previous frame is therefore **TotEn-1**. + +After calculating these measurements, a choice between ACELP and TCX excitation is made by using the following pseudo-code: + +``` + +if (stdalong < 0.4) + SET TCX_MODE +else if (LPHaF > 280) + SET TCX_MODE +else if (stdalong >= 0.4) + if ((5+(1/(stdalong -0.4))) > LPHaF) + SET TCX_MODE + else if ((-90* stdalong +120) < LPHaF) + SET ACELP_MODE + else + SET UNCERTAIN_MODE + +if (ACELP_MODE or UNCERTAIN_MODE) and (AVL > 2000) + SET TCX_MODE +if (UNCERTAIN_MODE) + if (stdashort < 0.2) + SET TCX_MODE + else if (stdashort >= 0.2) + if ((2.5+(1/(stdashort -0.2))) > LPHaF) + SET TCX_MODE + else if ((-90* stdashort +140) < LPHaF) + SET ACELP_MODE + else + SET UNCERTAIN_MODE +if (UNCERTAIN_MODE) + if ((TotE0 / TotE-1) > 25) + SET ACELP_MODE + +if (TCX_MODE || UNCERTAIN_MODE)) + if (AVL > 2000 and TotE0 < 60) + SET ACELP_MODE + +``` + +#### **2. stage** + +ECR is done after open-loop LTP analysis. + +If VAD flag is set and mode has been classified in EC algorithm as uncertain mode (defined as TCX\_OR\_ACELP), the is mode is selected as follows: + +``` + +if (SDn > 0.2) + Mode = ACELP_MODE; +else + if (LagDifbuf < 2 ) + if (Lagn == HIGH LIMIT or Lagn == LOW LIMIT){ + if (Gainn-NormCorrn < 0.1 and NormCorrn > 0.9) + +``` + +``` + + Mode = ACELP_MODE + else + Mode = TCX_MODE +else if ( $Gain_n - NormCorr_n < 0.1$ and $NormCorr_n > 0.88$ ) + Mode = ACELP_MODE +else if ( $Gain_n - NormCorr_n > 0.2$ ) + Mode = TCX_MODE +else + $NoMtcx = NoMtcx + 1$ +if ( $MaxEnergy_{buf} < 60$ ) + if ( $SD_n > 0.15$ ) + Mode = ACELP_MODE; + else + $NoMtcx = NoMtcx + 1$ . + +``` + +Where spectral distance, ***SDn***, of the frame *n* is calculated from ISP parameters as follows: + +$$SD(n) = \sum_{i=0}^N |ISP_n(i) - ISP_{n-1}(i)|$$ + +where ISPn is the ISP coefficients vector of the frame *n* and ISPn(i) is *i*th element of it. + +***LagDifbuf*** is the buffer containing open loop lag values of previous ten frames (256 samples). + +***Lagn*** contains two open loop lag values of the current frame *n*. + +***Gainn*** contains two LTP gain values of the current frame *n*. + +***NormCorrn*** contains two normalised correlation values of the current frame *n*. + +***MaxEnergybuf*** is the maximum value of the buffer containing energy values. The energy buffer contains last six values of current and previous frames (256 samples). + +***lphn*** indicates the spectral tilt. + +If VAD flag is set and mode has been classified in EC algorithm as ACELP mode, the mode decision is verified according to following algorithm where mode can be switched to TCX mode. + +``` + +if (LagDifbuf < 2) + if (NormCorrn < 0.80 and SDn < 0.1) + Mode = TCX_MODE; + if (lphn > 200 and SDn < 0.1) + Mode = TCX_MODE + +``` + +If VAD flag is set in current frame and VAD flag has set to zero at least one of frames in previous super-frame and the mode has been selected as TCX mode, the usage of TCX1024 is disabled (the flag ***NoMtcx*** is set). + +``` + +if (vadFlagold == 0 and vadFlag == 1 and Mode == TCX_MODE)) + NoMtcx = NoMtcx +1 + +``` + +If VAD flag is set and mode has been classified as uncertain mode (TCX\_OR\_ACELP) or TCX mode, the mode decision is verified according to following algorithm. + +``` + +if (Gainn - NormCorrn < 0.006 and NormCorrn > 0.92 and Lagn > 21) + DFTSum = 0; + for (i=1; i<40; i++) + DFTSum = DFTSum + mag[i]; + if (DFTSum > 95 and mag[0] < 5) + Mode = TCX_MODE; + else + +``` + +Mode = ACELP\_MODE; + +NoMtcx = NoMtcx + 1 + +*vadFlagold* is the VAD flag of the previous frame and *vadFlag* is the VAD flag of the current frame. + +*NoMtcx* is the flag indicating to avoid TCX transformation with long frame length (1024 samples), if TCX coding model is selected. + +*Mag* is a discrete Fourier transformed (DFT) spectral envelope created from LP filter coefficients, *Ap*, of the current frame. *DFTSum* is the sum of first 40 elements of the vector *mag*, excluding the first element (*mag(0)*) of the vector *mag*. + +If VAD flag is set and the mode, *Mode(Index)*, of the *Index*th frame of current superframe has still been classified as uncertain mode (TCX\_OR\_ACELP), the mode is decided based on selected modes in the previous and current superframes. The counter, *TCXCount*, gives the number of selected long TCX frames (TCX512 and TCX1024) in previous superframe (1024 samples). The counter, *ACELPCount*, gives the number of ACELP frames (256 samples) in previous and current superframes. + +``` + +if ((prevMode(i) == TCX1024 or prevMode(i) == TCX512) and vadFlagold(i) == 1 and + TotEi > 60) + TCXCount = TCXCount + 1 +if (prevMode(i) == ACELP_MODE) + ACELPCount = ACELPCount + 1 +if (Index != i) + if (Mode(i) == ACELP_MODE) + ACELPCount = ACELPCount + 1 + +``` + +Where *prevMode(i)* is the *i*th frame (256 samples) in the previous superframe, *Mode(i)* is the *i*th frame in the current superframe. *i* is the frame (256 samples) number in superframe (1, 2, 3, 4). The mode, *Mode(Index)*, is selected based on the counters *TCXCount* and *ACELPCount* as follows + +``` + +if (TCXCount > 3) + Mode(Index) = TCX_MODE; +else if (ACELPCount > 1) + Mode(Index) = ACELP_MODE +else + Mode(Index) = TCX_MODE + +``` + +3. stage: TCXS is done only if the number of ACELP modes selected in EC and ECR is less than three (ACELP < 3) within an 1024-sample super-frame. The Table 11 shows the possible mode combination which can be selected in TCXS. TCX mode is selected according to segmental SNR described in Chapter 5.2.3 (ACELP/TCX closed-loop mode selection). + +**Table 11: Possible mode combination selected in TCXS** + +| Selected mode combination after open-loop mode selection (TCX = 1 and ACELP = 0) | Possible mode combination after TCXS (ACELP = 0, TCX256 = 1, TCX512 = 2 and TCX1024 = 3) | | NoMTcx | +|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|--------------|--------| +| | | | | +| (0, 1, 1, 1) | (0, 1, 1, 1) | (0, 1, 2, 2) | NoMTcx | +| (1, 0, 1, 1) | (1, 0, 1, 1) | (1, 0, 2, 2) | | +| (1, 1, 0, 1) | (1, 1, 0, 1) | (2, 2, 0, 1) | | +| (1, 1, 1, 0) | (1, 1, 1, 0) | (2, 2, 1, 0) | | +| (1, 1, 0, 0) | (1, 1, 0, 0) | (2, 2, 0, 0) | | +| (0, 0, 1, 1) | (0, 0, 1, 1) | (0, 0, 2, 2) | | +| (1, 1, 1, 1) | (1, 1, 1, 1) | (2, 2, 2, 2) | 1 | +| (1, 1, 1, 1) | (2, 2, 2, 2) | (3, 3, 3, 3) | 0 | + +## 5.3 Hybrid ACELP/TCX core encoding description + +### 5.3.1 Pre-emphasis + +The input (mono) signal to the core ACELP/TCX encoder is first pre-processed through a high-pass filter. Then, a first-order, fixed pre-emphasis filter is applied with transfer function: + +$$P(z) = 1 - 0.68z^{-1}$$ + +This pre-emphasis filter reduces the signal energy at low frequency and increases the signal energy at high frequency. The result is a signal with a less spectral dynamics, which enhances the resolution of LPC analysis. This is particularly important in fixed-point implementations. + +### 5.3.2 LP analysis and interpolation + +The principles are similar to 3GPP TS 26.190 (Section 5.2) except for the window shape and position, and the interpolation factors. + +LPC analysis is performed every 256 samples in the superframe. The analysis window has 448 samples in duration, and has the shape of a half-sine cycle. It is symmetrical, and centred, for each LP analysis, at the middle of the first 64-sample sub-frame following each 256-sample frame. Hence, the lookahead required for LP analysis is half the analysis window length plus 32 samples, for a total of 256 samples. + +The autocorrelations of windowed speech are converted to the LP coefficients using the Levinson-Durbin algorithm. Then the LP coefficients are transformed to the ISP domain for quantization and interpolation purposes. The interpolated quantized and unquantized filters are converted back to the LP filter coefficients (to construct the synthesis and weighting filters at each subframe). + +The LP coefficients are quantized in the ISF domain, and interpolated every 64 samples. Depending on the coding mode selected (ACELP or TCX), the LP coefficients are transmitted at different update rates. For ACELP, which is based on the AMR-WB encoder, the LP coefficients are transmitted every 256 samples. For TCX, the LPC coefficients are transmitted every 256, 512 or 1024 samples, depending on the TCX frame length. + +The LPC analysis is identical for ACELP or TCX. + +#### 5.3.2.1 Windowing and auto-correlation computation + +A 448-sample symmetrical sine window is used. The window is given by + +$$w(n) = \sin\left(\frac{\pi}{L}(i + 0.5)\right), \quad i = 0, \dots, L - 1$$ + +where $L=488$ is the window length. + +Autocorrelation computation and lag windowing are similar to 3GPP TS 26.190 (Section 5.2.1) with the exception that the window length is 488 samples and centred at the middle of the first subframe of the next 256-sample frame. + +#### 5.3.2.2 Levinson-Durbin algorithm + +Same as 3GPP TS 26.190. + +#### 5.3.2.3 LP to ISP conversion + +Same as 3GPP TS 26.190. + +#### 5.3.2.4 ISP to LP conversion + +Same as 3GPP TS 26.190. + +#### 5.3.2.5 Quantization of the ISP coefficient + +Same as 3GPP TS 26.190. The difference is that in the case of TCX, the LP parameters are quantized and transmitted once per TCX frame (256, 512, or 1024 samples). + +#### 5.3.2.6 Interpolation of the ISPs + +Since the LP analysis window shape and position is changed compared to AMR-WB, the interpolation factors have changed. + +The interpolation is performed on the ISPs in the $\mathbf{q}$ domain (cosine domaine). Let $\mathbf{q}^{(n)}$ be the ISP vector from LP analysis at frame $n$ (centred at the 1st subframe of the frame $n+1$ ), and $\mathbf{q}^{(n-1)}$ the ISP vector from LP analysis at frame $n-1$ (centred at the 1st subframe of the frame $n$ ). The interpolated ISP vectors in each subframe are given by + +$$\mathbf{q}_i^{(n)} = \left(1 - \frac{i}{4}\right)\mathbf{q}^{(n-1)} + \frac{i}{4}\mathbf{q}^{(n)}, \quad i = 0, \dots, 3$$ + +The interpolated ISP vectors are used to compute a different LP filter at each subframe using the ISP to LP conversion method. + +The interpolation is performed for both unquantized and quantized parameters. In case TCX frames, the LP parameters are quantized once per 256-sample, 512-sample, or 1024-sample TCX frame, depending on the selected TCX mode. Thus the interpolation of quantized ISPs is performed as follows. In case of ACELP or 256-sample TCX frames, the interpolated quantized parameters are given by + +$$\hat{\mathbf{q}}_i^{(n)} = \left(1 - \frac{i}{4}\right)\hat{\mathbf{q}}^{(n-1)} + \frac{i}{4}\hat{\mathbf{q}}^{(n)}, \quad i = 0, \dots, 3$$ + +In case of 512-sample TCX frames, comprised of 256-sample frames $n$ and $n+1$ , the interpolated quantized parameters are given by + +$$\hat{\mathbf{q}}_i^{(n, n+1)} = \left(1 - \frac{i}{8}\right)\hat{\mathbf{q}}^{(n-1)} + \frac{i}{8}\hat{\mathbf{q}}^{(n+1)}, \quad i = 0, \dots, 7$$ + +In case of 1024-sample TCX frames, comprised of 256-sample frames $n$ , $n+1$ , $n+2$ , and $n+3$ , the interpolated quantized parameters are given by + +$$\hat{\mathbf{q}}_i^{(n, n+3)} = \left(1 - \frac{i}{16}\right)\hat{\mathbf{q}}^{(n-1)} + \frac{i}{16}\hat{\mathbf{q}}^{(n+3)}, \quad i = 0, \dots, 15$$ + +### 5.3.3 Perceptual weighting + +Same as 3GPP TS 26.190, using a filter of the form $W(z) = A(z/\gamma_1)H_{de-emph}(z)$ . Note that in case of TCX coding, quantized filter coefficients are used at the numerator, so that the filter is given by $W(z) = \hat{A}(z/\gamma_1)H_{de-emph}(z)$ . + +### 5.3.4 ACELP Excitation encoder + +#### 5.3.4.1 Open-loop pitch analysis + +Same as 3GPP TS 26.190 but with the minimum and maximum pitch lags as functions of the internal sampling rate. + +#### 5.3.4.2 Impulse response computation + +Same as 3GPP TS 26.190. + +#### 5.3.4.3 Target signal computation + +Same as 3GPP TS 26.190 + +#### 5.3.4.4 Adaptive codebook + +Same as 3GPP TS 26.190 but with the minimum and maximum pitch lags as functions of the internal sampling rate. + +#### 5.3.4.5 Algebraic codebook + +Same as 3GPP TS 26.190. The codebooks used in some basic core rates are the same as used in AMR-WB at 12.65, 14.25, 15.85, 18.25, 19.85, and 23.05, respectively. The codebook used in mono rate 208 bits/frame is the same as the one used in AMR-WB at 8.85 kbps (20 bit codebook). The codebook used in mono rate 240 bits/frame is a 28 bit codebook where two tracks contain one pulse each and two tracks contain two pulses each according to the following table: + +**Table 12: Potential positions of individual pulses in the 28-bit algebraic codebook** + +| Track | Pulse | Positions | +|-------|------------|--------------------------------------------------------------| +| 1 | $i_0, i_4$ | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 | +| 2 | $i_1$ | 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61 | +| 3 | $i_2, i_5$ | 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 | +| 4 | $i_3$ | 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63 | + +##### 5.3.4.5.1 Codebook structure + +Same as 3GPP TS 26.190. + +##### 5.3.4.5.2 Pulse indexing + +Same as 3GPP TS 26.190. + +##### 5.3.4.5.3 Codebook search + +Same as 3GPP TS 26.190. + +#### 5.3.4.6 Quantization of the adaptive and fixed codebook gains + +The adaptive codebook gain (pitch gain) and the fixed (algebraic) codebook gain are vector quantized using the same 7-bit codebook used in AMR-WB for modes 2 to 8. However, instead of using MA prediction to obtain the predicted gain $g'_c$ , it is found by directly quantizing the average innovation energy in the whole frame. + +Let $E_s(n)$ be the innovation energy (in dB) at subframe $n$ , and given by + +$$E_s(n) = 10 \log \left( \frac{1}{N} g_c^2 \sum_{i=0}^{N-1} c^2(i) \right) = 20 \log(g_c) + E_i$$ + +where $N=64$ is the subframe size, $c(i)$ is the fixed codebook excitation, and $E_i$ is the un-scaled innovation energy given by + +$$E_i = \frac{1}{N} \sum_{i=0}^{N-1} c^2(i)$$ + +An estimated innovation energy $\bar{E}_s$ is computed and quantized, and used to find the estimated gain $g'_c$ . That is, + +$$g'_c = 10^{0.05(\bar{E}_s - E_i)}$$ + +which is derived from the relation $\bar{E}_s = 20 \log(g'_c) + E_i$ . + +A correction factor between the gain $g_c$ and the estimated one $g'_c$ is given by + +$$\gamma = g_c / g'_c$$ + +The pitch gain, $g_p$ , and correction factor $\gamma$ are jointly vector quantized using the same 7-bit codebook used in AMR-WB, and using the same error minimization procedure. That is, the gain codebook search is performed by minimizing the mean-square of the weighted error between original and reconstructed signal. + +The estimated innovation energy is computed and quantized as follows. First, the LP residual energy is computed in each subframe $n$ by + +$$E_{res}(n) = 10 \log_{10} \left( \frac{1}{N} \sum_{j=0}^{N-1} r^2(j) \right)$$ + +then the average residual energy per subframe is found by + +$$\bar{E}_{res} = \frac{1}{4} \sum_{n=0}^3 E_{res}(n)$$ + +The innovation energy is estimated from the residual energy by removing an estimate of the adaptive codebook contribution. This is done by removing an energy related to the average normalized correlation obtained from the two open-loop pitch analyses performed in the frame. That is + +$$E_s = \bar{E}_{res} - 10\bar{R}$$ + +where $\bar{R}$ is the average of the normalized pitch correlations obtain for each half-frame from the open-loop pitch analysis. + +The estimated innovation energy is quantized once per frame using 2 bits, with the quantization levels: 18, 30, 42, and 54. Further, the quantized estimated innovation energy $\bar{E}_s$ is constrained to be larger than $E_{max} - 37$ , where $E_{max}$ is the maximum value of $E_{res}(n)$ from the 4 subframes. This is done by incrementing $\bar{E}_s$ by 12 (and the quantization index by 1) until $\bar{E}_s > E_{max} - 37$ or $\bar{E}_s = 54$ . + +The quantized estimated innovation energy is then used to compute the estimated gain in each subframe is explained above. + +### 5.3.5 TCX Excitation encoder + +This section presents the details of the TCX encoder, which is one of the possible modes to encode the mono, low-frequency signal in the 0-Fs/4 kHz band. Section 5.3.5.1 first presents the block diagram of the TCX encoder. Then, the details of each module are given in sections 5.3.5.2 to 5.3.5.13. + +#### 5.3.5.1 TCX encoder block diagram + +Figure 6 shows a block diagram of the TCX encoding mode. The TCX encoding principle is similar for TCX frames of 256, 512 and 1024 samples, with a few differences mostly involving the windowing and filter interpolation. The input audio signal is first filtered through a time-varying weighting filter (same perceptual filter as in AMR-WB) to obtain a weighted signal $x$ . The weighting filter coefficients are interpolated in the ISP domain as in Section 5.3.2.6. The interpolation is linear, and the beginning and end of the interpolation depend on the refresh rate of the LPC filter. The LPC filter is transmitted only once per TCX frame. For longer frames (TCX512 and TCX1024) the interpolated LPC filters will be farther apart that in the case of TCX256 or ACELP frames. + +Continuing in Figure 6, if the past frame was an ACELP frame, the zero-input response (ZIR) of the weighting filter is removed from the weighted signal, using the filter state at the end of the previous (ACELP) frame. The signal is then windowed (the window shape will be described in section 5.3.5.4) and a transform is applied to the windowed signal. In the transform domain, the signal is first pre-shaped, to minimize coding noise artefact in the low-frequencies, and then quantized using a specific lattice quantizer. Specifically, an 8-dimensional multi-rate lattice quantizer is used, based on an extension of the Gosset lattice. + +After quantization, the inverse pre-shaping function is applied to the spectrum which is then inverse transformed to provide a quantized time-domain signal. The gain for that frame is then rescaled to optimize the correlation with the original weighted signal. After gain rescaling, a window is again applied to the quantized signal to minimize the block effects due to quantizing in the transform domain. Overlap-and-add is used with the previous frame if it was also in TCX mode. Finally, the excitation signal is found through inverse filtering with proper filter memory updating. This TCX excitation is in the same "domain" as the ACELP (AMR-WB) excitation. + +![Block diagram of TCX encoding principle showing signal processing from input TCX frame to reconstructed output.](2ae3eae1bd80a90f192f568ae246a9a6_img.jpg) + +The diagram illustrates the TCX encoding process. The input is a **TCX frame (including overlap)**, which is processed **by subframe, except in overlap region**. This frame is passed through a block $A(z/\gamma_j)$ to produce a **weighted signal x**. This signal is then summed with the **ZIR in weighted domain (windowed) in first 2 subframes** (if the past frame was encoded with ACELP). The result is processed by **Adaptive windowing** to create a **windowed TCX target**. This target is then processed through a series of blocks: **Transform (T)**, **Spectrum pre-shaping (P)**, **split multi-rate lattice VQ with noise factor quantization** (outputting to a **MUX**), **Spectrum de-shaping**, and **inverse transform**. The output is then processed by **compute and quantize gain** (also outputting to a **MUX**) and **Adaptive windowing** again to produce the **windowed reconstructed TCX target**. This target is saved as **windowed overlap for next frame** and summed with the **windowed overlap from past frame**. The final output is processed by a series of blocks: $1 - \alpha z^{-1}$ , $\frac{1}{\hat{A}(z/\gamma_j)}$ , $\hat{A}(z)$ , and $\frac{1}{\hat{A}(z)}$ , which are processed **by subframe**. The states for the filters are initialized as follows: **states initialized to 0 in $\frac{1}{\hat{A}(z/\gamma_j)}$ and $1 - \alpha z^{-1}$ if past frame was encoded with ACELP**, and **state initialized to past synthesis in $\frac{1}{\hat{A}(z/\gamma_j)}$ otherwise**. + +Block diagram of TCX encoding principle showing signal processing from input TCX frame to reconstructed output. + +Figure 6: Principle of TCX encoding + +Each module of Figure 6 will now be detailed in the following subsections. + +#### 5.3.5.2 Computation of the target signal for transform coding + +To obtain the weighted signal, the input frame of audio samples is filtered with a perceptual filter having the following transfer function: + +$$W(z) = \frac{\hat{A}(z/0.92)}{1 - 0.68z^{-1}}$$ + +Here, $\hat{A}(z)$ is the quantized LP filter, interpolated at every 64-sample sub-frame in the ISP domain as in Section 5.3.2.6, and $\hat{A}(z/0.92)$ is the weighted version of that filter. The denominator of $W(z)$ is a constant polynomial of order 1, which is equal to the numerator of the pre-emphasis filter in Section 5.3.1. + +#### 5.3.5.3 Zero-input response subtraction + +If the previous encoded frame was ACELP, then the zero-input response (ZIR) of the combination of the weighting filter and synthesis filter is removed from the weighted signal. The ZIR is truncated to 128 samples and windowed in such a way that its amplitude monotonically decreases to zero at after 128 samples. The truncated ZIR is computed through the following steps: + +Using the filter states at the end of the previous frame, compute the ZIR of the following transfer function over 2 consecutive subframes (128 samples duration): + +$$H(z) = \frac{1}{\hat{A}(z)} \frac{\hat{A}(z/0.92)}{1 - 0.68z^{-1}}$$ + +where $\hat{A}(z)$ and $\hat{A}(z/0.92)$ are as defined in Section 5.3.5.2. + +Then, calling $z(n)$ the truncated ZIR of $H(z)$ (truncated to the first $2N$ samples, where $N=64$ is the subframe length), compute $z_w(n)$ , the windowed ZIR such that it is always forced to zero at the last sample: + +$$z_w(n) = z(n) * w(n) \quad \text{for } n = 0 \text{ to } 2*N-1$$ + +where + +$$w(n) = 1 \quad \text{for } n = 0 \text{ to } N-1$$ + +$$\text{and } w(n) = (2*N-n)/N \quad \text{for } n = N \text{ to } 2*N-1$$ + +The shape of $w(n)$ is shown in Figure 7 below, for a value of $N=64$ . + +![Figure 7: Shape of window to truncate the ZIR. The graph shows the window function w[n] versus Sample number n. The y-axis (w[n]) ranges from 0 to 1.0, and the x-axis (Sample number n) ranges from 0 to 128. The function is constant at 1.0 from n=0 to n=64 (N-1). From n=64 to n=128, it decreases linearly to 0.0 at n=128 (2*N-1).](23aa6984e9910c0a722a7d1844ad1956_img.jpg) + +| Sample number n | w[n] | +|-----------------|------| +| 0 | 1.0 | +| 64 | 1.0 | +| 128 | 0.0 | + +Figure 7: Shape of window to truncate the ZIR. The graph shows the window function w[n] versus Sample number n. The y-axis (w[n]) ranges from 0 to 1.0, and the x-axis (Sample number n) ranges from 0 to 128. The function is constant at 1.0 from n=0 to n=64 (N-1). From n=64 to n=128, it decreases linearly to 0.0 at n=128 (2\*N-1). + +Figure 7: Shape of window to truncate the ZIR + +After computing $z_w(n)$ , it is removed from the first $2*N$ samples of the weighted signal $x(n)$ . This removal of the ZIR from the past frame is performed only when the past frame was in ACELP mode. + +#### 5.3.5.4 Windowing of target signal + +In TCX mode, windowing is applied prior to the transform, and after the inverse transform, in order to apply overlap-and-add to minimize the framing effects due to quantization. + +To smooth the transition between ACELP and TCX modes, proper care has to be given to windowing and overlap of successive frames. Figure 8 shows the window shapes depending on the TCX frame length and the type of the previous frame (ACELP or TCX). + +![Figure 8: Target signal windowing in TCX coding. The figure consists of three subplots (a, b, c) showing window shapes over time. (a) target windowing in TCX 256+32 samples: shows a window shape for TCX 256+32 samples with 'no overlap'. The main window is 256 samples long, and there is a 32-sample overlap at the end. (b) target windowing in TCX 512+64 samples: shows a window shape for TCX 512+64 samples with 'no overlap (ACELP)'. The main window is 512 samples long, and there is a 64-sample overlap at the end. (c) target windowing in TCX 1024+128 samples: shows a window shape for TCX 1024+128 samples with 'no overlap (ACELP)'. The main window is 1024 samples long, and there is a 128-sample overlap at the end. All subplots show the window shape for TCX 256+32, 512+64, and 1024+128 samples, with the 'no overlap' condition indicated.](51536f203c07ce20ce119e7e09b11cb6_img.jpg) + +(a) target windowing in TCX 256+32 samples + +TCX 256+32 samples + +TCX 512+64 samples + +TCX 1024+128 samples + +no overlap + +time + +32 samples + +256 samples + +(b) target windowing in TCX 512+64 samples + +TCX 256+32 samples + +TCX 512+64 samples + +TCX 1024+128 samples + +no overlap (ACELP) + +time + +64 samples + +512 samples + +TCX 512+64 samples + +TCX 256+32 samples + +TCX 1024+128 samples + +no overlap (ACELP) + +time + +128 samples + +1024 samples + +(c) target windowing in TCX 1024+128 samples + +Figure 8: Target signal windowing in TCX coding. The figure consists of three subplots (a, b, c) showing window shapes over time. (a) target windowing in TCX 256+32 samples: shows a window shape for TCX 256+32 samples with 'no overlap'. The main window is 256 samples long, and there is a 32-sample overlap at the end. (b) target windowing in TCX 512+64 samples: shows a window shape for TCX 512+64 samples with 'no overlap (ACELP)'. The main window is 512 samples long, and there is a 64-sample overlap at the end. (c) target windowing in TCX 1024+128 samples: shows a window shape for TCX 1024+128 samples with 'no overlap (ACELP)'. The main window is 1024 samples long, and there is a 128-sample overlap at the end. All subplots show the window shape for TCX 256+32, 512+64, and 1024+128 samples, with the 'no overlap' condition indicated. + +**Figure 8: Target signal windowing in TCX coding** + +The window is defined as the concatenation of the following three sub-windows: + +$$w_1(n) = \sin(2 \pi n / (4 L_1)) \quad \text{for } n = 0, \dots, L_1-1$$ + +$$w_2(n) = 1 \quad \text{for } n = 0, \dots, L - L_1 - 1$$ + +$$w_3(n) = \sin(2 \pi n / (4 L_2)) \quad \text{for } n = L_2, \dots, 2L_2 - 1$$ + +The constants $L_1$ , $L_2$ and $L$ are defined as follows. + +$$L_1 = 0 \quad \text{when the previous frame is a 256-sample ACELP frame}$$ + +$$L_1 = 32 \quad \text{when the previous frame is a 256-sample TCX frame}$$ + +$$L_1 = 64 \quad \text{when the previous frame is a 512-sample TCX frame}$$ + +$$L_1 = 128 \quad \text{when the previous frame is an 1024-sample TCX frame}$$ + +Additionally: + +$$\text{For 256-sample TCX: } L = 256 \text{ and } L_2 = 32$$ + +$$\text{For 512-sample TCX: } L = 512, \text{ and } L_2 = 64$$ + +$$\text{For 1024-sample TCX: } L = 1024, \text{ and } L_2 = 128 \text{ and}$$ + +We note again that all these window types are applied to the weighted signal, only when the present frame is a TCX frame. Frames of type ACELP are encoded as in AMR-WB encoding (i.e. through analysis-by-synthesis encoding of the excitation signal, so as to minimize the error in the target signal – the target signal is essentially the weighted signal from which the zero-input response of the weighting filter is removed). + +#### 5.3.5.5 Transform + +After windowing, the signal is mapped to the frequency domain through a Discrete Fourier Transform (DFT), defined as: + +$$X(k) = \frac{1}{L_{TOT}} \sum_{n=0}^{L_{TOT}-1} x(n) e^{-j \frac{2\pi}{L_{TOT}} nk}$$ + +where $L_{TOT}$ is the number of samples in the DFT. $L_{TOT}$ depends on the frame length (256, 512 or 1024 samples, plus the lookahead which is a function of the frame length). + +An FFT is used to accelerate the computation of the Fourier coefficients. A radix-9 FFT is used to adapt to the frame length which is not a power of 2. Including the overlap in the windowing described in Section 5.3.5.4, the number of samples at the input of the FFT is, respectively, $L_{TOT} = 288$ for 256-sample TCX frames (256 samples in the frame plus 32 samples in the look-ahead), $L_{TOT} = 576$ for 512-sample TCX (512 samples in the frame plus 64 samples in the lookahead), and $L_{TOT} = 1152$ samples for 1024-sample TCX (1024 samples in the frame plus 128 samples in the lookahead). + +#### 5.3.5.6 Spectrum pre-shaping + +Once the Fourier spectrum (FFT) is computed, an adaptive low-frequency emphasis module is applied to the spectrum, to minimize the perceived distortion in the lower frequencies. The inverse low-frequency emphasis will be applied at the decoder, as well as in the encoder to allow obtaining the excitation signal necessary to encode the next frames. The adaptive low-frequency emphasis is applied only on the first quarter of the spectrum, as follows. + +First, we call $X$ the transformed signal at the output of the transform (FFT) in Figure 6. The Fourier coefficient at Nyquist frequency is systematically set to 0. Then, if $L_{TOT}$ is the number of samples in the FFT ( $L_{TOT}$ is thus the window length), the $K = L_{TOT} / 2$ complex-valued Fourier coefficients are grouped in blocks of four consecutive coefficients, forming 8-dimensional real-valued blocks. This block size of 8 is chosen to coincide with the 8-dimensional lattice quantizer used for spectral quantization. The energy of each block is computed, up to the first quarter of the spectrum. The energy $E_{max}$ and position index $I$ of the block with maximum energy are stored. Then, we calculate a factor for each 8-dimensional block with position index $m$ smaller than $I$ , as follows: + +- calculate the energy $E_m$ of the 8-dimensional block at position index $m$ +- compute the ratio $R_m = E_{max} / E_m$ +- compute the value $(R_m)^{1/4}$ + +- if $R_m > 10$ , then set $R_m = 10$ (maximum gain of 20 dB) +- also, if $R_m > R_{m-1}$ then $R_m = R_{m-1}$ + +This last condition ensures that the ratio function $R_m$ decreases monotonically. Further, limiting the ratio $R_m$ to be smaller or equal to 10 means that no spectral components in the low-frequency emphasis function will be modified by more than 20 dB. + +After computing the ratio $R_m = (E_{max} / E_m)^{1/4}$ for all blocks with position index smaller than $I$ (and with the limiting conditions described above), we then apply these ratios as a gain for each corresponding block. This has the effect of increasing the energy of blocks with relatively low energy compared to the block with maximum energy $E_{max}$ . Applying this procedure prior to quantization has the effect of shaping the coding noise in the lower band, such that low energy components before the first spectral peak will be better encoded. + +#### 5.3.5.7 Split multi-rate lattice VQ + +To quantize the pre-shaped spectrum $X$ of the weighted signal in TCX mode, a method based on lattice quantizers is used. Specifically, the spectrum is quantized in 8-dimensional blocks using vector codebooks composed of subsets of the Gosset lattice, referred to as the $RE_8$ lattice (see [6]). All points of a given lattice can be generated from the so-called *generator matrix* $G$ of the lattice, as $c = k G$ , where $k$ is a line vector with integer values and $c$ is the generated lattice point. To form a vector codebook at a given rate, only lattice points inside a sphere (in 8 dimensions) of a given radius are taken. Multi-rate codebooks can thus be formed by taking subsets of different radii. + +In lattice quantization, the operation of finding the nearest neighbour of an input vector $x$ among all codebook points is reduced to a few simple operations, involving rounding the components of a vector and verifying a few constraints. Hence, no exhaustive search is carried out as in stochastic quantization, which uses stored tables. Once the best lattice codebook point is determined, further calculations are also necessary to compute the binary index that will be sent to the decoder. The larger the components of the input vector $x$ , the more bits will be required to encode the index of its nearest neighbour in the lattice codebook. Hence, to remain within a pre-defined bit budget, a gain-shape approach has to be used, where the input vector is first scaled down, i.e. divided by a gain which has to be estimated, then quantized in the lattice, then scaled up again to produce the quantization result. To reduce computation complexity, the binary indices will actually only be calculated if a given TCX mode is retained as the best mode for a frame. + +For simplicity, we let $N$ be the length of the DFT. Since the transform used to obtain $X$ is a Discrete Fourier Transform, there are $N/2+1$ Fourier coefficients including $X(N/2)$ at Nyquist frequency. In the quantization process, coefficient $X(N/2)$ is always set to 0, so there are exactly $N/2$ Fourier coefficients to quantize. Then, all coefficients of $X$ are complex, except $X(0)$ which is real. + +To be quantized using the $RE_8$ lattice codebooks, the pre-shaped spectrum $X$ is split into consecutive blocks of 8 real values (4 consecutive complex coefficients). There are $K=N/8$ such blocks in the whole spectrum. We call $B_k$ the $k^{\text{th}}$ block, with $k = 0, 1, \dots, K-1$ . To remain within the total bit budget, the spectrum $X$ will have to be divided by a global gain $g$ prior to quantization, and multiplied by the quantized global gain after each block $B_k$ is encoded using the $RE_8$ lattice. We call $X' = X/g$ the scaled spectrum and $B'_k = B_k / g$ the $k^{\text{th}}$ scaled block. Thus, the parameters sent to the decoder to encode the TCX spectrum $X$ are the global gain $g$ and the index of the nearest neighbour of each block $B_k$ within the lattice codebook. + +The index of the nearest neighbour in the lattice is actually composed of three parts: 1) a codebook index, which essentially represents the bit allocation for each 8-dimensional vector; 2) a vector index, which uniquely identifies a lattice vector in a so-called *base codebook* $C$ ; and 3) an extension index $k$ , which is used to extend the base codebook when the selected point in the lattice is not in the base codebook $C$ . The extension used, called the *Voronoi* extension, will be described in Step 5 below. + +These parameters are encoded using the 5 Steps described below. + +**Step 1** Find the energy $E_k$ of each block $B_k$ : + +$$E_k = \max(2, \sum_{m=0}^7 B_k[m]B_k[m])$$ + +and obtain from $E_k$ a first estimate of the bit budget using the starting assumption that the global gain $g$ equals 1 (i.e. that the spectrum $X$ is quantized without scaling first): + +$$R_k(1) = 5 \log_2 \left( \frac{E_k}{2} \right)$$ + +The formula for $R_k(1)$ is based on the properties of the underlying $RE_8$ lattice, and the method used for encoding the index of a lattice point selected by the quantizer. These properties and encoding method will be described in Steps 3 and 5. + +Unless the energy of the frame is very small, the block energies $E_k$ will be too large to ensure that the total bit consumption (sum of all $R_k(1)$ ) remains within the total bit budget for the frame. Hence, it is necessary to estimate a gain $g$ so that the quantization of $X' = X/g$ in the $RE_8$ lattice will produce a set of indices that stay within the bit budget. This gain estimation is performed in Step 2. + +**Step 2** The estimation of the global gain $g$ for the TCX frame is performed in an iteration, as follows. + +**Initialisation:** Set $fac = 128$ , $offset = 0$ and $nbits\_max = 0.95 * (NB\_BITS\_ - K)$ + +**Iteration:** Do the following block of operations $NITER$ times (here, $NITER = 10$ ). + +1- $offset = offset + fac$ + +$$2- \quad nbits = \sum_{k=1}^K \max(0, R_k(1) - offset)$$ + +3- if $nbits \leq nbits\_max$ , then $offset = offset - fac$ + +$$fac = fac / 2$$ + +After the iteration, the global gain is estimated as + +$$g = 10^{\frac{offset * \log_{10}(2)}{10}}$$ + +The scaled spectrum can then be obtained as $X' = X/g$ . The input to the lattice quantizer described in Step 3 are the scaled blocks $B'_k = B_k / g$ , each an 8-dimensional vector of real components. The assumption is that the total number of bits used to quantize $B'_k$ into the lattice codebook will be close to the bit budget. + +**Step 3** In this step, each 8-dimensional block $B'_k$ of the scaled spectrum $X' = X/g$ is rounded as a point in the $RE_8$ lattice, to produce its quantized version, $\hat{X}'$ . Before looking at the quantization procedure, it is worthwhile to look at the properties of this lattice. $RE_8$ is defined as follows: + +$$RE_8 = 2D_8 \cup \{2D_8 + (1, \dots, 1)\}$$ + +that is as the union of the $2D_8$ lattice and a version of $2D_8$ shifted by the vector $(1, 1, 1, 1, 1, 1, 1, 1)$ . Therefore, searching for the nearest neighbour in the lattice $RE_8$ is equivalent to searching for the nearest neighbour in the lattice $2D_8$ , then searching for the nearest neighbour in the lattice $2D_8 + (1, 1, 1, 1, 1, 1, 1, 1)$ , and finally selecting the best of those two lattice points. The lattice $2D_8$ is just the $D_8$ lattice scaled by a factor of 2, with the $D_8$ lattice defined as: + +$$D_8 = \{(x_1, \dots, x_8) \in \mathbb{Z}^8 \mid x_1 + \dots + x_8 \text{ is even}\}$$ + +That is, the lattice points in $D_8$ are all integers, with the constraint that the sum of all components is even. This also implies that the sum of the components of a lattice point in $2D_8$ is an integer multiple of 4. + +From this definition of $RE_8$ , it is straightforward to develop a fast algorithm to search for the nearest neighbour of an 8-dimensional block $B'_k$ among all lattice points in $RE_8$ . This is done by applying the following operations. We note that the components of $B'_k$ are floating point values. The result of the quantization, $\hat{B}'_k$ , will be a vector of integers. + +1. $z_k = 0.5 * B'_k$ +2. Round each component of $z_k$ to the nearest integer, to generate $\bar{z}_k$ + +3. $y1_k = 2 \bar{z}_k$ +4. calculate $S$ as the sum of the components of $y1_k$ +5. If $S$ is not an integer multiple of 4 (negative values are possible), then modify one of its components as follows: + - find the position $I$ where $\text{abs}(z_k(i) - y1_k(i))$ is the highest + - if $z_k(I) - y1_k(I) < 0$ , then $y1_k(I) = y1_k(I) - 2$ + - if $z_k(I) - y1_k(I) > 0$ , then $y1_k(I) = y1_k(I) + 2$ +6. $z_k = 0.5 * (B'_k - \mathbf{1.0})$ where $\mathbf{1.0}$ denotes a vector with all 1's +7. Round each component of $z_k$ to the nearest integer, to generate $\bar{z}_k$ +8. $y2_k = 2 \bar{z}_k$ +9. calculate $S$ as the sum of the components of $y2_k$ +10. If $S$ is not an integer multiple of 4 (negative values are possible), then modify one of its components as follows: + - find the position $I$ where $\text{abs}(z_k(i) - y2_k(i))$ is the highest + - if $z_k(I) - y2_k(I) < 0$ , then $y2_k(I) = y2_k(I) - 2$ + - if $z_k(I) - y2_k(I) > 0$ , then $y2_k(I) = y2_k(I) + 2$ +11. $y2_k = y2_k + \mathbf{1.0}$ +12. Compute $e1_k = (B'_k - y1_k)^2$ and $e2_k = (B'_k - y2_k)^2$ +13. If $e1_k > e2_k$ , then the best lattice point (nearest neighbour in the lattice) is $y1_k$ otherwise the best lattice point is $y2_k$ . + +This is noted as $\hat{B}'_k = c_k$ where $c_k$ is the best lattice point as selected above. + +Through this quantization procedure, the scaling gain $g$ , estimated in Step 2, is left unquantized. The gain will be quantized only after being recomputed as in Section 5.3.5.10, to obtain $\hat{g}$ . The quantized spectrum will then be obtained as $\hat{X} = \hat{g}\hat{X}'$ . + +We note that after this lattice quantization step, the indices of the selected lattice points are not known. The indices will only be computed if a particular TCX mode is selected instead of an ACELP mode. (See Step 5 for the lattice index computation) + +- Step 4** A last step in the quantization procedure is the determination and quantization of a comfort noise factor. Comfort noise enhances the perceived quality in transform-based coders, which is the case for the TCX modes. Comfort noise will be added only to unquantized spectral components in the upper-half of the spectrum (Fs/8 kHz and above). Taking again $K$ as the total number of 8-dimensional blocks in the spectrum, the comfort noise factor is calculated as follows: + +**Initialisation:** Set $nbits = 0$ , $n = 1$ and take the *offset* value at the end of the iteration in Step 2 above. + +**Iteration :** For $k = K / 2$ to $K-1$ , do + +1. $tmp = R_k(1) - offset$ (with $R_k(1)$ as calculated in Step 1) +2. if ( $tmp < 5$ ), then $nbits = nbits + tmp$ and $n = n + 1$ + +**Noise factor calculation:** + +Set $nbits = nbits/ n$ , and evaluate the noise factor as + +$$Noise\_factor = 10^{\frac{(nbits-5)*\log_{10}(2)}{10}}$$ + +The noise factor will be comprised between 0 and 1. + +##### Noise level quantization + +The comfort noise factor is quantized using 3 bits in the range from 0.8 to 1.0. + +- Step 5** In Step 3, each scaled block $B'_k$ was rounded as a point in the $RE_8$ lattice. The result is $c_k = \hat{B}'_k$ , the quantized version of $B'_k$ . If the corresponding TCX mode is actually retained as the best encoding mode for that frame (in open-loop fashion as in Section 5.2.4 or in closed-loop fashion as in Section 5.2.3), then an index has to be computed for each $c_k$ for transmission to the decoder. The computation of these indices is described in this final Step. + +The calculation of an index for a given point in the $RE_8$ lattice is based on two basic principles: + +- 1- All points in the lattice $RE_8$ lie on concentric spheres of radius $\sqrt{8m}$ with $m = 0, 1, 2, 3$ , etc., and each lattice point on a given sphere can be generated by permuting the coordinates of reference points called *leaders*. There are very few leaders on a sphere, compared to the total number of lattice points which lie on the sphere. Codebooks of different bit rates can be constructed by including only spheres up to a given number $m$ . See reference [6] for more details, where codebooks $Q_0, Q_1, Q_2, Q_3, Q_4$ , and $Q_5$ are constructed with respectively 0, 4, 8, 12, 16 and 20 bits. Hence, codebook $Q_n$ requires $4n$ bits to index any point in that codebook. +- 2- From a base codebook $C$ (i.e. a codebook containing all lattice points from a given set of spheres up to a number $m$ ), an extended codebook can be generated by multiplying the elements of $C$ by a factor $M$ , and adding a second-stage codebook called the *Voronoi extension*. This construction is given by $y = Mz + v$ , where $M$ is the scale factor, $z$ is a point in the base codebook and $v$ is the Voronoi extension. The extension is computed in such a way that any point $y = Mz + v$ is also a lattice point in $RE_8$ . The extended codebook includes lattice points that extend further out from the origin than the base codebook. + +The base codebook $C$ in the present TCX modes can be either codebook $Q_0, Q_2, Q_3$ or $Q_4$ from reference [6]. When a given lattice point $c_k$ is not included in these base codebooks, the Voronoi extension is applied, using this time only the $Q_3$ or $Q_4$ part of the base codebook. Note that here, $Q_2 \subset Q_3$ but $Q_3 \not\subset Q_4$ . + +Then, the calculation of the index for each lattice point $c_k$ (quantization result in Step 3) is done according to the following operations. + +**Verify if $c_k$ is in the base codebook $C$ .** Here, this implies verifying if $c_k$ is an element of $Q_0, Q_2, Q_3$ or $Q_4$ from [6]. If $y$ is in $C$ , the index used to encode $c_k$ is thus the codebook number $n_k$ plus the index $I_k$ of codevector $c_k$ in $Q_{n_k}$ . The codebook number $n_k$ is encoded as a unary code, as follows: + +$Q_0 \rightarrow$ unary code for $n_k$ is 0 + +$Q_2 \rightarrow$ unary code for $n_k$ is 10 + +$Q_3 \rightarrow$ unary code for $n_k$ is 110 + +$Q_4 \rightarrow$ unary code for $n_k$ is 1110 + +The terminating "0" in this unary code will indicate to the decoder the separation between the successive blocks $C^k$ in the bit stream. + +The index $I_k$ indicates the rank of $C^k$ , i.e. the permutation to be applied to a specific leader to obtain $C^k$ (see [6]). Note that if $n_k = 0$ , then $I_k$ uses no bits. Otherwise, the index $I_k$ uses $4^{n_k}$ bits. Hence, a total of $5^{n_k}$ bits are required to index any lattice point in the base codebook: $n_k$ bits for the unary code specifying the codebook number (with the exception that 1 bit is required for $Q_0$ ), and $4^{n_k}$ bits to index the lattice point $C^k$ in that codebook. + +If $C^k$ is not in the base codebook, then apply the Voronoi extension through the following sub-steps, using this time only $Q_3$ or $Q_4$ as the base codebook. + +**V0** Set the extension order $r = 1$ and the scale factor $M = 2^r = 2$ . + +**V1** Compute the Voronoi index $k$ of the lattice point $C^k$ . The Voronoi index $k$ depends on the extension order $r$ and the scale factor $M$ . The Voronoi index is computed via modulo operations such that $k$ depends only on the relative position of $C^k$ in a scaled and translated Voronoi region: + +$$k = \text{mod}_M (c_k G^{-1})$$ + +Here, $G$ is the generator matrix and $\text{mod}_M(\cdot)$ is the component-wise modulo- $M$ operation. Hence, the Voronoi index $k$ is a vector of integers with each component comprised in the interval 0 to $M-1$ . + +**V2** Compute the Voronoi codevector $v$ from the Voronoi index $k$ . This can be implemented using an algorithm described in [7]. + +**V3** Compute the difference vector $w = C^k - v$ . This difference vector $w$ always belongs to the scaled lattice $m\Lambda$ , where $\Lambda$ is the lattice $RE_8$ . Compute $z = w/M$ , i.e., apply the inverse scaling to the difference vector $w$ . The codevector $z$ belongs to the lattice $\Lambda$ , since $w$ belongs to $M\Lambda$ . + +**V4** Verify if $z$ is in the base codebook $C$ (i.e. in $Q_3$ or $Q_4$ ) + +If $z$ is not in $C$ , increment the extension order $r$ by 1, multiply the scale factor $M$ by 2, and go back to sub-step V1. + +Otherwise, if $z$ is in $C$ , then we have found an extension order $r$ and a scaling factor $M = 2^r$ + +sufficiently large to encode the index of $C^k$ . The index is formed of three parts: 1) the codebook index $n_k$ as a unary code defined below; 2) the rank $I_k$ of $z$ in the corresponding base codebook (either $Q_3$ or $Q_4$ ); and 3) the 8 indices of the Voronoi index vector $k$ calculated in sub-step V1, where each index requires exactly $r$ bits ( $r$ is the Voronoi extension order set in sub-step V0). + +The codebook index $n_k$ is encoded in unary code as follows: + +$n_k = 11110$ when the base codebook is $Q_3$ +and the Voronoi extension order is $r = 1$ + +$n_k = 111110$ when the base codebook is $Q_4$ +and the Voronoi extension order is $r = 1$ + +$n_k = 1111110$ when the base codebook is $Q_3$ +and the Voronoi extension order is $r = 2$ + +$n_k = 11111110$ when the base codebook is $Q_5$ + +and the Voronoi extension order is $r = 2$ + +etc. + +The lattice point $c_k$ is then described as + +$$c_k = M z + v$$ + +The packetisation of these indices into transmission packets will be described in Section 5.6.1. + +#### 5.3.5.8 Spectrum de-shaping + +Spectrum de-shaping is applied to the quantized spectrum prior to applying the inverse FFT. The de-shaping is done according to the following steps: + +- calculate the energy $E_m$ of the 8-dimensional block at position index $m$ +- compute the ratio $R_m = E_{max} / E_m$ +- compute the value $(R_m)^{1/2}$ +- if $R_m > 10$ , then set $R_m = 10$ (maximum gain of 20 dB) +- also, if $R_m > R_{m-1}$ then $R_m = R_{m-1}$ + +After computing the ratio $R_m = (E_{max} / E_m)^{1/2}$ for all blocks with position index smaller than $I$ (and with the limiting conditions described above), we then divide each block by the corresponding ratio. Note that if we neglect the effects of quantization, this de-shaping is the inverse of the pre-shaping function as applied in Section 5.3.5.6. + +#### 5.3.5.9 Inverse transform + +The quantized spectrum $\hat{X}(k)$ is inverse transformed to obtain the time-domain quantized signal $\hat{x}(n)$ . The Inverse DFT is applied, as defined by: + +$$\hat{x}(n) = \sum_{k=0}^{L_{TOT}-1} \hat{X}(k) e^{j \frac{2\pi}{L_{TOT}} nk}$$ + +where $L_{TOT}$ is the number of samples in the TCX frame, as defined in Section 5.3.5.5. An Inverse FFT is used to optimize the computation time of the inverse DFT. + +#### 5.3.5.10 Gain optimization and quantization + +The global gain estimated in Section 5.3.5.7 to scale the spectrum prior to the multi-rate lattice quantization is not guaranteed to maximize the correlation between the original weighted signal $x$ and the quantized weighted signal $\hat{x}$ . Thus, after the inverse transform of the quantized spectrum (Section 5.3.5.9), the optimal gain between $x$ and $\hat{x}$ is computed as follows: + +$$g^* = \frac{\sum_{n=0}^{L_{TOT}-1} x(n)\hat{x}(n)}{\sum_{n=0}^{L_{TOT}-1} \hat{x}(n)\hat{x}(n)}$$ + +with $L_{TOT}$ as defined previously. Then, the gain $g^*$ is quantized on a logarithmic scale to a 7-bit index, using the following procedure. The procedure is purely algebraic and does not require storing a gain codebook. + +$$E = \sum_{n=0}^{L_{TOT}-1} \hat{x}(n)^2$$ + +1. Calculate the energy of the quantized weighted signal: + +$$rms = 4 \sqrt{\frac{E}{L_{TOT}}} \quad (\text{known also at the decoder})$$ + +2. Compute the RMS value: +3. Set $G = g^* \times rms$ (normalization step) +4. Calculate the index as $index = \lfloor 28 \log_{10}(G) + 0.5 \rfloor$ where $\lfloor x \rfloor$ denotes removing the fractional part of $x$ (rounding towards 0). +5. If $index < 0$ , then set $index = 0$ , and if $index > 127$ , then set $index = 127$ . + +The quantized gain $\hat{g}^*$ can be calculated as follows, both as the encoder and decoder since the decoder can calculate locally the value of $rms$ : + +$$\hat{g}^* = 10^{\frac{index}{28 \times rms}}$$ + +#### 5.3.5.11 Windowing for overlap-and-add + +After gain scaling, the quantized weighted signal is windowed again, according to the TCX frame length and the mode of the previous frame. The window shapes are as shown in Figure 8 and defined in Section 5.3.5.4. + +To reconstruct the complete quantized weighted signal, overlap-and-add is applied between the memory of the past frame and the beginning of the present frame corresponding to the non-flat portion of the window. Recall that if the past frame was in ACELP mode, the memory of the past frame corresponds to the windowed, truncated ZIR of the perceptual filter, as calculated in Section 5.3.5.3. + +#### 5.3.5.12 Memory update + +The samples in the lookahead (windowed portion to the right of the TCX frames in Figure 8) are kept in memory for the overlap-and-add procedure in the next TCX frame. + +#### 5.3.5.13 Excitation signal computation + +The excitation signal is finally computed by filtering the quantized weighted signal through the inverse weighting filter with zero-memory. The excitation is needed at the encoder in particular to update the long-term predictor memory. + +## 5.4 Mono Signal High-Band encoding (BWE) + +The encoding of the HF signal is detailed in Figure 9. The HF signal is composed of the frequency components above $F_s/4$ kHz in the input signal. The bandwidth of this HF signal depends on the input signal sampling rate. To encode the HF signal at a low rate, a bandwidth extension (BWE) approach is employed. In BWE, energy information is sent to the decoder in the form of spectral envelope and frame energy, but the fine structure of the signal is extrapolated at the decoder from the received (decoded) excitation signal in the LF signal. + +The down-sampled HF signal is called $s_{HF}(n)$ in Figure 9. The spectrum of this signal can be seen as a folded version of the high-frequency band prior to down-sampling. An LP analysis is performed on $s_{HF}(n)$ to obtain a set of coefficients which model the spectral envelope of this signal. Typically, fewer parameters are necessary than in the LF signal. Here, a filter of order 8 is used. The LP coefficients are then transformed into ISP representation and quantized for transmission. The number of LP analysis in an 1024-sample super-frame depends on the frame lengths in the super-frame. + +![Figure 9: High frequency encoding block diagram. It shows two parallel paths for energy calculation: one for the synthesized HF signal derived from s(n) and another for the reference HF signal s_HF(n). The ratio of these energies is converted to dB. An estimated gain ratio is computed from filters Â(z) and Â_HF(z), interpolated, and subtracted from the measured gain ratio to produce gain corrections g_tilde_0 to g_tilde_nb-1, which are then encoded.](6629e8a87e7552e2454b7c3e9f6d73a0_img.jpg) + +``` + +graph LR + subgraph "Top Path (Synthesized HF)" + S_N[s(n)] --> A_Z_INV[Â(z)] + A_Z_INV --> ONE_OVER_A_HF["1 / Â_HF(z)"] + ONE_OVER_A_HF --> A_HF_Z_P["A_HF(z) / A_HF(z/γ_HF)"] + A_HF_Z_P --> SUM_X2_1["Σ x_i² (per subframe)"] + end + + subgraph "Middle Path (Reference HF)" + S_HF_N[s_HF(n)] --> A_HF_Z_P2["A_HF(z) / A_HF(z/γ_HF)"] + A_HF_Z_P2 --> SUM_X2_2["Σ x_i² (per subframe)"] + end + + SUM_X2_1 --> DIV[÷] + SUM_X2_2 --> DIV + DIV --> LOG[10 log₁₀] + LOG --> SUB[-] + + subgraph "Bottom Path (Gain Estimation)" + LP_ANALYSIS["LP analysis, quantization, and interpolation"] --> A_HF_Z_HAT["Â_HF(z)"] + A_HF_Z_HAT --> COMPUTE_GAIN["compute gain (in dB) to match magnitude at Fs/4 Hz"] + A_Z_LF["Â(z) (from LF encoder)"] --> COMPUTE_GAIN + COMPUTE_GAIN -- g_match --> GAIN_INTERP["gain interpolation (in dB) per subframe"] + end + + GAIN_INTERP -- "(g̃₀, ..., g̃_nb-1)" --> SUB + SUB -- "(g̃₀, ..., g̃_nb-1)" --> ENCODING["encoding of gain corrections (in dB)"] + + A_Z_LF -.-> A_Z_INV + +``` + +Figure 9: High frequency encoding block diagram. It shows two parallel paths for energy calculation: one for the synthesized HF signal derived from s(n) and another for the reference HF signal s\_HF(n). The ratio of these energies is converted to dB. An estimated gain ratio is computed from filters Â(z) and Â\_HF(z), interpolated, and subtracted from the measured gain ratio to produce gain corrections g\_tilde\_0 to g\_tilde\_nb-1, which are then encoded. + +**Figure 9: High frequency encoding** + +The LP filter for the HF signal is denoted by $A_{HF}(z)$ , and its quantized version is denoted by $\hat{A}_{HF}(z)$ . From the LF signal ( $s(n)$ in Figure 9), a residual signal is first obtained by filtering $s(n)$ through the inverse filter $\hat{A}(z)$ . Then, this residual is filtered through the quantized HF synthesis filter, $1/\hat{A}_{HF}(z)$ . Up to a gain factor, this produces a good approximation of the HF signal, but in a spectrally folded version. The actual HF synthesis signal will be recovered when up-sampling is applied to this signal. + +Since the excitation is taken from the LF signal, an important step is to compute the proper gain for the HF signal. This is done by comparing the energy of the reference HF signal ( $s_{HF}(n)$ ) with the energy of the synthesized HF signal. The energy is computed once per 64-sample subframe, with energy match ensured at the $F_s/4$ kHz subband boundary. Specifically, the synthesized HF signal and the reference HF signal are filtered through a perceptual filter derived from $A_{HF}(z)$ . The ratio of the energy of these two filtered signals is computed every 64 samples, and expressed in dB. There are 4 such gains in a 256-sample frame (one for every 64-sample subframe). This 4-gain vector represents the gain that should be applied to the HF signal to properly match the HF signal energy. Instead of transmitting this gain directly, an estimated gain ratio is first computed by comparing the gains of filters $\hat{A}(z)$ from the lower band and $\hat{A}_{HF}(z)$ from the higher band. This gain ratio estimation is detailed in Figure 10 and will be explained below. The gain ratio estimation is interpolated every 64 samples, expressed in dB and subtracted from the measured gain ratio. The resulting gain differences or gain corrections, noted $\tilde{g}_0$ to $\tilde{g}_{nb-1}$ in Figure 9, are quantized as 4-dimensional vectors, i.e. 4 values per 256-sample frame. + +The gain estimation computed from filters $\hat{A}(z)$ and $\hat{A}_{HF}(z)$ is detailed in Figure 12. These two filters are available at the decoder side. The first 64 samples of a decaying sinusoid at Nyquist frequency $\pi$ radians per sample is first computed by filtering a unit impulse through a one-pole filter. The Nyquist frequency is used since the goal is to match the filter gains at around $F_s/4$ kHz, i.e. at the junction frequency between the LF and HF signals. Note the 64-sample length of this reference signal is the sub-frame length (64 samples). The decaying sinusoid is then filtered first through $\hat{A}(z)$ , to obtain a low-frequency residual, then through $1/\hat{A}_{HF}(z)$ to obtain a synthesis signal from the HF synthesis filter. We note that if filters $\hat{A}(z)$ and $\hat{A}_{HF}(z)$ have identical gains at the normalized frequency of $\pi$ radians per sample, the energy of the output of $1/\hat{A}_{HF}(z)$ would be equivalent to the energy of the input of $\hat{A}(z)$ (the decaying sinusoid). If the gains differ, then this gain difference is taken into account in the energy of the signal at the output, noted $x(n)$ . The correction gain should actually increased as the energy of $x(n)$ decreases. Hence, the gain correction is computed as the multiplicative inverse of the energy of signal $x(n)$ , in the logarithmic domain (i.e. in dB). To get a true energy ratio, the energy of the decaying sinusoid, in dB, should be removed from the output. However, since this energy offset is a constant, it will simply be taken into account in the gain correction encoder. + +At the decoder, the gain of the HF signal can be recovered by adding $\tilde{g}_0$ to $\tilde{g}_{nb-1}$ (known at the decoder) to the decoded gain corrections. + +![Block diagram of gain matching between low and high frequency envelope. The diagram shows a signal flow from delta(n) through a series of filters and gain calculations to produce g_match. Below the diagram are two plots: the first shows a single impulse at n=0 over 64 samples; the second shows a decaying impulse response over 64 samples.](9f6dec4d4e9fde40bce018861ef1278e_img.jpg) + +The diagram illustrates a signal processing chain for gain matching. The input signal $\delta(n)$ is processed through a filter $\frac{1}{1+0.9z^{-1}}$ to produce $h(n)$ . This signal is then processed by a filter $\hat{A}(z)$ (parameter from LF decoder) and then $\frac{1}{\hat{A}_{HF}(z)}$ (parameter from HF decoder) to produce $x(n)$ . Finally, $x(n)$ is processed by a gain calculation block $\frac{1}{10 \log_{10}(\sum x(n)^2)}$ to produce the gain $g_{match}$ . + +Below the diagram are two plots: + +- The left plot shows the impulse response $\delta(n)$ over 64 samples, with a single impulse at $n=0$ . +- The right plot shows the impulse response $h(n)$ over 64 samples, which is a decaying exponential-like signal. + +Block diagram of gain matching between low and high frequency envelope. The diagram shows a signal flow from delta(n) through a series of filters and gain calculations to produce g\_match. Below the diagram are two plots: the first shows a single impulse at n=0 over 64 samples; the second shows a decaying impulse response over 64 samples. + +Figure 10: Gain matching between low and high frequency envelope + +## 5.5 Stereo signal encoding + +### 5.5.1 Stereo Signal Low-Band Encoding + +![Block diagram of Stereo Signal Low-Band Encoding process.](0b3d9fe35da3ee0c88f1420bb9ed7a03_img.jpg) + +The diagram illustrates the stereo signal low-band encoding process. It starts with two input signals, $x_{SLo}(n)$ and $x_{MLo}(n)$ , which are processed through 'Adaptive Windowing' blocks. The outputs of these blocks are fed into a 'Time envelope compensation (mode 0 only)' block, which generates a 'Mono signal energy envelope'. This envelope is then used in a 'Compute and quantize balance factor' block, which outputs a balance factor to a 'MUX'. The outputs of the 'Adaptive Windowing' blocks are also summed (+) and then multiplied ( $\otimes$ ) by the balance factor. The result is then processed through a 'Transform', 'Spectrum pre-shaping', 'Split multi-rate lattice VQ' (which also outputs to a 'MUX'), 'Spectrum de-shaping', and 'Inverse Transform' blocks. The output of the 'Inverse Transform' block is multiplied ( $\otimes$ ) by a 'Compute and quantize gain' block, which also outputs to a 'MUX'. The result is then summed (+) and fed into another 'Time envelope compensation (mode 0 only)' block. The output of this block is processed through an 'Adaptive Windowing' block. The final output is the 'Windowed reconstructed target', which is summed (+) with the 'Windowed overlap from previous frame' to produce the quantized output $x_{SLo}(n)$ quantized. A 'Save for next frame' block is connected to the output of the 'Adaptive Windowing' block. + +Block diagram of Stereo Signal Low-Band Encoding process. + +#### 5.5.1.1 Principle + +The stereo Low band encoder receives the signals $x_{MLO}(n)$ and $x_{RLO}(n)$ for encoding. The Low band encoder is based on fidelity optimized encoding of the low band side signal. The Lo side signal is obtained by computing the difference + +$$x_{SLO}(n) = x_{MLO}(n) - x_{RLO}(n)$$ + +The encoding of the side signal is performed following a similar approach to that of the core encoder, except that the ACELP mode is not used. For each input signal block, the encoder decides in closed loop which encoding models to use. A signal to noise ratio fidelity criterion is used. + +All 4 encoding models are based on encoding in the frequency domain a redundancy reduced side signal. In order to account for transients, there is an encoding model that uses pre-echo reduction. Encoding in the frequency domain uses the same split multi-rate lattice VQ. + +Within each super-frame, the different encoding modes are: + +| mode | Duration (length + overlap) | Encoding | +|------|-----------------------------|----------------------| +| 0 | 40 + 8 | RR + Pre-echo + AVEQ | +| 1 | 40 + 8 | RR + AVEQ | +| 2 | 80 + 16 | RR + AVEQ | +| 3 | 160 + 32 | RR + AVEQ | + +The timing chart as well as the possible mode combinations is similar to that of the core encoder and is described in the following figure: + +![Timing chart showing the duration and overlap for different encoding modes (0, 1, 2, 3) over time. Mode 0 and 1 have a duration of 40 samples with an 8-sample overlap. Mode 2 has a duration of 80 samples with a 16-sample overlap. Mode 3 has a duration of 160 samples with a 32-sample overlap. The chart shows how these modes are scheduled within a super-frame.](e97d663314aff9c29bf8971323e6539e_img.jpg) + +The diagram illustrates the timing of different encoding modes (0, 1, 2, 3) over time. The horizontal axis represents time. Vertical dashed lines mark the start of each super-frame. Within each super-frame, the modes are scheduled as follows: + + +- Mode 0 and 1: A block of 40 samples followed by an overlap of 8 samples. +- Mode 2: A block of 80 samples followed by an overlap of 16 samples. +- Mode 3: A block of 160 samples followed by an overlap of 32 samples. + + The diagram shows multiple instances of these mode blocks within a super-frame, with mode 0 and 1 appearing twice, mode 1 appearing once, mode 2 appearing once, and mode 3 appearing once. The durations 40, 80, and 160 are indicated by double-headed arrows at the bottom, and the overlap durations 8 and 16 are indicated by double-headed arrows at the top. + +Timing chart showing the duration and overlap for different encoding modes (0, 1, 2, 3) over time. Mode 0 and 1 have a duration of 40 samples with an 8-sample overlap. Mode 2 has a duration of 80 samples with a 16-sample overlap. Mode 3 has a duration of 160 samples with a 32-sample overlap. The chart shows how these modes are scheduled within a super-frame. + +Selection of the encoding mode is done by closed loop search identical to the one used for the core encoder. + +#### 5.5.1.2 Signal Windowing + +The two signals $x_{SLO}(n)$ and $x_{MLO}(n)$ are windowed prior to redundancy removal and frequency transformation. This is necessary in order to apply overlap-add to minimize the framing effects due to quantization. The window shape is + +adaptive depending on the previous coding mode and is similar to that described in section 5.3.5.4. The windowed signals are denoted by $\tilde{x}_{SLo}(n)$ and $\tilde{x}_{MLO}(n)$ . + +#### 5.5.1.3 Pre-echo mode + +In order to encode transients more efficiently, a pre-echo mode is used. It is often the case in transients that the energy envelope of the mono signal is highly correlated with that of the side signal. The energy envelope of the mono signal is derived and normalized, it is then used to compensate for the energy envelope of the side signal. + +#### 5.5.1.4 Redundancy reduction + +For all encoding modes, a balance factor is used in order to remove the portion of the side signal that is correlated with the mono signal. The balance factor is given by + +$$balance\_factor = \frac{\sum_n \tilde{x}_{SLo}(n)\tilde{x}_{MLO}(n)}{\sum_n \tilde{x}_{MLO}(n)^2}$$ + +the balance factor is quantized by a uniform scalar quantizer with 7 bits. + +### 5.5.2 Stereo Signal Mid-Band Processing + +#### 5.5.2.1 Principle + +The encoder takes the mid band mono and right channel signals, $x_{MMid}(n)$ and $x_{RMid}(n)$ , and inverse filters it with the core codec LPC filters derived from the mono signal. In the residual domain a shape constrained FIR filter is computed for approximating the side signal. The filter is computed by means of the covariance method using a novel spectral shape constraint. A new filter is computed for each $L_{div}=256$ sample frame with an analysis frame of 320 samples. The energy of the filter is smoothed to avoid sudden energy changes. The smoothed filter is quantized with a multistage predictive vector quantizer (MSPVQ). + +The mono residual signal $e_{MMid}(n)$ is filtered with the quantized filter and gain factors are computed for the left and right channels respectively. + +![Block diagram of Stereo Signal Mid-Band Processing. The diagram shows two input signals, x_MMid(n) and x_RMid(n), entering blocks labeled A(z). The output of x_MMid(n) is e_MMid(n), and the output of x_RMid(n) is e_RMid(n). e_MMid(n) is split: one path goes to a summation node (+) where it is added to e_RMid(n) to produce e_LMid(n); the other path goes to a 'Covariance method' block. e_RMid(n) also goes to the 'Covariance method' block after being subtracted from e_MMid(n) at another summation node (+, -). The 'Covariance method' block outputs to 'Filter Energy Smoothing', which then outputs to 'MSPVQ', which finally outputs to 'MUX'. A dashed line from 'MSPVQ' goes to a 'filter' block. The 'filter' block takes e_MMid(n) and e_RMid(n) as inputs and outputs e_hat_RMid(n) and e_hat_LMid(n). These two signals enter a 'Gain matching and Gain control' block, which outputs gain factors g_R and g_L. g_R and g_L enter a 'PVQ' block, which outputs to 'MUX'. A dashed line from 'From core codec' points to the A(z) blocks.](1dbb1d90b2022a3a765c85929a515cc6_img.jpg) + +Block diagram of Stereo Signal Mid-Band Processing. The diagram shows two input signals, x\_MMid(n) and x\_RMid(n), entering blocks labeled A(z). The output of x\_MMid(n) is e\_MMid(n), and the output of x\_RMid(n) is e\_RMid(n). e\_MMid(n) is split: one path goes to a summation node (+) where it is added to e\_RMid(n) to produce e\_LMid(n); the other path goes to a 'Covariance method' block. e\_RMid(n) also goes to the 'Covariance method' block after being subtracted from e\_MMid(n) at another summation node (+, -). The 'Covariance method' block outputs to 'Filter Energy Smoothing', which then outputs to 'MSPVQ', which finally outputs to 'MUX'. A dashed line from 'MSPVQ' goes to a 'filter' block. The 'filter' block takes e\_MMid(n) and e\_RMid(n) as inputs and outputs e\_hat\_RMid(n) and e\_hat\_LMid(n). These two signals enter a 'Gain matching and Gain control' block, which outputs gain factors g\_R and g\_L. g\_R and g\_L enter a 'PVQ' block, which outputs to 'MUX'. A dashed line from 'From core codec' points to the A(z) blocks. + +#### 5.5.2.2 Residual computation + +The residual signal is computed according to + +$$e_{MMid}(n) = \sum_{i=0}^{16} a_i(n)x_{MMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +$$e_{RMid}(n) = \sum_{i=0}^{16} a_i(n) x_{RMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +The quantized and interpolated LPC coefficients from the core codec are used in the inverse filter operation, in addition an extra subframe is computed for the overlapped analysis section. The residual side signal is computed as + +$$e_{SMid}(n) = e_{MMid}(n) - e_{RMid}(n), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +#### 5.5.2.3 Filter computation, smoothing and quantization + +The filter is computed that minimizes the expression $\sum_{n=0}^{L_{div}+L_{subfr}} \left[ e_{SMid}(n) - \sum_{i=0}^8 b_i e_{MMid}(n-i) \right]^2$ under the constraint of a spectral null at 0Hz. The filter coefficients for the filter are computed with the well know covariance method using a modified cholesky algorithm taking into account the shape constraint. + +To avoid to fast changes in the filter energy, the filter energy is smoothed over time. The filter energy is first computed as + +$$E_b = \sum_{i=0}^8 b_i^2$$ + +the new filter energy is computed such that the filter energy is saturated to 16 and that transitions between frames are limited within a +/- 1.5 dB interval. + +After the smoothing operation the filter coefficients are quantized using a predictive multistage vector quantizer. + +#### 5.5.2.4 Channel energy matching + +The quantized filter coefficients $b_{0q}, b_{1q}, \dots, b_{8q}$ are used to filter the mono signal excitation in order to get an initial estimate of the left and the right channel excitation signals. These estimates are computed as + +$$\hat{e}_{LMid}(n) = e_{MMid}(n) - \sum_{i=0}^8 b_{iq} e_{MMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +$$\hat{e}_{RMid}(n) = e_{MMid}(n) + \sum_{i=0}^8 b_{iq} e_{MMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +The energy matching for the left and right channels is computed as + +$$g_L = 10 \log_{10} \frac{\sum_{n=0}^{L_{div}+L_{subfr}} e_{LMid}(n)^2}{\sum_{n=0}^{L_{div}+L_{subfr}} \hat{e}_{LMid}(n)^2}$$ + +$$g_R = 10 \log_{10} \frac{\sum_{n=0}^{L_{div}+L_{subfr}} e_{RMid}(n)^2}{\sum_{n=0}^{L_{div}+L_{subfr}} \hat{e}_{RMid}(n)^2}$$ + +The computed gains are adjusted in case of anti-correlation by computing a correlation gain + +$$g_{CORR} = 10 \log_{10} \frac{4 \sum_{n=0}^{L_{div}+L_{subfr}} e_{MMid}(n)^2}{\sum_{n=0}^{L_{div}+L_{subfr}} e_{RMid}(n)^2 + e_{RMid}(n)^2}$$ + +if $g_{CORR} < 0\text{dB}$ the gain matching factors are adjusted according to + +$$g_L = \begin{cases} g_L & g_L < 0\text{dB} \\ \max(0, g_L + g_{CORR}) & \text{otherwise} \end{cases} \quad \text{and} \quad g_R = \begin{cases} g_R & g_R < 0\text{dB} \\ \max(0, g_R + g_{CORR}) & \text{otherwise} \end{cases}$$ + +The energy matching factors are quantized using a two-dimensional vector-quantizer. + +### 5.5.3 Stereo Signal High-Band Processing + +In the stereo case two bandwidth extensions are used. Both use the mono coder excitation as excitation source. + +## 5.6 Packetization + +### 5.6.1 Packetization of TCX encoded parameters + +This section explains how the TCX encoded parameters are put in one or several binary packets for transmission. One packet is used for 256-sample TCX, while respectively 2 and 4 packets are used for 512- and 1024-sample TCX. To split the TCX spectral information in multiple packets (in case of 512- and 1024-sample TCX), the spectrum is divided into interleaved *tracks*, where each track contains a subset of the splits in the spectrum (each split represent 8-dimensional vectors encoded with algebraic VQ, and the bits of individual splits are not divided across different tracks). If we number the splits in the spectrum, from low to high frequency, with the split numbers 0, 1, 2, 3, etc. up to the last split at the highest frequency, then the tracks are as shown in the following table + +**Table 13: Dividing spectral splits in different tracks for packetization** + +| | | Split numbers | +|------------------------|---------|----------------------------------| +| 256-sample-TCX | Track 1 | 0, 1, 2, 3, etc (only one track) | +| 512-sample TCX | Track 1 | 0, 2, 4, 6, etc. | +| | Track 2 | 1, 3, 5, 7, etc. | +| 1024-sample TCX | Track 1 | 0, 4, 8, 12, etc. | +| | Track 2 | 1, 5, 9, 13, etc. | +| | Track 3 | 2, 6, 10, 14, etc. | +| | Track 4 | 3, 7, 11, 15, etc. | + +Then, recall that the parameters of each split in algebraic VQ consist of the codebook numbers $\mathbf{n} = [n_0 \dots n_{K-1}]$ and the indices $\mathbf{i} = [i_0 \dots i_{K-1}]$ of all splits. The values of codebooks numbers $\mathbf{n}$ are in the set of integers $\{0, 2, 3, 4, \dots\}$ . The size (number of bits) of each index $i_k$ is given by $4n_k$ . To write these bits into the different packets, we associate a track number to each packet. In the case of 256-sample TCX, only one track is used (i.e. all the splits in the spectrum) and it is written in a single packet. In the case of 512-sample TCX, two packets are used: the first packet is used for Track 1 and the second packet for Track 2. In the case of 1024-sample TCX, four packets are used: the first packet is used for Track 1, the second packet for Track 2, the third packet for Track 3 and the fourth packet for Track 4. However, the spectrum quantization and bit allocation was performed without constraining each track to have the same amount of bits, so in general the different tracks do not have the same number of bits allocated to the respective splits. Hence, when writing the encoded splits (codebook numbers and lattice point indices) of a track into their respective packet, two situations can occur: 1) there are not enough bits in the track to fill the packet or 2) there are more bits in a track than the size of the packet so there is overflow. The third possibility (exactly the same number of bits in a track as the packet size) occurs rarely. This overflow has to be managed properly, so all packets are completely filled, and so the decoder can properly interpret and decode the received bits. This overflow management will be explained below when the multiplexing for the case of multiple binary tables (i.e. tracks) is detailed. + +The split indices are written in their respective packets starting from the lowest frequency split and scanning the track in the spectrum in increasing value of frequency. The codebook number $n_K$ and index $i_K$ of each split are written in separate sections of the packet. Specifically, the bits of the codebook number $n_K$ (actually, its unary code representation) are written sequentially starting from one end of the packet, and the bits of the index $i_K$ are written sequentially starting from the other end of the packet. Hence, overflow occurs when these concurrent bit writing processes attempt to overwrite each other. Alternatively, when the bits in one track do not completely fill a packet, there will be a "hole" (i.e. available position for writing more bits) somewhere in the middle of the packet. In 512-sample TCX, overflow will only occur in one of the two packets, while the other packet will have this "hole" where the overflowing bits of the other packet will be written. In 1024-sample TCX, there can be "holes" in more than one of the four packets after overflow has happened. In this case, all the "holes" will be grouped together and the overflowing bits of the other packets will be written into these "holes". Details of this procedure are given below. + +Then, we note that the use of a unary code to encode the lattice codebook numbers (**n**) implies that each split requires actually $5n_k$ bits, when it is quantized using a point in the lattice codebook with number $n_k$ . That is, $n_k$ bits are used by the unary code ( $n_k - 1$ successive "1's" and a final "0") to indicate how many blocks of 4 bits are used in the codebook index, and $4n_k$ bits are used to form the actual lattice codebook index in codebook $n_k$ for the split. Note also that when a split is not quantized (i.e. set to zero by the TCX quantizer), it still requires 1 bit (a "0") in the unary code, to indicate that the decoder must skip this split and set it to zero. + +Now, more details related to the multiplexing of algebraic vector quantizer indices in one or several packets are given below, in particular regarding the splitting of TCX indices in more than one packet (for 512- and 1024-sample TCX) and the management of overflow in writing the bits into the packets. + +Recall that the codebook numbers are integers defined in the set $\{0, 2, 3, 4, \dots, 36\}$ . Each $n_k$ has to be represented in a proper binary format, denoted hereafter $n_k^E$ , for multiplexing. + +#### 5.6.1.1 Multiplexing principle for a single binary table + +The multiplexing in a single binary table **t** consists of writing bit-by-bit all the elements of **n** and **i** inside **t**, where the table **t** = ( $t_0, \dots, t_{R-1}$ ) contains $R$ bits (which corresponds to the number of bits allocated to algebraic VQ). + +A straightforward strategy amounts to writing sequentially the elements of **n**E and **i** in the binary table **t**, as follows: + +$$[n_{E0} \ i_0 \ n_{E1} \ i_1 \ n_{E2} \ i_2 \dots ]$$ + +In this case, the bits of $n_{E0}$ are written from position 0 in **t** and upward, the bits of $i_0$ then follow, etc. This format is uniquely decodable, because the encoded codebook number $n_k^E$ indicates the size of $i_k$ . + +Instead, an alternative format is used as described below: + +$$[ i_0 \ i_1 \ i_2 \dots n_{E2} \ n_{E1} \ n_{E0} ]$$ + +The codebook numbers are written sequentially and downward from the end of the binary table **t**, whereas the indices are written sequentially and upward from the beginning of the table. This format has the advantage to separate codebook numbers and indices. This allows to take into account the different bit sensitivity of codebook numbers and indices. Indeed, with the multi-rate lattice vector quantization used, the codebook numbers are the most sensitive parameters. Thus, they are written from the beginning of the table **t** and take around 20% of the total bit consumption, giving bitstream ordering according to bit sensitivity. + +For the actual multiplexing, two pointers are then defined on the binary table **t**: one for (encoded) codebook numbers $pos_n$ , another for indices $pos_i$ . The pointer $pos_i$ is initialized to 0 (i.e. the beginning of the binary table), and $pos_n$ to $R-1$ (i.e. the end of the binary table). Positive increments are used for $pos_i$ , and negative ones for $pos_n$ . At any time, the number of bits left in the binary table is given by $pos_n - pos_i + 1$ . + +The table **t** is initialized to zero. This guarantees that if no data is written, the data inside this table will correspond to an all-zero codebook numbers **n** (this follows from the definition of the unary code used here). The splits are then written sequentially in the binary table from $k=0$ to $K-1$ : $[n_{E0} \ i_0]$ then $[n_{E1} \ i_1]$ then $[n_{E2} \ i_2]$ , etc. + +The data of the $k$ th split are really written in the binary table **t** only if the minimal bit consumption of the $k$ th split, denoted $R_k$ hereafter, is less than the number of bits left in table **t**, i.e. if $R_k \leq pos_n - pos_i + 1$ . For the multi-rate lattice vector quantization used here, the minimal bit consumption $R_k$ equals to 0 bit if $n_k=0$ , or $5n_k-1$ bits if $n_k \geq 2$ . + +The multiplexing works as follows as shown in the algorithm of Figure 11. + +Initialization: + +$pos_i = 0, pos_n = R-1$ + +set binary table **t** to zero + +For $k=0$ to $K-1$ (loop for all splits over the 4 steps below): + +    Compute the number of left bits in table **t**: $nb = pos_n - pos_i + 1$ + +    Compute the minimal bit consumption of the $k$ th split: $R_k = 0$ if $n_k = 0, 5n_k - 1$ if $n_k \geq 2$ + +**Figure 11: Multiplexing algorithm for one binary table** + +In practice, the binary table **t** is physically represented as having 4-bit elements instead of binary (1-bit) elements, so as to accelerate the write-in-table operations and avoid too many bit manipulations. This optimization is significant because the indices $i_k$ are typically formatted into 4-bit blocks. In this case, the value of $pos_i$ is always a multiple of 4. However, this implies to use bit shifts and modular arithmetic on pointers $pos_n$ and $pos_i$ to locate positions in the table. + +#### 5.6.1.2 Multiplexing in case of multiple binary tables + +In the case of multiple binary tables, the algebraic VQ parameters are written in $P$ tables $t_0, \dots, t_{P-1}$ ( $P \geq 1$ ) containing respectively $r_0, \dots, r_{P-1}$ bits, such that $r_0 + \dots + r_{P-1} = R$ . In other words, the bit budget allocated to algebraic VQ parameters, $R$ , is distributed to $P$ binary tables. Here, $L$ is set to 1 in the 256-sample TCX mode, 2 in the 512-sample TCX mode or 4 in the 1024-sample TCX mode. + +Note that the multiplexing of algebraic VQ parameters in TCX modes employs frame-zero-fill if the bit budget allocated to algebraic VQ is not fully used. + +We assume that the number of sub-vectors, $K$ , is a multiple of $P$ . Under this assumption, the algebraic VQ parameters are then divided into $P$ groups of equal cardinality: each group comprises $K/P$ (encoded) codebook numbers and $K/P$ indices. By convention, the $p$ th group is defined as the set $(n_{p+jP}^E, i_{p+jP})_{j=0..K/P-1}$ . This can be seen as a decimation operation (in the usual multi-rate signal processing sense). + +Assuming the size of table $t_p$ is sufficient, the parameters of the $p$ th group are written in table $t_p$ . For the sake of clarity, the division of sub-vectors is explained below in more details for $P=1$ and 2: + +If $P=1$ , the set $(n_{p+jP}^E, i_{p+jP})_{j=0..K/P-1}$ for $l=0$ simply corresponds to $(n_0^E, i_0, \dots, n_{K-1}^E, i_{K-1})$ . These parameters are written in table $t_0$ . This is the single-table case. + +If $P=2$ , we have $(n_{p+jP}^E, i_{p+jP})_{j=0..K/P-1} = (n_0^E, i_0, n_2^E, i_2, \dots, n_{K-2}^E, i_{K-2})$ for $p=0$ and $(n_1^E, i_1, n_3^E, i_3, \dots, n_{K-1}^E, i_{K-1})$ for $p=1$ . Assuming the table sizes are sufficient, the parameters $(n_0^E, i_0, n_2^E, i_2, \dots, n_{K-2}^E, i_{K-2})$ are written in table $t_0$ , while the other parameters $(n_1^E, i_1, n_3^E, i_3, \dots, n_{K-1}^E, i_{K-1})$ are written in table $t_1$ . + +The case of $P=4$ can be readily understood from the case of $P=2$ . + +As a consequence, in principle the multiplexing in the multiple-table case boils down to applying several times the single-table multiplexing principle: the (encoded) codebook numbers $(n_{p+jP}^E)_{j=0..K/P-1}$ can be written upward from the bottom of each table $t_p$ and the indices $(i_{p+jP})_{j=0..K/P-1}$ can be written downward from the end of each table $t_p$ . Two pointers are defined for each binary table $t_p$ : $pos_{n,p}$ and $pos_{i,p}$ . These pointers are initialized to $pos_{i,p} = 0$ and $pos_{n,p} = r_p - 1$ , and are respectively incremented and decremented. + +Nonetheless, the multiple-table case is not a straightforward extension of the single-packet case. It may happen indeed that the number of bits in $(n_{p+jP}^E, i_{p+jP})_{j=0..K/P-1}$ exceeds, for a given $p$ , the number of bits, $r_p$ , available in the binary table $t_p$ . To deal with such an "overflow", an extra table $t_{ex}$ is defined as temporary buffer to write the bits in excess (which have to be distributed in another table $t_q$ with $q \neq p$ ). The size of $t_{ex}$ is set to $4 \times 36$ bits. + +The actual multiplexing algorithm in the multiple-table case is detailed below: + +1) *Initialize:* (We assume that a size of $r_p$ bits for each binary table $t_p$ .) + +Set total number of bits to $R$ : $nb = R$ + +Initialize the maximum position *last* such that $n_{last} \geq 2$ : + +$last = -1$ + +For $p=0 \dots P-1$ , + +$pos_{t,p} = 0$ and $pos_{n,p} = r_p - 1$ + +set table $t_p$ to zero + +2) *Split and write all codebook numbers:* + +For $p=0 \dots P-1$ , the (encoded) codebook numbers $(n_{p+j}^E)_{j=0 \dots K/P-1}$ are written sequentially (downward from the end) in table $t_p$ . This is done through two nested loops over $p$ and $j$ . In the illustrative embodiment a single loop is used with modular arithmetic, as detailed below: + +For $k=0, \dots, K-1$ + +$p = k \bmod P$ + +Compute the minimal bit consumption of the $k$ th split: $R_k = 0$ if $n_k=0$ , $5n_k-1$ if $n_k \geq 2$ + +If $R_k > nb$ , $n_k=0$ else $nb = nb - R_k$ + +If $n_k \geq 2$ , $last = k$ + +Write downward $n_k^E$ (except the stop bit) in table $t_p$ starting from $pos_{n,p}$ , and decrement $pos_{n,p}$ by $n_k - 1$ + +If $nb \geq 0$ , write the stop bit of the unary code and decrement $pos_{n,p}$ by 1 + +It can be checked that for $P \leq 4$ with a near-equal distribution of $R$ in $r_p$ , no overflow (i.e. bit in excess) in tables $t_p$ can happen at this step (for $p=0, \dots, P-1$ ). In general this property must be verified to apply the algorithm. + +3) *Split and write all indices:* + +This is the tricky part of the multiplexing algorithm due to the possibility of overflow. + +Find the positions $pos_p^{ovf}$ in each binary table $t_p$ (with $p = 1 \dots P$ ) from which the bits in overflow can be written. These positions are computed assuming the indices are written by 4-bit block. + +For $p = 0 \dots P-1$ + +$pos = 0$ + +$nb = pos_{n,p} + 1$ + +For $k = p$ to *last* with a step of $P$ + +If $n_k > 0$ , + +If $4n_k \leq nb$ , $nb_1 = n_k$ + +else $nb_1 = nb \gg 2$ (where $\gg$ is a bit shift operator) + +$nb = nb - 4 * nb_1$ + +$pos = pos + nb_1$ + +$pos_p^{ovf} = pos * 4$ + +The indices can then be written as follows: + +For $p = 0..P-1$ + +$pos = 0$ + +For $l = p$ to $N-1$ with a step of $P$ + +$nb = pos_{n,p} - pos$ + +Write the $4n_k$ bits of $i_k$ : + +Compute the number, $nb_1$ , of 4-bit blocks which can fit in table $t_p$ and the number, $nb_2$ , of 4-bit blocks in excess (to be written temporarily in table $t_{ex}$ ): + +If $4n_k \leq nb$ , $nb_1 = n_k$ , $nb_2 = 0$ + +else $nb_1 = nb \gg 2$ (where $\gg$ is a bit shift operator), $nb_2 = n_k - nb_1$ + +Write upward the $4nb_1$ bits of $i_k$ from $pos_{i,p}$ to $pos_{i,p}+4nb_1-1$ in table $t_p$ , and increment $pos_{i,p}$ by $4nb_1$ + +If $nb_2 \geq 0$ , + +Initialize $pos_{ovf}$ to 0 + +Write upward the remaining $4nb_2$ bits of $i_k$ from $pos_{ovf}$ to $pos_{ovf}+4nb_2-1$ in table $t_{ex}$ , and increment $pos_{ovf}$ by $4nb_{ovf}$ + +Distribute the $4nb_2$ bits in table $t_p$ (with $q \neq p$ ) based on the pointers $pos^{ovf}_q$ and $pos_{n,q}$ and the pointers $pos^{ovf}_q$ are updated. + +### 5.6.2 Packetization procedure for all parameters + +The coding parameters computed in a 1024-sample super-frame at the encoder are multiplexed into 4 binary packets of equal size. The packetization consists of a multiplexing loop over 4 iterations. The size of each packet is set to $R_{total} / 4$ where $R_{total}$ is the number of bits allocated to the super-frame. + +Recall that the mode selected in the 1024-sample super-frame has the form $(m_1, m_2, m_3, m_4)$ , where $m_k=0, 1, 2$ or $3$ , with the mapping: 0 → 256-sample ACELP, 1 → 256-sample TCX, 2 → 512-sample TCX, 3 → 1024-sample TCX + +![](8d66c9c295023a1380f9986d3663bb1e_img.jpg) + +$m_k = 3$ + +| | | | | | | | | | | | | | | +|----|---------------------------------------|-------------------------------------------------------------------------------------------------------|--|--|--|--|--|--|--|--|--|-----------------|-----------------| +| 11 | Split ISF
Noise factor
TCX gain | Algebraic VQ parameters
(¼ of the bit budget allocated to algebraic VQ for the 1024 samples frame) | | | | | | | | | | Split ISF, gain | gain correction | +|----|---------------------------------------|-------------------------------------------------------------------------------------------------------|--|--|--|--|--|--|--|--|--|-----------------|-----------------| + +$m_k = 2$ + +| | | | | | | | | | | | | | | +|----|---------------------------------------|------------------------------------------------------------------------------------------------------|--|--|--|--|--|--|--|--|--|-----------------|-----------------| +| 10 | Split ISF
Noise factor
TCX gain | Algebraic VQ parameters
(½ of the bit budget allocated to algebraic VQ for the 512 samples frame) | | | | | | | | | | Split ISF, gain | gain correction | +|----|---------------------------------------|------------------------------------------------------------------------------------------------------|--|--|--|--|--|--|--|--|--|-----------------|-----------------| + +$m_k = 1$ + +| | | | | | | | | | | | | | | +|----|-----|--------------|-------------|-------------------------|--|--|--|--|--|--|--|-----|------| +| 01 | ISF | Noise factor | Global gain | Algebraic VQ parameters | | | | | | | | ISF | gain | +|----|-----|--------------|-------------|-------------------------|--|--|--|--|--|--|--|-----|------| + +$m_k = 0$ + +| | | | | | | | | | | | | | | +|----|-----|-------------|-----------|--------------|------------------|----------------|-----|-----------|--------------|------------------|----------------|-----|------| +| 00 | ISF | Mean energy | Pitch lag | Pitch filter | Codebook indices | Codebook gains | ... | Pitch lag | Pitch filter | Codebook indices | Codebook gains | ISF | gain | +|----|-----|-------------|-----------|--------------|------------------|----------------|-----|-----------|--------------|------------------|----------------|-----|------| + +Diagram annotations: + +- Vertical dashed lines separate the first 7 columns from the last 7 columns. +- A horizontal double-headed arrow labeled "ACELP subframe 1" spans from the 3rd column to the 7th column. +- A horizontal double-headed arrow labeled "ACELP subframe 4" spans from the 9th column to the 13th column. +- A long horizontal double-headed arrow labeled "LF parameters" spans from the 1st column to the 13th column. +- A long horizontal double-headed arrow labeled "HF parameters" spans from the 14th column to the end. + +**Figure 12: Structure of transmission packets for all four frame types** + +The multiplexing in the $k$ -th packet is performed according to the value of $m_k$ . The corresponding packet format is shown in Figure 12. There are 3 cases: + +If $m_k=0$ or 1, the $k$ -th packet simply contains all parameters related to a 256-sample frame, where the parameters are the 2-bit mode information ('00' or '01' in binary format), the parameters of ACELP or those of 256-sample TCX, and the parameters of 256-sample HF coding. + +If $m_k=2$ , the $p$ -th packet contains half of the bits of the 512-sample TCX mode, half of the bits of 512-sample HF coding, plus the 2-bit mode information ('10' in binary format). + +If $m_k=3$ , the $k$ -th packet contains one fourth of the bits describing the 512-sample TCX mode, one fourth of the bits of 1024-sample HF coding, plus the 2-bit mode information ('11' in binary format). + +The packetization is therefore straightforward if the $k$ -th packet corresponds to ACELP or 256-sample TCX. The packetization is slightly more involved if 512- or 1024-sample TCX mode is used, because the bits of the 512- or 1024-sample modes have to be shared into even parts. + +### 5.6.3 TCX gain multiplexing + +It was found that the TCX gain is important to maintain audible quality in case of packet loss. Thus, in 512-sample and 1024-sample TCX frames, the TCX gain value is encoded redundantly in multiple packets to protect against packet loss. The TCX gain is encoded at a resolution of 7 bits, and these bits are labelled "Bit 0" to "Bit 6", where "Bit 0" is the Least Significant Bit (LSB) and "Bit 6" is the Most Significant Bit (MSB). We consider two cases, TCX512 and TCX1024, where the encoded bits are split into two or four packets, respectively. + +#### *At the Encoder side* + +**TCX512:** The first packet contains the full gain information (7 bits). The second packet repeats the most significant 6 bits ("Bit 1" to "Bit 6"). + +**TCX1024:** The first packet contains the full gain information (7 bits). The third packet contains a copy of the three bits "Bit 4", "Bit 5" and "Bit 6". The fourth packet contains a copy of the three bits "Bit 1", "Bit 2" and "Bit 3". + +Additionally, a 3-bit "parity" is formed as thus: combining by logical XOR "Bit 1" and "Bit 4" to generate "Parity Bit 0", combining by logical XOR "Bit 2" and "Bit 5" to generate "Parity Bit 1", and combining by logical XOR "Bit 3" and "Bit 6" to generate "Parity Bit 2". These three parity bits are sent in the second packet. + +#### *At the Decoder side* + +The logic applied at the decoder to recover the TCX gain when missing packets occur for 512-sample TCX and 1024-sample TCX. We assume that there is at least one packet missing before entering the flowchart. + +**TCX512:** If the first packet is flagged as being lost, the TCX global gain is taken from the second packet, with the LSB ("Bit 0") being set to zero. If only the second packet is lost, then the full TCX gain is obtained from the first packet. + +**TCX1024:** The gain recovery algorithm is only used if 1 or 2 packets forming an 1024-sample TCX frame are lost; as described in Section 6.5.1.1. If 3 or more packets are lost in a TCX1024 frame, the MODE is changed to (1,1,1,1) and BFI=(1,1,1,1). When only 1 or 2 packets are lost in a TCX1024 frame, the recovery algorithm is as follows: + +As described above, the second, third and fourth packets of a TCX1024 frame contain the parity bits, "Bit 6" to "Bit 4", and "Bit 3" to "Bit 1" of the TCX gain. These bits (three each) are stored in "parity", "index0" and "index1" respectively. + +If the third packet is lost, "index0" is replaced by the logical XOR combination of "parity" and "index1". That is, "Bit 6" is generated from the logical XOR of "Parity Bit 2" and "Bit 3", "Bit 5" is generated from the logical XOR of "Parity Bit 1" and "Bit 2", and "Bit 4" is generated from the logical XOR of "Parity Bit 0" and "Bit 1". + +If the fourth packet is lost, "index1" is replaced by the logical XOR combination of "parity" and "index0". That is, "Bit 3" is generated from the logical XOR of "Parity Bit 2" and "Bit 6", "Bit 2" is generated from the logical XOR of "Parity Bit 1" and "Bit 5", and "Bit 1" is generated from the logical XOR of "Parity Bit 0" and "Bit 4". + +Finally, the 7-bit TCX gain value is taken from the recovered bits ("Bit 1" to "Bit 6") and "Bit 0" is set to zero. + +### 5.6.4 Stereo Packetization + +![Diagram showing the packetization of stereo parameters into four binary packets. The first two packets are labeled 'Stereo mid-band parameters' and contain mid-band parameters (gain, filter), a balance factor, and algebraic VQ parameters. The last two packets are labeled 'Stereo LF parameters' and contain mid-band parameters (gain, filter), a balance factor, global gain, and algebraic VQ parameters. The last two columns of each packet are labeled 'Stereo HF parameters' and contain split ISF, gain, and gain correction.](08f6ace0c83e7394657fa372b47aec04_img.jpg) + +| | | | | | | | | +|------------------------------------|----------|----------------|-------------------------|-------------------------|--|-----------------|-----------------| +| Mid-band parameters (gain, filter) | 11 | Balance factor | Algebraic VQ parameters | | | Split ISF, gain | gain correction | +| | | global gain | | | | | | +| Mid-band parameters (gain, filter) | 10 | Balance factor | Algebraic VQ parameters | | | Split ISF, gain | gain correction | +| | | global gain | | | | | | +| Mid-band parameters (gain, filter) | 01 or 00 | Balance factor | Global gain | Algebraic VQ parameters | | Split ISF, gain | gain correction | +| | | | | | | | | + +Diagram showing the packetization of stereo parameters into four binary packets. The first two packets are labeled 'Stereo mid-band parameters' and contain mid-band parameters (gain, filter), a balance factor, and algebraic VQ parameters. The last two packets are labeled 'Stereo LF parameters' and contain mid-band parameters (gain, filter), a balance factor, global gain, and algebraic VQ parameters. The last two columns of each packet are labeled 'Stereo HF parameters' and contain split ISF, gain, and gain correction. + +Stereo parameters computed in a 1024-sample super-frame at the encoder are multiplexed into 4 binary packets of equal size. The packetization consists of a similar multiplexing loop as for the core encoder. The stereo packets are appended at the end of the mono packets. + +# 6 Functional description of the decoder + +The function of the decoder consists of decoding the transmitted parameters (LP parameters, ACELP/TCX mode, adaptive codebook vector, adaptive codebook gain, fixed codebook vector, fixed codebook gain, TCX parameters, high-band parameters, stereo information) and performing synthesis to obtain the reconstructed low-frequency and high-frequency signals. For stereo signal synthesis, the stereo low- and mid-band signals are reconstructed using the low-frequency mono signal and the transmitted and decoded stereo parameters (...). + +Section 6.1 describes the reconstruction, by the decoder, of the mono low-band signal in the 0-Fs/4 kHz bandwidth (core ACELP/TCX decoder). The reconstruction of the higher frequency band using bandwidth extension and the mixing of the low and high frequencies of the mono signal will be described respectively in Sections 6.2 and 6.3. The generation of the stereo signals will be described in Section 6.4. Finally, Section 6.5 describes the concealment algorithm in the case of missing frames. + +## 6.1 Mono Signal Low-Band synthesis + +The 0-Fs/4 kHz band of the mono signal is reconstructed by the core ACELP/TCX decoder. In ACELP mode, the decoder is the same as AMR-WB. The TCX mode of the decoder will be described in more details below. Selection between ACELP and TCX decoding in each 256-sample frame is controlled by the mode indicators described in Section 5.2.2 of the encoder. These mode indicators are transmitted as 2 bits in each 256-sample packet. + +### 6.1.1 ACELP mode decoding and signal synthesis + +Same as 3GPP TS 26.190. + +### 6.1.2 TCX mode decoding and signal synthesis + +The TCX decoder is shown in Figure 13. + +![Figure 13: Block diagram of the TCX decoder. The diagram is split into two parts: (a) TCX decoding in case of TCX256 packet erasure concealment and (b) TCX decoding in normal operation or in case of partial packet loss. Part (a) shows a simplified path where an excitation buffer and pitch lag are filtered by a non-linear filter 1/Â(z) (decomposed as 1/Â(z/γ) * 1/(1-αz⁻¹)), then limited by an amplitude limiter (with rms_wsyn feedback) and delayed by 1-αz⁻¹. Part (b) shows the full decoding process: BFI_TCX and TCX-specific parameters are demultiplexed. One path decodes algebraic VQ parameters (Y) which are then noise-injected (using σ_noise) and de-emphasized. Another path decodes noise fill-in level. A third path decodes global gain (using idx₂ and rms_wsyn). The de-emphasized signal is transformed via zero Nyquist frequency & inverse FFT (radix 9) to produce x'_w. This is multiplied (X) by the global gain g_TCX to produce x_w. An estimate of dominant pitch is also generated. The signal x_w is then processed by overlap-add synthesis (internal OVP_TCX) and finally filtered by 1-αz⁻¹ and 1/Â(z/γ) to produce the final output, which is also filtered by 1/Â(z) (per subframe).](aeb2a26a07219661191294dba528067a_img.jpg) + +Figure 13: Block diagram of the TCX decoder. The diagram is split into two parts: (a) TCX decoding in case of TCX256 packet erasure concealment and (b) TCX decoding in normal operation or in case of partial packet loss. Part (a) shows a simplified path where an excitation buffer and pitch lag are filtered by a non-linear filter 1/Â(z) (decomposed as 1/Â(z/γ) \* 1/(1-αz⁻¹)), then limited by an amplitude limiter (with rms\_wsyn feedback) and delayed by 1-αz⁻¹. Part (b) shows the full decoding process: BFI\_TCX and TCX-specific parameters are demultiplexed. One path decodes algebraic VQ parameters (Y) which are then noise-injected (using σ\_noise) and de-emphasized. Another path decodes noise fill-in level. A third path decodes global gain (using idx₂ and rms\_wsyn). The de-emphasized signal is transformed via zero Nyquist frequency & inverse FFT (radix 9) to produce x'\_w. This is multiplied (X) by the global gain g\_TCX to produce x\_w. An estimate of dominant pitch is also generated. The signal x\_w is then processed by overlap-add synthesis (internal OVP\_TCX) and finally filtered by 1-αz⁻¹ and 1/Â(z/γ) to produce the final output, which is also filtered by 1/Â(z) (per subframe). + +Figure 13: Block diagram of the TCX decoder + +Figure 13 shows a block diagram of the TCX decoder including the following two cases: + +**Case 1:** Packet-erasure concealment in TCX-256 when the TCX frame length is 256 samples and the related packet is lost i.e. **BFI\_TCX** = (1), as shown in Figure 13-a. + +**Case 2:** Normal TCX decoding, possibly with partial packet losses, as shown in Figure 13-b. + +In Case 1, no information is available to decode the 256-sample TCX frame. The TCX synthesis is found by processing the past excitation delayed by $T$ , where $T = \text{pitch\_tcx}$ is a pitch lag estimated in the previously decoded TCX frame, by a non-linear filter roughly equivalent to $1/\hat{A}(z)$ . A non-linear filter is used instead of $1/\hat{A}(z)$ to avoid clicks in the synthesis. This filter is decomposed in 3 steps: + +**Step 1:** filtering by + +$$\frac{\hat{A}(z/\gamma)}{\hat{A}(z)} \frac{1}{1 - \alpha z^{-1}}$$ + +to map the excitation delayed by $T$ into the TCX target domain; + +**Step 2:** applying a limiter (the magnitude is limited to $\pm rms_{wsyn}$ ) + +**Step 3:** filtering by + +$$\frac{1 - \alpha z^{-1}}{\hat{A}(z/\gamma)}$$ + +to find the synthesis. Note that the buffer **OVLP\_TCX** is set to zero in this case. + +#### Decoding of the algebraic VQ parameters + +In Case 2, TCX decoding involves decoding the algebraic VQ parameters describing each quantized block $\hat{B}'_k$ of the scaled spectrum $X'$ , where $X'$ is as described in Step 2 of Section 5.3.5.7. Recall that $X'$ has dimension $N$ , where $N = 288, 576$ and $1152$ for TCX-256, 512 and 1024 respectively, and that each block $B'_k$ has dimension 8. The number $K$ of blocks $B'_k$ is thus 36, 72 and 144 for TCX-256, 512 and 1024 respectively. The algebraic VQ parameters for each block $B'_k$ are described in Step 5 of Section 5.3.5.7. For each block $B'_k$ , three sets of binary indices are sent by the encoder: + +- the codebook index $n_k$ , transmitted in unary code as described in Step 5 of Section 5.3.5.7; +- the rank $I_k$ of a selected lattice point $c$ in a so-called *base codebook*, which indicates what permutation has to be applied to a specific *leader* (see Step 5 of Section 5.3.5.7) to obtain a lattice point $c$ ; +- and, if the quantized block $\hat{B}'_k$ (a lattice point) was not in the base codebook, the 8 indices of the Voronoi extension index vector $k$ calculated in sub-step V1 of Step 5 in Section; from the Voronoi extension indices, an extension vector $z$ can be computed as in reference [7]. The number of bits in each component of index vector $k$ is given by the extension order $r$ , which can be obtained from the unary code value of index $n_k$ . The scaling factor $M$ of the Voronoi extension is given by $M = 2^r$ . + +Then, from the scaling factor $M$ , the Voronoi extension vector $z$ (a lattice point in $RE_8$ ) and the lattice point $c$ in the base codebook (also a lattice point in $RE_8$ ), each quantized scaled block $\hat{B}'_k$ can be computed as + +$$\hat{B}'_k = M c + z$$ + +When there is no Voronoi extension (i.e. $n_k < 5$ , $M=1$ and $z=0$ ), the base codebook is either codebook $Q_0$ , $Q_2$ , $Q_3$ or $Q_4$ from reference [6]. No bits are then required to transmit vector $k$ . Otherwise, when Voronoi extension is used because $\hat{B}'_k$ is large enough, then only $Q_3$ or $Q_4$ from reference [6] is used as a base codebook. The selection of $Q_3$ or $Q_4$ is implicit in the codebook index value $n_k$ , as described in Step 5 of Section 5.3.5.7. + +#### Decoding of the noise-fill parameter + +The noise fill-in level $\sigma_{noise}$ is decoded by inverting the 3-bit uniform scalar quantization calculated at the encoder as in Step 4 of Section 5.3.5.7. For an index $0 \leq idx_1 \leq 7$ , $\sigma_{noise}$ is given by: $\sigma_{noise} = 0.1 * (8 - idx_1)$ . However, it may happen that the index $idx_1$ is not available. This is the case when **BFI\_TCX** = (1) in TCX-256, (1 X) in TCX-512 and (X 1 X X) in TCX-1024, with X representing an arbitrary binary value. In this case, $\sigma_{noise}$ is set to its maximal value, i.e. $\sigma_{noise} = 0.8$ . + +Comfort noise is injected in the subvectors $B_k$ rounded to zero and which correspond to a frequency above $F_s/2$ kHz 4. More precisely, $Z$ is initialized as $Z = Y$ and for $K/6 \leq k \leq K$ (only), if $Y_k = (0, 0, \dots, 0)$ , $Z_k$ is replaced by the 8-dimensional vector: + +$$\sigma_{noise} * [ \cos(\theta_1) \sin(\theta_1) \cos(\theta_2) \sin(\theta_2) \cos(\theta_3) \sin(\theta_3) \cos(\theta_4) \sin(\theta_4) ],$$ + +where the phases $\theta_1$ , $\theta_2$ , $\theta_3$ and $\theta_4$ are randomly selected. + +#### Low-frequency de-emphasis + +After decoding the algebraic VQ parameters and noise-fill parameter, we obtain the quantized pre-shaped TCX spectrum $X'$ . De-shaping is then applied as in Section 5.3.5.6. + +#### Estimation of the dominant pitch value + +The estimation of the dominant pitch is performed so that the next frame to be decoded can be properly extrapolated if it corresponds to TCX-256 and if the related packet is lost. This estimation is based on the assumption that the peak of maximal magnitude in spectrum of the TCX target corresponds to the dominant pitch. The search for the maximum $M$ is restricted to a frequency below $F_s/64$ kHz + +$$M = \max_{i=1..N/32} (X'_{2i})^2 + (X'_{2i+1})^2$$ + +and the minimal index $1 \leq i_{\max} \leq N/32$ such that $(X'_{2i})^2 + (X'_{2i+1})^2 = M$ is also found. Then the dominant pitch is estimated in number of samples as $T_{\text{est}} = N / i_{\max}$ (this value may not be integer). Recall that the dominant pitch is calculated for packet-erasure concealment in TCX-256. To avoid buffering problems (the excitation buffer being limited to 256 samples), if $T_{\text{est}} > 256$ samples, *pitch\_tcx* is set to 256; otherwise, if $T_{\text{est}} \leq 256$ , multiple pitch period in 256 samples are avoided by setting *pitch\_tcx* to + +$$\text{pitch\_tcx} = \max \{ \lfloor n T_{\text{est}} \rfloor \mid n \text{ integer} > 0 \text{ and } n T_{\text{est}} \leq 256 \}$$ + +where $\lfloor \cdot \rfloor$ denotes the rounding to the nearest integer towards $-\infty$ . + +#### Inverse transform + +To obtain the quantized perceptual signal, an inverse transform is applied to the de-shaped spectrum $X'$ . The transform used at the encoder and decoder is a the discrete Fourier transform, and is implemented as an FFT and IFFT, respectively. Recall that due to the ordering used at the TCX encoder, the transform coefficients $X' = (X'_0, \dots, X'_{N-1})$ are such that: + +$X'_0$ corresponds to the DC coefficient, + +$X'_1$ corresponds to the Nyquist frequency, and + +the coefficients $X'_{2k}$ and $X'_{2k+1}$ , for $k=1..N/2-1$ , are the real and imaginary parts of the Fourier component of frequency of $k/(N/2) * F_s/4$ kHz. + +$X'_1$ is always forced to 0. After this zeroing, the time-domain TCX target signal $x'_w$ is found by applying an inverse FFT to the quantized scaled spectrum $X$ . Rescaling will be applied in the following section, to obtain the total quantized weighted signal prior to windowing and overlapping. + +#### Decoding of the glocal TCX gain and scaling + +The (global) TCX gain $g_{\text{TCX}}$ is decoded by inverting the 7-bit logarithmic quantization calculated in the TCX encoder as in Section 5.2.5.10. First, the r.m.s. value of the TCX target signal $x'_w$ is computed as: + +$$\text{rms} = \sqrt{(1/N) (x'_{w0}{}^2 + x'_{w1}{}^2 + \dots + x'_{wN-1}{}^2)}$$ + +From the received 7-bit index $0 \leq \text{idx}_2 \leq 127$ , the TCX gain is given by: + +$$g_{\text{TCX}} = 10^{\text{idx}_2 / 28 / (4 \times \text{rms})}$$ + +The (logarithmic) quantization step is around 0.71 dB. + +This gain is used to scale $x'_w$ into $x_w$ . Note that from the mode extrapolation and the gain repetition strategy, the index $\text{idx}_2$ is available in case of frame loss. However, in case of partial packet losses (1 loss for TCX-512 and up to 2 losses for TCX-1024) the least significant bit of $\text{idx}_2$ may be set by default to 0 in the demultiplexer. + +#### Windowing and overlap + +Since the TCX encoder employs windowing with overlap and weighted ZIR removal prior to transform coding of the target signal, the reconstructed TCX target signal $x = (x_0, x_1, \dots, x_{N-1})$ is actually found by overlap-add. The overlap-add depends on the type of the previous decoded frame (ACELP or TCX). The TCX target signal is first multiplied by a window $w = [w_0 \ w_1 \ \dots \ w_{N-1}]$ , whose shape is described in Section 5.3.5.4. + +Then, the overlap from the past decoded frame (**OVLP\_TCX**) is added to the present windowed signal $x$ . The overlap length **OVLP\_TCX** depends on the past TCX framelen and on the mode of the past frame (ACELP or TCX). + +#### Computation of the synthesis signal + +The reconstructed TCX target is then filtered through the zero-state inverse perceptual filter $W^{-1}(z) = (1 - \alpha z^{-1}) / \hat{A}(z/\gamma)$ to find the synthesis signal which will be applied to the synthesis filter. The excitation is also calculated to update the ACELP adaptive codebook and allow to switch from TCX to ACELP in a subsequent frame. Note that the length of the TCX synthesis is given by the TCX frame length (without the overlap): 256, 512 or 1024 samples. + +### 6.1.3 Post-processing of Mono Low-Band signal + +In the low-frequency pitch enhancement, two-band decomposition is used and adaptive filtering is applied only to the lower band. This results in a total post-processing that is mostly targeted at frequencies near the first harmonics of the synthesized speech signal. + +![Block diagram of the low frequency pitch enhancer. The input 'decoded signal' splits into three paths. The top path goes to a 'High-pass filter' which outputs s_H. The middle path goes to a 'Pitch enhancer' block, which outputs s_LE. This s_LE signal then goes to a 'Low-pass filter' which outputs s_LEE. The bottom path goes to a 'Pitch tracking' block, which receives 'Decoded parameters (pitch info)' and outputs a pitch period T. The s_H and s_LEE signals are summed at a circular junction to produce the final 'Post-processed decoded signal' s_E.](3e2dcee303cecdd31b7f9ec0d8942fed_img.jpg) + +Block diagram of the low frequency pitch enhancer. The input 'decoded signal' splits into three paths. The top path goes to a 'High-pass filter' which outputs s\_H. The middle path goes to a 'Pitch enhancer' block, which outputs s\_LE. This s\_LE signal then goes to a 'Low-pass filter' which outputs s\_LEE. The bottom path goes to a 'Pitch tracking' block, which receives 'Decoded parameters (pitch info)' and outputs a pitch period T. The s\_H and s\_LEE signals are summed at a circular junction to produce the final 'Post-processed decoded signal' s\_E. + +**Figure 14: Block diagram of the low frequency pitch enhancer** + +Figure 14 shows the block diagram of the two-band pitch enhancer. In the higher branch the decoded signal is filtered by a high-pass filter to produce the higher band signal ( $s_H$ ). In the lower branch, the decoded signal is first processed through an adaptive pitch enhancer, and then filtered through a low-pass filter to obtain the lower band post-processed signal ( $s_{LEE}$ ). The post-processed decoded signal is obtained by adding the lower band post-processed signal and the higher band signal. The object of the pitch enhancer is to reduce the inter-harmonic noise in the decoded signal, which is achieved here by a time-varying linear filter with a transfer function + +$$H_E(z) = (1 - \alpha) + \frac{\alpha}{2} z^T + \frac{\alpha}{2} z^{-T}$$ + +and described by the following equation: + +$$s_{LE}(n) = (1 - \alpha)\hat{s}(n) + \frac{\alpha}{2}\hat{s}(n - T) + \frac{\alpha}{2}\hat{s}(n + T) \quad (1)$$ + +where $\alpha$ is a coefficient that controls the inter-harmonic attenuation, $T$ is the pitch period of the input signal $\hat{s}(n)$ , and $s_{LE}(n)$ is the output signal of the pitch enhancer. Parameters $T$ and $\alpha$ vary with time and are given by the pitch tracking module. With a value of $\alpha = 1$ , the gain of the filter described by Equation (1) is exactly 0 at frequencies $1/(2T), 3/(2T), 5/(2T)$ , etc.; i.e. at the mid-point between the harmonic frequencies $1/T, 3/T, 5/T$ , etc. When $\alpha$ approaches 0, the attenuation between the harmonics produced by the filter of Equation (1) decreases. + +To confine the post-processing to the low frequency region, the enhanced signal $s_{LE}$ is low pass filtered to produce the signal $s_{LEF}$ which is added to the high-pass filtered signal $s_H$ to obtain the post-processed synthesis signal $s_E$ . + +Another configuration equivalent to the one in Figure 14 is used here which eliminates the need to high-pass filtering. This is explained as follows. + +Let $h_{LP}(n)$ be the impulse response of the low-pass filter and $h_{HP}(n)$ is the impulse response of the complementary high-pass filter. The post-processed signal $s_E(n)$ is given by + +$$\begin{aligned} + s_E(n) &= \hat{s}(n) * h_{HP}(n) + s_{LE}(n) * h_{LP}(n) \\ + &= \hat{s}(n) * h_{HP}(n) + \left( (1-\alpha)\hat{s}(n) + \frac{\alpha}{2}\hat{s}(n-T) + \frac{\alpha}{2}\hat{s}(n+T) \right) * h_{LP}(n) \\ + &= \hat{s}(n) * h_{HP}(n) + \hat{s}(n) * h_{LP}(n) - \left( \alpha\hat{s}(n) - \frac{\alpha}{2}\hat{s}(n-T) - \frac{\alpha}{2}\hat{s}(n+T) \right) * h_{LP}(n) \\ + &= \hat{s}(n) - \alpha \left( \hat{s}(n) - \frac{1}{2}\hat{s}(n-T) - \frac{1}{2}\hat{s}(n+T) \right) * h_{LP}(n) \\ + &= \hat{s}(n) - \alpha e_{LT}(n) * h_{LP}(n) + \end{aligned}$$ + +Thus, the post-processing is equivalent to subtracting the scaled low-pass filtered long-term error signal from the synthesis signal $\hat{s}(n)$ . The transfer function of the long-term prediction filter is given by + +$$P_{LT}(z) = 1 - 0.5z^T - 0.5z^{-T}$$ + +The alternative post-processing configuration is depicted in Figure 15. + +![Figure 15: Implemented post-processing configuration. The diagram shows a block diagram of the post-processing. A 'decoded signal' enters from the left and is split. One path goes directly to a summer (represented by a circle with a cross). The other path goes through a 'Long-term prediction filter P_LT(z)'. This filter also receives a 'Pitch tracking' input (indicated by a dashed line labeled T). The output of the filter goes through an 'Adaptive gain alpha' block (represented by a triangle). The output of the gain block goes through a 'Low-pass filter'. The outputs of the direct path and the low-pass filter are combined in the summer. The summer has a '+' sign for the direct path and a '-' sign for the low-pass filter path. The output of the summer is labeled 'Post-processed decoded signal s_E'. A 'Decoded parameters (pitch info)' input is shown entering the 'Pitch tracking' block from the bottom left.](7156cf400ef0e19f9d06a5d0549834a3_img.jpg) + +Figure 15: Implemented post-processing configuration. The diagram shows a block diagram of the post-processing. A 'decoded signal' enters from the left and is split. One path goes directly to a summer (represented by a circle with a cross). The other path goes through a 'Long-term prediction filter P\_LT(z)'. This filter also receives a 'Pitch tracking' input (indicated by a dashed line labeled T). The output of the filter goes through an 'Adaptive gain alpha' block (represented by a triangle). The output of the gain block goes through a 'Low-pass filter'. The outputs of the direct path and the low-pass filter are combined in the summer. The summer has a '+' sign for the direct path and a '-' sign for the low-pass filter path. The output of the summer is labeled 'Post-processed decoded signal s\_E'. A 'Decoded parameters (pitch info)' input is shown entering the 'Pitch tracking' block from the bottom left. + +**Figure 15: Implemented post-processing configuration** + +The value $T$ is given by the received closed-loop pitch lag in each subframe (the fractional pitch lag rounded to the nearest integer). A simple tracking for checking pitch doubling is performed. If the normalized pitch correlation at delay $T/2$ is larger than 0.95 then the value $T/2$ is used as the new pitch lag for post-processing. + +The factor $\alpha$ is by + +$$\alpha = 0.5g_p, \quad \text{constrained to } 0 \leq \alpha \leq 0.5$$ + +where $g_p$ is the decoded pitch gain. Note that in TCX mode the value of $\alpha$ is set to zero. + +A linear phase FIR low-pass filter with 25 coefficients is used, with a cut-off frequency at $5F_s/256$ kHz (the filter delay is 12 samples). + +## 6.2 Mono Signal High-Band synthesis + +The synthesis of the HF signal implements a kind of bandwidth extension (BWE) mechanism and uses some data from the LF decoder. It is an evolution of the BWE mechanism used in the AMR-WB speech decoder. The HF decoder is detailed in Figure 16. The HF signal is synthesized in 2 steps: calculation of the HF excitation signal and computation of the HF signal from the HF excitation. The HF excitation is obtained by shaping in time-domain the LF excitation signal with scalar factors (or gains) per 64-sample subframes. This HF excitation is post-processed to reduce the "buzziness" of the output, and then filtered by a HF linear-predictive synthesis filter $1/A_{HF}(z)$ . Recall that the LP order used to encode and then decode the HF signal is 8. The result is also post-processed to smooth energy variations. + +![Block diagram of high frequency decoder. The diagram shows the synthesis process starting with 'BFI_GAIN' and 'decoding of gain corrections (in dB)' which output gain corrections. These are summed with 'gain interpolation (in dB) per subframe' (outputting $\tilde{g}_0, \dots, \tilde{g}_{nb-1}$) to produce $\hat{g}_0, \dots, \hat{g}_{nb-1}$. Simultaneously, 'compute gain (in dB) to match magnitude at $F_s/4$ Hz' (taking $\hat{A}(z)$ from LF decoder and $g_{match}$) also outputs $\tilde{g}_0, \dots, \tilde{g}_{nb-1}$. The LF excitation signal is multiplied by $\hat{g}_0, \dots, \hat{g}_{nb-1}$ and then processed through 'dB linear' to produce $\hat{r}_{HF}(n)$. This is followed by 'buzziness reduction of HF excitation' and then filtered by $1/\hat{A}_{HF}(z)$ (from 'HF LP decoding and interpolation' which takes 'HF ISF parameters' and $bfi\_isf\_hf$). The final output is 'HF synthesis' after 'HF energy smoothing'.](d7948c38a18636aefecdd95388196460_img.jpg) + +``` + +graph TD + BFI_GAIN --> GainDec[decoding of gain corrections in dB] + GainDec --> Sum((+)) + Interp[gain interpolation in dB per subframe] --> Sum + Sum --> G_hat["(\hat{g}_0, ..., \hat{g}_{nb-1})"] + G_hat --> DB["dB → linear"] + + A_LF["\hat{A}(z) (from LF decoder)"] --> CompGain[compute gain in dB to match magnitude at Fs/4 Hz] + G_match[g_match] --> CompGain + CompGain --> G_tilde["(\tilde{g}_0, ..., \tilde{g}_{nb-1})"] + G_tilde --> Sum + + LF_Exc[LF excitation signal] --> Mult((X)) + DB --> Mult + Mult --> R_HF_hat["\hat{r}_{HF}(n)"] + + R_HF_hat --> Buzz[buzziness reduction of HF excitation] + Buzz --> R_HF_prime["\hat{r}'_{HF}(n)"] + + ISF_Params[HF ISF parameters] --> LP_Dec[HF LP decoding and interpolation] + BFI_ISF[bfi_isf_hf] --> LP_Dec + LP_Dec --> A_HF_hat["\hat{A}_{HF}(z)"] + + R_HF_prime --> Filter["1 / \hat{A}_{HF}(z)"] + A_HF_hat --> Filter + Filter --> S_HF_hat["\hat{s}_{HF}(n)"] + + S_HF_hat --> Smooth[HF energy smoothing] + Smooth --> HF_Synth["\hat{s}'_{HF}(n) HF synthesis"] + +``` + +Block diagram of high frequency decoder. The diagram shows the synthesis process starting with 'BFI\_GAIN' and 'decoding of gain corrections (in dB)' which output gain corrections. These are summed with 'gain interpolation (in dB) per subframe' (outputting \$\tilde{g}\_0, \dots, \tilde{g}\_{nb-1}\$) to produce \$\hat{g}\_0, \dots, \hat{g}\_{nb-1}\$. Simultaneously, 'compute gain (in dB) to match magnitude at \$F\_s/4\$ Hz' (taking \$\hat{A}(z)\$ from LF decoder and \$g\_{match}\$) also outputs \$\tilde{g}\_0, \dots, \tilde{g}\_{nb-1}\$. The LF excitation signal is multiplied by \$\hat{g}\_0, \dots, \hat{g}\_{nb-1}\$ and then processed through 'dB linear' to produce \$\hat{r}\_{HF}(n)\$. This is followed by 'buzziness reduction of HF excitation' and then filtered by \$1/\hat{A}\_{HF}(z)\$ (from 'HF LP decoding and interpolation' which takes 'HF ISF parameters' and \$bfi\\_isf\\_hf\$). The final output is 'HF synthesis' after 'HF energy smoothing'. + +Figure 16: Block diagram of high frequency decoder + +The HF decoder synthesizes an 1024-sample HF superframe. This superframe is segmented according to **MODE** = ( $m_0, m_1, m_2, m_3$ ). To be more specific, the decoded frames used in the HF decoder are synchronous with the frames used in the LF decoder. Hence, $m_k \le 1$ , $m_k = 2$ and $m_k = 3$ indicate respectively a 256, 512 and 1024-sample frame. These frames are referred to as HF-256, HF-512 and HF-1024, respectively. + +From the synthesis chain described above, it is clear that the only parameters needed for HF decoding are ISF and gain parameters. The ISF parameters represent the filter $1/A_{HF}(z)$ , while the gain parameters are used to shape the LF excitation signal. These parameters are demultiplexed based on **MODE** and knowing the format of the bitstream. + +Control data which are internal to the HF decoder are generated from the bad frame indicator vector **BFI** = ( $bfi_0, bfi_1, bfi_2, bfi_3$ ). These data are $bfi\_isf\_hf$ , **BFI\_GAIN**, and the number of subframes for ISF interpolation. The nature of these data is defined in more details below: + +$bfi\_isf\_hf$ is a binary flag indicating loss of the ISF parameters. Its definition is given below from **BFI**. + +For HF-256 in packet $k$ , $bfi\_isf\_hf = bfi_k$ , + +For HF-512 in packets $k$ and $k+1$ , $bfi\_isf\_hf = bfi_k$ , + +For HF-1024 (in packets $k=0$ to $3$ ), $bfi\_isf\_hf = bfi_0$ + +This definition can be readily understood from the bitstream format. Recall that the ISF parameters for the HF signal are always in the first packet describing HF-256, -512 or -1024 frames. + +**BFI\_GAIN** is a binary vector used to signal packet losses to the HF gain decoder: **BFI\_GAIN** = ( $bfi_k$ ) for HF-256 in packet $k$ , ( $bfi_k$ $bfi_{k+1}$ ) for HF-512 in packets $k$ and $k+1$ , **BFI\_GAIN** = **BFI** for HF-1024. + +The number of subframes for ISF interpolation refers to the number of 64-sample subframes in the decoded frame. This number is 4 for HF-256, 8 for HF-512 and 16 for HF-1024. + +The ISF vector **isf\_hf\_q** is decoded using AR(1) predictive VQ. If $bfi\_isf\_hf = 0$ , the 2-bit index $i_1$ of the 1st stage and the 7-bit index $i_2$ of the 2nd stage are available and **isf\_hf\_q** is given by + +$$\mathbf{isf\_hf\_q} = \mathbf{cb1}(i_1) + \mathbf{cb2}(i_2) + \mathbf{mean\_isf\_hf} + \mu_{\text{isf\_hf}} * \mathbf{mem\_isf\_hf}$$ + +where **cb1**( $i_1$ ) is the $i_1$ -th codevector of the 1st stage, **cb2**( $i_2$ ) is the $i_2$ -th codevector of the 2nd stage, **mean\_isf\_hf** is the mean ISF vector, $\mu_{\text{isf\_hf}} = 0.5$ is the AR(1) prediction coefficient and **mem\_isf\_hf** is the memory of the ISF predictive decoder. + +If $bfi\_isf\_hf = 1$ , the decoded ISF vector corresponds to the previous ISF vector shifted towards the mean ISF vector: + +$$\mathbf{isf\_hf\_q} = \alpha_{\text{isf\_hf}} * \mathbf{mem\_isf\_hf} + \mathbf{mean\_isf\_hf}$$ + +with $\alpha_{\text{isf\_hf}} = 0.9$ . After calculating **isf\_hf\_q**, the ISF reordering defined in AMR-WB speech coding is applied to **isf\_hf\_q** with an ISF gap of 9 Fs/1280 Hz. Finally the memory **mem\_isf\_hf** is updated for the next HF frame as: + +$$\mathbf{mem\_isf\_hf} = \mathbf{isf\_hf\_q} - \mathbf{mean\_isf\_hf}$$ + +Note that the initial value of **mem\_isf\_hf** (at the reset of the decoder) is zero. + +A simple linear interpolation between the ISP parameters of the previous decoded HF frame (HF-256, HF-512 or HF-1024) and the new decoded ISP parameters is performed. The interpolation is conducted in the ISP domain and results in ISP parameters for each 64-sample subframe, according to the formula: + +$$\mathbf{isp}_{\text{subframe-}i} = i/nb * \mathbf{isp}_{\text{new}} + (1-i/nb) * \mathbf{isp}_{\text{old}},$$ + +where $nb$ is the number of subframes in the current decoded frame ( $nb=4$ for HF-256, 8 for HF-512, 16 for HF-1024), $i=0, \dots, nb-1$ is the subframe index, **isp**old is the set of ISP parameters obtained from the ISF parameters of the previously decoded HF frame and **isp**new is the set of ISP decoded. The interpolated ISP parameters are then converted into linear-predictive coefficients for each subframe. + +The computation of the gain $g_{\text{match}}$ in dB is detailed in the next paragraphs. This gain is interpolated for each 64-sample subframe based on its previous value $old\_g_{\text{match}}$ as: + +$$\tilde{g}_i = i/nb * g_{\text{match}} + (1-i/nb) * old\_g_{\text{match}},$$ + +where $nb$ is the number of subframes in the current decoded frame ( $nb=4$ for HF-256, 8 for HF-512, 16 for HF-1024), $i=0, \dots, nb-1$ is the subframe index. This results in a vector ( $\tilde{g}_0, \dots, \tilde{g}_{nb-1}$ ). + +### Gain estimation computation to match magnitude at Fs/4 kHz + +Same as section 5.6 (Figure 9) + +### Decoding of correction gains and gain computation + +Recall that after gain interpolation the HF decoder gets the estimated gains ( $g^{\text{est}}_0, g^{\text{est}}_1, \dots, g^{\text{est}}_{nb-1}$ ) in dB for each of the $nb$ subframes of the current decoded frame. Furthermore, $nb = 4, 8$ and $16$ in HF-256, -512 and -1024, respectively. The correction gains in dB are then decoded which will be added to the estimated gains per subframe to form the decode gains $\hat{g}_0, \hat{g}_1, \dots, \hat{g}_{nb-1}$ : + +$$(\hat{g}_0 \text{ (dB)}, \hat{g}_1 \text{ (dB)}, \dots, \hat{g}_{nb-1} \text{ (dB)}) = (\tilde{g}_0, \tilde{g}_1, \dots, \tilde{g}_{nb-1}) + (\bar{g}_0, \bar{g}_1, \dots, \bar{g}_{nb-1})$$ + +where + +$$(\bar{g}_0, \bar{g}_1, \dots, \bar{g}_{nb-1}) = (g^{c1}_0, g^{c1}_1, \dots, g^{c1}_{nb-1}) + (g^{c2}_0, g^{c2}_1, \dots, g^{c2}_{nb-1}).$$ + +Therefore, the gain decoding corresponds to the decoding of predictive two-stage VQ-scalar quantization, where the prediction is given by the interpolated Fs/4 kHz junction matching gain. The quantization dimension is variable and is equal to $nb$ . + +*Decoding of the 1st stage:* + +The 7-bit index $0 \leq idx \leq 127$ of the 1st stage 4-dimensional HF gain codebook is decoded into 4 gains ( $G_0, G_1, G_2, G_3$ ). A bad frame indicator $bfi = BFI\_GAIN_0$ in HF-256, -512 and -1024 allows to handle packet losses. If $bfi = 0$ , these gains are decoded as + +$$(G_0, G_1, G_2, G_3) = \mathbf{cb\_gain\_hf}(idx) + \mathbf{mean\_gain\_hf}$$ + +where $\mathbf{cb\_gain\_hf}(idx)$ is the $idx$ -th codevector of the codebook $\mathbf{cb\_gain\_hf}$ . If $bfi = 1$ , a memory $\mathbf{past\_gain\_hf\_q}$ is shifted towards -20 dB: + +$$\mathbf{past\_gain\_hf\_q} := \alpha_{\text{gain\_hf}} * (\mathbf{past\_gain\_hf\_q} + 20) - 20.$$ + +where $\alpha_{\text{gain\_hf}} = 0.9$ and the 4 gains ( $G_0, G_1, G_2, G_3$ ) are set to the same value: + +$$G_k = \mathbf{past\_gain\_hf\_q} + \mathbf{mean\_gain\_hf}, \text{ for } k = 0, 1, 2 \text{ and } 3$$ + +Then the memory $\mathbf{past\_gain\_hf\_q}$ is updated as: + +$$\mathbf{past\_gain\_hf\_q} := (G_0 + G_1 + G_2 + G_3)/4 - \mathbf{mean\_gain\_hf}.$$ + +The computation of the 1st stage reconstruction is then given as: + +$$\text{HF-256: } (g^{c1}_0, g^{c1}_1, g^{c1}_2, g^{c1}_3) = (G_0, G_1, G_2, G_3).$$ + +$$\text{HF-512: } (g^{c1}_0, g^{c1}_1, \dots, g^{c1}_7) = (G_0, G_0, G_1, G_1, G_2, G_2, G_3, G_3).$$ + +$$\text{HF-1024: } (g^{c1}_0, g^{c1}_1, \dots, g^{c1}_{15}) = (G_0, G_0, G_0, G_0, G_1, G_1, G_1, G_1, G_2, G_2, G_2, G_2, G_3, G_3, G_3, G_3).$$ + +*Decoding of 2nd stage:* + +In TCX-256, $(g^{c2}_0, g^{c2}_1, g^{c2}_2, g^{c2}_3)$ is simply set to (0,0,0,0) and there is no real 2nd stage decoding. In HF-512, the 2-bit index $0 \leq idx_i \leq 3$ of the $i$ -th subframe, where $i=0, \dots, 7$ , is decoded as: + +$$\text{If } bfi = 0, g^{c2}_i = 3 * idx_i - 4.5 \text{ else } g^{c2}_i = 0.$$ + +In TCX-1024, 16 subframes 3-bit index the $0 \leq idx_i \leq 7$ of the $i$ -th subframe, where $i=0, \dots, 15$ , is decoded as: + +$$\text{If } bfi = 0, g^{c2}_i = 3 * idx_i - 10.5 \text{ else } g^{c2}_i = 0.$$ + +In TCX-512 the magnitude of the second scalar refinement is up to $\pm 4.5$ dB and in TCX-1024 up to $\pm 10.5$ dB. In both cases, the quantization step is 3 dB. + +*HF gain reconstruction:* + +The gain for each subframe is then computed as: $10^{\hat{g}_i/20}$ + +### **Buzziness reduction and energy smoothing** + +The role of energy smoothing is to attenuate pulses in the time-domain HF excitation signal $r_{\text{HF}}(n)$ , which often cause the audio output to sound "buzzzy". Pulses are detected by checking if the absolute value $|r_{\text{HF}}(n)| > 2 * \mathbf{thres}(n)$ , where $\mathbf{thres}(n)$ is an adaptive threshold corresponding to the time-domain envelope of $r_{\text{HF}}(n)$ . The samples $r_{\text{HF}}(n)$ which are detected as pulses are limited to $\pm 2 * \mathbf{thres}(n)$ , where $\pm$ is the sign of $r_{\text{HF}}(n)$ . + +Each sample $r_{HF}(n)$ of the HF excitation is filtered by a 1st order low-pass filter $0.02/(1 - 0.98 z^{-1})$ to update $thres(n)$ . Note that the initial value of $thres(n)$ (at the reset of the decoder) is 0. The amplitude of the pulse attenuation is given by: + +$$\Delta = \max(|r_{HF}(n)| - 2 * thres(n), 0.0).$$ + +Thus, $\Delta$ is set to 0 if the current sample is not detected as a pulse, which will let $r_{HF}(n)$ unchanged. Then, the current value $thres(n)$ of the adaptive threshold is changed as: + +$$thres(n) := thres(n) + 0.5 * \Delta.$$ + +Finally each sample $r_{HF}(n)$ is modified to: $r'_{HF}(n) = r_{HF}(n) - \Delta$ if $r_{HF}(n) \geq 0$ , and $r'_{HF}(n) = r_{HF}(n) + \Delta$ otherwise. + +The short-term energy variations of the HF synthesis $s_{HF}(n)$ are then smoothed. The energy is measured by subframe. The energy of each subframe is modified by up to $\pm 1.5$ dB based on an adaptive threshold. + +For a given subframe $s_{HF}(n)$ , $n=0, \dots, 63$ , the subframe energy is calculated as + +$$\varepsilon = 0.0001 + \sum_{n=0}^{63} s_{HF}^2(n)$$ + +The value $t$ of the threshold is updated as: + +$$t := \begin{cases} \min(\varepsilon * 1.414, t), & \text{if } \varepsilon < t \\ \max(\varepsilon / 1.414, t), & \text{otherwise.} \end{cases}$$ + +The current subframe is then scaled by $\sqrt{t/\varepsilon}$ : + +$$s'_{HF}(n) = \sqrt{t/\varepsilon} s_{HF}(n), \quad n=0, \dots, 63$$ + +## 6.3 Stereo Signal synthesis + +![Block diagram of stereo signal synthesis. A 'Core decoder' block outputs a signal x_ML(n). This signal is split into two paths. The upper path goes through a down-sampling block labeled '↓5/32', then an up-sampling block labeled '↑32/5', and finally to an adder (represented by a circle with a plus sign). The lower path goes through a 'delay' block and then to the same adder. The output of the adder is labeled x_MMid(n). The signal x_ML(n) is also directly output as x_MLo(n).](d344e2567def9141040128932d6aec49_img.jpg) + +Block diagram of stereo signal synthesis. A 'Core decoder' block outputs a signal x\_ML(n). This signal is split into two paths. The upper path goes through a down-sampling block labeled '↓5/32', then an up-sampling block labeled '↑32/5', and finally to an adder (represented by a circle with a plus sign). The lower path goes through a 'delay' block and then to the same adder. The output of the adder is labeled x\_MMid(n). The signal x\_ML(n) is also directly output as x\_MLo(n). + +For stereo signal decoding, the mono signal is needed. First, the output of the core decoder is split into two bands, these two signals $x_{MLo}(n)$ and $x_{MMid}(n)$ are fed to the low band and high band stereo decoder. + +### 6.3.1 Stereo signal low-band synthesis + +![Block diagram of stereo signal low-band synthesis. The diagram shows the processing of a mono signal x_MLo(n) and decoded parameters to produce low-band stereo signals x_RLo(n) and x_LLo(n).](50ef8602c7c9edd2da0e2133e772c2a2_img.jpg) + +The diagram illustrates the stereo signal low-band synthesis process. The input $x_{MLo}(n)$ is processed through several paths: + +- It is demultiplexed (DEMUX) to provide parameters for decoding. +- One path goes through 'Demultiplex/Decode AVQ parameters', 'Spectrum de-shaping', and 'Inverse Transform' to produce a signal that is multiplied by 'Decode gain'. +- Another path from the DEMUX goes through 'Decode balance factor' and is multiplied by the output of 'Time envelope compensation (mode 0 only)'. +- The 'mode' from the DEMUX is also input to 'Time envelope compensation (mode 0 only)'. +- The 'envelope' from 'Time envelope compensation (mode 0 only)' is passed to another 'Time envelope compensation (mode 0 only)' block. +- The outputs of the 'Decode gain' multiplication and the 'Decode balance factor' multiplication are summed (+). +- This sum is then processed by 'Adaptive Windowing'. +- The output of 'Adaptive Windowing' is saved for the next frame and also added (+) to the 'Windowed overlap from previous frame'. +- The result of this addition is then split into two paths: one for the right low-band signal $x_{RLo}(n)$ and one for the left low-band signal $x_{LLo}(n)$ . Each path involves a subtraction (-) and an addition (+) to produce the final signals. + +Block diagram of stereo signal low-band synthesis. The diagram shows the processing of a mono signal x\_MLo(n) and decoded parameters to produce low-band stereo signals x\_RLo(n) and x\_LLo(n). + +The AVQ parameters are decoded in a similar way as described in section 6.1.2, after decoding the step of spectrum de-shaping is performed in order to de-emphasize the spectral coefficients. + +The global gain decoding is performed according to Section 6.1. by inverting the 7-bit logarithmic quantization calculated in the encoder as in Section 5.5.1. The signal after inverse transform is multiplied by the global gain in order to produce a time domain signal $y(n)$ . + +Decoding the balance factor is done by inverting the 7 bit scalar quantizer. In the case of mode 0, a signal envelope is estimated from the mono signal $x_{MLo}(n)$ and this signal is compensated for the envelope. The resulting signal is multiplied by the balance factor and added to the time domain signal $y(n)$ . The estimated time domain envelope is used in order to shape the resulting signal and reduce the pre-echo artefact when mode 0 is selected in the encoder. + +Adaptive overlap-add is used in order to synthesise the time domain side signal $x_{SLo}(n)$ which is used to produce the low frequencies left and right signal $x_{RLo}(n)$ , $x_{LLo}(n)$ . + +### 6.3.2 Stereo Signal Mid-Band synthesis + +![Block diagram of Stereo Signal Mid-Band synthesis. The input x_MMid(n) is processed by A(z) to produce e_MMid(n). This signal is filtered by a 'filter' block to produce e_SMid(n). The filter coefficients are decoded from a DEMUX via MSPVQ^-1 (Decode filter). Gains g_R and g_L are decoded from the DEMUX via PVQ^-1 (Decode gains). The signals e_SMid(n) are then multiplied by g_R and g_L. The resulting signals are processed by Windowing (Save for next frame) and Overlap-add blocks. Finally, they are processed by 1/A(z) to produce the output signals x_LMid(n) and x_RMid(n). The 1/A(z) blocks also receive feedback from the core decoder.](212c50c4e3d043c989037a01e13c1a98_img.jpg) + +Block diagram of Stereo Signal Mid-Band synthesis. The input x\_MMid(n) is processed by A(z) to produce e\_MMid(n). This signal is filtered by a 'filter' block to produce e\_SMid(n). The filter coefficients are decoded from a DEMUX via MSPVQ^-1 (Decode filter). Gains g\_R and g\_L are decoded from the DEMUX via PVQ^-1 (Decode gains). The signals e\_SMid(n) are then multiplied by g\_R and g\_L. The resulting signals are processed by Windowing (Save for next frame) and Overlap-add blocks. Finally, they are processed by 1/A(z) to produce the output signals x\_LMid(n) and x\_RMid(n). The 1/A(z) blocks also receive feedback from the core decoder. + +The mono mid-band signal is filtered in order to obtain the mid-band excitation signal $e_{MMid}(n)$ . The filter and the corresponding gains are decoded by using the inverse operation of the predictive multistage quantizer ( $MSPVQ^{-1}$ ) and the predictive 2 dimensional vector quantizer ( $PVQ^{-1}$ ). + +The filter is used to filter the excitation signal $e_{MMid}(n)$ according to + +$$e_{SMid}(n) = \sum_{i=0}^8 b_{iq} e_{MMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +the two channels pseudo-excitations are computed as: + +$$e_{LMid}(n) = g_L e_{MMid}(n) - g_L \sum_{i=0}^8 b_{iq} e_{MMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +$$e_{RMid}(n) = g_R e_{MMid}(n) + g_R \sum_{i=0}^8 b_{iq} e_{MMid}(n-i), \quad 0 \leq n < L_{div} + L_{subfr}$$ + +Windowing and overlap add is used in order to smooth the frame transitions. The amount of overlap is equal to $L_{subfr}$ according to the following figure + +![Diagram illustrating the overlap-add process. The top part shows two overlapping signal segments. The first segment has a length of L_div followed by a subframe of length L_subfr. The second segment is shifted by L_subfr. The bottom part shows the result of the overlap-add process, where the segments are summed to produce a continuous signal of length L_div.](fd3cbb53e991f8209ba17b398f426e13_img.jpg) + +The diagram illustrates the overlap-add process. At the top, two overlapping signal segments are shown. The first segment has a length of $L_{div}$ followed by a subframe of length $L_{subfr}$ . The second segment is shifted by $L_{subfr}$ . The bottom part shows the result of the overlap-add process, where the segments are summed to produce a continuous signal of length $L_{div}$ . + +Diagram illustrating the overlap-add process. The top part shows two overlapping signal segments. The first segment has a length of L\_div followed by a subframe of length L\_subfr. The second segment is shifted by L\_subfr. The bottom part shows the result of the overlap-add process, where the segments are summed to produce a continuous signal of length L\_div. + +The output of the overlap add sections are finally inverse filtered by the core low band signal lpc filter $1/A(z)$ to produce the left and right mid-band signals $x_{LMid}(n)$ and $x_{RMid}(n)$ . + +### 6.3.3 Stereo Signal High-Band synthesis + +Same as mono signal high band synthesis, the high band for each signal is delayed slightly to be aligned with the low and midband stereo signal + +### 6.3.4 Stereo output signal generation + +The low and high frequencies of the low band left and right channels are combined together according to the following figure + +![Block diagram of stereo output signal generation. Two input signals, x_LMid(n) resp. x_RMid(n) and x_LLo(n) resp. x_RLo(n), are processed. The first signal passes through a delay block, and the second signal passes through an upsample block (32/5). The outputs of these blocks are then summed to produce the final output signals x_LL(n) resp. x_RL(n).](ae0dd5533e0b7fd2db452b5e2fdf8e5b_img.jpg) + +The block diagram shows the stereo output signal generation. Two input signals, $x_{LMid}(n)$ resp. $x_{RMid}(n)$ and $x_{LLo}(n)$ resp. $x_{RLo}(n)$ , are processed. The first signal passes through a delay block, and the second signal passes through an upsample block (32/5). The outputs of these blocks are then summed to produce the final output signals $x_{LL}(n)$ resp. $x_{RL}(n)$ . + +Block diagram of stereo output signal generation. Two input signals, x\_LMid(n) resp. x\_RMid(n) and x\_LLo(n) resp. x\_RLo(n), are processed. The first signal passes through a delay block, and the second signal passes through an upsample block (32/5). The outputs of these blocks are then summed to produce the final output signals x\_LL(n) resp. x\_RL(n). + +The obtained low band left and right channels are combined with the high band signals in order to restore the full band left and right channels. + +## 6.4 Stereo to mono conversion + +In the case the application or hardware does not support stereo output, the output of the synthesised output stereo bit stream needs to be mixed to mono. + +### 6.4.1 Low-Band synthesis + +The low band stereo output is converted to mono by omitting the stereo information in the bit stream and skipping the stereo decoder. Hence, the mono output is synthesised only according to Section 6.1. + +### 6.4.2 High-Band synthesis + +The stereo bit stream contains separate bandwidth extensions for left and right High-Band synthesis. To minimise the decoder complexity, the stereo to mono down mixing is done on parameter level. + +First the High-Band gain factors for both left and right channel are decoded as explained in Section 6.2. The gain difference of left and right channels is calculated in dB scale. When the difference is greater than 20 dB, the LP synthesis filter coefficients of the higher energy channel are selected for the mono output synthesis filtering and the LP parameters from the lower energy channel are omitted completely. On the other hand, when the gain difference is less than the 20 dB threshold, the LP synthesis filter coefficients of left and right channel are averaged in ISP domain. The gain parameters from left and right channels are averaged in both cases. When the LP synthesis filter coefficients and gain factor is determined, the High-Band synthesis is done according to mono signal High-Band synthesis in Section 6.2. + +## 6.5 Bad frame concealment + +### 6.5.1 Mono + +#### 6.5.1.1 Mode decoding and extrapolation + +In the presence of packet losses, the decoder tries to recover the missing mode indicators from the available ones (including also mode indicators of previous superframes). Recall that the mode selected in a given super-frame is given by **MODE** = ( $m_0, m_1, m_2, m_3$ ) where $0 \leq m_k \leq 3$ and $k=0,\dots,3$ . The 26 valid modes are enumerated in Table 10. When frame $k$ is missing at the receiver, $bfi_k$ is set to 1. When $bfi_k = 1$ , the value $m_k$ is not available and has to be estimated from other received information. + +The mode extrapolation is essentially based on a mode repetition logic. The mode indicators from the previous superframe only are reused in the extrapolation. More precisely, only the last indicator of the previous mode is used. Hence, the modes of the four 256-sample frames in the previous superframe are seen as (X, X, X, $m_{-1}$ ) where the value X is not relevant (this value is not used here) and $0 \leq m_{-1} \leq 3$ is the final indicator of the previous mode. Note that if $m_{-1}$ was not available, the extrapolated value of $m_{-1}$ is used. + +A high-level block diagram of the mode extrapolation module is given in Figure 17. + +![Figure 17: High-level block diagram of mode extrapolation module. The diagram shows three main components: 'set available mode indicators (missing ones are set to -1)', 'count number of packet losses', and 'extrapolate missing mode indicators'. Inputs include 'bitstream (mode indicators)' and 'BFI'. The first component outputs 'MODE'. The second component outputs 'n_loss'. Both 'MODE' and 'n_loss' are inputs to the third component, which outputs the final 'MODE'.](2dc649aff45a8a0924db45fc3bd6aabb_img.jpg) + +``` + +graph LR + bitstream["bitstream (mode indicators)"] --> set["set available mode indicators (missing ones are set to -1)"] + BFI --> count["count number of packet losses"] + set --> MODE1["MODE"] + count --> n_loss["n_loss"] + MODE1 --> extrapolate["extrapolate missing mode indicators"] + n_loss --> extrapolate + extrapolate --> MODE2["MODE"] + +``` + +Figure 17: High-level block diagram of mode extrapolation module. The diagram shows three main components: 'set available mode indicators (missing ones are set to -1)', 'count number of packet losses', and 'extrapolate missing mode indicators'. Inputs include 'bitstream (mode indicators)' and 'BFI'. The first component outputs 'MODE'. The second component outputs 'n\_loss'. Both 'MODE' and 'n\_loss' are inputs to the third component, which outputs the final 'MODE'. + +Figure 17: High-level block diagram of mode extrapolation module + +Based on the values in **BFI**, the available mode indicators are set from the bits coming from the demultiplexer. The number of packet losses $n_{loss}$ is counted as the number of $bfi_k$ values set to 1. The mode is given by **MODE** = ( $m_0, m_1, m_2, m_3$ ) with $0 \leq m_k \leq 3$ when the indicator $m_k$ is available (i.e. $bfi_k = 0$ ), and $m_k = -1$ when $bfi_k = 1$ . Then, the missing mode indicators (for which $m_k = -1$ ) are extrapolated. The logic of this mode extrapolation is shown in Figure 18. + +![Flowchart of Mode extrapolation logic. The process starts with BEGIN, initializing MODE = (m0, m1, m2, m3) where mk = -1, 0, 1, 2 or 3, and nloss = 0, 1, 2, 3 or 4. It then checks if any mk = 3. If yes, it checks if nloss > 2. If yes, MODE becomes (1,1,1,1) and BFI becomes (1,1,1,1). If no, MODE becomes (3,3,3,3). If no mk = 3, it checks if any mk = 2. If yes, it sets the corresponding mk to 2. If no, it enters a loop for k = 0 to 3. If k > 3, it ends with the updated MODE. If not, it checks if mk-1 = 0. If yes, it sets mk = 0. If no, it sets mk = 1. It then increments k and loops back to the k > 3 check. Both (1,1,1,1) and (3,3,3,3) lead to the END state.](61a7f401eb46fe99a71f27bc37493f04_img.jpg) + +``` + + graph TD + BEGIN([BEGIN +o MODE = (m0,m1,m2,m3) +where mk=-1,0,1,2 or 3 +o previous mode (x,x,x, m-1) +o nloss = 0, 1, 2, 3 or 4]) --> D1{ (m0=3) or +(m1=3) or +(m2=3) or +(m3=3) +? } + + D1 -- yes --> D2{ nloss > 2 +? } + D2 -- yes --> S1[MODE := (1,1,1,1) +BFI := (1,1,1,1)] + D2 -- no --> S2[MODE := (3,3,3,3)] + + D1 -- no --> D3{ (m0=2) or (m1=2) +? } + D3 -- yes --> S3[m0 := 2 +m1 := 2] + D3 -- no --> D4{ (m2=2) or (m3=2) +? } + D4 -- yes --> S4[m2 := 2 +m3 := 2] + + D4 -- no --> S5[k := 0] + S3 --> D4 + S4 --> S5 + + S5 --> D5{ k > 3 +? } + D5 -- yes --> END([END +MODE = (m0,m1,m2,m3) +where mk=0,1,2 or 3 + +(BFI may have changed)]) + + D5 -- no --> D6{ mk-1=0 +? } + D6 -- yes --> S6[mk := 0] + D6 -- no --> S7[mk := 1] + + S6 --> S8[k := k + 1] + S7 --> S8 + S8 --> D5 + + S1 --> END + S2 --> END + +``` + +Flowchart of Mode extrapolation logic. The process starts with BEGIN, initializing MODE = (m0, m1, m2, m3) where mk = -1, 0, 1, 2 or 3, and nloss = 0, 1, 2, 3 or 4. It then checks if any mk = 3. If yes, it checks if nloss > 2. If yes, MODE becomes (1,1,1,1) and BFI becomes (1,1,1,1). If no, MODE becomes (3,3,3,3). If no mk = 3, it checks if any mk = 2. If yes, it sets the corresponding mk to 2. If no, it enters a loop for k = 0 to 3. If k > 3, it ends with the updated MODE. If not, it checks if mk-1 = 0. If yes, it sets mk = 0. If no, it sets mk = 1. It then increments k and loops back to the k > 3 check. Both (1,1,1,1) and (3,3,3,3) lead to the END state. + +Figure 18: Mode extrapolation logic + +The rationale behind the mode extrapolation logic in Figure 18 is as follows: + +- There exists redundancy in the definition of mode indicators. A TCX-1024 frame is described by **MODE** = (3,3,3,3), and a TCX-512 frame is described by (2,2,X,X) or (X,X,2,2). Therefore, *in the absence of bit errors*, the mode indicators describing a TCX-512 or TCX-1024 frame can be easily extrapolated in case of partial packet losses, when a single value $m_k = 2$ or 3 is available. +- The frame-erasure concealment in ACELP mode relies on the pitch delay and codebook gains of the previous ACELP frame. However in switched ACELP/TCX coding there is no guarantee that the frame preceding an + +ACELP frame was also encoded by ACELP. Assuming that $m_k$ is not available and that the extrapolation has to choose between $m_k = 0$ or $m_k = 1$ , the extrapolation will select ACELP decoding ( $m_k = 0$ ) only if $m_{k-1} = 0$ . Otherwise the ACELP parameters needed for concealment would not be up-to-date. As a consequence, under the above assumptions, if $m_{k-1} > 0$ , the value $m_k = 1$ will be selected. + +- If 3 packets are lost and if the only available mode indicator is $m_k = 3$ with $k = 0, 1, 2$ or $3$ , a mode $(3, 3, 3, 3)$ corresponding to TCX-1024 should normally be extrapolated. Yet, with the bitstream format described in Section 5.6, losing 3 packets out of 4 in TCX-1024 means + +- 1) losing roughly 3 quarters of the TCX target spectrum and +- 2) having no information about the TCX global gain since the gain repetition in TCX-1024 is designed to perform well for up to 2 packet losses. + +As a consequence, the mode $(3, 3, 3, 3)$ is rather replaced by the mode $(1, 1, 1, 1)$ in the extrapolation when more than 2 packets are lost. Note that this causes the concealment of TCX-256 to be used (the synthesis will actually be progressively faded out). + +#### 6.5.1.2 TCX bad frame concealment + +Concealment of TCX256 erased frames was described in Section 6.2.1. + +In the case of a TCX1024 partial frame loss and given that the previous decoded frame was also a TCX1024 frame a spectral fill-in strategy is used in order to conceal the lost packets. The fill-in strategy assumes that since we have a case of two consecutive 1024-sample TCX frames, the signal is quasi stationary so that lost subvectors can be interpolated from the previous frame. + +##### 6.5.1.2.1 Spectrum de-shaping + +Spectrum de-shaping is applied to the quantized spectrum as described in Section 5.3.5.8. In case of frame erasure, the de-shaping uses a prediction of the new maximum using the previously saved quantized spectrum. De-shaping is done according to the following steps: + +- Compute the maximum energy $OldE_{max}$ of the 8-dimensional block at position index $m$ of the previous 1024-sample TCX frame +- Compute the maximum energy $E_{max}$ of the 8-dimensional block at position index $m$ of the current 1024-sample TCX frame +- If $E_{max} < OldE_{max}$ , then set $E_{max} = OldE_{max}$ +- Calculate the energy $E_m$ of the 8-dimensional block at position index $m$ +- Compute the ratio $R_m = E_{max} / E_m$ +- Compute the value $(R_m)^{1/2}$ +- if $R_m > 10$ , then set $R_m = 10$ (maximum gain of 20 dB) +- also, if $R_m > R_{m-1}$ then $R_m = R_{m-1}$ + +This allows in case of the loss of the 8-dimensional block corresponding to the maximum to use the previous maximum. + +##### 6.5.1.2.2 Spectrum Extrapolation + +Spectrum extrapolation is applied to the quantized spectrum prior to applying the inverse FFT. Spectrum extrapolation consists of amplitude and phase extrapolation applied to the lost spectral coefficients. The extrapolated amplitude and phase are combined to form the extrapolated spectral coefficient. Combining the extrapolated and the received spectral coefficients is done in order to form quantized spectrum $\hat{X}[k]$ . + +##### 6.5.1.2.3 Amplitude Extrapolation + +Spectral amplitude extrapolation consists of is performed according to the following steps; + +- Compute the previous frame amplitude spectrum, $oldA[k] = |old\hat{X}[k]|$ + - Compute the current frame spectrum, $A[k] = |\hat{X}[k]|$ + - Compute the gain difference of energy of non-lost spectral coefficients between the previous and the current frame +- $$gain = \sqrt{\frac{\sum_{k, S[k] \neq 0} A[k]^2}{\sum_{k, S[k] \neq 0} oldS[k]^2}}$$ +- Extrapolate the amplitude of the missing spectral coefficients using +if (*lost*[*k*]) $A[k] = gain \cdot oldA[k]$ + +##### 6.5.1.2.4 Phase Extrapolation + +![Diagram illustrating phase extrapolation. The top part shows a plot of phase φ(k) versus bin. The 'Known phase' region is from bin K to K+N, with points marked by solid dots. The 'Predicted-extrapolated phase' region is from bin K+N onwards, with points marked by open circles. Arrows indicate the extrapolation process. The bottom part shows a plot of oldφ(k) versus bin, with points marked by solid dots. The 'Known phase' region is from bin K to K+N, and the 'Predicted-extrapolated phase' region is from bin K+N onwards. Arrows indicate the extrapolation process.](6381dcd91bf4636842734ec95bbd75d4_img.jpg) + +The figure consists of two plots. The top plot shows the phase $\varphi(k)$ versus bin. The x-axis has labels $K$ and $K+N$ . The y-axis has labels $\varphi(K)$ and $\varphi(K+N)$ . A solid line represents the 'Known phase' from bin $K$ to $K+N$ , with solid dots at each bin. A dashed line represents the 'Predicted-extrapolated phase' from bin $K+N$ onwards, with open circles at each bin. Arrows point from the known phase to the predicted phase. The bottom plot shows the old phase $old\varphi(k)$ versus bin. The x-axis has labels $K$ , $K+1$ , and $K+N$ . The y-axis has labels $old\varphi(K+1)$ and $old\varphi(K+N)$ . A solid line represents the known phase from bin $K$ to $K+N$ , with solid dots at each bin. A dashed line represents the predicted phase from bin $K+N$ onwards, with solid dots at each bin. Arrows point from the known phase to the predicted phase. + +Diagram illustrating phase extrapolation. The top part shows a plot of phase φ(k) versus bin. The 'Known phase' region is from bin K to K+N, with points marked by solid dots. The 'Predicted-extrapolated phase' region is from bin K+N onwards, with points marked by open circles. Arrows indicate the extrapolation process. The bottom part shows a plot of oldφ(k) versus bin, with points marked by solid dots. The 'Known phase' region is from bin K to K+N, and the 'Predicted-extrapolated phase' region is from bin K+N onwards. Arrows indicate the extrapolation process. + +Phase extrapolation uses the principle of group delay conservation for quasi-stationary signals. First the group delay is estimated on the previous frame and then used in the current frame in order to extrapolate the phase on the missing spectral coefficients. The estimation of the group delay is done by computing + +$$\Delta old\varphi(k) = old\varphi(k) - old\varphi(k-1)$$ + +The phase of the missing spectral coefficients $\hat{\varphi}(k)$ is computed by using the following recursive algorithm + +$$\hat{\varphi}(k) = \hat{\varphi}(k-1) + \Delta old\varphi(k) + \Delta \varphi_c, \quad k = K+1, \dots, K+N-1$$ + +where + +$$\Delta \varphi_c = (1/N) \cdot (\varphi(K+N) - old\varphi(K+N) - \varphi(K) + old\varphi(K))$$ + +$\hat{\varphi}(K) = \varphi(K)$ is used to start the recursion., and $K, K + N$ are received (non lost) bins. + +### 6.5.2 Stereo + +The stereo error concealment is controlled by the bad frame indicators $bfi_k$ , $k = 0 \dots 3$ . In response to the bad frame indicators of the present super frame together with some bad frame indicator history proper actions are taken mitigating the perceptual impact of bad frames. Particular error mitigation actions are taken on the stereo low-band, the mid-band, and the high-band. + +#### 6.5.2.1 Low-band + +##### *Balance factor* + +The balance factor to be used for the derivation of the side signal is not available depending on $bfi_k$ and on the stereo TCX frame length, i.e. if + +$bfi_k = 1$ , $k = 0 \dots 3$ in case of 256-sample stereo TCX frames, + +$bfi_k = 1$ , $k = 0, 2$ in case of 512-sample stereo TCX frames, or + +$bfi_k = 1$ , $k = 0$ in case of 1024-sample stereo TCX frames, + +In this case, the balance factor is derived from the balance factor of the previous stereo TCX frame, however, attenuated by 0.9. + +For the case of a future frame loss, the balance factor of the present stereo TCX frame is stored in a history buffer. + +##### *Side signal error signal* + +The side signal error signal is derived using the TCX decoder and the associated bad frame concealment described above (6.6.1.3). Input to the TCX bad frame concealment is a flag, signalling if any of the frames associated with the present stereo TCX frame is bad. + +##### *Side signal* + +Stereo TCX frames of size 512 samples and 1024 samples are reconstructed as in the case without bad frames, however using the balance factor and side signal error signal derived as specified above. + +Bad stereo TCX frames of size 256 samples are, however, reconstructed differently. A parametric model with transfer function + +$$H(z) = \sum_{i=0}^P h(i) \cdot z^{-i} \quad , P=8$$ + +is applied to the windowed mono signal for reconstructing a substitution signal for the side signal. The filter coefficients are taken from a state memory and are always derived during preceding stereo TCX frames if the associated $bfi_k$ flags are equal to zero. The coefficients are calculated by solving the following equation system: + +$$\underline{\underline{R}}_{mm} \cdot \underline{h} = \underline{r}_{ca} \quad ,$$ + +where $\underline{\underline{R}}_{mm}$ is a Toeplitz matrix of autocorrelations $r_{mm}$ of the windowed mono signal: + +$$\underline{\underline{R}}_{mm} = [r_{mm}(j - k)] \quad , j, k \in [0 \dots P] \quad ,$$ + +and where $\underline{r}_{ms}$ is a vector of cross-correlations $r_{ms}$ of the windowed mono signal and the side signal: + +$$\underline{r}_{ms} = [r_{ms}(k)] \quad , k \in [0 \dots P] \quad .$$ + +##### *Left/right signal reconstruction* + +The side signal used for left/right signal reconstruction is attenuated in case of severe frame loss conditions of an estimated frame loss rate of greater than 1%. Using an estimate $\bar{f}$ of the present average frame loss rate, an attenuation factor $\alpha$ is derived according to the following formula: + +$$\alpha = 1 - \min(0.7, 17.5 \cdot (\bar{f} - 0.01)),$$ + +where, in addition, $\alpha$ is limited to be within the range of 0...1. + +Before reconstructing left and right signals, the side signal is multiplied with factor $\alpha$ . + +The average frame loss rate is estimated according to the following algorithm. + +A first estimate $f$ is calculated according to + +$$f = \frac{1}{375} \cdot \sum_{j=0}^{N-1} w_j \cdot bfi\_buf(-j), \quad N=500,$$ + +where $w_j$ is a weighting factor defined as + +$$w_j = \min(1, 1.5 - \frac{j}{N}),$$ + +and $bfi\_buf$ is a buffer comprising the $N$ most recent flags $bfi_k$ . + +The final frame loss rate estimate is then obtained by AR-1 filtering: + +$$\bar{f} = 0.9 \cdot \bar{f}' + 0.1 \cdot f,$$ + +where $\bar{f}'$ is the frame loss estimate calculated during processing of the preceding frame. + +#### 6.5.2.2 Mid-band + +The mid-band synthesis is performed on every frame. When a frame is lost the parameters of the mid-band decoder are extrapolated by using the predictive decoders fed with a zero error signal. This implies that the error will propagate to few frames which does not impact the overall quality. The extrapolated parameters are the filter coefficients and the channel gains and are computed as: + +$$\begin{aligned} g_L(frame) &= 0.5 \cdot g_L(frame - 1), \\ g_R(frame) &= 0.5 \cdot g_R(frame - 1), \\ b_i(frame) &= 0.5 \cdot b_i(frame - 1), i = 0, \dots, 8 \end{aligned}$$ + +## 6.6 Output signal generation + +The decoder output signal(s) are generated by combining the low and high band signal to produce full band signals. This operation is the inverse of the encoder band-splitting operation described in section 5.1. The following figure shows how the operation is performed. + +![Block diagram of a filter bank. Two input signals, x_H(n) and x_L(n), each with 1024 samples, are processed through separate paths. The top path consists of an upsampler (↑2) followed by a high-pass filter (HP). The bottom path consists of an upsampler (↑2) followed by a low-pass filter (LP). The outputs of the HP and LP filters are summed together at a summing node (indicated by a circle with a plus sign). The resulting output signal has a sampling rate of Fs kHz and contains 2048 samples.](0f6e3cdce0f01d6ccceabcced508bb5b_img.jpg) + +Block diagram of a filter bank. Two input signals, $x_H(n)$ and $x_L(n)$ , each with 1024 samples, are processed through separate paths. The top path consists of an upsampler ( $\uparrow 2$ ) followed by a high-pass filter (HP). The bottom path consists of an upsampler ( $\uparrow 2$ ) followed by a low-pass filter (LP). The outputs of the HP and LP filters are summed together at a summing node (indicated by a circle with a plus sign). The resulting output signal has a sampling rate of $F_s$ kHz and contains 2048 samples. + +Block diagram of a filter bank. Two input signals, x\_H(n) and x\_L(n), each with 1024 samples, are processed through separate paths. The top path consists of an upsampler (↑2) followed by a high-pass filter (HP). The bottom path consists of an upsampler (↑2) followed by a low-pass filter (LP). The outputs of the HP and LP filters are summed together at a summing node (indicated by a circle with a plus sign). The resulting output signal has a sampling rate of Fs kHz and contains 2048 samples. + +The exact same filters used in the encoder are re-used in the decoder. Furthermore, if the desired output sampling rate is different from the internal sampling rate, then a resampling operation is performed which is the reverse operation of that performed in the encoder. + +![Block diagram of a resampling operation. An input signal with a sampling rate of Fs kHz is processed through three cascaded blocks: an upsampler (↑180), a low-pass filter (LP 1/180), and a downsampler (↓K). The output signal has a sampling rate of 180Fs / K kHz.](9b9262a549828579ab904148450734f6_img.jpg) + +Block diagram of a resampling operation. An input signal with a sampling rate of $F_s$ kHz is processed through three cascaded blocks: an upsampler ( $\uparrow 180$ ), a low-pass filter (LP $1/180$ ), and a downsampler ( $\downarrow K$ ). The output signal has a sampling rate of $180F_s / K$ kHz. + +Block diagram of a resampling operation. An input signal with a sampling rate of Fs kHz is processed through three cascaded blocks: an upsampler (↑180), a low-pass filter (LP 1/180), and a downsampler (↓K). The output signal has a sampling rate of 180Fs / K kHz. + +# 7 Detailed bit allocation of the Extended AMR-WB codec + +The detailed allocation of the bits in the AMR-WB+ audio encoder is shown for each frame type in tables 14-17 for mono and tables 18-20 for stereo. These tables show the order of the bits produced by the audio encoder. Note that the most significant bit (MSB) of each codec parameter is always sent first. For TCX512 frames, the frame is split in two equal packets. For TCX1024 frames, the frame is split in four equal packets. The splitting of TCX512 and TCX1024 frames in several packets is explained in Section 5.6.1. + +**Table 14: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of ACELP coding type** + +| Description | Bits (MSB-LSB) | | | | | | | | +|----------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| Mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 1 st ISP subvec | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | +| 2 nd ISP subvec | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | +| 3 rd ISP subvec | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | +| 4 th ISP subvec | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | +| 5 th ISP subvec | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | +| 6 th ISP subvec | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | +| 7 th ISP subvec | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | +| index of mean energy | b48 – b49 | b48 – b49 | b48 – b49 | b48 – b49 | b48 – b49 | b48 – b49 | b48 – b49 | b48 – b49 | +| subframe 1 | | | | | | | | | +| Adaptive CB index | b50 – b58 | b50 – b58 | b50 – b58 | b50 – b58 | b50 – b58 | b50 – b58 | b50 – b58 | b50 – b58 | +| LTP-filtering-flag | b59 | b59 | b59 | b59 | b59 | b59 | b59 | b59 | +| Algebraic CB indices | b60 – b147 | b60 – b131 | b60 – b123 | b60 – b111 | b60 – b103 | b60 – b95 | b60 – b87 | b60 – b79 | +| codebook gains | b148 – b154 | b132 – b138 | b124 – b130 | b112 – b118 | b104 – b110 | b96 – b102 | b88 – b94 | b80 – b86 | +| subframe 2 | | | | | | | | | +| Adaptive CB index | b155 – b160 | b139 – b144 | b131 – b136 | b119 – b124 | b111 – b116 | b103 – b108 | b95 – b100 | b87 – b92 | +| LTP-filtering-flag | b161 | b145 | b137 | b125 | b117 | b109 | b101 | b93 | +| Algebraic CB indices | b162 – b249 | b146 – b217 | b138 – b201 | b126 – b177 | b118 – b161 | b110 – b145 | b102 – b129 | b94 – b113 | +| codebook gains | b250 – b256 | b218 – b224 | b202 – b208 | b178 – b184 | b162 – b168 | b146 – b152 | b130 – b136 | b114 – b120 | +| subframe 3 | | | | | | | | | +| Adaptive CB index | b257 – b265 | b225 – b233 | b209 – b217 | b185 – b193 | b169 – b177 | b153 – b161 | b137 – b145 | b121 – b129 | +| LTP-filtering-flag | b266 | b234 | b218 | b194 | b178 | b162 | b146 | b130 | +| Algebraic CB indices | b267 – b354 | b235 – b306 | b219 – b282 | b195 – b246 | b179 – b222 | b163 – b198 | b147 – b174 | b131 – b150 | +| codebook gains | b355 – b361 | b307 – b313 | b283 – b289 | b247 – b253 | b223 – b229 | b199 – b205 | b175 – b181 | b151 – b157 | +| subframe 4 | | | | | | | | | +| Adaptive CB index | b362 – b367 | b314 – b319 | b290 – b295 | b254 – b259 | b230 – b235 | b206 – b211 | b182 – b187 | b158 – b163 | +| LTP-filtering-flag | b368 | b320 | b296 | b260 | b236 | b212 | b188 | b164 | +| Algebraic CB indices | b369 – b456 | b321 – b392 | b297 – b360 | b261 – b312 | b237 – b280 | b213 – b248 | b189 – b216 | b165 – b184 | +| codebook gains | b457 – b463 | b393 – b399 | b361 – b367 | b313 – b319 | b281 – b287 | b249 – b255 | b217 – b223 | b185 – b191 | +| Bandwidth extension | | | | | | | | | +| Index of HF ISP | b464 – b472 | b400 – b408 | b368 – b376 | b320 – b328 | b288 – b296 | b256 – b264 | b224 – b232 | b192 – b200 | +| Index of HF gain | b473 – b479 | b409 – b415 | b377 – b383 | b329 – b335 | b297 – b303 | b265 – b271 | b233 – b239 | b201 – b207 | + +**Table 15: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX256 frame type** + +| Description | Bits (MSB-LSB) | | | | | | | | +|----------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 1 st ISP subvec | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | +| 2 nd ISP subvec | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | +| 3 rd ISP subvec | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | b18 - b23 | +| 4 th ISP subvec | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | b24 – b30 | +| 5 th ISP subvec | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | b31 – b37 | +| 6 th ISP subvec | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | b38 – b42 | +| 7 th ISP subvec | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | b43 – b47 | +| Noise factor | b48-b50 | b48-b50 | b48-b50 | b48-b50 | b48-b50 | b48-b50 | b48-b50 | b48-b50 | +| Global gain | b51 – b57 | b51 – b57 | b51 – b57 | b51 – b57 | b51 – b57 | b51 – b57 | b51 – b57 | b51 – b57 | +| Algebraic VQ | b58 – b463 | b58 – b399 | b58 – b367 | b58 – b319 | b58 – b287 | b58 – b255 | b58 – b223 | b58 – b191 | +| Bandwidth extension | | | | | | | | | +| Index of HF ISP | b464 – b472 | b400 – b408 | b368 – b376 | b320 – b328 | b288 – b296 | b256 – b264 | b224 – b232 | b192 – b200 | +| Index of HF gain | b473 – b479 | b409 – b415 | b377 – b383 | b329 – b335 | b297 – b303 | b265 – b271 | b233 – b239 | b201 – b207 | + +**Table 16a: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX512 frame type – First Packet** + +| Description | Bits (MSB-LSB) | | | | | | | | +|----------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 1 st ISP subvec | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | +| 2 nd ISP subvec | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | +| Noise factor | b18-b20 | b18-b20 | b18-b20 | b18-b20 | b18-b20 | b18-b20 | b18-b20 | b18-b20 | +| Global gain | b21 – b27 | b21 – b27 | b21 – b27 | b21 – b27 | b21 – b27 | b21 – b27 | b21 – b27 | b21 – b27 | +| Split Algebraic VQ | b28 – b463 | b28 – b399 | b28 – b367 | b28 – b319 | b28 – b287 | b28 – b255 | b28 – b223 | b28 – b191 | +| Bandwidth extension | | | | | | | | | +| Index of HF ISP | b464 – b472 | b400 – b408 | b368 – b376 | b320 – b328 | b288 – b296 | b256 – b264 | b224 – b232 | b192 – b200 | +| Index of HF gain | b473– b479 | b409 – b415 | b377 – b383 | b329– b335 | b297 – b303 | b265 – b271 | b233 – b239 | b201 – b207 | + +**Table 16b: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX512 frame type – Second Packet** + +| Description | Bits (MSB-LSB) | | | | | | | | +|----------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 3 rd ISP subvec | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | +| 4 th ISP subvec | b8 – b14 | b8 – b14 | b8 – b14 | b8 – b14 | b8 – b14 | b8 – b14 | b8 – b14 | b8 – b14 | +| 5 th ISP subvec | b15 – b21 | b15 – b21 | b15 – b21 | b15 – b21 | b15 – b21 | b15 – b21 | b15 – b21 | b15 – b21 | +| 6 th ISP subvec | b22 – b26 | b22 – b26 | b22 – b26 | b22 – b26 | b22 – b26 | b22 – b26 | b22 – b26 | b22 – b26 | +| 7 th ISP subvec | b27 – b31 | b27 – b31 | b27 – b31 | b27 – b31 | b27 – b31 | b27 – b31 | b27 – b31 | b27 – b31 | +| Gain redundancy (6 MSBs) | b32-b37 | b32-b37 | b32-b37 | b32-b37 | b32-b37 | b32-b37 | b32-b37 | b32-b37 | +| Split Algebraic VQ | b38 – b463 | b38 – b399 | b38 – b367 | b38 – b319 | b38 – b287 | b38 – b255 | b38 – b223 | b38 – b191 | +| Bandwidth extension | | | | | | | | | +| Gain correction 8x2 bits | b464-b479 | b400-b415 | b368-b383 | b320-b335 | b288-b303 | b256-b271 | b224-b239 | b192-b207 | + +**Table 17a: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX1024 frame type – First Packet** + +| Description | Bits (MSB-LSB) | | | | | | | | +|----------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 1 st ISP subvec | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | b2 – b9 | +| 2 nd ISP subvec | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | b10 – b17 | +| Global gain | b18 – b24 | b18 – b24 | b18 – b24 | b18 – b24 | b18 – b24 | b18 – b24 | b18 – b24 | b18 – b24 | +| Split Algebraic VQ | b25 – b463 | b25 – b399 | b25 – b367 | b25 – b319 | b25 – b287 | b25 – b255 | b25 – b223 | b25 – b191 | +| Bandwidth extension | | | | | | | | | +| Index of HF ISP | b464 – b472 | b400 – b408 | b368 – b376 | b320 – b328 | b288 – b296 | b256 – b264 | b224 – b232 | b192 – b200 | +| Index of HF gain | b473 – b479 | b409 – b415 | b377 – b383 | b329– b335 | b297 – b303 | b265 – b271 | b233 – b239 | b201 – b207 | + +**Table 17b: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX1024 frame type – Second packet** + +| Description | Bits (MSB-LSB) | | | | | | | | +|-------------------------------------------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 3 rd ISP subvec | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | b2 – b7 | +| Noise factor | b8-b10 | b8-b10 | b8-b10 | b8-b10 | b8-b10 | b8-b10 | b8-b10 | b8-b10 | +| Global gain parity | b11 – b13 | b11 – b13 | b11 – b13 | b11 – b13 | b11 – b13 | b11 – b13 | b11 – b13 | b11 – b13 | +| Split Algebraic VQ | b14– b463 | b14 – b399 | b14 – b367 | b14 – b319 | b14 – b287 | b14 – b255 | b14 – b223 | b14 – b191 | +| Bandwidth extension | | | | | | | | | +| Gain correction 8x2 bits (MSBs 1 st 8 subframes) | b464-b479 | b400-b415 | b368-b383 | b320-b335 | b288-b303 | b256-b271 | b224-b239 | b192-b207 | + +**Table 17c: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX1024 frame type – Third packet** + +| Description | Bits (MSB-LSB) | | | | | | | | +|-------------------------------------------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 4 th ISP subvec | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | +| 6 th ISP subvec | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | +| Global gain redundancy | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | +| Split Algebraic VQ | b17– b463 | b17 – b399 | b17 – b367 | b17 – b319 | b17 – b287 | b17 – b255 | b17 – b223 | b17 – b191 | +| Bandwidth extension | | | | | | | | | +| Gain correction 8x2 bits (MSBs 2 nd 8 subframes) | b464-b479 | b400-b415 | b368-b383 | b320-b335 | b288-b303 | b256-b271 | b224-b239 | b192-b207 | + +**Table 17d: Source encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX1024 frame type – Fourth packet** + +| Description | Bits (MSB-LSB) | | | | | | | | +|----------------------------------------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------| +| | 480 bits/frame | 416 bits/frame | 384 bits/frame | 336 bits/frame | 304 bits/frame | 272 bits/frame | 240 bits/frame | 208 bits/frame | +| mode bits | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | b0-b1 | +| 5 th ISP subvec | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | b2 – b8 | +| 7 th ISP subvec | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | b9 – b13 | +| Global gain redundancy | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | b14 – b16 | +| Split Algebraic VQ | b17– b463 | b17 – b399 | b17 – b367 | b17 – b319 | b17 – b287 | b17 – b255 | b17 – b223 | b17 – b191 | +| Bandwidth extension | | | | | | | | | +| Gain correction 16x1 bits (LSB 16 subframes) | b464-b479 | b400-b415 | b368-b383 | b320-b335 | b288-b303 | b256-b271 | b224-b239 | b192-b207 | + +N1 is the number of bits per frame allocated for the low and midband and is calculated according to + +**Table 18: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX48 frame type, mode 0 and 1** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Balance factor | b9-b15 | b15-b21 | +| Global gain | b16 – b22 | b22-b28 | +| Algebraic VQ | b23 – bN 1 | b29- bN 1 | + +**Table 19a: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX96 frame type, mode 2 - First packet** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Balance factor | b9-b15 | b15-b21 | +| Algebraic VQ | b16 – bN 1 | b22- bN 1 | + +**Table 19b: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX96 frame type, mode 2 - Second packet** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Global gain | b9-b15 | b15-b21 | +| Algebraic VQ | b16 – bN 1 | b22- bN 1 | + +**Table 20a: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX96 frame type, mode 3 - First packet** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Balance factor | b9-b15 | b15-b21 | +| Algebraic VQ | b16- bN 1 | b22- bN 1 | + +**Table 20b: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX96 frame type, mode 3 - Second packet** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Algebraic VQ | b9 - bN 1 | b15- bN 1 | + +**Table 20c: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX96 frame type, mode 3 - Third packet** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Global gain | B9-b15 | b15-b21 | +| Algebraic VQ | b16 - bN 1 | b22- bN 1 | + +**Table 20d: Stereo encoder output parameters in order of occurrence and bit allocation within the audio frame of TCX96 frame type, mode 3 - Fourth packet** + +| Description | Bits (MSB-LSB) | | +|----------------|------------------------|----------------------| +| | N bits/frame $\leq 76$ | N bits/frame $> 76$ | +| Midband stereo | | | +| Midband filter | b0-b3 | b0-b6 | +| Midband gain | b4-b5 | b7-b11 | +| Lowband stereo | | | +| Mode bits | b6-b7 | b12-b13 | +| reserved | b8 | b14 | +| Algebraic VQ | b9 - bN 1 | b15- bN 1 | + +# 8 Storage and Transport Interface formats + +The AMR-WB+ codec storage and transport interface formats are described in this section. + +## 8.1 Available Modes and Bitrates + +The AMR-WB+ format contains the AMR-WB modes and a set of AMR-WB+ extension modes. The AMR-WB+ codec includes the AMR-WB modes, as shown in Table 21 below. + +**Table 21: AMR-WB+ modes.** + +| Index | Mode | Sampling rate (kHz) | Mono/Stereo | Number of data octets per frame (AMR-WB modes zero-padded) | +|-------|---------------------|---------------------|-------------|------------------------------------------------------------| +| 0 | AMR-WB 6.60 kbit/s | 16 | Mono | 17 | +| 1 | AMR-WB 8.85 kbit/s | 16 | Mono | 23 | +| 2 | AMR-WB 12.65 kbit/s | 16 | Mono | 32 | +| 3 | AMR-WB 14.25 kbit/s | 16 | Mono | 36 | +| 4 | AMR-WB 15.85 kbit/s | 16 | Mono | 40 | +| 5 | AMR-WB 18.25 kbit/s | 16 | Mono | 46 | +| 6 | AMR-WB 19.85 kbit/s | 16 | Mono | 50 | +| 7 | AMR-WB 23.05 kbit/s | 16 | Mono | 58 | +| 8 | AMR-WB 23.85 kbit/s | 16 | Mono | 60 | +| 9 | AMR-WB SID | 16 | Mono | 5 | +| 10 | AMR-WB+ 13.6 kbit/s | 16/24 | Mono | 34 | +| 11 | AMR-WB+ 18 kbit/s | 16/24 | Stereo | 45 | +| 12 | AMR-WB+ 24 kbit/s | 16/24 | Mono | 60 | +| 13 | AMR-WB+ 24 kbit/s | 16/24 | Stereo | 60 | +| 14 | FRAME ERASURE | - | - | 0 | +| 15 | NO DATA | - | - | 0 | + +There are four special extension modes (Index 10-13 in table 21) that have a fixed internal sampling frequency (25600 Hz) and audio input frequencies (16 or 24 kHz). These modes share the property with the AMR-WB modes that each frame is only capable of representing 20 ms. + +Besides the AMR-WB+ operation according to the modes specified in table 21, AMR-WB+ operation is specified by three parameters: mono bit-rate as given in Table 22, stereo bit-rate as given in Table 23, and internal sampling frequency (ISF) as given in Table 24. + +**Table 22: Mono rate indices.** + +| Mono Index | Mono rate | Bit rate at 25.6 kHz ISF | Octets per frame | +|------------|-----------------------|--------------------------|------------------| +| 0 | AMR-WB+ 208 bit/frame | 10.4 kbit/s | 26 | +| 1 | AMR-WB+ 240 bit/frame | 12 kbit/s | 30 | +| 2 | AMR-WB+ 272 bit/frame | 13.6 kbit/s | 34 | +| 3 | AMR-WB+ 304 bit/frame | 15.2 kbit/s | 38 | +| 4 | AMR-WB+ 336 bit/frame | 16.8 kbit/s | 42 | +| 5 | AMR-WB+ 384 bit/frame | 19.2 kbit/s | 48 | +| 6 | AMR-WB+ 416 bit/frame | 20.8 kbit/s | 52 | +| 7 | AMR-WB+ 480 bit/frame | 24 kbit/s | 60 | + +**Table 23: Stereo rate indices.** + +| Stereo index | Stereo extension rate(bits/frame) | Stereo rate for ISF of 25.6 kHz | Number of data octets per frame | +|--------------|------------------------------------------|----------------------------------------|----------------------------------------| +| 0 | 40 bits/frame | 2.0 kbit/s | 5 | +| 1 | 48 bits/frame | 2.4 kbit/s | 6 | +| 2 | 56 bits/frame | 2.8 kbit/s | 7 | +| 3 | 64 bits/frame | 3.2 kbit/s | 8 | +| 4 | 72 bits/frame | 3.6 kbit/s | 9 | +| 5 | 80 bits/frame | 4.0 kbit/s | 10 | +| 6 | 88 bits/frame | 4.4 kbit/s | 11 | +| 7 | 96 bits/frame | 4.8 kbit/s | 12 | +| 8 | 104 bits/frame | 5.2 kbit/s | 13 | +| 9 | 112 bits/frame | 5.6 kbit/s | 14 | +| 10 | 120 bits/frame | 6.0 kbit/s | 15 | +| 11 | 128 bits/frame | 6.4 kbit/s | 16 | +| 12 | 136 bits/frame | 6.8 kbit/s | 17 | +| 13 | 144 bits/frame | 7.2 kbit/s | 18 | +| 14 | 152 bits/frame | 7.6 kbit/s | 19 | +| 15 | 160 bits/frame | 8.0 kbit/s | 20 | + +It is to be noted that the number of samples each frame corresponds to is always the same but the duration of each frame varies depending on the internal sampling frequency. There is no preferred sampling frequency for the codec to operate at, but in order to limit the possible settings for an effective transmission, the format supports the sampling frequencies given in Table 24. . Herein, index 0 is used for AMR-WB and the 4 extension modes of Table 21. + +**Table 24: Internal sampling frequencies and corresponding frame lengths in time** + +| ISF Index | Internal Sampling Rate (Hz) | Frame duration (ms) | Bit Rate factor | +|-----------|------------------------------------|----------------------------|------------------------| +| 0 | N/A | 20 | N/A | +| 1 | 12800 | 40 | $\frac{1}{2}$ | +| 2 | 14400 | 35.55 | $\frac{9}{16}$ | +| 3 | 16000 | 32 | $\frac{5}{8}$ | +| 4 | 17067 | 30 | $\frac{2}{3}$ | +| 5 | 19200 | 26.67 | $\frac{3}{4}$ | +| 6 | 21333 | 24 | $\frac{5}{6}$ | +| 7 | 24000 | 21.33 | $\frac{15}{16}$ | +| 8 | 25600 | 20 | 1 | +| 9 | 28800 | 17.78 | $\frac{9}{8}$ | +| 10 | 32000 | 16 | $\frac{5}{4}$ | +| 11 | 34133 | 15 | $\frac{4}{3}$ | +| 12 | 36000 | 14.22 | $\frac{45}{32}$ | +| 13 | 38400 | 13.33 | $\frac{3}{2}$ | + +The bit-rate will be dependent on the internal sampling frequency. The last column of Table 24 indicates which multiplication factor, any bit-rate value for 25600 Hz internal sampling factor should be converted with. The ISF index is carried in the bitstream format to indicate which internal sampling frequency is used for each AMR-WB+ encoded frame. + +The frame type is used to identify the content of an AMR-WB+ encoded frame. This type indicates if it is; an AMR-WB mode, Comfort noise, NO\_DATA, AMR-WB+ core mode in mono usage, or a combination of a core mode and a stereo mode. The frame types are presented in Table 25 below. The core mode and stereo mode index values are according to Table 22 and 23 respectively. The bit-rate value assumes an internal sampling frequency of 25600 Hz. + +**Table 25: Normative frame type table. Bit-rates assumes 25600 Hz internal sampling frequency.** + +| Frame type | Core mode | Stereo mode | Bit rate | Octets per frame | +|------------|--------------------------|-------------|----------|------------------| +| 0-15 | As specified in Table 21 | | | | +| 16 | 0 | None | 10.4 | 26 | +| 17 | 1 | None | 12.0 | 30 | +| 18 | 2 | None | 13.6 | 34 | +| 19 | 3 | None | 15.2 | 38 | +| 20 | 4 | None | 16.8 | 42 | +| 21 | 5 | None | 19.2 | 48 | +| 22 | 6 | None | 20.8 | 52 | +| 23 | 7 | None | 24.0 | 60 | +| 24 | 0 | 0 | 12.4 | 31 | +| 25 | 0 | 1 | 12.8 | 32 | +| 26 | 0 | 4 | 14 | 35 | +| 27 | 1 | 1 | 14.4 | 36 | +| 28 | 1 | 3 | 15.2 | 38 | +| 29 | 1 | 5 | 16 | 40 | +| 30 | 2 | 2 | 16.4 | 41 | +| 31 | 2 | 4 | 17.2 | 43 | +| 32 | 2 | 6 | 18 | 45 | +| 33 | 3 | 3 | 18.4 | 46 | +| 34 | 3 | 5 | 19.2 | 48 | +| 35 | 3 | 7 | 20 | 50 | +| 36 | 4 | 4 | 20.4 | 51 | +| 37 | 4 | 6 | 21.2 | 53 | +| 38 | 4 | 9 | 22.4 | 56 | +| 39 | 5 | 5 | 23.2 | 58 | +| 40 | 5 | 7 | 24 | 60 | +| 41 | 5 | 11 | 25.6 | 64 | +| 42 | 6 | 8 | 26 | 65 | +| 43 | 6 | 10 | 26.8 | 67 | +| 44 | 6 | 15 | 28.8 | 72 | +| 45 | 7 | 9 | 29.6 | 74 | +| 46 | 7 | 10 | 30 | 75 | +| 47 | 7 | 15 | 32 | 80 | +| 48-127 | Reserved | | | | + +## 8.2 AMR-WB+ Transport Interface Format + +The transport interface format serves as an intermediate interface to the transport format. The transport interface frame contains a two-octet header followed by data octets. + +The header in each frame contains the following two octets. + +| | MSB | | | | | | | LSB | +|-------|-------|-----------------|-------|-------------------|-------|-------|-------|-------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | 0 | Frame type (FT) | | | | | | | +| 2 | TFI | | 0 | ISF mode (5 bits) | | | | | + +**Frame type (FT)** (7 bits): Indicates the frame type setting of the codec used for the corresponding frame (the combination of AMR-WB+ core and stereo mode, the AMR-WB mode, or comfort noise, as specified by Table 25 above). + +**Transport Frame Index (TFI)** (2 bits): An index from 0 (first) to 3 (last) indicating this transport frame's position in the superframe. + +**ISF index** (5 bits): Indicates the internal sampling frequency employed for the corresponding frame. The index values correspond to internal sampling frequency as specified in Table 24 above. This field SHALL be set to 0 for operation according to the AMR-WB+ modes defined in table 21 (Frame types 0-13). + +FT=14 (AUDIO\_LOST) is used to indicate frames that are lost. NO\_DATA (FT=15) frame could mean either that there is no data produced by the audio encoder for that frame or that no data for that frame is transmitted in the current packet (i.e., valid data for that frame could be sent in either an earlier or later packet). The duration for these non-included frames is dependent on the internal sampling frequency indicated by the ISF mode field. + +For operation according to FT 0-13 the ISF field shall be set 0 and has no meaning. The frame length for that operation is fixed to 20 ms in time. + +If receiving a frame with an FT value not defined the whole frame SHOULD be discarded and assumed erased. + +The AMR-WB+ SCR/DTX is identical with AMR-WB SCR/DTX described in [8] and SHALL only be used in combination with the AMR-WB modes (0-8). + +The audio data follows the header octets. The number of data octets per frame corresponding to a certain frame type is given in Table 25. + +### Example + +The following diagram (Table 26) shows a frame of AMR-WB+ using 14 kbit/s frame type (FT=26) with a frame length of 35 octets (280 bits). The internal sampling frequency in this example is 25.6 kHz (ISF mode = 8). FT 26 corresponds to mono mode 0 (208 bits/frame) and stereo mode 4 (72 bits/frame). The frame is the first frame in the superframe (TFI=0). + +The data octets are placed according to the detailed bit allocation given in tables 14 to 20. The first bit of the AMR-WB+ data b0 is placed in bit 8 of octet 3. + +**Table 26: AMR-WB+ transport interface format for 14 kbit/s operation with ISF mode 8 (bit rate factor=1).** + +| Octet | MSB | | | | | | | LSB | +|--------|-------------------------------|-------|---------|-------|-------|-------|-------|-------| +| | bit 8 | bit 7 | bit 6 | bit 5 | Bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | FT = 26 | | | | | | | | +| | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | +| 2 | TFI=0 | | ISF = 8 | | | | | | +| | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | +| 3 | AMR-WB+ data (octet 1) | | | | | | | | +| | b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | +| 4..27 | AMR-WB+ data (octets 2 to 25) | | | | | | | | +| | b8 | ... | ... | ... | ... | ... | ... | ... | +| 28 | AMR-WB+ data (octet 26) | | | | | | | | +| | b200 | b201 | b202 | b203 | B204 | b205 | b206 | b207 | +| 29 | AMR-WB+ data (octet 27) | | | | | | | | +| | s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7 | +| 30..36 | AMR-WB+ data (octet 28 to 34) | | | | | | | | +| | s8 | ... | ... | ... | ... | ... | ... | ... | +| 37 | AMR-WB+ data (octet 35) | | | | | | | | +| | S64 | S65 | S66 | S67 | S68 | S69 | S70 | S71 | + +## 8.3 AMR-WB+ File Storage Format + +This format is relevant only for file storage and defines a storage unit contained in an AMR-WB+ sample of a 3GP file [9]. It is quite similar to transport interface format with the exception that the two-octet header is used once per superframe for AMR-WB+ extension modes and once per frame for AMR-WB modes. Note that in AMR-WB+, the operation code and internal sampling frequency can be switched only on a superframe basis boundaries so the header octets are needed only once per superframe. + +All media streams in a 3GP file are stored in timed units called samples. This format defines the syntax of the basic component of a sample, which is here called a storage unit.. + +A storage unit consists of a two-octet header followed by data octets corresponding to either: + +1. A whole superframe (4 transport frames) when FT = 10..13 or OC = 16...47 . +2. A frame otherwise + +For the first case, the number of data octets per superframe is given by 4 times the number of octets per frame (the right-most column in Table 25). + +The length of an AMR-WB+ storage unit in ms (corresponding to one superframe) depends on the internal sample frequency and given by $80 \times \text{ISF} / 25600$ where ISF is the internal sampling frequency in Hz (ISF modes are shown in Table 24). + +The header in each storage unit contains the following two octets. + +| | MSB | | | | | | | LSB | +|-------|-------|---------------------|-------|-------------------|-------|-------|-------|-------| +| Octet | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | 0 | Frame type (7 bits) | | | | | | | +| 2 | 0 | 0 | 0 | ISF mode (5 bits) | | | | | + +**Frame type (FT) (7 bits):** Indicates the frame type setting of the codec used for the corresponding frame (the combination of AMR-WB+ core and stereo mode, the AMR-WB mode, or comfort noise, as specified by Table 25 above). + +**ISF index (5 bits):** Indicates the internal sampling frequency employed for the corresponding frame. The index values correspond to internal sampling frequency as specified in Table 24 above. This field SHALL be set to 0 for operation according to the AMR-WB+ modes defined in table 21 (frame types 0-13). + +For frame types according to FT 0-13 the ISF field shall be set 0 and has no meaning. The frame length for that operation is fixed to 20 ms in time. + +The audio data follows the header octets. The number of data octets per storage unit corresponding to frame types 10..13 and 16...47 are given as 4 times the number of octets per frame (right-most column in Table 25), for the other frame types, the number of octets are those corresponding to 1 frame only. + +It should be noticed that when FT <10, i.e. AMR-WB frames, the original AMR-WB storage format should be preferred in order to ensure backward decoding compatibility. + +### Example + +The following diagram (Table 27) shows a storage sample of AMR-WB+ using 14 kbit/s frame types (FT=26) with a superframe length of $4 \times 35 = 140$ octets. The internal sampling frequency in this example is 25.6 kHz (ISF mode = 8). FT 26 corresponds to mono mode 0 (208 bits/frame) and stereo mode 4 (72 bits/frame). + +The data octets are packetized according to the detailed bit allocation given in tables 14 to 20. The first bit of the AMR-WB+ data b0 is placed in bit 8 of octet 3. + +**Table 27: AMR-WB+ storage sample (superframe) for 14 kbit/s operation with ISF mode 8 (bit rate factor=1).** + +| Octet | MSB | | | | | | | LSB | +|----------|---------------------------------------|-------|-------|-------|-------|-------|-------|-------| +| | bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | +| 1 | FT = 26 | | | | | | | | +| | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | +| 2 | ISF = 8 | | | | | | | | +| | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | +| 3 | Frame 1 AMR-WB+ data (octet 1) | | | | | | | | +| | b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | +| 4..27 | Frame 1 AMR-WB+ data (octets 2 to 25) | | | | | | | | +| | b8 | ... | ... | ... | ... | ... | ... | ... | +| 28 | Frame 1 AMR-WB+ data (octet 26) | | | | | | | | +| | b200 | b201 | b202 | b203 | B204 | b205 | b206 | b207 | +| 29 | Frame 1 AMR-WB+ data (octet 27) | | | | | | | | +| | s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7 | +| 30..36 | Frame 1 AMR-WB+ data (octet 28 to 34) | | | | | | | | +| | s8 | ... | ... | ... | ... | ... | ... | ... | +| 37 | Frame 1 AMR-WB+ data (octet 35) | | | | | | | | +| | S64 | S65 | S66 | S67 | S68 | S69 | S70 | S71 | +| 38 | Frame 2 AMR-WB+ data (octet 1) | | | | | | | | +| | b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | +| 39..62 | Frame 2 AMR-WB+ data (octets 2 to 25) | | | | | | | | +| | b8 | ... | ... | ... | ... | ... | ... | ... | +| 63 | Frame 2 AMR-WB+ data (octet 26) | | | | | | | | +| | b200 | b201 | b202 | b203 | B204 | b205 | b206 | b207 | +| 64 | Frame 2 AMR-WB+ data (octet 27) | | | | | | | | +| | s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7 | +| 65..71 | Frame 2 AMR-WB+ data (octet 28 to 34) | | | | | | | | +| | s8 | ... | ... | ... | ... | ... | ... | ... | +| 72 | Frame 2 AMR-WB+ data (octet 35) | | | | | | | | +| | S64 | S65 | S66 | S67 | S68 | S69 | S70 | S71 | +| 73 | Frame 3 AMR-WB+ data (octet 1) | | | | | | | | +| | b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | +| 74..97 | Frame 3 AMR-WB+ data (octets 2 to 25) | | | | | | | | +| | b8 | ... | ... | ... | ... | ... | ... | ... | +| 98 | Frame 3 AMR-WB+ data (octet 26) | | | | | | | | +| | b200 | b201 | b202 | b203 | B204 | b205 | b206 | b207 | +| 99 | Frame 3 AMR-WB+ data (octet 27) | | | | | | | | +| | s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7 | +| 100..106 | Frame 3 AMR-WB+ data (octet 28 to 34) | | | | | | | | +| | s8 | ... | ... | ... | ... | ... | ... | ... | +| 107 | Frame 3 AMR-WB+ data (octet 35) | | | | | | | | +| | S64 | S65 | S66 | S67 | S68 | S69 | S70 | S71 | +| 108 | Frame 4 AMR-WB+ data (octet 1) | | | | | | | | +| | b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | +| 109..132 | Frame 4 AMR-WB+ data (octets 2 to 25) | | | | | | | | +| | b8 | ... | ... | ... | ... | ... | ... | ... | +| 133 | Frame 4 AMR-WB+ data (octet 26) | | | | | | | | +| | b200 | b201 | b202 | b203 | B204 | b205 | b206 | b207 | +| 134 | Frame 4 AMR-WB+ data (octet 27) | | | | | | | | +| | s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7 | +| 135..141 | Frame 4 AMR-WB+ data (octet 28 to 34) | | | | | | | | +| | s8 | ... | ... | ... | ... | ... | ... | ... | +| 142 | Frame 4 AMR-WB+ data (octet 35) | | | | | | | | +| | S64 | S65 | S66 | S67 | S68 | S69 | S70 | S71 | + +# Annex A (informative): Change history + +| Change history | | | | | | | | +|----------------|---------|-----------|------|-----|-------------------------------------------------------------------------------------------------------------------------------------|--------|--------| +| Date | TSG SA# | TSG Doc. | CR | Rev | Subject/Comment | Old | New | +| 2004-09 | 25 | SP-040639 | - | - | Approved at TSG SA#25 | 2.0.0 | 6.0.0 | +| 2004-12 | 26 | SP-040841 | 001 | | Correction of stereo bit allocation tables | 6.0.0 | 6.1.0 | +| 2004-12 | 26 | SP-040841 | 002 | | Correction of storage format for AMR-WB+ | 6.0.0 | 6.1.0 | +| 2004-12 | 26 | SP-040841 | 003 | 1 | Editorial changes | 6.0.0 | 6.1.0 | +| 2004-12 | 26 | SP-040841 | 004 | | Editorial changes. Note that in Tdoc S4-040722, this CR was meant to be CR 004 and not CR 012; a remark was put in the CR database. | 6.0.0 | 6.1.0 | +| 2005-03 | 27 | SP-050096 | 005 | 1 | Update for TCX coding mode selection table | 6.1.0 | 6.2.0 | +| 2005-06 | 28 | SP-050252 | 006 | | Correction of a value in Table 21 | 6.2.0 | 6.3.0 | +| 2007-03 | 35 | SP-070029 | 0007 | 1 | Reference to users guide | 6.3.0 | 7.0.0 | +| 2008-12 | 42 | | | | Version for Release 8 | 7.0.0 | 8.0.0 | +| 2009-09 | 45 | SP-090574 | 0008 | | Correction of references | 8.0.0 | 9.0.0 | +| 2011-03 | 51 | | | | Version for Release 10 | 9.0.0 | 10.0.0 | +| 2012-09 | 57 | | | | Version for Release 11 | 10.0.0 | 11.0.0 | \ No newline at end of file diff --git a/marked/Rel-11/26_series/26304/1a827b10290f33d4fec04d0e8ef7a897_img.jpg b/marked/Rel-11/26_series/26304/1a827b10290f33d4fec04d0e8ef7a897_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..15b917c4ca453c972635d2e6b75690eb81016f08 --- /dev/null +++ b/marked/Rel-11/26_series/26304/1a827b10290f33d4fec04d0e8ef7a897_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfb6010d26f3a681c6784c3f2da4a8809184af4f07b43856696d2b33b877cf8c +size 116906 diff --git a/marked/Rel-11/26_series/26304/27b06ec9f42b5d727a2630f61a5f1861_img.jpg b/marked/Rel-11/26_series/26304/27b06ec9f42b5d727a2630f61a5f1861_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a3396b09114ac4812e0af0e076c7c4a3dfa75fde --- /dev/null +++ b/marked/Rel-11/26_series/26304/27b06ec9f42b5d727a2630f61a5f1861_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4b295e8681338d3beec94d642fd955fa34ffeebae54de35ece0f13a03582ac6 +size 97117 diff --git a/marked/Rel-11/26_series/26304/7efae06af3af43ffe5d4b956a679cf54_img.jpg b/marked/Rel-11/26_series/26304/7efae06af3af43ffe5d4b956a679cf54_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..291f873324ef9e7cf5c11014312f2f6241d5fd36 --- /dev/null +++ b/marked/Rel-11/26_series/26304/7efae06af3af43ffe5d4b956a679cf54_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e444c87b171807b35a3d0492096fb43b63ce7460325d816ec76432b4a460e790 +size 111816 diff --git a/marked/Rel-11/26_series/26304/8fa679f79a1bb1f527cba9f29e784e89_img.jpg b/marked/Rel-11/26_series/26304/8fa679f79a1bb1f527cba9f29e784e89_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6fb860e690cce9f3275f073417d6566bb50613e6 --- /dev/null +++ b/marked/Rel-11/26_series/26304/8fa679f79a1bb1f527cba9f29e784e89_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47138cc40dfd480c03f8f5cf5cea119a363a790aad78ba03a1235b9398f3f732 +size 90101 diff --git a/marked/Rel-11/26_series/26304/b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg b/marked/Rel-11/26_series/26304/b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aa524cea9d720316a1942b15b6d43ce1d9824e8a --- /dev/null +++ b/marked/Rel-11/26_series/26304/b3baf3a29b67c7425d2562ddbc52f0cc_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc38d0584cfe75652afeca02a8c619842be82c6e6a409b68985d4ad9a32db474 +size 111058 diff --git a/marked/Rel-11/26_series/26304/d0abac95583b52a3b35f74a215567334_img.jpg b/marked/Rel-11/26_series/26304/d0abac95583b52a3b35f74a215567334_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b5e9b212c415465556f1970051bc0b7730fb897c --- /dev/null +++ b/marked/Rel-11/26_series/26304/d0abac95583b52a3b35f74a215567334_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52633bbea56388406c51c354743a05de6e97f58fe075cc42cadd58a1d974d38b +size 97542 diff --git a/marked/Rel-11/26_series/26304/e6df2733626a85205c1db682e6259c46_img.jpg b/marked/Rel-11/26_series/26304/e6df2733626a85205c1db682e6259c46_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a9a91a0ae52fb2b1976f94c6ae62e8d83cb81866 --- /dev/null +++ b/marked/Rel-11/26_series/26304/e6df2733626a85205c1db682e6259c46_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b547f5c119e4cc9bf9b90b7bcd26539daa51a5740aa00421ab69a0a3fa6ed565 +size 106154 diff --git a/marked/Rel-11/26_series/26304/f556082df0c46b714ad32cafd26dacd7_img.jpg b/marked/Rel-11/26_series/26304/f556082df0c46b714ad32cafd26dacd7_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b26dc6e9ac4f4f333fcb79f1ef0e0f3a665aba75 --- /dev/null +++ b/marked/Rel-11/26_series/26304/f556082df0c46b714ad32cafd26dacd7_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2e804d7f4e5bdd4901c2ceb48c61229a2d1d37bb44010309e1173bd8caa76ce +size 52225 diff --git a/marked/Rel-11/26_series/26304/ff0952ef692c9d960ce5f6708bcc9711_img.jpg b/marked/Rel-11/26_series/26304/ff0952ef692c9d960ce5f6708bcc9711_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fcf5a9289c023f1139a31148ee369099eac20ae3 --- /dev/null +++ b/marked/Rel-11/26_series/26304/ff0952ef692c9d960ce5f6708bcc9711_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25794f0cce896107b30cd994898496cd094d467b8dab0e48a038d915d98ed432 +size 125697 diff --git a/marked/Rel-11/26_series/26304/raw.md b/marked/Rel-11/26_series/26304/raw.md new file mode 100644 index 0000000000000000000000000000000000000000..d0d1693acb73dce517fe94253116d6f74df8f47f --- /dev/null +++ b/marked/Rel-11/26_series/26304/raw.md @@ -0,0 +1,989 @@ + + + + + + +# --- Contents + +| | | +|-------------------------------------------------------------------|-----------| +| Foreword ..... | 4 | +| 1 Scope..... | 5 | +| 2 References..... | 5 | +| 3 Definitions, symbols and abbreviations ..... | 5 | +| 3.1 Definitions..... | 5 | +| 3.2 Abbreviations ..... | 5 | +| 4 C code structure ..... | 6 | +| 4.1 Contents of the C source code..... | 6 | +| 4.2 Program execution..... | 6 | +| 4.3 Code hierarchy ..... | 6 | +| 4.4 Variables, constants and tables..... | 19 | +| 4.4.1 Description of fixed tables used in the C-code..... | 19 | +| 4.4.2 Static variables used in the C-code..... | 20 | +| 5 File formats ..... | 24 | +| 5.1 Audio file (encoder input/decoder output) ..... | 24 | +| 5.2 Parameter bitstream file (encoder output/decoder input) ..... | 25 | +| Annex A (informative): AMR-WB+ user guide ..... | 26 | +| A.1 Encoder usage ..... | 26 | +| A.1.1 Simple mode..... | 26 | +| A.1.2 Flexible mode..... | 27 | +| A.2 Decoder usage ..... | 31 | +| Annex B (informative): Change history..... | 32 | + +# --- Foreword + +This Technical Specification has been produced by the 3rd Generation Partnership Project (3GPP). + +The contents of the present document are subject to continuing work within the TSG and may change following formal TSG approval. Should the TSG modify the contents of the present document, it will be re-released by the TSG with an identifying change of release date and an increase in version number as follows: + +Version x.y.z + +where: + +- x the first digit: + - 1 presented to TSG for information; + - 2 presented to TSG for approval; + - 3 or greater indicates TSG approved document under change control. +- y the second digit is incremented for all changes of substance, i.e. technical enhancements, corrections, updates, etc. +- z the third digit is incremented when editorial only changes have been incorporated in the document. + +# --- 1 Scope + +The present document contains an electronic copy of the ANSI-C code for the Floating-point Extended Adaptive Multi-Rate Wideband codec. Alternatively, fixed-point ANSI-C code is specified in 3GPP TS 26.273 [1]. The floating-point codec/encoder/decoder specified in this document or the fixed-point codec/encoder/decoder specified in [1] may be used depending on if the implementation platform is better suited for a floating-point or a fixed-point implementation. It has been verified that the fixed-point and floating-point codecs interoperate with each other without any artifacts. + +The floating-point ANSI-C code in the present document defines, besides the fixed-point c-code specified in [1], one valid reference implementation of the Extended Adaptive Multi-Rate Wideband transcoder (3GPP TS 26.290 [2]). Standard conformance is enforced by meeting the conformance criteria defined in [3]. + +# --- 2 References + +The following documents contain provisions which, through reference in this text, constitute provisions of the present document. + +- References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific. + - For a specific reference, subsequent revisions do not apply. + - For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document *in the same Release as the present document*. +- [1] 3GPP TS 26.273: "ANSI-C code for the Fixed-point Extended AMR Wideband codec". +- [2] 3GPP TS 26.290: " Audio codec processing functions; Extended AMR Wideband codec; Transcoding functions ". +- [3] 3GPP TS 26.274: " Audio codec processing functions; Extended Adaptive Multi-Rate - Wideband (AMR-WB+) codec; Conformance testing ". +- [4] 3GPP TS 26.244: "Transparent end-to-end packet switched streaming service (PSS); 3GPP file format (3GP)" + +# --- 3 Definitions, symbols and abbreviations + +## 3.1 Definitions + +For the purposes of the present document, the terms and definitions are given in TS 26.290 [2]. + +## 3.2 Abbreviations + +For the purposes of the present document, the following abbreviations apply: + +| | | +|---------|-----------------------------------------| +| AMR-WB+ | Extended Adaptive Multi-Rate WideBand | +| ANSI | American National Standards Institute | +| GSM | Global System for Mobile communications | +| I/O | Input/Output | +| RAM | Random Access Memory | +| ROM | Read Only Memory | + +# --- 4 C code structure + +This clause gives an overview of the structure of the C code and provides an overview of the contents and organization of the C code attached to the present document. + +The C code has been verified on the following systems: + +- IBM PC/AT compatible computers with Windows 2000 SP4 and Microsoft Visual C++ v.6.0 compiler. + +ANSI-C was selected as the programming language because portability was desirable. + +## 4.1 Contents of the C source code + +The C code distribution has the files divided in five different directories, all present in the directory *c-code*. The directories are: *common*, *decoder*, *encoder*, *lib\_amr* and *include*. The distributed files with suffix "c" contain the source code and the files with suffix "h" are the header files. + +Project and workspace files are provided in the directory *MSVC*. + +## 4.2 Program execution + +The Extended Adaptive Multi-Rate Wideband codec is implemented in two programs: + +- (*encoder*) audio encoder; +- (*decoder*) audio decoder. + +The programs should be called like: + +- encoder [encoder options] -if