From 04586de1ddc3ddbb52165b97c2262b65c9e41813 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 18 Sep 2007 14:08:08 +0000 Subject: [PATCH] MPEG-2 blocks at qp 1 get overfiltered by spp, apparently because "qp>>1" turns it into 0, which causes an integer overflow later. Clip qp at 1 to avoid this. patch by Alexander Strange, astrange ithinksw com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24572 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_spp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c index fc789397f7..1b6a5536d3 100644 --- a/libmpcodecs/vf_spp.c +++ b/libmpcodecs/vf_spp.c @@ -402,7 +402,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri qp= p->qp; else{ qp= qp_store[ (XMIN(x, width-1)>>qps) + (XMIN(y, height-1)>>qps) * qp_stride]; - if(p->mpeg2) qp>>=1; + if(p->mpeg2) qp = FFMAX(1, qp>>1); } for(i=0; i