format/pixel: add Descriptor::nb_components()
This commit is contained in:
parent
a5a112713c
commit
1095c8842e
@ -312,6 +312,12 @@ impl Descriptor {
|
||||
self.ptr
|
||||
}
|
||||
|
||||
pub fn nb_components(self) -> u8 {
|
||||
unsafe {
|
||||
(*self.as_ptr()).nb_components
|
||||
}
|
||||
}
|
||||
|
||||
pub fn log2_chroma_h(self) -> u8 {
|
||||
unsafe {
|
||||
(*self.as_ptr()).log2_chroma_h
|
||||
|
Loading…
x
Reference in New Issue
Block a user