[FFmpeg-devel] [PATCH] swscale: fix To{Y, UV} extern prototypes.

Michael Niedermayer michaelni at gmx.at
Sun Sep 30 22:18:45 CEST 2012


On Sun, Sep 30, 2012 at 08:48:23PM +0200, Clément Bœsch wrote:
> On Sun, Sep 30, 2012 at 05:04:20PM +0200, Michael Niedermayer wrote:
> > On Sun, Sep 30, 2012 at 10:54:02AM +0200, Clément Bœsch wrote:
> > > This fix a bunch of "assignment from incompatible pointer type" warnings
> > > with GCC.
> > > ---
> > > What I'm afraid of is that the prototypes don't seem to match what's in
> > > sws/x86/input.asm (based on the comments) in comparison to the C versions in
> > > sws/swscale.c.
> > 
> > i think the comments are wrong 
> 
> OK, see attached patch then.
> 
> > following is the difference of the input.asm "prototypes" to libav
> > 
> > -cglobal %2 %+ 24ToY, 3, 3, %1, dst, src, w
> > +cglobal %2 %+ 24ToY, 6, 6, %1, dst, src, u1, u2, w, u3
> > -cglobal %2 %+ 24ToUV, 3, 4, %1, dstU, dstV, src, w
> > +cglobal %2 %+ 24ToUV, 7, 7, %1, dstU, dstV, u1, src, u2, w, u3
> > -cglobal %2%3%4%5 %+ ToY, 3, 3, %1, dst, src, w
> > +cglobal %2%3%4%5 %+ ToY, 6, 6, %1, dst, src, u1, u2, w, u3
> > -cglobal %2%3%4%5 %+ ToUV, 3, 4, %1, dstU, dstV, src, w
> > +cglobal %2%3%4%5 %+ ToUV, 7, 7, %1, dstU, dstV, u1, src, u2, w, u3
> > -cglobal %2ToY, 3, 3, %1, dst, src, w
> > +cglobal %2ToY, 5, 5, %1, dst, unused0, unused1, src, w
> > -cglobal %2ToUV, 3, 4, %1, dstU, dstV, src, w
> > +cglobal %2ToUV, 4, 5, %1, dstU, dstV, unused, src, w
> > -cglobal %2ToUV, 3, 4, %1, dstU, dstV, src, w
> > +cglobal %2ToUV, 4, 5, %1, dstU, dstV, unused, src, w
> > 
> 
> Right, OK
> 
> > 
> > > 
> > > AFAIU, those prototypes were simplified by libav but it seems they were kept
> > > unchanged in FFmpeg (because of a bug? because the prototypes could be shared
> > > with the others functions?). Though, it might be important to check the if the
> > 
> > the prototypes where the same originally, the additional fields
> > where added by me to support planar RGB (packed was fine with 1 pointer
> > but planar needed 3)
> > libav later reimplemented planar rgb support by adding a seperate
> > function pointer that takes 3, leaving the existing with 1 and adding
> > a if() to all calls
> 
> Wouldn't it make sense to keep them in sync?

in sync with libav? to simplify merge work?
that makes only sense when libav will continue to work on sws and
there is something to merge ...
and recent rumors dont point in that direction.
that said we certainly can switch to the 2 fptr API. And we certainly
should integrate all improvments anyone does on a swscale fork or
another scaler.


[...]

>  input.asm |   11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 0189d59dd789f62a35ffd9eeccb94187a6d2b810  0001-sws-x86-keep-comments-in-sync-with-real-prototypes.patch
> From 9fb77f0cbb8ac45f9888b9bd65b3689f434a33cb Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux at gmail.com>
> Date: Sun, 30 Sep 2012 20:51:37 +0200
> Subject: [PATCH] sws/x86: keep comments in sync with real prototypes.
> 
> ---
>  libswscale/x86/input.asm | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

LGTM

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120930/0cc53717/attachment.asc>


More information about the ffmpeg-devel mailing list