-5
size.total = size.width * size.height;
y = yuv[position.y * size.width + position.x];
u = yuv[(position.y / 2) * (size.width / 2) + (position.x / 2) + size.total];
v = yuv[(position.y / 2) * (size.width / 2) + (position.x / 2) + size.total + (size.total / 4)];
rgb = YUV444toRGB888(y, u, v);

Here / is Div not division.

The above formula is taken from the wikipedia link .

The one thing I want to know is that the statement mentioned

Here / is Div not division.

What is Div here then, it is not dividing then what?

Roman R.
  • 68,205
  • 6
  • 94
  • 158
Asad Ali
  • 15
  • 7

1 Answers1

0

What the page means by Div is integer division. In C, if both operands to the / operator are of an integral type, the result is also of an integral type and any fractional part is truncated.

For example, 5 / 2 evaluates to 2.

dbush
  • 205,898
  • 23
  • 218
  • 273