[FFmpeg-devel] MXF D10 regression tests

Michael Niedermayer michaelni
Wed Mar 18 15:40:52 CET 2009


On Wed, Mar 18, 2009 at 02:46:48PM +0100, Reimar D?ffinger wrote:
> On Wed, Mar 18, 2009 at 02:31:33PM +0100, Michael Niedermayer wrote:
> > > @@ -243,7 +243,7 @@
> > >          int size[4] = {0};
> > >          int tmpsize;
> > >          AVPicture picture;
> > > -        int stride_align[4];
> > > +        int stride_align = STRIDE_ALIGN;
> > >  
> > >          avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
> > >  
> > 
> > this is conceptually slightly bad because
> > 16x16 MBs in luma may need 16 byte alignment and
> > 8x8 MBs in 420 chroma may need 8 byte alignment
> 
> Current code does not care, it just saves a rather small amount of
> memory and it adds a bit of complexity.
> Not to mention that there might be quite a few codecs that need no
> alignment at all. I am rather unconvinced that there is a point in
> taking all this into account.

iam not asking for all of it to be taken into account but rather that
there is some framework in which such things can be filled in where
they are needed.
(we also have avcodec_align_dimensions())

currently STRIDE_ALIGN is 8 for x86* and that works out exactly because 420
and the linesize relations gurantee 16 byte alignment for luma.
if 444 is ever added it will need some special handling like svq1 does,
also other archs than x86 set STRIDE_ALIGN to 16 while they possibly
like x86 really just mean 16 for luma ...
wasting a few % of memory does also not sound that insigificant and may
have also a speedeffect due to caches ...


-- 
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-devel/attachments/20090318/80ca5bc7/attachment.pgp>



More information about the ffmpeg-devel mailing list