Skip to content

Commit f8bb315

Browse files
ValeZAAqyot27
authored andcommitted
convert_helper.h: cosmetics, wrong equation number
1 parent f4628d0 commit f8bb315

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

avs_core/convert/convert_helper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ typedef struct bits_conv_constants {
183183

184184
if (use_chroma) {
185185
// decision: 'limited' range float +/-112 is +/-112/255.0. Must be consistent with Expr, ColorYUV etc
186-
// 3.7.2: full range chroma: as per ITU Rec H.273 eq.30 p.10: Cb=Clip1_C(Round(((1<<BitDepth_C)-1)*E'_PB)+(1<<(BitDepth_C-1)))
186+
// 3.7.2: full range chroma: as per ITU Rec H.273 eq.37 p.10: Cb=Clip1_C(Round(((1<<BitDepth_C)-1)*E'_PB)+(1<<(BitDepth_C-1)))
187187
// For 8 bit this results in 128 +/-127.5 instead of 128 +/-127
188188
// In general the span is ((1 << srcBitDepth) - 1) / 2.0 instead of (1 << (srcBitDepth - 1)) - 1
189189

190190
// a bit asymmetric but meets mpeg, jpeg, Rec.2020 industry standards:
191-
// full range chroma span intentionally not 128 bit 255/2.0, which is virtually 127.5.
191+
// full range chroma span intentionally is not 128 but 255/2.0, which is virtually 127.5.
192192
// This also gives identical results to e.g. zimg when used in full range YUV-RGB conversions, which is good for consistency.
193193
d.src_span = (srcBitDepth == 32) ?
194194
(fulls ? 0.5f : 112 / 255.0f) :

0 commit comments

Comments
 (0)