[FFmpeg-devel] [PATCH] Correction for Blackfin unscaled swscale
Ronaldo Moura
ronaldo.moura
Thu May 6 21:23:34 CEST 2010
Hi everyone,
I found a problem in the Blackfin optimized function ff_bfin_uyvytoyv12,
to convert video from packet 4:2:2 to planar 4:2:0 without rescaling.
The function just works correctly when srcStride == 2*width. For the
cases where you have to skip some bytes in the end of a line and srcStride >
2*width ( for example to skip the ITU-T-655 horizontal blanking bytes), the
function ff_bfin_uyvytoyv12 doesn't work correctly.
The problem is caused because the pointers to odd or even srcLines are
incremented until position 2*width, and then added to srcStride. They
should be incremented until srcStride and then added to srcStride again.
To fix the problem I've done the annexed patch, where every next line step
adds srcStride + (srcStride - 2*width). I tested the function after the
patch a now it is working correctly.
A similar correction was done to function ff_bfin_yuyvtoyv12 also.
Best regards,
Ronaldo Moura.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: internal_bfin.S.patch
Type: text/x-patch
Size: 4268 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100506/f655d94c/attachment.bin>
More information about the ffmpeg-devel
mailing list