Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
3rd October 2021, 02:05 | #1 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
converttorgb() versus converttorgb(interlaced=true)
If converttorgb() is applied to an interlaced image, an interesting and very noticeable artifact appears. It looks similar to interlacing, except that the "scanlines" are two pixels thick instead of one.
If converttorgb(interlaced=true) is applied to a progressive image, in the other hand, you probably won't be able to spot the difference without a map and a microscope. Therefore, for content that mixes interlaced with progressive frames, (interlaced=true) is the superior setting to use, and I believe it should be the default setting in future versions of AVIsynth.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
3rd October 2021, 03:54 | #2 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Sorry Katie, but aint no way in hell anybody is gonna screw up one helluva lot of existing scripts just to do that.
Quote:
Also, most people would rather 'get away' from Interlaced stuff, not make it the default.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
3rd October 2021, 06:56 | #3 | Link | |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Quote:
Unfortunately, we cannot wave a magic wand and change history and make all TV from the mid-80s to the mid-2000s progressive. Interlaced nonsense is here to stay.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
|
3rd October 2021, 10:47 | #4 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Here's a function that converts using interlaced=true without the need to change it for an Avisynth filter that's probably had the same default for 20 years.
Code:
function KatieRGB(clip Source) { ConvertToRGB(Source, Interlaced=true) } Code:
function KatieToRGB(clip Source, int "threshold", bool "debug") { debug = default(debug, false) global threshold = default(threshold, 20) Vid1 = ConvertToRGB(Source, interlaced=false) Vid2 = ConvertToRGB(Source, interlaced=true) ConditionalFilter(Source, Vid1, Vid2, "IsCombed(threshold)", "equals", "true", show=debug) } Last edited by hello_hello; 3rd October 2021 at 10:53. |
3rd October 2021, 11:20 | #5 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Interlacing is meant for broadcasting and storage. The proper way to process interlaced content is to deinterlace it first, process the progressive double-rate frames, and possibly interlace them again (if really required) at the very end of the processing.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
3rd October 2021, 11:40 | #6 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
For temporal-spatial filters and if the interlaced format should be kept it may be preferable to separatefields -> even/odd grouping -> filter the even and odd fields -> interleave -> weave. Last edited by Sharc; 3rd October 2021 at 11:54. |
|
3rd October 2021, 11:54 | #7 | Link | |
Registered User
Join Date: Jul 2018
Posts: 1,070
|
Quote:
Also some 4:2:0 interlaced processing may used 'mixed' block types - some blocks are treated as interlaced and some as progressive (to have better vertical colour resolution that degrades to 1/4 instead of 1/2 for progressive 4:2:0). When separate to fields - the 'progressive' blocks lost Nyquist limiting as being point-downsized 1/2 without pre-filtering. And later processing may cause additional distortions. It is better to try both processing ways - with converting to progressive full frame height and with processing separated fields as progressive and pick best output. Changing default interlaced to 'true' will degrade vertical colour resolution if processing progressive scanned frames. And as Avisynth was designed by PC programmers and not old video (moving pictures) engineers - PC (usually static) bitmaps typically progressively scanned so default interlaced was false from the initial Avisynth design I think. Last edited by DTL; 3rd October 2021 at 12:01. |
|
3rd October 2021, 11:59 | #8 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
Edit: Also see this old discussion here: https://forum.doom9.org/showthread.php?t=86394 with the summary in posts #32 and 48 https://forum.doom9.org/showpost.php...8&postcount=48 Last edited by Sharc; 3rd October 2021 at 12:44. |
|
3rd October 2021, 12:11 | #9 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,070
|
Also if set interlaced=true I think Avisynth uses static treatment of all input as separated (in time) fields. It is fail-safe for moving areas but degrades vertical colour resolution on static areas. So better solution is not to use simple built-in conversion functions at all and use motion-adaptive ways. Motion-adaptive processing to and from 4:2:0 may possibly solve the issue with setting interlaced param manually and will save colour resolution where possible better.
I post some example already (though used motion-detector is not perfect and may pass errors). It is also make some effect if source is 4:2:2 or better or the downscaling work performed (like creating interlaced 4:2:0 SD rip from HDTV/UHDTV source). I think in the industry may already exist X:X:X to 4:2:0 interlaced converting hardware with motion-adaptive processing of different areas of the frame. Last edited by DTL; 3rd October 2021 at 12:13. |
4th October 2021, 07:08 | #12 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Code:
Function KB_ConvertToRGB(clip c,string "matrix", bool "interlaced", string "chromaInPlacement", string "chromaResample") { /* KB_ConvertToRGB(clip c,string "matrix"="Rec601", bool "interlaced"=True, string "chromaInPlacement"="MPEG2", string "chromaResample"="bicubic") Same as ConvertToRGB() / ConvertToRGB32() but with interlaced default = True. All other args passed to ConvertToRGB() where it will use builtin avisynth defaults if not provided. Args not provided, will be UnDefined within this function, and just passed on to the builtin ConvertToRGB which will then use its usual defaults. [EDIT: Above line excluding Interlaced, will be True if not provided, can provide as Interlaced=True/False as usual] */ return ConvertToRGB(c, matrix, Default(interlaced,True) , chromaInPlacement, chromaResample) } EDIT: !!!, However, if you're really planning a visit to China, can change function title by removing "KB_", and change internal return ConvertToRGB =====>>> return ConvertToRGB32 And you're all set for the great journey [no crash] EDIT: I dont recommend this for anyone else but Katie, she's special. [***NOTE*** use at your own risk, I wouldn't]
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 4th October 2021 at 08:13. |
|
6th October 2021, 09:08 | #15 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 6th October 2021 at 10:48. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|