NvBufSurface attributes don't add up

I am reading the buffer of a frame of a nvarguscamerasrc into an NvBufSurface in order to work with it, but I cannot explain some of the values that are set in the object attributes.
The are the attributes I read from the object

Batch Size: 1
Num Filled: 1
Is contiguous: 0
Mem type: 4
Buffer descriptor 1063
Width: 3264, Height: 2464
Data size: 12451840
Color format: 6 (NV12)
Number of planes: 2
Width plane 0: 3264, Height plane 0: 2464
Width plane 1: 1632, Height plane 1: 1232
Byte per pixel plane 0: 1, Byte per pixel plane 1: 2
pitch plane 0: 3328 bytes, pitch plane 1 : 3328 bytes
offset plane 0 (Y): 0 bytes, offset plane 1 (UV): 8257536 bytes
size plane 0 (Y): 8257536, size plane 1 (UV): 4194304

How is the size of the planes calculated?
For plane 0 (Y) with one byte per pixel I would have calculated it with:

size = Width * pitch + Height = 3264 * 3328 + 2464 = 10865056

Which is neither the size of plane 0 nor the total size.

Where does the pitch come into play?
How is total size and plane size calculated?

Hi,
There is constraint in data alignment. Please refer to this post:
Memory for NvMap - #10 by DaneLLL

Hi,
Yes I understand that the DMA memory buffer is constrained in that regard. The size of my plane 0 is 8257536 bytes and with a pitch of every row of 3328 bytes I would expect to be the size of plane 0 to be

pitch * number_of_columns = 3328*2464 = 8200192 bytes

But it isn’t. Where are the extra bytes coming from? If I wanted to iterate over every byte of my buffer, how would I do that?

@elhe
Each plane aligns to 128K(131072 bytes)
8200192/131072=62.5625
63*131072=8257536

Ah very good thanks.