[XviD-devel] GME

elcabesa elcabesa at inwind.it
Sat Jul 12 19:51:46 CEST 2003


i still can't understand my error nad start think that xvid is not properly 
work
this is my patch but i cna't make it work
can someone tell me where is the error??
-------------- next part --------------
? out.txt
? build/generic/config.guess
? build/generic/config.log
? build/generic/config.status
? build/generic/config.sub
? build/generic/configure
? build/generic/install-sh
? build/generic/libxvidcore.def
? build/generic/libxvidcore.so.4.0
? build/generic/missing
? build/generic/mkinstalldirs
? build/generic/platform.inc
Index: build/generic/sources.inc
===================================================================
RCS file: /xvid/xvidcore/build/generic/sources.inc,v
retrieving revision 1.3.2.7
diff -r1.3.2.7 sources.inc
79d78
< 	$(SRCDIR)/dct/ia64_asm/fdct_ia64.s \
Index: src/encoder.c
===================================================================
RCS file: /xvid/xvidcore/src/encoder.c,v
retrieving revision 1.95.2.32
diff -r1.95.2.32 encoder.c
1289a1290
>     {
1296a1298
> //			printf( "%d", quant);
1298a1301,1303
> //    printf("\n");
>     }
> //    printf("\n\n");
1427a1433
> 	
1440c1446
<   MBParam * const pParam = &pEnc->mbParam;
---
> 	MBParam * const pParam = &pEnc->mbParam;
1479a1486,1546
> //elcabesa	
> 	for(x=0;x<mb_width;x++)
> 	{
> 		for(y=0;y<mb_height;y++)
> 		{	
>         		MACROBLOCK * pMB = &current->mbs[y*mb_width + x];
> 			MACROBLOCK * rMB = &reference->mbs[y*mb_width + x];
> 			if((y*16)+rMB->pmvs[0].y<0)
> 			{			
> 			pMB->dquant=-2;
> 			}
> 			if(((y+1)*16)+rMB->pmvs[0].y>16*mb_height)
> 			{			
> 			pMB->dquant=-2;
> 			}
> 			if((x*16)+rMB->pmvs[0].x<0)
> 			{			
> 			pMB->dquant=-2;
> 			}
> 			if(((x+1)*16)+rMB->pmvs[0].x>16*mb_width)
> 			{
> 			pMB->dquant=-2;
> 			}
> 			
> 		}
> 	}
> 	int* quant;
> 	quant=malloc(sizeof(int)*mb_width*mb_height);
> 	for(x=0;x<mb_width;x++)
> 	{
> 	for(y=0;y<mb_height;y++)
> 	{
> 	MACROBLOCK * pMB = &current->mbs[y*mb_width + x];
> 	quant[x+mb_width*y]=pMB->dquant;
> 	}
> 	}
> 	for(x=0;x<mb_width;x++)
> 	{
> 	for(y=0;y<mb_height;y++)
> 	{
> 	MACROBLOCK * pMB = &current->mbs[y*mb_width + x];
> 	if((x+mb_width*y-1)>=0)
> 	pMB->dquant=quant[x+mb_width*y]-quant[x+mb_width*y-1];
> 	}
> 	}
> 	free(quant);
> 	/*for(x=0;x<mb_width;x++)
> 	{
> 		for(y=0;y<mb_height;y++)
> 		{
> 	//	printf("x %d y %d dx %d dy %d\n",x,y, my_vector[2*(x+mb_width*y)],my_vector[2*(x+mb_width*y)+1]);
> 			
>         		MACROBLOCK * pMB = &current->mbs[y*mb_width + x];
> 			if(pMB->quant<1)
> 			{
> 			pMB->quant=1;
> 			}
> 		}
> 	}
> 	*/
> //--elcabesa
1481,1482c1548
< 
<     SetMacroblockQuants(&pEnc->mbParam, current);
---
> 	SetMacroblockQuants(&pEnc->mbParam, current);
1539d1604
< 
Index: src/plugins/plugin_psnr.c
===================================================================
RCS file: /xvid/xvidcore/src/plugins/Attic/plugin_psnr.c,v
retrieving revision 1.1.2.4
diff -r1.1.2.4 plugin_psnr.c
33a34,38
>     static long int sse_y=0;
>     static long int sse_u=0;
>     static long int sse_v=0;
>     static int n=0;
>     static int height=0;
43a49
>         return 0;
44a51,58
>         {
>         printf("TOT y_psnr=%2.2f u_psnr=%2.2f v_psnr=%2.2f\n", 
>            sse_to_PSNR(sse_y/n, height),
>            sse_to_PSNR(sse_u/n, height/4),
>            sse_to_PSNR(sse_v/n, height/4));
> 
>        return 0;
>        }
51c65,69
< 
---
>        height=data->width*data->height;
>        n++;
>        sse_y+=data->sse_y;
>        sse_u+=data->sse_u;
>        sse_v+=data->sse_v;


More information about the XviD-devel mailing list