# stream interlace and deinterlace

Interlace is the method to create a new data stream from two data streams, each of which has a constant time interval sequence. Formally, suppose $A=(a,\Delta_{a})$ and $B=(b,\Delta_{b})$ are two data streams, each have a constant time sequence. For convenience, we use $\Delta_{a}$ and $\Delta_{b}$ to also denote the constant terms of each of those sequences. We construct a new data stream $C=(c,\Delta_{c})$, also having constant time interval, as follows:

$c_{n}=\left\{\begin{array}[]{cc}b_{n-\left\lfloor nz\right\rfloor}&\left% \lfloor nz\right\rfloor=\left\lfloor\left(n+1\right)z\right\rfloor\\ a_{\left\lfloor nz\right\rfloor}&\left\lfloor nz\right\rfloor\neq\left\lfloor% \left(n+1\right)z\right\rfloor\end{array}\right.,z=\frac{\Delta_{b}}{\Delta_{a% }+\Delta_{b}},\Delta_{c}=\frac{\Delta_{a}\Delta_{b}}{\Delta_{a}+\Delta_{b}}$

Deinterlace is the method of constructing two data streams , $A$ and $B$, each having constant time interval, from a given data stream $C$ and primary interlace value $\Delta$ of computed stream, where $C$ has constant time interval.

$a_{n}=c_{n+\left\lceil\frac{(n+1)\Delta_{a}}{\Delta_{b}}\right\rceil}\ ,\ % \Delta_{a}=\frac{\Delta_{c}\Delta_{b}}{\left|\Delta_{c}-\Delta_{b}\right|}$ and $b_{n}=c_{n+\left\lfloor\frac{n\Delta_{b}}{\Delta_{a}}\right\rfloor},\ \Delta_{% b}=\frac{\Delta_{c}\Delta_{a}}{\left|\Delta_{c}-\Delta_{a}\right|}$

This sequences are the Fraenkel partition theorem instance.

References

[1

] Aviezri S. Fraenkel, The bracket function and complementary sets of integers, Canad. J. Math. 21 (1969), 6–27. http://www.ams.org/mathscinet-getitem?mr=38:3214MR 38:3214

[2

] Michal Widera, Deterministic method of data sequence processing, Vol. IV, ISSN 1732-1360, Annales UMCS (2006), 314–331. http://www.annales.umcs.lublin.pl/AI/index.htmlUMCS Annales AI

Title stream interlace and deinterlace StreamInterlaceAndDeinterlace 2013-03-22 15:37:08 2013-03-22 15:37:08 michal (7107) michal (7107) 16 michal (7107) Theorem msc 11B83 interlace deinterlace FraenkelsPartitionTheorem BeattySequence DataStream stream junction method