## 3 ALF Decoder
### Details of the ALF Decoder  
Algorithm 1 describes the details of our ALF decoder. \(T\) refers to the maximum of extra decoding attempts with the list flip operation. \(L_{max}\) represents the maximum list size. \(L_{cur}\) is the current list size. \(\mathcal{S}=\{S_{1},S_{2},\ldots,S_{T}\}\) refers to the list of flip sets. Its subset \(S_{i}\) is a flip set that records all flip indices for the \(t\)th additional decoding attempt. It is worth noting that \(S_{0}\) is not a subset of \(\mathcal{S}\), and \(S_{0}=\emptyset\). \(\mathcal{M}=\{M_{\beta}^{line}(S_{1}),M_{\beta}^{line}(S_{2}),\ldots,M_{\beta }^{line}(S_{T})\}\) is the list of flip metric values that satisfies \(M_{\beta}^{line}(S_{1})<M_{\beta}^{line}(S_{2})<\ldots<M_{\beta}^{line}(S_{T})\). The initial \(\mathcal{S}\) and \(\mathcal{M}\) are both \([0]_{1\times T}\). \(\mathbf{SCLDecoding}(\)S\(,L_{cur})\) denotes a standard CA-SCL decoding with a list of size \(L_{cur}\) during which the flip operation will be performed at the bit indices given in this set \(S_{t}\). In particular, \(\mathbf{SCLDecoding}(\emptyset\), \(L_{cur})\) denotes a standard CA-SCL decoding without the flip operation. The flip operation refers to the current \(\mid_{best}^{(i)}\) consisting of \(L\) paths with bigger \(PM\) from \(\mid^{(i)}\). \(\hat{u}_{1}^{N}\) is the estimated sequence of \(u_{1}^{N}\). When \(L_{cur}<L_{max}\), \(\mathbf{SCLDecoding}(\emptyset\), \(L_{cur})\) is performed to obtain \(\hat{u}_{1}^{N}\). If the \(\hat{u}_{1}^{N}\) passes CRC, ALF decoding is terminated and outputs the current \(\hat{u}_{1}^{N}\). If not, \(L_{cur}\) is updated to \(2\times L_{cur}\) and the ALF decoding continues. When \(L_{cur}=L_{max}\), \(\mathbf{SCLDecoding}(S_{t}\), \(L_{max})\) is performed to obtain \(\hat{u}_{1}^{N}\). If the \(\hat{u}_{1}^{N}\) passes CRC, the ALF decoding is terminated and outputs the current \(\hat{u}_{1}^{N}\). If not, (\(\mathcal{S}\), \(\mathcal{M}\)) is updated by performing the \(\mathbf{UpdateFlipList}(\cdot)\) function, \(t\) is updated to \(t+1\), and the ALF decoding continues. ```
Input:\(T\), \(L_{max}\) Output:\(\hat{u}_{1}^{N}\) \((\mathcal{S},\mathcal{M})\leftarrow([0]_{1\times T},[0]_{1\times T})\) ; for\(j\gets 0\) to \(log_{2}L_{max}\)do \(L_{cur}\gets 2\); if\(L_{cur}<L_{max}\)then \(\hat{u}_{1}^{N}\leftarrow\mathbf{SCLDecoding}(\emptyset\), \(L_{cur})\); else for\(t\gets 0\) to \(T\)do \(\hat{u}_{1}^{N}\leftarrow\mathbf{SCLDecoding}(S_{t}\), \(L_{max})\); if\(\hat{u}_{1}^{N}\) passes CRCthen  break; else \((\mathcal{S},\mathcal{M})\leftarrow\mathbf{UpdateFlipList}(\mathcal{S}, \mathcal{M},t,T,N,L_{max})\); if\(\hat{u}_{1}^{N}\) passes CRCthen  break; return\(\hat{u}_{1}^{N}\)
```  
**Algorithm 1**ALF decoder  
Algorithm 2 describes the update process of \((\mathcal{S},\mathcal{M})\). If \(t=0\), \(\mathcal{S}\) will consist of \(T\) indexes of non-frozen bits with smaller \(M_{\beta}^{line}\), and these non-frozen bits are in \(\{\mathcal{A}\setminus\mathcal{A}^{\prime}\}\). After \(\mathcal{S}\) is updated, \(\mathcal{M}\) will store the flip metrics corresponding to the flip sets in \(\mathcal{S}\), which satisfies \(\mathcal{M}=\{M_{\beta}^{line}(S_{1}),M_{\beta}^{line}(S_{2}),\ldots,M_{\beta }^{line}(S_{T})\}\), and \(M_{\beta}^{line}(S_{1})<M_{\beta}^{line}(S_{2})<\ldots<M_{\beta}^{line}(S_{T})\). It is worth noting that \(S_{t}\) refers to the \(t\)th element in \(\mathcal{S}\). If \(0<t<T\), \(\mathcal{S}\) will be updated by inserting new flip sets \(\{S_{t}\cup\{j\}\}\) when \(j>i_{t}\), \(j\in\{\mathcal{A}\setminus\mathcal{A}^{\prime}\}\), \(M_{\beta}^{line}(S_{t}\cup\{j\})<M_{\beta}^{line}(S_{T})\). After \(\mathcal{S}\) is updated, \(\mathcal{M}\) will store the new flip metrics corresponding to the updated \(\mathcal{S}\), which satisfies \(\mathcal{M}=\{\ldots,M_{\beta}^{line}(S_{t}),\ldots,M_{\beta}^{line}(S_{t} \cup\{j\}),\ldots,M_{\beta}^{line}(S_{T-1})\}\), and \(M_{\beta}^{line}(S_{1})<\ldots<M_{\beta}^{line}(S_{t})<\ldots<M_{\beta}^{line}(S_ {t}\cup\{j\})<\ldots<M_{\beta}^{line}(S_{T-1})\).