Discussion:
How to improve quality of TV tuner output (eliminate toothed edges)?
(too old to reply)
bogdan
2010-03-20 19:09:47 UTC
Permalink
Hi,

I'm testing analog channels with tv tuners from Hauppauge and AverMedia
using DirectShow on XP and Win7. I'm running into problems with video
quality. The main issue is that moving objects have short diagonal lines
around them. I think that this is called 'toothed edges' (or something like
it).

I get the same results from my app and graphedt.

But when I use Hauppauge and AverMedia applications and tuning to the same
channels then I do not see these artefacts. I also do not see them in MS
MediaCenter on Win7.

Is there a way that I can get rid of the lines in DirectShow?

Thanks,
Bogdan
Alessandro Angeli
2010-03-22 22:41:26 UTC
Permalink
From: "bogdan"
Post by bogdan
Is there a way that I can get rid of the lines in
DirectShow?
What you see is the feathering artifact of interlaced video.
You need to enable deinterlacing in the video renderer (or
sometimes the capture source). If the deinterlacing provided
by the video hardware is unsatisfactory, you may need a
software deinterlacing filter.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
bogdan
2010-03-23 00:11:13 UTC
Permalink
"Alessandro Angeli" <***@nowhere.in.the.net> wrote in message news:uxP%***@TK2MSFTNGP04.phx.gbl...
[...]
What you see is the feathering artifact of interlaced video. You need to
enable deinterlacing in the video renderer (or sometimes the capture
source). If the deinterlacing provided by the video hardware is
unsatisfactory, you may need a software deinterlacing filter.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Alessandro,

Thanks for the reply.

I noticed that the feathering artifact does not occur if I render the video
into a rectangle that is equal to (or 1/2, 1/4, etc. of) the default output
size of the capture filter. For example, the default size on the capture
pin is 720 x 480. If my destination rectangle is set to 720 x 480, 360 x
240, or 180 x 120 then I do not see the artifacts. Any other rectangles
having the same aspect ratio do not seem to work properly.

Is it still possible that the above problem could be caused by the video
renderer not having deinterlacing enabled?

If yes, is enabling done through IVMRDeinteraceControl?

How do I enable deinterlacing on the capture filter?

Do you know of a reliable deinterlacing filter?

I would really appreciate answer(s) to any of the above questions or any
relevant pointers to on-line docs.

Thanks again,
Bogdan
Tim Roberts
2010-03-23 04:00:46 UTC
Permalink
Post by bogdan
I noticed that the feathering artifact does not occur if I render the video
into a rectangle that is equal to (or 1/2, 1/4, etc. of) the default output
size of the capture filter. For example, the default size on the capture
pin is 720 x 480. If my destination rectangle is set to 720 x 480, 360 x
240, or 180 x 120 then I do not see the artifacts.
Right. In that case, the capture driver only delivers one of the two
fields, so no interlacing is needed.
Post by bogdan
Is it still possible that the above problem could be caused by the video
renderer not having deinterlacing enabled?
Absolutely.
Post by bogdan
If yes, is enabling done through IVMRDeinteraceControl?
It's worth trying.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Alessandro Angeli
2010-03-23 18:08:20 UTC
Permalink
From: "bogdan"
Post by bogdan
I noticed that the feathering artifact does not occur if
I render the video into a rectangle that is equal to (or
1/2, 1/4, etc. of) the default output size of the capture
filter. For example, the default size on the capture pin
is 720 x 480. If my destination rectangle is set to 720
x 480, 360 x 240, or 180 x 120 then I do not see the
artifacts. Any other rectangles having the same aspect
ratio do not seem to work properly.
Is it still possible that the above problem could be
caused by the video renderer not having deinterlacing
enabled?
Yes. Interlaced video frames are composed of 2 fields each
containing every other scanline so that each field is a
half-height progressive image. If you resize you video to
half the height or less, only one field is necessary and the
feathering disappears.
Post by bogdan
If yes, is enabling done through IVMRDeinteraceControl?
It depends on the the video renderer you are using:

- old VR: not supported

- OverlayMixer:
IAMOverlayFX::SetOverlayFX(AMOVERFX_DEINTERLACE)

- VMR7: IVMRDeinterlaceControl

- VMR9: IVMRDeinterlaceControl9

- EVR: http://msdn.microsoft.com/en-us/library/bb970394.aspx

For the video to actually be deinterlaced, it must be
flagged as interlaced (that is, the media type must use
FORMAT_VideoInfo2 with the necessary interlacing info).
Post by bogdan
How do I enable deinterlacing on the capture filter?
That depends on the capture filter, it is not a standard
feature.
Post by bogdan
Do you know of a reliable deinterlacing filter?
Software deinterlacing is computanionally very expensive
(sometimes more than compressed video decoding!). I suggest
you try the hardware-accelerated deinterlacing provided by
the video card through the video renderer.

Many video decoders include deinterlacing capabilities, but
the only stand-alone deinterlacing filters I know of are the
ones included in DScaler and ffmpeg and wrapped by ffdshow.
However, they are all GPL'ed.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
bogdan
2010-03-23 22:56:21 UTC
Permalink
"Alessandro Angeli" <***@nowhere.in.the.net> wrote in message news:***@TK2MSFTNGP05.phx.gbl...

