diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-07-03 18:05:11 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-07-03 18:05:11 +0200 |
commit | 64e8b9711a54641d4155d01f095053233c79a9bf (patch) | |
tree | bf2ab3bf36f2254380ac633ee3c83e317ab67daa /nihav-core/src/codecs/mod.rs | |
parent | 23eeced96736873d96bcdab904cd21244643ed99 (diff) | |
download | nihav-64e8b9711a54641d4155d01f095053233c79a9bf.tar.gz |
move zigzag scan to common place
Diffstat (limited to 'nihav-core/src/codecs/mod.rs')
-rw-r--r-- | nihav-core/src/codecs/mod.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 6cc8880..ee6f5cd 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -293,3 +293,14 @@ impl RegisteredDecoders { self.decs.iter() } } + +pub const ZIGZAG: [usize; 64] = [ + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63 +]; |