tor 2024-05-30 klockan 00:31 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > */ > > static av_always_inline av_const int32_t av_clipl_int32_c(int64_t > > a) > > { > > - if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return > > (int32_t)((a>>63) ^ 0x7FFFFFFF); > > - else return > > (int32_t)a; > > + if ((a+UINT64_C(0x80000000)) & ~UINT64_C(0xFFFFFFFF)) return > > (int32_t)((a>>63) ^ 0x7FFFFFFF); > > + else return > > (int32_t)a; > > IMO (uint64_t)a + 0x80000000 is more readable. (Maybe it would even > be > good to use >> 32 instead of ~UINT64_C(0xFFFFFFFF)?)
It already uses UINT64_C, hence why I used it. >> 32 would work also. Does it make any difference performance wise? /Tomas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".