mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-20 07:48:15 +02:00
avcodec/ivi_dsp: Fix multiple runtime error: left shift of negative value -71
Fixes: 1734/clusterfuzz-testcase-minimized-5385630815092736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 8fb00b3e858b7a5aeccfe6bdfc10290c2121c3ec) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a8fb8cd716
commit
7b074e728d
@ -116,10 +116,10 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
|
|||||||
b0_2 = b0_ptr[pitch+indx+1];
|
b0_2 = b0_ptr[pitch+indx+1];
|
||||||
tmp1 = tmp0 + b0_1;
|
tmp1 = tmp0 + b0_1;
|
||||||
|
|
||||||
p0 = tmp0 << 4;
|
p0 = tmp0 * 16;
|
||||||
p1 = tmp1 << 3;
|
p1 = tmp1 * 8;
|
||||||
p2 = (tmp0 + tmp2) << 3;
|
p2 = (tmp0 + tmp2) * 8;
|
||||||
p3 = (tmp1 + tmp2 + b0_2) << 2;
|
p3 = (tmp1 + tmp2 + b0_2) * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process the HL-band by applying HPF vertically and LPF horizontally */
|
/* process the HL-band by applying HPF vertically and LPF horizontally */
|
||||||
@ -132,10 +132,10 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
|
|||||||
tmp2 = tmp1 - tmp0*6 + b1_3;
|
tmp2 = tmp1 - tmp0*6 + b1_3;
|
||||||
b1_3 = b1_1 - b1_2*6 + b1_ptr[pitch+indx+1];
|
b1_3 = b1_1 - b1_2*6 + b1_ptr[pitch+indx+1];
|
||||||
|
|
||||||
p0 += (tmp0 + tmp1) << 3;
|
p0 += (tmp0 + tmp1) * 8;
|
||||||
p1 += (tmp0 + tmp1 + b1_1 + b1_2) << 2;
|
p1 += (tmp0 + tmp1 + b1_1 + b1_2) * 4;
|
||||||
p2 += tmp2 << 2;
|
p2 += tmp2 * 4;
|
||||||
p3 += (tmp2 + b1_3) << 1;
|
p3 += (tmp2 + b1_3) * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process the LH-band by applying LPF vertically and HPF horizontally */
|
/* process the LH-band by applying LPF vertically and HPF horizontally */
|
||||||
@ -146,10 +146,10 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
|
|||||||
tmp0 = b2_1 + b2_2;
|
tmp0 = b2_1 + b2_2;
|
||||||
tmp1 = b2_1 - b2_2*6 + b2_3;
|
tmp1 = b2_1 - b2_2*6 + b2_3;
|
||||||
|
|
||||||
p0 += tmp0 << 3;
|
p0 += tmp0 * 8;
|
||||||
p1 += tmp1 << 2;
|
p1 += tmp1 * 4;
|
||||||
p2 += (tmp0 + b2_4 + b2_5) << 2;
|
p2 += (tmp0 + b2_4 + b2_5) * 4;
|
||||||
p3 += (tmp1 + b2_4 - b2_5*6 + b2_6) << 1;
|
p3 += (tmp1 + b2_4 - b2_5*6 + b2_6) * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process the HH-band by applying HPF both vertically and horizontally */
|
/* process the HH-band by applying HPF both vertically and horizontally */
|
||||||
@ -163,9 +163,9 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
|
|||||||
|
|
||||||
b3_9 = b3_3 - b3_6*6 + b3_ptr[pitch+indx+1];
|
b3_9 = b3_3 - b3_6*6 + b3_ptr[pitch+indx+1];
|
||||||
|
|
||||||
p0 += (tmp0 + tmp1) << 2;
|
p0 += (tmp0 + tmp1) * 4;
|
||||||
p1 += (tmp0 - tmp1*6 + tmp2) << 1;
|
p1 += (tmp0 - tmp1*6 + tmp2) * 2;
|
||||||
p2 += (b3_7 + b3_8) << 1;
|
p2 += (b3_7 + b3_8) * 2;
|
||||||
p3 += b3_7 - b3_8*6 + b3_9;
|
p3 += b3_7 - b3_8*6 + b3_9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user