projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
h264: more micro-optimisations
[nihav.git]
/
nihav-itu
/
src
/
codecs
/
h264
/
types.rs
diff --git
a/nihav-itu/src/codecs/h264/types.rs
b/nihav-itu/src/codecs/h264/types.rs
index 1310daaa9ddc022259ae165cf5e5cb1bfb144fd9..4bcdb4943547318d09df4c858f7412fa7aedd080 100644
(file)
--- a/
nihav-itu/src/codecs/h264/types.rs
+++ b/
nihav-itu/src/codecs/h264/types.rs
@@
-383,8
+383,9
@@
pub struct MBData {
}
pub fn blk4_to_blk8(blk4: usize) -> usize {
}
pub fn blk4_to_blk8(blk4: usize) -> usize {
- const MAP: [usize; 16] = [ 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3 ];
- MAP[blk4 & 0xF]
+ /*const MAP: [usize; 16] = [ 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3 ];
+ MAP[blk4 & 0xF]*/
+ ((blk4 & 2) >> 1) | ((blk4 & 8) >> 2)
}
#[derive(Clone,Copy)]
}
#[derive(Clone,Copy)]