You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize readNativeFrame performance via chunked I/O reads
- Reduced I/O overhead by implementing a 4KB chunk buffer instead of per-sample reads.
- Flattened nested pixel/sample loops into a contiguous index space processing.
- Eliminated boxing/unboxing and reflection overhead by moving from dynamically typed `any(...).(I)` to generic numeric conversion `I(bo.Uint...)`.
- Ensured unsupported BitsAllocated constraints (<8 or not a multiple of 8) exit cleanly before divisions.
Co-authored-by: suyashkumar <6299853+suyashkumar@users.noreply.github.com>
return frame.Frame{}, bytesToRead, fmt.Errorf("internal error - readNativeFrame unexpectedly unable to type cast pixel buffer data to the I type (%T), where bitsAllocated=%v", *new(I), bitsAllocated)
return frame.Frame{}, bytesToRead, fmt.Errorf("internal error - readNativeFrame unexpectedly unable to type cast pixel buffer data to the I type (%T), where bitsAllocated=%v", *new(I), bitsAllocated)
return frame.Frame{}, bytesToRead, fmt.Errorf("internal error - readNativeFrame unexpectedly unable to type cast pixel buffer data to the I type (%T), where bitsAllocated=%v", *new(I), bitsAllocated)
0 commit comments