VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. Hi everyone,

    I'm using a Canon Legria HFG25, which records interlaced video with some halo effects.

    I've been processing this footage with AviSynth using QTGMC and dehaloing.

    I converted the material to 10-bit, but now I want to archive it in 8-bit at 15 Mb/s.

    Question: Can I achieve this directly in one process, converting straight to 8-bit at 15 Mb/s, without first going through the 10-bit step? I'm concerned about quality - will it be preserved?

    Thanks for any advice!
    Quote Quote  
  2. Curious: Up to now, I have not seen one example that shows that using QTGMC in 10bit would show any better quality than sticking with 8bit (unless the source already was 10bit and the loss you see is through converting to 8bit), so I wonder where does the idea come from that it would be better to convert 8it to 10bit before feeding it to QTGMC?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Originally Posted by Selur View Post
    Curious: Up to now, I have not seen one example that shows that using QTGMC in 10bit would show any better quality than sticking with 8bit (unless the source already was 10bit and the loss you see is through converting to 8bit), so I wonder where does the idea come from that it would be better to convert 8it to 10bit before feeding it to QTGMC?
    The idea of processing 8-bit sources in 10-bit with QTGMC comes from the general principle that higher bit depths can reduce rounding errors in complex operations. This approach was suggested by GPT, mentioning "bound headroom" as a potential benefit. But yes, concrete evidence of improvement is lacking.
    Quote Quote  
  4. Ah, okay. I would have been surprised to see any (even synthetic) example where this would help with QTGMC.
    => in my option: I see no reason to up convert to 10bit (or even 16bit or 32bit) before deinterlacing with QTGMC.
    So I doubt that you will lose anything when deinterlacing 8bit content in 8bit QTGMC.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Selur View Post
    Curious: Up to now, I have not seen one example that shows that using QTGMC in 10bit would show any better quality than sticking with 8bit
    Yes, converting to 10 bits improves quality (in fact, you shouldn't go below 16 bits). This is especially noticeable if you use other filters (and that's what QTGMC does). I once even posted an example of how well it reduces banding (of course due to the lack of rounding when moving from filter to filter).
    Quote Quote  
  6. Using 10/16bit helps with:
    a. debanding and similar (from what I see in QTGMC none of the filters used there would gain from upsampling to 10bit before processing)
    b. compression
    no question about that. But, have not seen that it helps at all with QTGMCs processing.
    => if you can show that is does, please do
    (so please show that 8bit->10/16bit->QTGMC is better than 8bit->QTGMC->10/16bit, if you can, which I doubt, since like I wrote: I do not think any of the filters/methods in QTGMC will improve when fed upsampled 8bit (=10/16bit) instead of the original 8bit content)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by taigi View Post
    Hi everyone,

    I'm using a Canon Legria HFG25, which records interlaced video with some halo effects.

    I've been processing this footage with AviSynth using QTGMC and dehaloing.

    I converted the material to 10-bit, but now I want to archive it in 8-bit at 15 Mb/s.

    Question: Can I achieve this directly in one process, converting straight to 8-bit at 15 Mb/s, without first going through the 10-bit step? I'm concerned about quality - will it be preserved?

    Thanks for any advice!
    You can put ConvertBits(8, dither=-1) at the end of the script - that's probably the best way to convert to 8 bits. A codec won't do it any better.
    Quote Quote  
  8. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    The second screenshot also shows how QTGMC at 8 bits is more likely to go beyond the 16-235 range.
    Image Attached Thumbnails Click image for larger version

Name:	diff1.png
Views:	21
Size:	710.2 KB
ID:	83059  

    Click image for larger version

