1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

describe IDWT

Originally committed as revision 10174 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-08-21 19:22:59 +00:00
parent 5ab657079d
commit 09671ce718

View File

@ -246,11 +246,65 @@ Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integer
transform and a integer approximation of the symmetric biorthogonal 9/7 transform and a integer approximation of the symmetric biorthogonal 9/7
daubechies wavelet. daubechies wavelet.
5/3 Integer IDWT: 2D IDWT (inverse discrete wavelet transform)
FIXME --------------------------------------------
The 2D IDWT applies a 2D filter recursively, each time combining the
4 lowest frequency subbands into a single subband until only 1 subband
remains.
The 2D filter is done by first applying a 1D filter in the vertical direction
and then applying it in the horizontal one.
--------------- --------------- --------------- ---------------
|LL0|HL0| | | | | | | | | | | |
|---+---| HL1 | | L0|H0 | HL1 | | LL0 | HL1 | | | |
|LH0|HH0| | | | | | | | | | | |
|-------+-------|->|-------+-------|->|-------+-------|->| L1 | H1 |->...
| | | | | | | | | | | |
| LH1 | HH1 | | LH1 | HH1 | | LH1 | HH1 | | | |
| | | | | | | | | | | |
--------------- --------------- --------------- ---------------
1D Filter:
----------
1. interleave the samples of the low and high frequency subbands like
s={L0, H0, L1, H1, L2, H2, L3, H3, ... }
note, this can end with a L or a H, the number of elements shall be w
s[-1] shall be considered equivalent to s[1 ]
s[w ] shall be considered equivalent to s[w-2]
2. perform the lifting steps in order as described below
5/3 Integer filter:
1. s[i] -= (s[i-1] + s[i+1] + 2)>>2; for all even i < w
2. s[i] += (s[i-1] + s[i+1] )>>1; for all odd i < w
\ | /|\ | /|\ | /|\ | /|\
\|/ | \|/ | \|/ | \|/ |
+ | + | + | + | -1/4
/|\ | /|\ | /|\ | /|\ |
/ | \|/ | \|/ | \|/ | \|/
| + | + | + | + +1/2
snows 9/7 Integer filter:
1. s[i] -= (3*(s[i-1] + s[i+1]) + 4)>>3; for all even i < w
2. s[i] -= s[i-1] + s[i+1] ; for all odd i < w
3. s[i] += ( s[i-1] + s[i+1] + 4*s[i] + 8)>>4; for all even i < w
4. s[i] += (3*(s[i-1] + s[i+1]) )>>1; for all odd i < w
\ | /|\ | /|\ | /|\ | /|\
\|/ | \|/ | \|/ | \|/ |
+ | + | + | + | -3/8
/|\ | /|\ | /|\ | /|\ |
/ | \|/ | \|/ | \|/ | \|/
(| + (| + (| + (| + -1
\ + /|\ + /|\ + /|\ + /|\ +1/4
\|/ | \|/ | \|/ | \|/ |
+ | + | + | + | +1/16
/|\ | /|\ | /|\ | /|\ |
/ | \|/ | \|/ | \|/ | \|/
| + | + | + | + +3/2
snows 9/7 Integer IDWT:
FIXME
TODO: TODO:
===== =====