33 if ((nb & (nb - 1)) == 0) {
38 tab =
av_realloc(tab, nb_alloc *
sizeof(intptr_t));
45 #define ISLEAP(y) (((y) % 4 == 0) && (((y) % 100) != 0 || ((y) % 400) == 0))
46 #define LEAPS_COUNT(y) ((y)/4 - (y)/100 + (y)/400)
53 int md[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
57 tm->tm_hour = secs / 3600;
58 tm->tm_min = (secs % 3600) / 60;
59 tm->tm_sec = secs % 60;
68 if (days==365 && !
ISLEAP(y)) { days=0; y++; }
70 for (m=0; days >= md[m]; m++)
struct tm * ff_brktimegm(time_t secs, struct tm *tm)
void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem)
void * av_realloc(void *ptr, size_t size)
Allocate or reallocate a block of memory.
static const struct twinvq_data tab