Skip to content

Commit

Permalink
fix vc_copylineRG48toY216
Browse files Browse the repository at this point in the history
incorrectly braced

Actually not obvious until 2f45006 (2024-09-24) because the chroma x1.5
was used but clamped, which has somehow hidden that.
  • Loading branch information
MartinPulec committed Oct 11, 2024
1 parent fd08c58 commit f12577f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pixfmt_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2365,6 +2365,7 @@ static void vc_copylineRG48toV210(unsigned char * __restrict dst, const unsigned
#undef FETCH_BLOCK
}


static void vc_copylineRG48toY216(unsigned char * __restrict dst, const unsigned char * __restrict src, int dst_len, int rshift,
int gshift, int bshift) {
enum {
Expand Down Expand Up @@ -2392,14 +2393,14 @@ static void vc_copylineRG48toY216(unsigned char * __restrict dst, const unsigned
r = *in++;
g = *in++;
b = *in++;
u = (u + (RGB_TO_CB(cfs, r, g, b) >> COMP_BASE) /
u = ((u + (RGB_TO_CB(cfs, r, g, b) >> COMP_BASE)) /
2) +
(1 << 15);
*d++ = CLAMP_LIMITED_CBCR(u, 16);
y = (RGB_TO_Y(cfs, r, g, b) >> COMP_BASE) +
(1 << 12);
*d++ = CLAMP_LIMITED_Y(y, 16);
v = (v + (RGB_TO_CR(cfs, r, g, b) >> COMP_BASE) /
v = ((v + (RGB_TO_CR(cfs, r, g, b) >> COMP_BASE)) /
2) +
(1 << 15);
*d++ = CLAMP_LIMITED_CBCR(v, 16);
Expand Down

0 comments on commit f12577f

Please sign in to comment.