[...]
For the video to actually be deinterlaced, it must be flagged as
interlaced (that is, the media type must use FORMAT_VideoInfo2 with the
necessary interlacing info).
After connecting preview/capture pin (using
ICaptureGraphBuilder2::RenderStream()) to VMR7 I checked media type on
VMR7's input pin and found out that it is FORMAT_VideoInfo only.

Does this mean that there is not much I can do because capture filter is not
flagging the video as interlaced?

Thanks again,
Bogdan
Ganesh W
2011-02-28 14:34:11 UTC
Permalink
Hi Bogdan

Have u got the solution for your problem (above Mentioned).
I'm also getting the same problem. I'm using the AverMedia TvTuner. I have used the VMR9 renderer. On VMR9's input pin I'm getting it's format as 'FORMAT_VideoInfo'. When I checked the "videoHeader.InterlaceFlags & AMInterlace.IsInterlaced", it shows video is not interlaced.

I have also used some Software Deinterlaced Filter like AlparySoft, ffdshow, DScaler. But Still the moving parts appears as toothed edged.

Since my video format is FORMAT_VideoInfo I can't use VideoInfoHeader2. Does it required to VideoInfoHeader to VideoInfoHeader2? If yes, How can I do this conversion? Pls, guide me.


Thanks,
Ganesh
Hi,
I am testing analog channels with tv tuners from Hauppauge and AverMedia
using DirectShow on XP and Win7. I am running into problems with video
quality. The main issue is that moving objects have short diagonal lines
around them. I think that this is called 'toothed edges' (or something like
it).
I get the same results from my app and graphedt.
But when I use Hauppauge and AverMedia applications and tuning to the same
channels then I do not see these artefacts. I also do not see them in MS
MediaCenter on Win7.
Is there a way that I can get rid of the lines in DirectShow?
Thanks,
Bogdan
Post by Alessandro Angeli
From: "bogdan"
What you see is the feathering artifact of interlaced video.
You need to enable deinterlacing in the video renderer (or
sometimes the capture source). If the deinterlacing provided
by the video hardware is unsatisfactory, you may need a
software deinterlacing filter.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Post by bogdan
[...]
Alessandro,
Thanks for the reply.
I noticed that the feathering artifact does not occur if I render the video
into a rectangle that is equal to (or 1/2, 1/4, etc. of) the default output
size of the capture filter. For example, the default size on the capture
pin is 720 x 480. If my destination rectangle is set to 720 x 480, 360 x
240, or 180 x 120 then I do not see the artifacts. Any other rectangles
having the same aspect ratio do not seem to work properly.
Is it still possible that the above problem could be caused by the video
renderer not having deinterlacing enabled?
If yes, is enabling done through IVMRDeinteraceControl?
How do I enable deinterlacing on the capture filter?
Do you know of a reliable deinterlacing filter?
I would really appreciate answer(s) to any of the above questions or any
relevant pointers to on-line docs.
Thanks again,
Bogdan
Post by Tim Roberts
Right. In that case, the capture driver only delivers one of the two
fields, so no interlacing is needed.
Absolutely.
it is worth trying.
--
Providenza & Boekelheide, Inc.
Post by Alessandro Angeli
From: "bogdan"
Yes. Interlaced video frames are composed of 2 fields each
containing every other scanline so that each field is a
half-height progressive image. If you resize you video to
half the height or less, only one field is necessary and the
feathering disappears.
- old VR: not supported
IAMOverlayFX::SetOverlayFX(AMOVERFX_DEINTERLACE)
- VMR7: IVMRDeinterlaceControl
- VMR9: IVMRDeinterlaceControl9
- EVR: http://msdn.microsoft.com/en-us/library/bb970394.aspx
For the video to actually be deinterlaced, it must be
flagged as interlaced (that is, the media type must use
FORMAT_VideoInfo2 with the necessary interlacing info).
That depends on the capture filter, it is not a standard
feature.
Software deinterlacing is computanionally very expensive
(sometimes more than compressed video decoding!). I suggest
you try the hardware-accelerated deinterlacing provided by
the video card through the video renderer.
Many video decoders include deinterlacing capabilities, but
the only stand-alone deinterlacing filters I know of are the
ones included in DScaler and ffmpeg and wrapped by ffdshow.
However, they are all GPL'ed.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Post by bogdan
[...]
After connecting preview/capture pin (using
ICaptureGraphBuilder2::RenderStream()) to VMR7 I checked media type on
VMR7's input pin and found out that it is FORMAT_VideoInfo only.
Does this mean that there is not much I can do because capture filter is not
flagging the video as interlaced?
Thanks again,
Bogdan
Submitted via EggHeadCafe
SharePoint Get Attachment with Attachment Icon Using Javascript
http://www.eggheadcafe.com/tutorials/aspnet/84606954-21c2-4038-a9ed-bcbd525f978e/sharepoint-get-attachment-with-attachment-icon-using-javascript.aspx
Loading...