#include #include #include #include /******************************/ #include "global.h" #include "config.h" #include "mpeg2dec.h" #include "common.h" void resizefunc(int width,int height) { /**************** VARIABLE DECLEARATION ***********************************************************/ int i,j,a,b,q,r,c,d,c1,d1,x,y; int hr_st_integer,hr_end_integer,vr_st_integer,vr_end_integer; int vr_start,vr_end,hr_start,hr_end; /*intermediate indexes*/ int x1,y1,x2,y2,x3,y3,x4,y4,type; float sum2; float current_hor_total,hr_st_decimal,hr_end_decimal; float current_ver_total,vr_st_decimal,vr_end_decimal; float tmp,avg; float curwindow[10][10],curwindow1[10][10]; float rwmbno; float rhmbno; FILE *f1; /**************** VARIABLE DECLEARATION END ***********************************************************/ /**************** Calculation of rescaled height and width ***********************************************************/ if(resecho){ printf("width=%d height=%d\n",width,height); getchar();} /**************** Calculation of rescaled height and width ENDS ***********************************************************/ /**************** Setting type values to 1or 2 according to the orig_height and width ***********************************************************/ /**************** Setting type values to 1or 2 according to the orig_height and width ENDS **********************************************/ /**************** Initialising the buffers used and the variables used ***********************************************************/ //Initialisation of the convertvalue matrix for(x1 = 0; x1<1000;x1++) for(y1 = 0; y1<1000;y1++) { convertvalues[x1][y1] = 0; } /*initialisation of first window for(x2 = 0; x2<10;x2++) for(y2 = 0; y2<10;y2++) { curwindow[x2][y2] = 0; }*/ //initialisation of second window for(x3 = 0; x3<10;x3++) for(y3 = 0; y3<10;y3++) { curwindow1[x3][y3] = 0; } /**************** Initialising the buffers used and the variables used ENDS ***********************************************************/ /***************** Calculation beigns **************************************************************************************************/ // fprintf(convalfd,"the y comp-begins\n"); for(a = 0;a