[FFmpeg-cvslog] r17404 - trunk/libavcodec/mpegvideo_xvmc.c
Michael Niedermayer
michaelni
Wed Feb 18 19:22:35 CET 2009
On Wed, Feb 18, 2009 at 08:11:29PM +0200, Ivan Kalvachev wrote:
> On 2/18/09, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Feb 18, 2009 at 12:51:28AM +0100, diego wrote:
> >> Author: diego
> >> Date: Wed Feb 18 00:51:28 2009
> >> New Revision: 17404
> >>
> >> Log:
> >> Replace sizeof(short) by the more robust sizeof(*s->pblocks[i]) in memset
> >> and
> >> memcpy calls. s->pblocks is the element actually being handled.
> >
> > ok +2 for you
> >
> > diego 19
> > ivan 20.5
>
> That's actually wrong. XvMC defines block data as short
its not wrong, the type of pblocks is wrong, it should be DCTELEM
well actually a array of 12 pointers to arrays of 64 DCTELEM
then it would be sizeof(*s->pblocks[i]) instead of sizeof(*s->pblocks[i])*64
> and this is how it is in the xvmc structure.
> pblocks points into the data array so sizeof(short) is the correct way to use
no pblocks points into array of DCTELEM, it just works out because
short == DCTELEM and because someone added casts in mpegvideo to hide the
(correct) warnings that its broken.
>
> Now, making xvmc work when DCTELEM is not short, is interesting task.
> But for now there is no reason for me to implement it.
id give you half a point for that
and another half one if you at least get rid of the incorrect casts
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090218/7aa50f07/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list