File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ impl PixelBufferLockGuard<'_> {
159159 }
160160
161161 /// Get the number of planes in the pixel buffer
162- ///
162+ ///
163163 /// Returns 0 for non-planar formats (e.g., BGRA).
164164 /// Returns 2 for bi-planar formats like NV12 (`YCbCr_420v`).
165165 pub fn plane_count ( & self ) -> usize {
@@ -179,7 +179,10 @@ impl PixelBufferLockGuard<'_> {
179179 /// Get the base address of a specific plane
180180 pub fn base_address_of_plane ( & self , plane_index : usize ) -> Option < * const u8 > {
181181 unsafe {
182- let ptr = crate :: cm:: ffi:: cv_pixel_buffer_get_base_address_of_plane ( self . buffer_ptr , plane_index) ;
182+ let ptr = crate :: cm:: ffi:: cv_pixel_buffer_get_base_address_of_plane (
183+ self . buffer_ptr ,
184+ plane_index,
185+ ) ;
183186 if ptr. is_null ( ) {
184187 None
185188 } else {
@@ -190,7 +193,9 @@ impl PixelBufferLockGuard<'_> {
190193
191194 /// Get the bytes per row of a specific plane
192195 pub fn bytes_per_row_of_plane ( & self , plane_index : usize ) -> usize {
193- unsafe { crate :: cm:: ffi:: cv_pixel_buffer_get_bytes_per_row_of_plane ( self . buffer_ptr , plane_index) }
196+ unsafe {
197+ crate :: cm:: ffi:: cv_pixel_buffer_get_bytes_per_row_of_plane ( self . buffer_ptr , plane_index)
198+ }
194199 }
195200
196201 /// Get raw pointer to buffer data
You can’t perform that action at this time.
0 commit comments