[FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

Ganesh Ajjanagadde gajjanag at mit.edu
Sat Nov 28 22:47:34 CET 2015


On Sat, Nov 28, 2015 at 4:35 PM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> On 11/28/2015 9:26 PM, Derek Buitenhuis wrote:
>> Changing all of them sounds fine to me.
>
> [21:31] <@ubitux> re: i%4 vs i&3; you should ask him to make sure the compiler is smart enough regarding the signess of i

No idea, actually GCC even to this day has issues with signed vs unsigned.

Trivial example (unrelated),
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48052 which is still
open. Lesson for FFmpeg - make sure looping is done with int i instead
of unsigned i. I have not done an extensive audit, but FFmpeg seems
mostly good in this respect.

So I will follow Derek's suggestion and use i & 3 uniformly here; I
lack the energy to investigate and will err on the safe side wrt
performance.

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


More information about the ffmpeg-devel mailing list