[FFmpeg-devel] [PATCH 4/7] Use alias-safe types in AV_[RW] macros

Jason Garrett-Glaser darkshikari
Fri Jan 29 04:37:25 CET 2010

On Thu, Jan 28, 2010 at 7:27 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Fri, Jan 29, 2010 at 02:12:11AM +0000, Mans Rullgard wrote:
>> ---
>> ?libavutil/intreadwrite.h | ? 14 +++++++-------
>> ?1 files changed, 7 insertions(+), 7 deletions(-)
> id like to see some benchmark done with the latest gcc release
> and h264/h263/aac decoding as well as mpeg4 encoding on x86_64 (codecs
> randomly picked based more on what is used alot than what uses alot of funny
> accesses)
> if nothing gets slower then iam not against this otherwise i think
> more investigation is needed

When we implemented these macros in x264 I spent hours benching all
over the place.  Nothing of note got slower, a few things got slightly
faster.  Overall, I'd call it a wash, though a definite win if you
consider the fact that it stops gcc from miscompiling things

> Also how does this stuff interact with restrict ?
> Which overrides the other? can we still use restrict to make sure the
> gcc is aware that aliasing does not happen?

Good question...

Dark Shikari

More information about the ffmpeg-devel mailing list