1 int abs (int); find_sad_16x16(int * intra_mode)2int find_sad_16x16(int *intra_mode) 3 { 4 int current_intra_sad_2,best_intra_sad2; 5 int M1[16][16],M0[4][4][4][4],M3[4],M4[4][4]; 6 int i,j,k; 7 int ii,jj; 8 int up_avail, left_avail, left_up_avail; 9 for (i=0;i<17;i++) 10 if (left_up_avail) 11 { 12 for (jj=0;jj<4;jj++) 13 for (ii=0;ii<4;ii++) 14 for (j=0;j<4;j++) 15 for (i=0;i<4;i++) 16 { 17 M0[i][ii][2][jj]=M3[0]-M3[1]; 18 M0[i][ii][1][jj]=M3[2]+M3[3]; 19 current_intra_sad_2 += abs(M0[i][ii][j][jj]); 20 } 21 22 if(current_intra_sad_2 < best_intra_sad2) 23 best_intra_sad2=current_intra_sad_2; 24 } 25 } 26