[x264-devel] commit: Replace some divisions with shifts (Henrik Gramner )

Jason Garrett-Glaser darkshikari at gmail.com
Wed Jun 9 20:33:58 CEST 2010


On Wed, Jun 9, 2010 at 10:37 AM, Jan Willamowius <jan at willamowius.de> wrote:
> git at videolan.org wrote:
>> x264 | branch: master | Henrik Gramner <hengar-6 at student.ltu.se> | Tue Jun  8 16:29:16 2010 +0200| [59a9e0337cf5f75046b7031c61fdd2d88fc9021c] | committer: Jason Garrett-Glaser
>>
>> Replace some divisions with shifts
> [...]
>> -    return i_satd / 2;
>> +    return i_satd >> 1;
>
> Did anybody check if this really makes any difference in the generated
> code at all ?
>
> I would suspect most compilers to do these optimizations for constant
> values automatically. I personally would favor code readybility
> over such optimizations.

They don't unless the value is unsigned.

Dark Shikari


More information about the x264-devel mailing list