Mercurial > mplayer.hg
changeset 25640:a51e1bd9ba4f
Add an extra check to avoid a case that cause black lines in scaled
vobsubs due to an overflow in the multiplication.
author | reimar |
---|---|
date | Thu, 10 Jan 2008 21:47:33 +0000 |
parents | 8a673cfc4043 |
children | 58fd8ebcd6e3 |
files | spudec.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/spudec.c Thu Jan 10 19:59:09 2008 +0000 +++ b/spudec.c Thu Jan 10 21:47:33 2008 +0000 @@ -731,6 +731,8 @@ color[2] = spu->image[base + spu->stride]; color[3] = spu->image[base + spu->stride + 1]; scale[0] = (table_x[x].left_up * table_y[y].left_up >> 16) * alpha[0]; + if (table_y[y].left_up == 0x10000) // necessary to avoid overflow-case + scale[0] = table_x[x].left_up * alpha[0]; scale[1] = (table_x[x].right_down * table_y[y].left_up >>16) * alpha[1]; scale[2] = (table_x[x].left_up * table_y[y].right_down >> 16) * alpha[2]; scale[3] = (table_x[x].right_down * table_y[y].right_down >> 16) * alpha[3];