Document BT.709 v210 conversion

This commit is contained in:
Johanness
2026-05-24 21:17:44 +03:00
parent 22335bb378
commit f79eeadde6
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -95,6 +95,8 @@ inline void decodeV210Line(
default: y10 = y0; cb10 = cb0; cr10 = cr0; break;
}
// BT.709 limited-range YCbCr to RGB. v210 stores 10-bit video-range
// samples: Y [64, 940], Cb/Cr centered at 512.
int32_t yp = (static_cast<int32_t>(y10) - 64) >> 2;
int32_t cbp = (static_cast<int32_t>(cb10) - 512) >> 2;
int32_t crp = (static_cast<int32_t>(cr10) - 512) >> 2;
@@ -175,6 +177,8 @@ inline void convertV210ToRgba(
default: y10 = y0; cb10 = cb0; cr10 = cr0; break;
}
// BT.709 limited-range YCbCr to RGB. v210 stores 10-bit video-range
// samples: Y [64, 940], Cb/Cr centered at 512.
int32_t yp = (static_cast<int32_t>(y10) - 64) >> 2;
int32_t cbp = (static_cast<int32_t>(cb10) - 512) >> 2;
int32_t crp = (static_cast<int32_t>(cr10) - 512) >> 2;
@@ -187,4 +191,4 @@ inline void convertV210ToRgba(
{clampUint8(r), clampUint8(g), clampUint8(b)});
}
}
}
}