File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ impl EncoderConfig {
186
186
187
187
/// Is temporal RDO enabled ?
188
188
#[ inline]
189
- pub fn temporal_rdo ( & self ) -> bool {
189
+ pub const fn temporal_rdo ( & self ) -> bool {
190
190
// Note: This function is called frequently, unlike most other functions here.
191
191
192
192
// `compute_distortion_scale` computes a scaling factor for the distortion
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ declare_asm_dist_fn![
59
59
const DIST_FNS_LENGTH : usize = 32 ;
60
60
61
61
#[ inline]
62
- fn to_index ( bsize : BlockSize ) -> usize {
62
+ const fn to_index ( bsize : BlockSize ) -> usize {
63
63
bsize as usize & ( DIST_FNS_LENGTH - 1 )
64
64
}
65
65
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ declare_asm_dist_fn![
113
113
const DIST_FNS_LENGTH : usize = 32 ;
114
114
115
115
#[ inline]
116
- fn to_index ( bsize : BlockSize ) -> usize {
116
+ const fn to_index ( bsize : BlockSize ) -> usize {
117
117
bsize as usize & ( DIST_FNS_LENGTH - 1 )
118
118
}
119
119
Original file line number Diff line number Diff line change @@ -65,13 +65,13 @@ struct I32X8 {
65
65
impl I32X8 {
66
66
#[ target_feature( enable = "avx2" ) ]
67
67
#[ inline]
68
- unsafe fn vec ( self ) -> __m256i {
68
+ const unsafe fn vec ( self ) -> __m256i {
69
69
self . data
70
70
}
71
71
72
72
#[ target_feature( enable = "avx2" ) ]
73
73
#[ inline]
74
- unsafe fn new ( a : __m256i ) -> I32X8 {
74
+ const unsafe fn new ( a : __m256i ) -> I32X8 {
75
75
I32X8 { data : a }
76
76
}
77
77
}
Original file line number Diff line number Diff line change @@ -558,7 +558,7 @@ impl From<DistortionScale> for f64 {
558
558
559
559
impl RawDistortion {
560
560
#[ inline]
561
- pub fn new ( dist : u64 ) -> Self {
561
+ pub const fn new ( dist : u64 ) -> Self {
562
562
Self ( dist)
563
563
}
564
564
}
You can’t perform that action at this time.
0 commit comments