This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[GUIDE] Colour Change with Hybrid & QTGMC Deinterlacing
#1
I have a ProRes 422 HQ file which was imported and digitised from a PAL Standard Definition S-VHS-C tape.  I used DaVinci Resolve to edit and colour grade it in its interlaced form.  I rendered it and MediaInfo says that it has Colour space YUV, Chroma Subsampling 4:2:2, interlaced top field first, Colour primaries BT.709, Matrix Coefficients BT.601, and Gamma 2.4.

I deinterlaced the file using the Hybrid defaults with the following adjustments: 

Sound Passthrough All
Base video: ProRes, Video Container MOV
Profile: ProRes 422 HQ
Crop/resize: PAR 59 x 54
Filtering Deinterlace: QTGMC, Preset Placebo, and Bob ticked. 

The delinterlacing has worked well, perhaps a little bit too smooth but otherwise excellent.

The only problem is that the colours are not quite the same as the colour grading.  The saturation seems to be slightly less, the reds are slightly muted and some shots seem to be slightly green.  I have tried playing around with Colour Matrix settings in both the QTGMC and FFMPEG by varying the from and to colour spaces between Rec.601 and Rec.709, but this does not seem to affect the result. I wonder whether the noise reduction may have suppressed some chrome noise that affected the apparent colour?

Do you have any suggestions on how I could make the colours identical between the input and output files please?

