[MPlayer-dev-eng] [PATCH] altivec unscaled planar YV12 to packed YUY2 conversion.

Nicolas Plourde nicolas.plourde at gmail.com
Sat Jun 25 18:05:11 CEST 2005


On 25-Jun-05, at 11:39 AM, Michael Niedermayer wrote:

> Hi
>
> On Saturday 25 June 2005 16:51, Nicolas Plourde wrote:
>
>> Here is a fix for yv12 to yuy2 altivec conversion. I dont know
>> anything about altivec
>> and csp conversion so I did not try to fix the altivec code. the
>> problem is that the altivec code
>> expect the width to be multiple of 16, when its not the image get
>> distorted so my patch
>> fall back to default converter if its the case.
>>
>> its probably not the best solution but fix the problem until a better
>> fix to the altivec code is
>> submitted.
>>
>
> iam against such workarounds, you shouldnt need to know much about  
> altivec to
> add some c code to handle the last 0-15 pixels

Anyone care to give it a shot? i will probably not fix it.

>> +  if( ((float)width/16) == round(width/16) )
>>
>
> while i dont have a technical argument againt floats in this check  
> it does
> seem a little strange to me. not to mention round() doing nothing  
> at all here
>

humm... you are so right, funny i should definitely re-read my code  
once in a while.
but anyway the result is ok in the end.

====
Nicolas Plourde <nicolas.plourde at gmail.com>






More information about the MPlayer-dev-eng mailing list