Advertisement
Guest User

Untitled

a guest
May 8th, 2014
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. [18:33:02] <michaelni> decoding works like this: for each 8x8 block
  2. [18:33:18] <michaelni> 1. figure out the prediction direction and dc prediction value
  3. [18:33:28] <michaelni> decode the VLC for the DC coeff
  4. [18:33:44] <michaelni> add it with the predictor to get the first coefficient
  5. [18:34:24] <michaelni> then decode the up to 63 run/level pairs
  6. [18:35:16] <michaelni> theres some escaping cases for the VLC codes but we can ignore these and just imagine each run/level pair is a single VLC code
  7. [18:36:14] <michaelni> so for example the run level pairs (0,3), (5,7) would result in 3,0,0,0,0,0,7
  8. [18:37:04] <michaelni> and that list of level values is than stored into a 8x8 array in a zigzag (or some other) order
  9. [18:37:13] <michaelni> at the 0,0 position is the DC value
  10. [18:37:50] <michaelni> then, if enabled the top row or left colunm gets the AC predicted coeffs added
  11. [18:38:40] <michaelni> then all are multiplied with the quantizatinon factor (not exact so but the rounding details are irrelevant for us here)
  12. [18:38:47] <michaelni> and then it goes in the IDCT
  13. [18:39:03] <michaelni> now i skiped over how the end of the up to 63 coeffs is detected
  14. [18:39:30] <michaelni> each VLC value doesnt just store the run and level but also if its the last VLC for a block
  15. [18:39:57] <michaelni> above is from memory, i hope ive not forgotten something :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement