@@ -22,11 +22,24 @@ const CODE_NUM_TO_INTRA_CODED_BLOCK_PATTERN: [u8; 48] = [
2222 35 , 37 , 42 , 44 , 1 , 2 , 4 , 8 , 17 , 18 , 20 , 24 , 6 , 9 , 22 , 25 , 32 , 33 , 34 , 36 , 40 , 38 , 41 ,
2323] ;
2424
25+ const CODE_NUM_TO_INTER_CODED_BLOCK_PATTERN : [ u8 ; 48 ] = [
26+ 0 , 16 , 1 , 2 , 4 , 8 , 32 , 3 , 5 , 10 , 12 , 15 , 47 , 7 , 11 , 13 , 14 , 6 , 9 , 31 , 35 , 37 , 42 , 44 , 33 , 34 ,
27+ 36 , 40 , 39 , 43 , 45 , 46 , 17 , 18 , 20 , 24 , 19 , 21 , 26 , 28 , 23 , 27 , 29 , 30 , 22 , 25 , 38 , 41 ,
28+ ] ;
29+
2530#[ inline]
2631pub fn code_num_to_intra_coded_block_pattern ( x : u8 ) -> Option < CodedBlockPattern > {
2732 let result =
2833 CODE_NUM_TO_INTRA_CODED_BLOCK_PATTERN . get ( x as usize ) . map ( |x| CodedBlockPattern ( * x) ) ;
29- trace ! ( "coded_block_pattern num: {} pattern: {:?}" , x, result) ;
34+ trace ! ( "intra coded_block_pattern num: {} pattern: {:?}" , x, result) ;
35+ result
36+ }
37+
38+ #[ inline]
39+ pub fn code_num_to_inter_coded_block_pattern ( x : u8 ) -> Option < CodedBlockPattern > {
40+ let result =
41+ CODE_NUM_TO_INTER_CODED_BLOCK_PATTERN . get ( x as usize ) . map ( |x| CodedBlockPattern ( * x) ) ;
42+ trace ! ( "inter coded_block_pattern num: {} pattern: {:?}" , x, result) ;
3043 result
3144}
3245
0 commit comments