Name:	diff2.png
Views:	23
Size:	1.40 MB
ID:	83060  

    Quote Quote  
  9. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    xx
    Quote Quote  
  10. Without knowing what scripts created those screenshots, they do not really say much.
    Both images in your second screenshots violate 16-235,...
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. In your second example it's the white text which exceeds 235. It should theoretically be at 255 exact (sRGB 255,255,255) in 8 bit realm or YCbCr(255,128,128) in YUV for sRGB matrix.
    Quote Quote  
  12. You can put ConvertBits(8, dither=-1) at the end of the script - that's probably the best way to convert to 8 bits
    Unless any dithering was added beforehand, this will add banding to banding prone areas,....
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  13. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Selur View Post
    Without knowing what scripts created those screenshots, they do not really say much.
    Both images in your second screenshots violate 16-235,...
    Sample examples from the net. You can make your own, the effect should be similar.
    In the second example both exceed, but with 8 bits even more.
    Quote Quote  
  14. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Sharc View Post
    In your second example it's the white text which exceeds 235. It should theoretically be at 255 exact (sRGB 255,255,255) in 8 bit realm or YCbCr(255,128,128) in YUV for sRGB matrix.
    I meant rather the range 0-16. After zooming in you can see that at 8 bits the overshoot is stronger.
    Quote Quote  
  15. Sample examples from the net.
    Link?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  16. That file is progressive,... why would you apply QTGMC to that?
    Given an 8bit source, the question was, whether there is a difference in quality comparing:
    Code:
    ConvertBits(16, dither=-1).QTGMC().ConvertBits(8, dither=-1)
    vs.
    Code:
    QTGMC()
    or
    Code:
    ConvertBits(16, dither=-1).QTGMC().ConvertBits(10)
    vs.
    Code:
    QTGMC().ConvertBits(10)
    and as such, is there a scenario where it makes sense to convert to a higher bit depth before applying QTGMC?

    A progressive source does not make sense to test deinterlacing with QTGMC,....
    And since you didn't care to post what did to the file, your screenshots do not really say much.

    Cu Selur
    Last edited by Selur; 25th Oct 2024 at 09:03.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  17. I was hoping more for something like:

    8bit Output:
    Code:
    ClearAutoloadDirs()
    SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\DGDecode.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\nnedi3.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mvtools2.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\masktools2.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\RgTools.dll")
    Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
    Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi")
    Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi")
    # loading source: G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\bff.m2v
    # color sampling YV12@8, matrix: bt601, scantyp: bottom field first, luminance scale: limited
    Source = MPEG2Source(d2v="J:\tmp\m2v_478bc6d007ec94bfc67367d30d9093a4_853323747.d2v",fieldop=0)
    # current resolution: 720x480
    # deinterlacing
    Source = Source.AssumeBFF()
    
    Source8bitFiltered = Source.QTGMC(PrevGlobals="Replace")
    Source16bitFiltered = Source.ConvertBits(bits=16).QTGMC(PrevGlobals="Replace").ConvertBits(bits=8)
    
    Source8bitFiltered = Source8bitFiltered.Histogram("classic")
    Source16bitFiltered = Source16bitFiltered.Histogram("classic")
    sub =Source16bitFiltered.subtract(Source8bitFiltered)
    substrong = sub.levels(122,1,132,0,255)
    
    StackVertical(Source8bitFiltered.Subtitle("8Bit"), Source16bitFiltered.Subtitle("16bit"), substrong.Subtitle("Diff"))
    ConvertToRGB32(matrix="Rec601")
    AssumeFPS(30000,1001)
    PreFetch(16)
    #  output: color sampling RGB32@8, matrix: bt601, scantyp: progressive, luminance scale: limited
    return last.BicubicResize(Ceil(last.Width*0.888889) - (Ceil(last.Width*0.888889) % 2), last.Height)


    16bit Output:
    Code:
    ClearAutoloadDirs()
    SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\DGDecode.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\nnedi3.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mvtools2.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\masktools2.dll")
    LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\RgTools.dll")
    Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
    Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi")
    Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi")
    # loading source: G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\bff.m2v
    # color sampling YV12@8, matrix: bt601, scantyp: bottom field first, luminance scale: limited
    Source = MPEG2Source(d2v="J:\tmp\m2v_478bc6d007ec94bfc67367d30d9093a4_853323747.d2v",fieldop=0)
    # current resolution: 720x480
    # deinterlacing
    Source = Source.AssumeBFF()
    
    Source8bitFiltered = Source.QTGMC(PrevGlobals="Replace").ConvertBits(bits=16)
    Source16bitFiltered = Source.ConvertBits(bits=16).QTGMC(PrevGlobals="Replace")
    
    Source8bitFiltered = Source8bitFiltered.Histogram("classic")
    Source16bitFiltered = Source16bitFiltered.Histogram("classic")
    sub =Source16bitFiltered.subtract(Source8bitFiltered)
    substrong = sub.Levels(31354, 1, 33924, 0, 65535)
    
    StackVertical(Source8bitFiltered.Subtitle("8Bit"), Source16bitFiltered.Subtitle("16bit"), substrong.Subtitle("Diff"))
    ConvertToRGB32(matrix="Rec601")
    AssumeFPS(30000,1001)
    PreFetch(16)
    #  output: color sampling RGB32@8, matrix: bt601, scantyp: progressive, luminance scale: limited
    return last.BicubicResize(Ceil(last.Width*0.888889) - (Ceil(last.Width*0.888889) % 2), last.Height)



    At least to me, the 16bit-filtering process for QTGMC doesn't seem to produce better quality to me.
    Attached the original source so, others can reproduce the results.
    If you think otherwise, please prove it through a script that allows others to reproduce it. Thanks!

    Cu Selur
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  18. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Selur View Post
    That file is progressive,... why would you apply QTGMC to that?
    My mistake. But what does it matter how it was labeled if every frame will be the same anyway?

    When marked as interlace:
    Image Attached Thumbnails Click image for larger version

