pub fn byte_size_from_pitch_and_height(self, pitch: usize, height: usize) -> usize {
        match self {
            PixelFormatEnum::YV12 | PixelFormatEnum::IYUV => {
                // YUV is 4:2:0.
                // `pitch` is the width of the Y component, and
                // `height` is the height of the Y component.
                // U and V have half the width and height of Y.
                pitch * height + 2 * (pitch / 2 * height / 2)
            }
            _ => pitch * height,
        }
    }
/// Calculates the total byte size of an image buffer, given its pitch
/// and height.
Calculates the total byte size of an image buffer, given its pitch
and height.
Calculates the total byte size of an image buffer given its pitch and height .
pub fn byte_size_from_pitch_and_height(self, pitch: usize, height: usize) -> usize {
        match self {
            PixelFormatEnum::YV12 | PixelFormatEnum::IYUV => {
                // YUV is 4:2:0.
                // `pitch` is the width of the Y component, and
                // `height` is the height of the Y component.
                // U and V have half the width and height of Y.
                pitch * height + 2 * (pitch / 2 * height / 2)
            }
            _ => pitch * height,
        }
    }
pub fn byte_size_from_pitch_and_height ( self , pitch : usize , height : usize ) -> usize { match self { PixelFormatEnum :: YV12 | PixelFormatEnum :: IYUV => { // YUV is 4:2:0. // `pitch` is the width of the Y component, and // `height` is the height of the Y component. // U and V have half the width and height of Y. pitch * height + 2 * ( pitch / 2 * height / 2 ) } _ => pitch * height , } }
Calculates the total byte size of an image buffer, given its pitch
and height.
Calculates the total byte size of an image buffer given its pitch and height .
self
pitch
usize
height
usize
self
pitch
usize
height
usize