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

Kostya kostya.shishkov
Sun Aug 30 08:31:35 CEST 2009


On Sat, Aug 29, 2009 at 07:24:13PM +0200, Michael Niedermayer wrote:
> qOn Sat, Aug 29, 2009 at 06:28:00PM +0300, Kostya wrote:
> > On Sat, Aug 29, 2009 at 01:59:13PM +0200, Michael Niedermayer wrote:
> > > On Fri, Aug 28, 2009 at 07:44:54PM +0300, Kostya wrote:
> > [...]
> > > >  
> > > > Let's see what are the cases when fill_rectangle() is used:
> > > > 1) r->avail_cache - zeroes 8x2 bytes, stride is always 16 bytes,
> > > >                     alignment is 4
> > > > 2) r->intra_types - zeroes 4x4 bytes, stride is multiple of 4,
> > > >                     alignment is 16
> > > > 3) pic->motion_val - zeroes 8x2 bytes, stride is s->b8_stride*4,
> > > >                      alignment is 8
> > > > 
> > > > For the case 1 I will fix alignment to be 8, for the case 2 there's
> > > > nothing to do. In case 3 it fails because of stride since mpegvideo.c
> > > > says:
> > > >     s->b8_stride = s->mb_width*2 + 1
> > > > and allocates memory for pic->motion_val according to it.
> > > > So in this case I either need custom zeroing function or just strides
> > > > adjusted.
> > > 
> > > so motion_val is the problem?
> > > well, you could really try to change stride
> > 
> > Can somebody benchmark this? I don't think it will hurt H.263-based
> > decoders performance but better be safe than sorry.
> 
> you misunderstood me, i mean the stride that is used in rv*c
> i see no sense in changing it for the other video codecs

As you like.
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB



More information about the ffmpeg-devel mailing list