Fix buffer size calculations for multi-component data
The buffer size calculation functions do not take the channel as an argument so they assume scalar data.
The buffer size calculation functions do not take the channel as an argument so they assume scalar data.