[FFmpeg-devel] [PATCH 6/6] Add rotate90 filter.
Baptiste Coudurier
baptiste.coudurier
Wed Nov 24 00:18:14 CET 2010
On 11/23/2010 12:29 PM, Stefano Sabatini wrote:
> On date Sunday 2010-10-17 13:23:25 +0200, Stefano Sabatini encoded:
>> On date Sunday 2010-10-17 11:05:34 +0200, Michael Niedermayer encoded:
>>> On Fri, Oct 15, 2010 at 01:13:59AM +0200, Stefano Sabatini wrote:
>> [...]
>>>> + for (y = 0; y< outh; y++) {
>>>> + for (x = 0; x< outw; x++) {
>>>> + int32_t v;
>>>> + int x1 = outw -1 -x;
>>>> + int y1 = outh -1 -y;
>>>> +
>>>> + switch (pixstep) {
>>>> + case 1:
>>>> + *(out + x) = *(in + y1*inlinesize + x1);
>>>> + break;
>>>> + case 2:
>>>> + *((uint16_t *)(out + 2*x)) = *((uint16_t *)(in + y1*inlinesize + x1*2));
>>>> + break;
>>>> + case 3:
>>>> + v = AV_RB24(in + y1*inlinesize + x1*3);
>>>> + AV_WB24(out + 3*x, v);
>>>> + break;
>>>> + case 4:
>>>> + *((uint32_t *)(out + 4*x)) = *((uint32_t *)(in + y1*inlinesize + x1*4));
>>>> + break;
>>>> + }
>>>> + }
>>>
>>> please put the for loop inside the switch
>>
>> Updated.
>
> Updated again, avoids unnecessary loops when angle is 0.
What's wrong with the rotate filter ?
This filter looks useless to me.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list