mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
swscale: fix signed overflow in yuv2mono_X_c_template
As old bits are shifted out of the accumulator, they cause signed overflows when they reach the end. Making the variable unsigned fixes this. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
8540dcfd7a
commit
7c5ce99bd9
1 changed files with 1 additions and 1 deletions
|
|
@ -510,7 +510,7 @@ yuv2mono_X_c_template(SwsContext *c, const int16_t *lumFilter,
|
|||
const uint8_t * const d128=dither_8x8_220[y&7];
|
||||
uint8_t *g = c->table_gU[128] + c->table_gV[128];
|
||||
int i;
|
||||
int acc = 0;
|
||||
unsigned acc = 0;
|
||||
|
||||
for (i = 0; i < dstW - 1; i += 2) {
|
||||
int j;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue