[FFmpeg-devel] [PATCH] Add FITS Decoder

James Almer jamrial at gmail.com
Thu Jun 8 23:08:04 EEST 2017


On 6/8/2017 4:56 PM, Moritz Barsnick wrote:
> On Thu, Jun 08, 2017 at 22:34:15 +0530, Paras Chadha wrote:
>> +            t64 = (((uint64_t) ptr8[0]) << 56) | (((uint64_t) ptr8[1]) << 48) | (((uint64_t) ptr8[2]) << 40) | (((uint64_t) ptr8[3]) << 32) | (ptr8[4] << 24) | (ptr8[5] << 16) | (ptr8[6] << 8) | ptr8[7];
> 
> I think you can (or should?) use macros such as av_be2ne64() for this,
> and all the other shift-byte-placements throughout the code. (Yes, I
> know that operation is doing "ne2be", but there's no macro for that,
> probably because it's identical.) In addition to being shorter, they
> will evaluate to pure assignments on big-endian platforms.

In this case, i think AV_RB64() is the correct macro to use.

> 
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 



More information about the ffmpeg-devel mailing list