[FFmpeg-devel] [PATCH] Fix unaligned fill_rectangle in rv34.c

Michael Niedermayer michaelni
Fri Aug 28 15:33:57 CEST 2009


On Fri, Aug 28, 2009 at 08:29:08AM +0300, Kostya wrote:
> On Thu, Aug 27, 2009 at 09:57:56PM +0200, Reimar D?ffinger wrote:
> > On Sat, Aug 22, 2009 at 04:11:19PM +0200, Michael Niedermayer wrote:
> > > let me try again
> > > if you write a rectangle of 8xC then there exists a semantic partitioning
> > > of sizeof=8, and things could be aligned accordingly, if not you cannot
> > > use fill_rectangle()
> > > you would have to replace r->avail_cache + 5 by + 6 maybe and make other
> > > related changes, its perfectly fine as well if you dont and remove all
> > > calls to fill_rectangle() from your code but fill_rectangle() requires
> > > aligned memory.
> > 
> > So can we get over with this and use attached patch?
> > The important cases needs something far simpler than fill_rectangle,
> > so it is not that bad code-wise I think.
> 
> I'm not against it but Michael may complain since this function may be
> useful for other pieces of code it should be put into some header.

iam not sure if you try to be sarcastic but if so you are sucessfull

Arrays should be aligned so that optimized accesses are possible.
I dont want ffmpeg to become a trashcan of poorly writtem code that
doesnt align things correctly, if you as maintainer of rv want this
i wont stop you as i have noone else to maintain this code better
but i do NOT want this to spread and be done elsewhere.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- 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-devel/attachments/20090828/b30fe404/attachment.pgp>



More information about the ffmpeg-devel mailing list