[Ffmpeg-devel] Some possible libswscale cleanups?
Thu Dec 21 17:56:30 CET 2006
> On Thu, 21 Dec 2006 16:46:25 +0100
> Luca Abeni <lucabe72 at email.it> wrote:
> > I think the correct version should be
> > - b = c->table_bU[U];\
> > + r = (type *)c->table_rV[V];\
> > + g = (type *)(c->table_gU[U] + c->table_gV[V]);\
> > right?
That looks OK.
On Thu, 2006-12-21 at 16:55 +0100, Aurelien Jacobs wrote:
> No, because here you still do arithmetic with void pointer !
> You probably want something like this:
> + g = (type *)c->table_gU[U] + c->table_gV[V]/sizeof(type);\
That's unnecessarily complex and would create less efficient code. The
compiler can't just optimize out the division because of truncation
( (int *)p+1/4 must evaluate to p instead of an unaligned odd pointer).
More information about the ffmpeg-devel