[FFmpeg-trac] #9149(swscale:new): bugs in Altivec code
FFmpeg
trac at avcodec.org
Wed Mar 17 13:29:25 EET 2021
#9149: bugs in Altivec code
---------------------------------------+-----------------------------------
Reporter: ilyakurdyukov | Owner:
Type: defect | Status: new
Priority: normal | Component: swscale
Version: unspecified | Resolution:
Keywords: ppc altivec | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------------+-----------------------------------
Comment (by ilyakurdyukov):
"If the issues you see are reproducible with current FFmpeg git head"
As I said, I can't test this because I don't have Altivec hardware to test
it, but I'm pretty sure this code is wrong as I ported this code to a
different SIMD architecture and changed these parts with the correct code.
And I have no intention of fixing the Altivec code, when I told my
colleagues that I found bugs in the Altivec code during porting, they
recommended reporting this to the ffmpeg bug tracker, which I did.
Also I found strange code in "libswscale/ppc/yuv2rgb_altivec.c":
yuv2packedX_altivec() has some code after the loop that calculates the
extra remaining bytes that are less than 16x RGB blocks. But this code
will never be called, because of "i < dstW" conditional, it should be "i +
15 < dstW".
for (i = 0; i < dstW; i += 16) {
...
}
if (i < dstW) {
i -= 16;
...
memcpy(&((uint32_t *) dest)[i], scratch, (dstW - i) / 4);
}
And altivec_uyvy_rgb32() in the same source file - seems to be never
called in the current version of ffmpeg.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9149#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list