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

Michael Niedermayer michaelni at gmx.at
Sun Sep 30 17:04:20 CEST 2012


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 
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


> 
> 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

[...]

the patch should be ok

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- 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/8f31d4fa/attachment.asc>


More information about the ffmpeg-devel mailing list