# HG changeset patch # User benoit # Date 1224055494 0 # Node ID 481638df1e8b00160963320c7efd40beb71150f5 # Parent 87b221edc92532764b0cf18bf2302cd718f7946d Add a macro to get the number of elements in a table. diff -r 87b221edc925 -r 481638df1e8b common.h --- a/common.h Sun Oct 12 19:50:24 2008 +0000 +++ b/common.h Wed Oct 15 07:24:54 2008 +0000 @@ -116,6 +116,7 @@ #define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c) #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) +#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) /* misc math functions */ extern const uint8_t ff_log2_tab[256];