Thanks, GrahamPlease, read the 'Infos needed to fix&reproduce bugs,..'-sticky before you post about a problem.
Reply
#2
Quote:The delinterlacing has worked well, perhaps a little bit too smooth but otherwise excellent.
Adjusting settings like 'Lossless', 'SourceMatch' and a few other parameters that could be set throught he 'Addition' line edit, could be used to help with that. (QTGMC has tons of parameters Hybrid doesn't offer in the GUI,..
QTGMC(Input, Preset='Slower', TR0=None, TR1=None, TR2=None, Rep0=None, Rep1=0, Rep2=None, EdiMode=None, RepChroma=True, NNSize=None, NNeurons=None, EdiQual=1, EdiMaxD=None, ChromaEdi='', EdiExt=None, Sharpness=None, SMode=None, SLMode=None, SLRad=None, SOvs=0, SVThin=0.0, Sbb=None, SrchClipPP=None, SubPel=None, SubPelInterp=2, BlockSize=None, Overlap=None, Search=None, SearchParam=None, PelSearch=None, ChromaMotion=None, TrueMotion=False, Lambda=None, LSAD=None, PNew=None, PLevel=None, GlobalMotion=True, DCT=0, ThSAD1=640, ThSAD2=256, ThSCD1=180, ThSCD2=98, SourceMatch=0, MatchPreset=None, MatchEdi=None, MatchPreset2=None, MatchEdi2=None, MatchTR2=1, MatchEnhance=0.5, Lossless=0, NoiseProcess=None, EZDenoise=None, EZKeepGrain=None, NoisePreset='Fast', Denoiser=None, FftThreads=1, DenoiseMC=None, NoiseTR=None, Sigma=None, ChromaNoise=False, ShowNoise=0.0, GrainRestore=None, NoiseRestore=None, NoiseDeint=None, StabilizeNoise=None, InputType=0, ProgSADMask=None, FPSDivisor=1, ShutterBlur=0, ShutterAngleSrc=180, ShutterAngleOut=180, SBlurLimit=4, Border=False, Precise=None, Tuning='None', ShowSettings=False, ForceTR=0, TFF=None, pscrn=None, int16_prescreener=None, int16_predictor=None, exp=None, alpha=None, beta=None, gamma=None, nrad=None, vcheck=None, opencl=False, device=None)
source: https://github.com/Selur/VapoursynthScri...nc.py#L892

Quote:The only problem is that the colours are not quite the same as the colour grading.
Too vague to know what could be happening,...

Quote:I have tried playing around with Colour Matrix settings in both the QTGMC and FFMPEG by varying the from and to colour spaces between Rec.601 and Rec.709, but this does not seem to affect the result.
No clue what you are doing, first time I hear about QTGMC having a color matrix settings,....
Since there should be RGB<>YUV-conversion when applying QTGMC to YUV and saving it as YUV content sticking with the original color signaling data should be fine.

Quote:I wonder whether the noise reduction may have suppressed some chrome noise that affected the apparent colour?
I doubt it, but sure everything is possible.

Quote: The saturation seems to be slightly less, the reds are slightly muted and some shots seem to be slightly green.
Maybe some tv (15-235) vs. pc (0-255) scale luma issue?

Quote:Do you have any suggestions on how I could make the colours identical between the input and output files please?
No, maybe some users which use ProRes can suggest something, but for me it's all to vague.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#3
Thanks for your helpful suggestion on the interlacing parameters.  I'm not sure if I can work out how to adjust all that detail, but I will have a look.  Otherwise, I may just try using Slower, rather than Placebo, as I think that may retain a bit more detail, at the expense of a few more artefacts.

I saved a screen shot in the attachment section      , so this may help you to understand what I mean.  The image on the left is before interlacing and the image on the right is after.

I could also provide the source and target files (6 seconds each) and debug file, if that would be useful.

Thanks, Graham
Reply
#4
If you share a sample of the source (don't need target) and a debug output I can look at it.
No clue what's causing this shift in colors, also the colors on the left side already seem wrong. (In general I would recommand to color grade after deinterlacing, cleaning, etc.)

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#5
I have just sent you the source and debug files, as requested.

For comparison, I also tried rendering the deinterlaced output to a file encoded with X.264, but I got the same colours as with ProRes 422 HQ output.

I decided to do all the editing first, so that my deinterlaced file would be smaller.  However, if the deinterlaced and cleaned up file has different colours, then I completely agree that colour grading must come after those two steps.  I guess I have just learnt that the hard way!

Thanks for your help, Graham
Reply
#6
To figure out whether this is caused by the deinterlacing I did the following:
  • open two instances of Hybrid
  • open the source file in both
  • in one I overwrote the scanorder to progressive (so that Hybrid would not deinterlace)
  • enabled histograms
  • opened the Vapoursynth Preview in both instances
This way I get one version where interlacing is applied and one where it isn't.
[Image: org-deinterlaced.png]
I also looked at the separate YUV channel.
Org:
[Image: Org.png]
Deinterlaced:
[Image: deinter.png]
yes there are differences in the u&v due to the filtering, but nothing dramatic.

Then I enabled bob and looked at the histograms and you see rather strong changes in the chroma planes.
If you got through the source and look at the bobbed frames you see that the first few fields after the first scene change are broken. (you can also see this when overwriting the scanorder to progressive)

But still I could not reproduce the color change.
I also did a reencode of the file and asside from smoothing through the compression I couldn't reproduce the color changes.

[Image: 29.png][Image: 30.png][Image: 31.png][Image: 32.png][Image: 33.png][Image: temp-Preview-Vapoursynth-File18-53-19-989-vpy-34.png]

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#7
Selur,

Thanks for sending me your helpful analysis.  Sometimes, when the camcorder starts up, there are a few damaged frames.  I agree that I should have edited them out.  

I am not sure how to interpret your findings.  Are saying that the colour change is caused by damage to some of the fields at the start of the clip?  I notice that the Bob deinterlaced output seems to have the same colour throughout the clip, so it does not correct itself after the damaged frames.  

Looking at the previous clip, the black lettering on the van is darker on the source than on the deinterlaced output.  Also the £8 is written in a deeper red.

Is there any way to change the Hybrid parameters to get round this problem?

Thanks, Graham
Reply
#8
No, I do not think that the color issue is caused by the broken fields.

I have no clue what to change, since I can not reproduce the issue. For me the colors do not change.
Looking at the histogram one can see that the luma range is limited range (16-235).
What did you use to compare the colors?

Do the colors differ if you open Hybrid two times and look at the reencode and the original (overwrite scantype to progressive) in Vapoursynth Preview windows?
(atm. my guess is that whatever you used to compare the colors is doing something wrong. On Windows I would guess this might be an overlay issue,..)

Cu Selur

Ps.: The Vapoursynth Preview also has a color picker, to see rgb colors,..
--- mainly offline 20.-26 of May ---
Reply
#9
Color and Gamma in video is a common historical problem. It depends a lot of codec/container/resolution/metadata and of video player/system color management. Some video players can read metadata, some don't. Some video players use color management, some don't. Some players may apply some color matrix correction based on HD/SD resolution, some don't. Legacy QuickTime player read ProRes colors and gamma in one way, modern QuickTime player read in different way. In short - it current reality it is impossible to match exact same look of same video file between all existing software and hardware devices.
So to understand your problem you need to provide more details about what video player and what OS you use to compare.
You may see some examples and partial explanation of this problem in this epic thread https://forum.blackmagicdesign.com/viewt...p?t=101253

You may also check some specific info about video capture and Hybrid setup in this thread https://forum.blackmagicdesign.com/viewt...3&t=109259

In your specific before/after example it looks like incorrect pc/tv levels, or could be due color managed videoplayer in macOS which read some gamma metadata in deinterlaced video and so makes video look too light.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)