digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: What does the DCT filter do? (http://www.digitalfaq.com/archives/avisynth/1766-avisynth-dct-filter.html)

Sergeiv 12-04-2002 07:19 PM

What does the DCT filter do?
 
Hi,
I added to my last AVS script the Tom barry´s DTC filter (yuy2_modified version), sorry for the basic question, but I do not not understang what can this filter improve the final results, what are the main advantage of using it?... It seems as if the filter worked flawlessy 8) in the avisynth version included in the last DVD2SVCD version...
Thanks in advance

snowmoon 12-05-2002 12:00 AM

DCT = Discrete Cosine transformation

This is the same method that MPEG uses to quantizize ( aka sample ) the image as it's encoding. The filter does this transformation and looks to "simplify" the image in the DCT domain insted of the YUV or much less efficient RGB domain. This "simplified" image is then transfered back into the YUV domain for sending to the encoder.

Since the DCT domain is the native domain for MPEG encoding it's much easier to look for and filter things that will be a problem for the encoder.

snowmoon 12-05-2002 12:01 AM

oh. I should say.... That's MY understanding ot MPEG encoding and the DCT filter.

Sergeiv 12-05-2002 05:48 PM

Thx
 
Thx for the explanation, there is any link where can we learn a little more of this filter?

SansGrip 12-05-2002 08:17 PM

Re: Thx
 
Quote:

Originally Posted by Sergeiv
Thx for the explanation, there is any link where can we learn a little more of this filter?

The plugin is Tom's first attempt at filtering in the frequency domain instead of the spatial domain (i.e. it uses a "Discrete Cosine Transform" to convert each frame into frequency information instead of just working with the raw pixel data).

It's more of an experiment into what's possible with this technique than anything yet demonstrably useful. People have reported mixed results with XViD, but its encoding engine is quite a lot more sophisticated than TMPGEnc's, which is why I suggested people here give it a go. Plus I know you all love to play with new toys :D.

The way it works is basically to remove a configurable amount of the high-frequency information from each frame. High-frequency areas include those with a lot of detail and high contrast. Generally it's possible to compress these areas more than those of a low frequency because the eye is more sensitive to lower spatial frequencies than higher.

It's the same technique used in MPEG compression, with some subtle differences that it's not necessary to go into right now. Basically the hope is that it'll improve compression of a movie without much visual impact.

The best way to get a sense of how it works is to play with the settings. You'll find something like:

DctFilter(1, 1, 0, 0, 0, 0, 0, 0)

produces a VERY blocky image because it's removing almost all the high frequency information. Something like:

DctFilter(1, 1, 1, 1, 1, 1, 1, 0)

will look almost identical to the original, but should compress slightly better when you encode it to MPEG-1 or -2.

In other words, it might be worth encoding some test strips with various settings to see if we can increase compressibility without much noticible impact. The TMPGEnc encoder (indeed, the MPEG-1 standard) is fairly rigid, and this filter might offer some extra room to fine-tune the output.


All times are GMT -5. The time now is 07:10 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.