# Video over DSL with LDGM Codes for Interactive Applications
## 3 Methodology
### Extending LDGM for \"Bursty\" Channels  
LDGM codes are randomly generated and are not normally modified (except for minor optimizations such as removal of cycles of four) to improve their recovery capability for a particular transmission channel type. However, if an estimate of that recovery capability could be made then the parity-check matrix \(H\) could be modified to improve the protection for \"bursty\" channel conditions. Error bursts are common in wireless channels due to time-varying fading as the mobile user changes location. Fast fading owing to destructive interference from multipath propagation can cause short error bursts. Longer bursts can occur owing to slow fading, when the user moves into a different environment, for example, where there is shadowing from a building. Compressed video streaming is known [27] to be more susceptible to error bursts than it is to isolated errors. The improvement to the layout of \(H\) occurs without changing its defining parameters introduced in Section, namely \(k\), \(n\), \(w_{c}\) and \(w_{r}\). For low values of the Packet Error Rate (PER), it is reasonable to assume [24] that only one error burst occurs per block of \(k\) packets. Then for each column \(j\) in \(H\) assess all bursts starting at the packet in column \(j\) and extending by a range from 2 to \(n-k\). The assessment determines whether the packets lost in the error burst can be recovered by application of the FEC. The column-based recovery estimate (CRE) for any column \(j\) is, thus, found as:  
\[CRE\left(j\right)=\sum\
olimits_{l=2}^{max(n-k,n-j)}FEC(B_{j}^{l}) \tag{8}\]  
where \(B_{j}^{l}\) is a burst of length \(l\in(2,\,n-k)\) starting at packet \(j\). \(FEC(. )\) is an indicator function taking the value 1 if the lost packets can be recovered by the LDGM code and 0 if not. Across all of \(H\), the global recovery estimate (GRE) capability is then given by:  
\[GRE\left(H\right)=\sum\
olimits_{j=0}^{k-1}CRE(j) \tag{9}\]  
An algorithm to improve the LDGM matrix \(H\) is detailed in [28]. In this paper we informally outline the algorithm and compare error recovery with the improved LDGM matrix against original LDGM. The performance comparison can be found in Section 4. The algorithm in a first phase works by re-arranging the entries of the columns \(j,j+1,\ldots,j+(l-1)\), where \(j=\arg\min(CRE(\cdot)\), that is column \(j\) for which \(CRE(\cdot)\) is at a minimum across the columns of \(H\). For example, if the burst length were assumed to be four, it would attempt to re-arrange the entries within the columns \(j,\ldots,j+3\). The rows of this sub-set of columns form a sub-matrix of \(H\). Within each row of the sub-matrix, any row with only one \"1\" entry can be repaired, assuming no other burst affected the columns of \(H\). Now search for rows within the sub-matrix with just two \"1s\". Figure 3: Example of a packetized protection scheme based on LDGM codes. These rows cannot be repaired, because two of the corresponding packets have been lost in the burst. However, if one of the \"1s\" is removed and placed in another row, that row can now be repaired. The most suitable row to move the \"1\" to is a row with all zero entries. This is because, by adding a \"1\" to that row of the sub-matrix, the \"1\" is placed in a position where it can be repaired. However, by moving a \"1\" from one row to another \(H\) is no longer regular and does not have the benefit of fixed block sizes. Therefore, in the second and final phase of the algorithm, if within the sub-matrix a \"1\" has been moved from a row to another where there was previously a \"0\", the reverse swap takes place at some place within \(H\) outside the sub-matrix. In that way, the constraint of equation (8) is kept. A suitable place to perform this operation is within the sub-matrix formed from columns \(h\) to \(h+l\), where \(h=\arg\max(CRE(\cdot))\), that is the column \(h\) for which \(CRE(\cdot)\) is at a maximum across the columns of \(H\).