Name:	test8-10bit.png
Views:	16
Size:	745.6 KB
ID:	83099  

    Click image for larger version

Name:	test8-10bit-2.png
Views:	12
Size:	1.18 MB
ID:	83100  

    Quote Quote  
  19. No script, nothing to reproduce,... you didn't read what I wrote,..
    => I give up on this thread, I wrote my piece and leave in peace.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  20. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    You just don't accept that 10, 16, or 32-bit processing is more accurate.

    https://files.fm/u/zz7cys82h6
    Quote Quote  
  21. I never questioned that higher bit processing can be more accurate, I questioned that it makes any sense for QTGMC, which you seemingly ignored all the time.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  22. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Selur View Post
    I never questioned that higher bit processing can be more accurate, I questioned that it makes any sense for QTGMC, which you seemingly ignored all the time.
    And that depends on whether the QTGMC errors I showed are acceptable or not. If they are not acceptable, then of course it is worth using greater depth, which even GPT chat knows.
    Quote Quote  
  23. You did not show anything with QTGMC,...
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  24. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    You just didn't notice post #19.
    Quote Quote  
  25. No, like I wrote: No script, nothing to reproduce => does not say anything
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  26. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Use your own advanced QTGMC settings, it's easy.
    Quote Quote  
  27. I did in #18 and I did not encounter what you highlighted.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  28. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Selur View Post
    I did in #18 and I did not encounter what you highlighted.
    Because you are using a script that only uses a fraction of QTGMC.

    Code:
    a=ffms2("Title_1.mpg")
    a=AddGrainC(a,var=10.0, uvar=1.0, hcorr=0.0, vcorr=0.0, seed=-1, constant=false, sse2=true)
    b=a
    a=a.convertbits(16).converttoyuv444
    #return a
    
    a=QTGMC(a,preset="slower",noiseprocess=1,noisepreset="slower",
    	\ blocksize=12,search=3,searchparam=1,subpel=4,matchenhance=1,Rep0=4,Rep2=4,stabilizenoise=true,sourcematch=2,
    	\ TR0=2,TR1=2,TR2=3,chromanoise=true,noiserestore=0,grainrestore=0,sigma=4,sharpness=1,showsettings=false)
    
    b=QTGMC(b,preset="slower",noiseprocess=1,noisepreset="slower",
    	\ blocksize=12,search=3,searchparam=1,subpel=4,matchenhance=1,Rep0=4,Rep2=4,stabilizenoise=true,sourcematch=2,
    	\ TR0=2,TR1=2,TR2=3,chromanoise=true,noiserestore=0,grainrestore=0,sigma=4,sharpness=1,showsettings=false)
    
    a=a.convertbits(8).converttoyuv444
    stackvertical(a.histogram,b.histogram.converttoyuv444)
    Quote Quote  
  29. This just throws up more general, not QTGMC related questions. *gig*
    Why the AddGrainC?
    Why ConvertToYUV444? Why for 'a' before and after QTGMC, but for 'b' you only convert to 444 after applying histogram.

    Because you are using a script that only uses a fraction of QTGMC.
    Okay, so your statement is only true for specific settings? Maybe it's just one filter that benefits from 16 bit (or the YUV444 conversion). Do you know which parameter in QTGMC is causing the differences.

    If it can be clearly shown, that QTGMC benefits from using 16bit and/or 444, maybe an option for this could be added to QTGMC.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!