Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Directshow rotation filter, please help

474 views
Skip to first unread message

Hesham Desouky

unread,
Sep 26, 2005, 6:49:02 PM9/26/05
to
Is there a directshow filter to rotate video stream right,left and flip
vertically and horizontally?
Did the VMR renderer can support these operations?

I need to do this for live video stream and saved video streams

please help

Hesham Desouky

unread,
Sep 26, 2005, 7:36:50 PM9/26/05
to
diehard2 wrote:
> Hi,
>
> I believe you can flip the video by changing the biheight value of the
> sample (did this accidentally once). I don't think you can do rotation with
> the VMR9 however.
>
> ~Steve
Do you have any idea to write a custom filter for this? Performance is a
key issue

thanks

Hesham

enze

unread,
Sep 27, 2005, 1:45:55 PM9/27/05
to
Hi,
see www.montivision.com,

regards, enze - www.mpegcode.com

"Hesham Desouky" <hesham@home> schrieb im Newsbeitrag
news:%23Dq7Byu...@TK2MSFTNGP09.phx.gbl...

Hesham Desouky

unread,
Sep 28, 2005, 3:39:41 PM9/28/05
to
Jeremy Noring wrote:

> "enze" wrote:
>
>> Hi,
>> see www.montivision.com,
>>
>> regards, enze - www.mpegcode.com
>
> Either that, or write your own transform filter that flips the image for
> you. Writing an algorithm to flip an image horizontally and vertically
> wouldn't be difficult, especially for composite YUV and RGB types.
> Effectively, you'd just be rewriting pixel values from the end to the
> beginning (backwards) into a new buffer if you wanted both a H/V flip.
> Planar formats would be slightly more difficult, but only because you'd run
> the same algorithm against three buffer arrays instead of one.
>
> If speed is an absolute must, use the Intel IPP--you can do all sorts of
> image manipulation, all of which has been heavily optimized to the user's
> processor.
>

I already written the transform filter, it uses two for loops to move
the pixels around and it works fine.

You mentioned the use of Intel IPP, is this easy to use or needs a lot
of work to get familiar with?

Regards

Hesham

Jeremy Noring

unread,
Sep 29, 2005, 12:11:06 PM9/29/05
to
"Hesham Desouky" wrote:

I'd say it takes a good week or two to become familiar with the image
manipulation capabilities of the IPP--definitely get the book to go along
with it. It has lots of sample code and some helpful classes to use.

That being said, if your filter has the performance and features you need, I
wouldn't bother.

--
My Site (under construction): http://deepsea.no-ip.com/AV/

Thore Karlsen [MVP DX]

unread,
Oct 2, 2005, 10:29:11 PM10/2/05
to
On Wed, 28 Sep 2005 21:39:41 +0200, Hesham Desouky <hesham@home> wrote:

>> Either that, or write your own transform filter that flips the image for
>> you. Writing an algorithm to flip an image horizontally and vertically
>> wouldn't be difficult, especially for composite YUV and RGB types.
>> Effectively, you'd just be rewriting pixel values from the end to the
>> beginning (backwards) into a new buffer if you wanted both a H/V flip.
>> Planar formats would be slightly more difficult, but only because you'd run
>> the same algorithm against three buffer arrays instead of one.
>>
>> If speed is an absolute must, use the Intel IPP--you can do all sorts of
>> image manipulation, all of which has been heavily optimized to the user's
>> processor.

>I already written the transform filter, it uses two for loops to move
>the pixels around and it works fine.
>
>You mentioned the use of Intel IPP, is this easy to use or needs a lot
>of work to get familiar with?

It's not terribly hard to use, but it can be a little painful to set up
your project to use it initially. It can also be hard sometimes to
figure out how to do exactly what you need to do with the functions
available, since there may be more than one step involved.

I recommend it if you need high performance, but if your filter already
works fine I wouldn't bother.

--
New to newsgroups? Read: http://dev.6581.com/newsgroups.html

RyanRounkles

unread,
Nov 11, 2005, 2:32:05 AM11/11/05
to

"Hesham Desouky" wrote:

Hello, I am working on a similar project (attempting to rotate a video
stream), and have not had success. Would you share any info on how you
accomplished this?

Thanks

Hesham Desouky

unread,
Nov 11, 2005, 8:49:07 AM11/11/05
to
Hello
Well, I done my own Rotation Filter using the DirectShow TrasnformFilter
I used the DirectShow walk-thorugh in the DirectX 9.0 SDK help files.

This filter supports the 90 Degrees Right and left + Vertical and
Horizontation Flipping.
Also I supported property pages and added a mode to enable the filter to
work in performance mode to perform the rotation on a scaled down video
size.

I am preparing a Code Project article to submit this filter into it

Look at the code project at the next week to see the submission.

Regards

Hesham

Marc

unread,
Nov 14, 2005, 2:28:45 AM11/14/05
to
What FourCC did you use? If you use RGB, Decode or Render will need an
additional color conversion, it also can slow down you performance. I
think YV12 is a better for you transform filter.

Hesham Desouky

unread,
Nov 14, 2005, 3:57:48 PM11/14/05
to
actually, yes I am using RGB24 format.

I tried to use YUV format, but I am not familiar with it.

Your help to use the appropriate format will be so much appreciated.

Hesham

0 new messages