aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-core/src/codecs/mod.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2019-07-03 18:05:11 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2019-07-03 18:05:11 +0200
commit64e8b9711a54641d4155d01f095053233c79a9bf (patch)
treebf2ab3bf36f2254380ac633ee3c83e317ab67daa /nihav-core/src/codecs/mod.rs
parent23eeced96736873d96bcdab904cd21244643ed99 (diff)
downloadnihav-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.rs11
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
+];