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) in master because the
chroma x1.5 was used but clamped, which has somehow hidden that.
  • Loading branch information
MartinPulec committed Oct 21, 2024
1 parent 49059db commit 293bb3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pixfmt_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,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) {
UNUSED(rshift);
Expand All @@ -2215,11 +2216,13 @@ static void vc_copylineRG48toY216(unsigned char * __restrict dst, const unsigned
r = *in++;
g = *in++;
b = *in++;
u = (u + (RGB_TO_CB_709_SCALED(r, g, b) >> COMP_BASE) / 2) + (1<<15);
u = ((u + (RGB_TO_CB_709_SCALED(r, g, b) >> COMP_BASE)) / 2) +
(1 << 15);
*d++ = CLAMP_LIMITED_CBCR(u, 16);
y = (RGB_TO_Y_709_SCALED(r, g, b) >> COMP_BASE) + (1<<12);
*d++ = CLAMP_LIMITED_Y(y, 16);
v = (v + (RGB_TO_CR_709_SCALED(r, g, b) >> COMP_BASE) / 2) + (1<<15);
v = ((v + (RGB_TO_CR_709_SCALED(r, g, b) >> COMP_BASE)) / 2) +
(1 << 15);
*d++ = CLAMP_LIMITED_CBCR(v, 16);
}
}
Expand Down

0 comments on commit 293bb3c

Please sign in to comment.