[Ffmpeg-devel] Negative stride in swscaler
Michael Niedermayer
michaelni
Sat Feb 17 14:28:37 CET 2007
Hi
On Sat, Feb 17, 2007 at 01:22:37PM +0100, GizmoSDK wrote:
> Ok. Finally got my ffmpeg email woking again.
>
> There is a bug in the swscaler software when converting from yuv to
> rgb and the line stride is negative.
>
> e.g.
>
> static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[],
> int srcStride[], int srcSliceY,
> int srcSliceH, uint8_t* dst[], int dstStride[]){
> int y, h_size;
>
> if(c->srcFormat == PIX_FMT_YUV422P){
> srcStride[1] *= 2;
> srcStride[2] *= 2;
> }
>
> h_size= (c->dstW+7)&~7;
> if(h_size*2 > dstStride[0]) h_size-=8;
>
> The h_size is always decremented with 8 for negative strides which is
> wrong .
fixed
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070217/0ef67adc/attachment.pgp>
More information about the ffmpeg-devel
mailing list