[FFmpeg-cvslog] r11573 - trunk/libavformat/mxf.c

Reimar Döffinger Reimar.Doeffinger
Sat Jan 19 21:37:22 CET 2008


Hello,
On Sat, Jan 19, 2008 at 08:22:23PM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> > On Sat, Jan 19, 2008 at 09:00:09PM +0100, bcoudurier wrote:
> >> Author: bcoudurier
> >> Date: Sat Jan 19 21:00:09 2008
> >> New Revision: 11573
> >> 
> >> Log:
> >> init uid to 0
> >> 
> >> Modified:
> >>    trunk/libavformat/mxf.c
> >> 
> >> Modified: trunk/libavformat/mxf.c
> >> ==============================================================================
> >> --- trunk/libavformat/mxf.c	(original)
> >> +++ trunk/libavformat/mxf.c	Sat Jan 19 21:00:09 2008
> >> @@ -922,7 +922,7 @@ static int mxf_read_local_tags(MXFContex
> >>          int tag = get_be16(pb);
> >>          int size = get_be16(pb); /* KLV specified by 0x53 */
> >>          uint64_t next = url_ftell(pb) + size;
> >> -        UID uid;
> >> +        UID uid = {0};
> >
> > I'm quite sure it does not matter here, but note that even for arrays as
> > small as 16 bytes memset is quite a bit faster than this kind of
> > initialization, at least with gcc around 3.4
> 
> If memset is the fastest way, gcc should know to call it in such
> situations.  I've seen gcc generate memcpy() calls for struct
> assignments, so it's certainly something that is reasonable to expect.

Certainly gcc should know, back then it didn't though (I noticed it
while optimizing libfaad back then).




More information about the ffmpeg-cvslog mailing list