[MPlayer-cvslog] r24572 - trunk/libmpcodecs/vf_spp.c

diego subversion at mplayerhq.hu
Tue Sep 18 16:08:08 CEST 2007


Author: diego
Date: Tue Sep 18 16:08:08 2007
New Revision: 24572

Log:
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


Modified:
   trunk/libmpcodecs/vf_spp.c

Modified: trunk/libmpcodecs/vf_spp.c
==============================================================================
--- trunk/libmpcodecs/vf_spp.c	(original)
+++ trunk/libmpcodecs/vf_spp.c	Tue Sep 18 16:08:08 2007
@@ -402,7 +402,7 @@ static void filter(struct vf_priv_s *p, 
 				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<count; i++){
 				const int x1= x + offset[i+count-1][0];



More information about the MPlayer-cvslog mailing list