format/pixel: add Descriptor::nb_components()

This commit is contained in:
Ivan Molodetskikh 2017-06-20 23:18:28 +03:00 committed by meh
parent a5a112713c
commit 1095c8842e

View File

@ -312,6 +312,12 @@ impl Descriptor {
self.ptr self.ptr
} }
pub fn nb_components(self) -> u8 {
unsafe {
(*self.as_ptr()).nb_components
}
}
pub fn log2_chroma_h(self) -> u8 { pub fn log2_chroma_h(self) -> u8 {
unsafe { unsafe {
(*self.as_ptr()).log2_chroma_h (*self.as_ptr()).log2_chroma_h