[MPlayer-dev-eng] [PATCH] vf_ass: support uyvy and yuy2 directly
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Thu Aug 30 07:38:42 CEST 2012
On 30 Aug 2012, at 01:45, Xidorn Quan <quanxunzhen at gmail.com> wrote:
> On Thu, Aug 30, 2012 at 12:42 AM, Reimar Döffinger <Reimar.Doeffinger at gmx.de
>> wrote:
>
>> On Wed, Aug 29, 2012 at 10:37:55PM +0800, Xidorn Quan wrote:
>>> Is there any problem still prevents this patch from being applied?
>>
>> My lack of time.
>> But actually I was just about to commit it, but:
>>> for (y = 0; y < y2 - y1; ++y)
>>> for (x = 0; x < mpi->w; ++x)
>>> AV_COPY32(dst + 4 * x, packed_color);
>>
>> This seems wrong to me, shouldn't it be mpi->w/2 ?
>> I made that change locally (so I don't need you to send a new patch),
>> but I want someone to confirm that it isn't just me thinking wrongly.
>>
>
> Another problem here: y is never used so rows other than the first will
> never be fill.
> I fixed it locally:
>
> dst = mpi->planes[0] + y1 * mpi->stride[0];
> for (y = y1; y < y2; ++y, dst += mpi->stride[0])
> for (x = 0; x < mpi->w / 2; ++x)
> AV_COPY32(dst + 4 * x, packed_color);
Ah, that would explain why the missing /2 did not cause any valgrind warnings.
More information about the MPlayer-dev-eng
mailing list