[Ffmpeg-devel] [PATCH] PRId64 / PRIx64 changes

Michael Niedermayer michaelni
Mon Oct 23 21:56:06 CEST 2006


Hi

On Mon, Oct 23, 2006 at 07:36:40PM +0200, Steve Lhomme wrote:
> Rich Felker wrote:
> >On Mon, Oct 23, 2006 at 06:32:04PM +0200, Steve Lhomme wrote:
> >>Hi,
> >>
> >>Here is a patch to replace most of the %lld and %llx into their 
> >>(cleaner) PRI*64 counterparts.
> >
> >Are the variables in question int64_t or long long?? PRI*64 is for
> >int64_t, not for long long. If they do match then this patch is fine..
> 
> There is no long long in the code, so it must be fine.

wrong, there are very few long long in the code

ffserver.c:    long long data_count;
ffserver.c:    return (long long)tv.tv_sec * 1000 + (tv.tv_usec / 1000);
libavutil/common.h:    typedef signed long long   int64_t;
libavutil/common.h:    typedef unsigned long long uint64_t;
libavutil/common.h:static inline long long read_time(void)
libavutil/common.h:        long long l;

libavcodec/i386/mpegvideo_mmx.c:static const unsigned long long int mm_wabs __attribute__ ((aligned(8))) = 0xffffffffffffffffULL;
libavcodec/i386/mpegvideo_mmx.c:static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL;

these 2 are wrong and should be uint64_t


libavcodec/ppc/dsputil_ppc.c:unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
libavcodec/ppc/dsputil_ppc.c:        if (perfdata[j][i][powerpc_data_num] != (unsigned long long)0)
libavcodec/i386/mmx.h:        long long               q;      /* Quadword (64-bit) value */
libavcodec/i386/mmx.h:        unsigned long long      uq;     /* Unsigned Quadword */
libavcodec/ppc/dsputil_ppc.h:extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
libavcodec/ppc/dsputil_ppc.h:#define POWERP_PMC_DATATYPE unsigned long long


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list