I can't understand how TV adaptive comb filters work?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

Post Reply
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

How can an adaptive comb filter tell the difference between black and white vertical stripes at the chroma carrier frequency, and complementary orange and blue horizontal stripes? I want to know how slightly more modern TVs decode an NTSC signal, but this has been boggling my mind for a long time.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: I can't understand how TV adaptive comb filters work?

Post by TmEE »

Adaptive things I have seen are all done in digital domain. ADC, digital processing, DAC.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

That doesn't answer my question.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: I can't understand how TV adaptive comb filters work?

Post by lidnariq »

It kinda does.

"Adaptive comb filter" means it's a digital filter that uses the theoretical decoded YUV values¹ from the pixel, the pixels above and below (i.e. "comb filter") as well as (most likely) the pixels from some number of fields in the future/past.

So how do you tell if something is color or high-frequency luma? Are its temporal and spatial neighbors consistent with color content? If so, it's probably color. If it's a big shimmery rainbow smear? Definitely luma.

Maybe you throw the motion compensating deinterlacer into the same pile of DSP too. If the vibrantly colored thing is moving, you predict that the place where it's moving to should be chroma instead of luma.

¹ maybe they actually can operate just on the un-decoded signal. Not clear, haven't thought about it.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: I can't understand how TV adaptive comb filters work?

Post by tepples »

Even modern TVs can have trouble with fine diagonal stripes on neckties, misdecoding them as rainbows if their angle coincides with the phase of the chroma subcarrier.

In any case, modern NTSC decoding is probably a digital, noncausal, nonlinear elaboration on the 2-line comb filter in full PAL decoding. It involves comparing chroma of this line to the average chroma of previous and next lines and determining based on that how much of this line's chroma to "trust".
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

My guess is that it combs if either the filtered luma and chroma match, or if the filtered luma matches but the chroma is inversed.


Something that I don't understand is when they invented NTSC color in the 1950s why did they design the color carrier with such a big magnitude in the first place?
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

Another possibility is that if it's a 5 line adaptive filter, it can check correlation of each line combination, quantize the results to one bit (lines correlate or not) then send it through some binary logic that will decide which filtering mode.

Vertical lines of luma can be detect if it's alternating between 2 colors at the same luma, for 4 or more lines in a row.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: I can't understand how TV adaptive comb filters work?

Post by TmEE »

A lot of it has to do with requirements for off the air transfers, those signals must travel 100km+ and still be recoverable. If it was meant for cables things would be quite different, many of the limits disappear entirely.

As far these filters go, they're nothing you can represent in a simple formula, they're not linear things, there will be plenty of IFs to alter processing flow to reach output the creator desired. These stages are also usually containing unrelated image enhancement things too. Anything you can come up with is plausible.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

I wish I still had my 2004 CRT so I can study the picture quality to determine what kind of filter it uses. I remember it looking amazing with retro games. I remember rainbow atifacts, but not much dotcrawl other than the pixels having a slight wiggle to them.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: I can't understand how TV adaptive comb filters work?

Post by tepples »

The NTSC Super NES S-PPU in hi-res mode outputs 227.333 chroma subcarrier cycles per scanline and 3 pixels per cycle. This being above the Nyquist rate, it should be possible to make test patterns for the comb filter by using specially constructed hi-res pictures. But I admit this doesn't help tell the difference between behavior for a standard 227.5-cycle scanline and the nonstandard 227.333-cycle scanline of the NES and Super NES.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

It broke so I can't test it.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

TmEE wrote:A lot of it has to do with requirements for off the air transfers, those signals must travel 100km+ and still be recoverable. If it was meant for cables things would be quite different, many of the limits disappear entirely.

As far these filters go, they're nothing you can represent in a simple formula, they're not linear things, there will be plenty of IFs to alter processing flow to reach output the creator desired. These stages are also usually containing unrelated image enhancement things too. Anything you can come up with is plausible.
I've also wondered if it would've worked if they placed the chroma carrier in the vestigial sideband of the luma carrier.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: I can't understand how TV adaptive comb filters work?

Post by psycopathicteen »

https://patents.google.com/patent/US4864389

I found a patent for a comb filter from the 80s by Yves Faroudja. It took a while for me to understand it. The chroma signal gets mixed with which ever line correlates the most. If both or neither lines correlate with the middle line, they get mixed equally.

So in other words, if there is:
cyan-blue
cyan-blue
orange

The middle line will be cyan-blue

If it's:
orange
cyan-blue
orange

The middle line will have black and white stripes.
Post Reply