diff options
Diffstat (limited to 'libswscale/output.c')
-rw-r--r-- | libswscale/output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index e9bbb3d03c..de40e4b33e 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -722,7 +722,7 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter, A2 += 0x20002000; } - // 8bit: 12+15=27; 16-bit: 12+19=31 + // 8 bits: 12+15=27; 16 bits: 12+19=31 Y1 >>= 14; // 10 Y1 += 0x10000; Y2 >>= 14; @@ -730,20 +730,20 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter, U >>= 14; V >>= 14; - // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit + // 8 bits: 27 -> 17 bits, 16 bits: 31 - 14 = 17 bits Y1 -= c->yuv2rgb_y_offset; Y2 -= c->yuv2rgb_y_offset; Y1 *= c->yuv2rgb_y_coeff; Y2 *= c->yuv2rgb_y_coeff; Y1 += 1 << 13; // 21 Y2 += 1 << 13; - // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit + // 8 bits: 17 + 13 bits = 30 bits, 16 bits: 17 + 13 bits = 30 bits R = V * c->yuv2rgb_v2r_coeff; G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; B = U * c->yuv2rgb_u2b_coeff; - // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit + // 8 bits: 30 - 22 = 8 bits, 16 bits: 30 bits - 14 = 16 bits output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14); output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14); @@ -1294,7 +1294,7 @@ yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2, dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1]; dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2]; - } else /* 8/4-bit */ { + } else /* 8/4 bits */ { uint8_t *dest = (uint8_t *) _dest; const uint8_t *r = (const uint8_t *) _r; const uint8_t *g = (const uint8_t *) _g; |