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 | |
parent | 23eeced96736873d96bcdab904cd21244643ed99 (diff) | |
download | nihav-64e8b9711a54641d4155d01f095053233c79a9bf.tar.gz |
move zigzag scan to common place
Diffstat (limited to 'nihav-core/src')
-rw-r--r-- | nihav-core/src/codecs/h263/data.rs | 11 | ||||
-rw-r--r-- | nihav-core/src/codecs/mod.rs | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/nihav-core/src/codecs/h263/data.rs b/nihav-core/src/codecs/h263/data.rs index 4f6a705..de827d4 100644 --- a/nihav-core/src/codecs/h263/data.rs +++ b/nihav-core/src/codecs/h263/data.rs @@ -8,17 +8,6 @@ pub const H263_SCALES: &[u8] = &[ pub const H263_DC_SCALES: &[u8] = &[ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62 ]; -pub const H263_ZIGZAG: &[usize] = &[ - 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 -]; - pub const H263_SCAN_H: &[usize] = &[ 0, 1, 2, 3, 8, 9, 16, 17, 10, 11, 4, 5, 6, 7, 15, 14, 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 +]; |