#ifndef __DEFINES_H__ #define __DEFINES_H__ const unsigned int CORRESPONDANCE_Di_Dj_FREEMAN[3][3] = {{3,2,1}, {4,8,0}, {5,6,7}} ; const int TABLE_CODAGE[8][8] = {{ 0, 0, 0, 0, 0,-1,-1,-1}, /* 0 */ { 1, 1, 1, 1, 1, 0, 0, 0}, /* 1 */ { 1, 1, 1, 1, 1, 0, 0, 0}, /* 2 */ { 1, 1, 1, 1, 1, 0, 0, 0}, /* 3 */ { 0, 0, 0, 0, 0,-1,-1,-1}, /* 4 */ { 0, 0, 0, 0, 0,-1,-1,-1}, /* 5 */ { 0, 0, 0, 0, 0,-1,-1,-1}, /* 6 */ { 0, 0, 0, 0, 0,-1,-1,-1}}; /* 7 */ /* 0 1 2 3 4 5 6 7 */ const int TABLE_CODAGE1[8][8] = {{ 0, 1, 1, 1, 1, 0, 0, 0}, /* 0 */ { 0, 1, 1, 1, 1, 2, 0, 0}, /* 1 */ { 0, 1, 1, 1, 1, 2, 2, 0}, /* 2 */ { 0, 1, 1, 1, 1, 2, 2, 2}, /* 3 */ {-1, 0, 0, 0, 0,-1,-1,-1}, /* 4 */ {-1, 2, 0, 0, 0,-1,-1,-1}, /* 5 */ {-1, 2, 2, 0, 0,-1,-1,-1}, /* 6 */ {-1, 2, 2, 2, 0,-1,-1,-1}}; /* 7 */ /* 0 1 2 3 4 5 6 7 */ #define BS 512 #define MAX_PIX 20000 #define MAX_NODES 1000 #define MAX_LISTE_PIX 10000000 #define MAX(x,y) ( ( (x)>=(y) )?(x):(y) ) #define ABS(x) ( ((x)>0)?(x):-(x)) #define DEC 4 #define DEC2 8 #define CONFLICT_FREE_OFFSET(index) ( ((index) >>(DEC)) + ((index) >>(DEC2) ) ) #define CFO(index) ( ( (index) >>(DEC) ) + ( (index) >>(DEC2) ) ) #define CFI(index) ( (index) + (CFO(index)) ) #endif